From 9c3b84a3049a152dd6a2b9e3aecaf897f57ac28e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 18 Jan 2010 01:55:00 +0100 Subject: ls: make it so that group never glues itself to file size + smaller enhancements: inode is long long; -h is a bit narrower; etc Signed-off-by: Denys Vlasenko --- include/libbb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/libbb.h') diff --git a/include/libbb.h b/include/libbb.h index 9e6ee8434..73aea409e 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -704,8 +704,10 @@ void smart_ulltoa4(unsigned long long ul, char buf[5], const char *scale) FAST_F void smart_ulltoa5(unsigned long long ul, char buf[5], const char *scale) FAST_FUNC; /* If block_size == 0, display size without fractional part, * else display (size * block_size) with one decimal digit. - * If display_unit == 0, add suffix (K,M,G...), + * If display_unit == 0, show value no bigger than 1024 with suffix (K,M,G...), * else divide by display_unit and do not use suffix. */ +#define HUMAN_READABLE_MAX_WIDTH 7 /* "1024.0G" */ +#define HUMAN_READABLE_MAX_WIDTH_STR "7" //TODO: provide pointer to buf (avoid statics)? const char *make_human_readable_str(unsigned long long size, unsigned long block_size, unsigned long display_unit) FAST_FUNC; -- cgit v1.2.3