diff options
author | yar <yar@FreeBSD.org> | 2006-11-27 16:23:09 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2006-11-27 16:23:09 +0000 |
commit | 2f8ab38300aecf93354cbcbcf42b5ef86db1de7a (patch) | |
tree | 8010147db035b7fa538a37ae799e31ffe3f6156c /usr.bin/systat/convtbl.c | |
parent | 5218213e10691f9f5c166c41b3c374ff133a2fd2 (diff) | |
download | FreeBSD-src-2f8ab38300aecf93354cbcbcf42b5ef86db1de7a.zip FreeBSD-src-2f8ab38300aecf93354cbcbcf42b5ef86db1de7a.tar.gz |
Stop exposing things that can be private to convtbl.c.
Diffstat (limited to 'usr.bin/systat/convtbl.c')
-rw-r--r-- | usr.bin/systat/convtbl.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.bin/systat/convtbl.c b/usr.bin/systat/convtbl.c index 79005ce..0e16de6 100644 --- a/usr.bin/systat/convtbl.c +++ b/usr.bin/systat/convtbl.c @@ -33,7 +33,23 @@ #include <string.h> #include "convtbl.h" -struct convtbl convtbl[] = { +#define BIT (8) +#define BYTE (1) + +#define BITS (1) +#define BYTES (1) +#define KILO (1024LL) +#define MEGA (KILO * 1024) +#define GIGA (MEGA * 1024) + +struct convtbl { + uintmax_t mul; + uintmax_t scale; + const char *str; + const char *name; +}; + +static struct convtbl convtbl[] = { /* mul, scale, str, name */ [SC_BYTE] = { BYTE, BYTES, "B", "byte" }, [SC_KILOBYTE] = { BYTE, KILO, "KB", "kbyte" }, |