fc3d3cbf826851710075abad58ed7277d0c250f7 kent Mon Apr 24 16:51:39 2017 -0700 Cleaning up newlines in text strings and comments and adding to build. diff --git src/index/trixContextIndex/trixContextIndex.c src/index/trixContextIndex/trixContextIndex.c index 04e1e99..a3037ff 100644 --- src/index/trixContextIndex/trixContextIndex.c +++ src/index/trixContextIndex/trixContextIndex.c @@ -1,50 +1,53 @@ -/* trixContextIndex - Index in.txt file used with ixIxx to produce a two column file with symbol name and file offset for that line.. */ +/* trixContextIndex - Index in.txt file used with ixIxx to produce a two column file with symbol name + * and file offset for that line.. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "options.h" void usage() /* Explain usage and exit. */ { errAbort( - "trixContextIndex - Index in.txt file used with ixIxx to produce a two column file with symbol name and file offset for that line.\n" + "trixContextIndex - Index in.txt file used with ixIxx to produce a two column file with symbol\n" + "name and file offset for that line.\n" "usage:\n" " trixContextIndex in.txt out.tab\n" "options:\n" " -xxx=XXX\n" ); } /* Command line validation table. */ static struct optionSpec options[] = { {NULL, 0}, }; void trixContextIndex(char *input, char *output) -/* trixContextIndex - Index in.txt file used with ixIxx to produce a two column file with symbol name and file offset for that line.. */ +/* trixContextIndex - Index in.txt file used with ixIxx to produce a two column file with symbol name + * and file offset for that line.. */ { struct lineFile *lf = lineFileOpen(input, TRUE); FILE *f = mustOpen(output, "w"); char *line; while (lineFileNextReal(lf, &line)) { long long pos = lineFileTell(lf); char *word = nextWord(&line); if (word == NULL) errAbort("Short line %d of %s", lf->lineIx, input); fprintf(f, "%s\t%lld\n", word, pos); } carefulClose(&f); } int main(int argc, char *argv[]) /* Process command line. */ { optionInit(&argc, argv, options); if (argc != 3) usage(); trixContextIndex(argv[1], argv[2]); return 0; }