Subject: humanize_number(3)
To: None <tech-userlevel@netbsd.org>
From: Tomas Svensson <tsn@gbdev.net>
List: tech-userlevel
Date: 12/27/2001 02:31:45
Hi,

How about a userland version of humanize_number(9) that looks
something like this?

     int
     humanize_number(char *buf, size_t len, u_int64_t number,
             const char *suffix, int divisor, int use_space,
             int use_decimal);

where u_int64_t has been changed to int64_t (df(1) is using signed
sizes), if use_space is nonzero: put a space between the number and
the suffix, if use_decimal is nonzero: display the number with one
decimal if it would normally only display one digit.

-Tomas