ae06b237971133bc7e68daa85cb34d32cdeabd6f hiram Mon Mar 2 12:55:59 2020 -0800 correct one line header message in usage() no redmine diff --git src/hg/pslPartition/pslPartition.c src/hg/pslPartition/pslPartition.c index da252d3..9c6aa3f 100644 --- src/hg/pslPartition/pslPartition.c +++ src/hg/pslPartition/pslPartition.c @@ -12,55 +12,54 @@ /* command line options and values */ static struct optionSpec optionSpecs[] = { {"outLevels", OPTION_INT}, {"partSize", OPTION_INT}, {"dropContained", OPTION_BOOLEAN}, {"parallel", OPTION_INT}, {NULL, 0} }; static int gOutLevels = 0; static int gPartSize = 20000; static boolean gDropContained = FALSE; static int gParallel = 0; -static void usage(char *msg) +static void usage() /* Explain usage and exit. */ { -errAbort("Error: %s\n" - "pslPartition - split PSL files into non-overlapping sets\n" +errAbort("pslPartition - split PSL files into non-overlapping sets\n" "usage:\n" " pslPartition [options] pslFile outDir\n" "\n" "Split psl files into non-overlapping sets for use in cluster jobs,\n" "limiting memory usage, etc. Multiple levels of directories can be are\n" "created under outDir to prevent slow access to huge directories.\n" "The pslFile maybe compressed and no ordering is assumed.\n" "\n" "options:\n" " -outLevels=0 - number of output subdirectory levels. 0 puts all files\n" " directly in outDir, 2, will create files in the form outDir/0/0/00.psl\n" " -partSize=20000 - will combine non-overlapping partitions, while attempting\n" " to keep them under this number of PSLs. This reduces the number of\n" " files that are created while ensuring that there are no overlaps\n" " between any two PSL files. A value of 0 creates a PSL file per set of\n" " overlapping PSLs.\n" " -dropContained - drop PSLs that are completely contained in a block of\n" " another PSL.\n" " -parallel=n - use this many cores for parallel sorting\n" - "\n", msg); + "\n"); } struct pslInput /* object to read a psl */ { struct pipeline *pl; /* sorting pipeline */ struct lineFile *lf; /* lineFile to pipeline */ struct psl *pending; /* next psl to read, if not NULL */ }; static struct pslInput *pslInputNew(char *pslFile) /* create object to read PSLs */ { struct pslInput *pi; AllocVar(pi); @@ -259,23 +258,23 @@ { if (gDropContained) dropContained(&newPart); pslPartsAdd(&parts, newPart, outDir); } if (parts.psls != NULL) pslPartsWrite(&parts, outDir); pslInputFree(&pi); } int main(int argc, char *argv[]) /* Process command line. */ { optionInit(&argc, argv, optionSpecs); if (argc != 3) - usage("wrong # args"); + usage(); gOutLevels = optionInt("outLevels", gOutLevels); gPartSize = optionInt("partSize", gPartSize); gDropContained = optionExists("dropContained"); gParallel = optionInt("parallel", gParallel); pslPartition(argv[1], argv[2]); return 0; }