50528cd3bd4e0424cf8ef9a11fe72023cb2b6433 kent Tue Mar 3 12:24:42 2015 -0800 Adding printWithGreekByte, just a wrapper around sprintWithGreekByte. diff --git src/lib/obscure.c src/lib/obscure.c index 0322d28..b707da3 100644 --- src/lib/obscure.c +++ src/lib/obscure.c @@ -588,30 +588,38 @@ char *greek[] = {"B", "KB", "MB", "GB", "TB", "PB"}; int i = 0; long long d = 1; while ((size/d) >= 1024) { ++i; d *= 1024; } double result = ((double)size)/d; if (result < 10) safef(s,slength,"%3.1f %s",((double)size)/d, greek[i]); else safef(s,slength,"%3.0f %s",((double)size)/d, greek[i]); } +void printWithGreekByte(FILE *f, long long l) +/* Print with formatting in gigabyte, terabyte, etc. */ +{ +char buf[32]; +sprintWithGreekByte(buf, sizeof(buf), l); +fprintf(f, "%s", buf); +} + void shuffleArrayOfChars(char *array, int arraySize) /* Shuffle array of characters of given size given number of times. */ { char c; int i, randIx; /* Randomly permute an array using the method from Cormen, et al */ for (i=0; i