d65b2f26eed1c2bf535de4b676704a4e7a20ac05
max
  Mon Oct 7 10:37:58 2013 -0700
small change after rm #11884
diff --git src/utils/calc/calc.c src/utils/calc/calc.c
index 3df97d3..c9ec8c6 100644
--- src/utils/calc/calc.c
+++ src/utils/calc/calc.c
@@ -4,31 +4,31 @@
 #include "hash.h"
 #include "cheapcgi.h"
 #include "dystring.h"
 #include "options.h"
 
 bool humanReadable = FALSE;
 
 void usage()
 /* Explain usage and exit. */
 {
 errAbort(
   "calc - Little command line calculator\n"
   "usage:\n"
   "   calc this + that * theOther / (a + b)\n"
   "Options:\n"
-  "  -h - output as human-readable numbers, with k=kilos, m=millions, g=billions, etc\n"
+  "  -h - output result as a human-readable integer numbers, with k/m/g/t suffix
   );
 }
 
 static struct optionSpec options[] = {
    {"h", OPTION_BOOLEAN},
    {NULL, 0},
 };
 
 void calc(int wordCount, char *words[])
 /* calc - Little command line calculator. */
 {
 struct dyString *dy = newDyString(128);
 int i;
 
 for (i=0; i<wordCount; ++i)
@@ -57,29 +57,33 @@
 else if (result>=1E9)
     {
     intRes = round(result/1E9);
     resQual = "g";
     }
 else if (result>=1E6)
     {
     intRes = round(result/1E6);
     resQual = "m";
     }
 else if (result>=1E3)
     {
     intRes = round(result/1E3);
     resQual = "k";
     }
+else {
+    intRes = round(result);
+    resQual = "";
+}
 printf("%s = %d%s\n", dy->string, intRes, resQual);
 }
 
 
 int main(int argc, char *argv[])
 /* Process command line. */
 {
 optionInit(&argc, argv, options);
 if (argc < 2)
     usage();
 humanReadable = optionExists("h");
 calc(argc-1, argv+1);
 return 0;
 }