901666d674b8e7147670eb2fd3f9e80f0c1d2fbd kent Thu Dec 31 14:59:45 2020 -0800 Removed dependency on having less than 16k words/line. diff --git src/utils/wordLine/wordLine.c src/utils/wordLine/wordLine.c index 43fd015..5c05767 100644 --- src/utils/wordLine/wordLine.c +++ src/utils/wordLine/wordLine.c @@ -18,41 +18,37 @@ "wordLine - chop up words by white space and output them with one\n" "word to each line.\n" "usage:\n" " wordLine inFile(s)\n" "Output will go to stdout." "Options:\n" " -csym - Break up words based on C symbol rules rather than white space\n" ); } void wordLine(char *file) /* wordLine - chop up words by white space and output them with one * word to each line. */ { struct lineFile *lf = lineFileOpen(file, TRUE); -int lineSize, wordCount; -static char *line, *words[1024*16]; -int i; + char *line; -while (lineFileNext(lf, &line, &lineSize)) - { - wordCount = chopLine(line, words); - for (i=0; ileaveQuotes = TRUE; tok->uncommentC = TRUE; tok->uncommentShell = TRUE; while ((s = tokenizerNext(tok)) != NULL) puts(s);