0186982e4dd1912d6a8bf518d5d0301901fb4e4c
hiram
  Mon Mar 2 12:50:21 2020 -0800
correct one line header message in usage() no redmine

diff --git src/hg/pslHisto/pslHisto.c src/hg/pslHisto/pslHisto.c
index 15d7d11..91daf79 100644
--- src/hg/pslHisto/pslHisto.c
+++ src/hg/pslHisto/pslHisto.c
@@ -3,37 +3,35 @@
 #include "pslTbl.h"
 #include "psl.h"
 #include "hash.h"
 #include "options.h"
 
 /* command line options and values */
 static struct optionSpec optionSpecs[] =
 {
     {"multiOnly", OPTION_BOOLEAN},
     {"nonZero", OPTION_BOOLEAN},
     {NULL, 0}
 };
 boolean gMultiOnly;
 boolean gNonZero;
 
-void usage(char *msg, ...)
+void usage()
 /* usage msg and exit */
 {
-va_list ap;
-va_start(ap, msg);
-vfprintf(stderr, msg, ap);
-errAbort("\n%s",
+errAbort("pslHisto - Collect counts on PSL alignments for making histograms.\n"
+         "usage:\n"
          "    pslHisto [options] what inPsl outHisto\n"
          "\n"
          "Collect counts on PSL alignments for making histograms. These\n"
          "then be analyzed with R, textHistogram, etc.\n"
          "\n"
          "The 'what' argument determines what data to collect, the following\n"
          "are currently supported:\n"
          "\n"
          "  o alignsPerQuery - number of alignments per query. Output is one\n"
          "    line per query with the number of alignments.\n"
          "\n"
          "  o coverSpread - difference between the highest and lowest coverage\n"
          "    for alignments of a query.  Output line per query, with the difference.\n"
          "    Only includes queries with multiple alignments\n"
          "\n"
@@ -157,38 +155,41 @@
         }
 }
 
 void pslHisto(char *what, char *inPsl, char *outHisto)
 /* collect counts on PSL alignments for making histograms */
 {
 struct pslTbl *pslTbl = pslTblNew(inPsl, NULL);
 FILE *outFh = mustOpen(outHisto, "w");
 if (sameString(what, "alignsPerQuery"))
     alignsPerQuery(pslTbl, outFh);
 else if (sameString(what, "coverSpread"))
     coverSpread(pslTbl, outFh);
 else if (sameString(what, "idSpread"))
     idSpread(pslTbl, outFh);
 else
-    usage("invalid what argument: %s", what);
+    {
+    verbose(1, "invalid what argument: %s", what);
+    usage();
+    }
 carefulClose(&outFh);
 pslTblFree(&pslTbl);
 }
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, optionSpecs);
 if (argc != 4)
-    usage("wrong # of args:");
+    usage();
 gMultiOnly = optionExists("multiOnly");
 gNonZero =  optionExists("nonZero");
 pslHisto(argv[1], argv[2], argv[3]);
 return 0;
 }
 
 /*
  * Local Variables:
  * c-file-style: "jkent-c"
  * End:
  */