e70152e44cc66cc599ff6b699eb8adc07f3e656a kent Sat May 24 21:09:34 2014 -0700 Adding Copyright NNNN Regents of the University of California to all files I believe with reasonable certainty were developed under UCSC employ or as part of Genome Browser copyright assignment. diff --git src/utils/minEachRow/minEachRow.c src/utils/minEachRow/minEachRow.c index 3541608..723f1ff 100644 --- src/utils/minEachRow/minEachRow.c +++ src/utils/minEachRow/minEachRow.c @@ -1,68 +1,71 @@ /* minEachRow - Output numeric value for each row. */ + +/* Copyright (C) 2011 The Regents of the University of California + * See README in this or parent directory for licensing information. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" void usage() /* Explain usage and exit. */ { errAbort( "minEachRow - Output numeric value for each row\n" "usage:\n" " minEachRow input output\n" "options:\n" " -xxx=XXX\n" ); } static struct optionSpec options[] = { {NULL, 0}, }; void minEachRow(char *inName, char *outName) /* minEachRow - Output numeric value for each row. */ { struct lineFile *lf = lineFileOpen(inName, TRUE); FILE *f = mustOpen(outName, "w"); char *line; if (lineFileNextReal(lf, &line)) { int rowSize = chopByWhite(line, NULL, 0); char **row; AllocArray(row, rowSize+1); for (;;) { int thisSize = chopByWhite(line, row, rowSize+1); int i; double minVal; if (thisSize != rowSize) errAbort("First line has %d words, but line %d has %d words", rowSize, lf->lineIx, thisSize); minVal = atof(row[0]); for (i=1; i