/* aveCols - Add together columns. */ #include "common.h" #include "linefile.h" void usage() /* Explain usage and exit. */ { errAbort( "aveCols - average together columns\n" "usage:\n" " aveCols file\n" "File may be stdin."); } void aveCols(char *fileName) /* aveCols - Add together columns. */ { struct lineFile *lf; char *words[16]; int wordCount; double totals[16]; int maxCount = 0; int i; int lineCount = 0; if (sameString(fileName, "stdin")) lf = lineFileStdin(TRUE); else lf = lineFileOpen(fileName, TRUE); for (i=0; i