7451d36950210fb0e91f5983eb98effbf63d519c kent Mon Jun 21 13:47:22 2010 -0700 Merged two files. diff --git src/oneShot/testGitRename/justAnotherTest.c src/oneShot/testGitRename/justAnotherTest.c new file mode 100644 index 0000000..420a5d8 --- /dev/null +++ src/oneShot/testGitRename/justAnotherTest.c @@ -0,0 +1,55 @@ +/* testGitRename - Just a little something to test renaming, merging, etc.. */ +#include "common.h" +#include "linefile.h" +#include "hash.h" +#include "options.h" +#include "upperFile.h" + +static char const rcsid[] = "$Id: newProg.c,v 1.30 2010/03/24 21:18:33 hiram Exp $"; + +void usage() +/* Explain usage and exit. */ +{ +errAbort( + "testGitRename - Just a little something to test renaming, merging, etc.\n" + "usage:\n" + " testGitRename input output\n" + "options:\n" + " -xxx=XXX\n" + ); +} + +static struct optionSpec options[] = { + {NULL, 0}, +}; + + +int main(int argc, char *argv[]) +/* Process command line. */ +{ +optionInit(&argc, argv, options); +if (argc != 3) + usage(); +upperFile(argv[1], argv[2]); +return 0; +} +/* upperFile - convert file to upper case. */ + +#include "common.h" +#include "linefile.h" +#include "upperFile.h" + +void upperFile(char *input, char *output) +/* upperFile - convert file to upper case. */ +{ +struct lineFile *lf = lineFileOpen(input, TRUE); +FILE *f = mustOpen(output, "w"); +char *line; +while (lineFileNext(lf, &line, NULL)) + { + touppers(line); + fprintf(f, "%s\n", line); + } +carefulClose(&f); +} +