diff options
author | Rob Landley <rob@landley.net> | 2020-09-04 01:04:43 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-09-04 01:04:43 -0500 |
commit | ec5e6e12ee6d7047ab013f3a2826abdb52666ea0 (patch) | |
tree | 0a14a66b2dab3daa67da89d8bf6ce8032ccb5527 /lib/lib.h | |
parent | cb064374c86259f74899162b28c4896e898401e3 (diff) | |
download | toybox-ec5e6e12ee6d7047ab013f3a2826abdb52666ea0.tar.gz |
Add commas to top display, and adjust memory units to megabytes if >10G RAM.
Diffstat (limited to 'lib/lib.h')
-rw-r--r-- | lib/lib.h | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -275,10 +275,12 @@ unsigned tar_cksum(void *data); int is_tar_header(void *pkt); char *elf_arch_name(int type); -#define HR_SPACE 1 // Space between number and units -#define HR_B 2 // Use "B" for single byte units -#define HR_1000 4 // Use decimal instead of binary units -int human_readable_long(char *buf, unsigned long long num, int dgt, int style); +#define HR_SPACE 1 // Space between number and units +#define HR_B 2 // Use "B" for single byte units +#define HR_1000 4 // Use decimal instead of binary units +#define HR_COMMAS 8 // Commas every 1000 +int human_readable_long(char *buf, unsigned long long num, int dgt, int unit, + int style); int human_readable(char *buf, unsigned long long num, int style); // env.c |