Subject: Re: humanize_number(3)
To: Tomas Svensson <>
From: Luke Mewburn <>
List: tech-userlevel
Date: 12/27/2001 13:07:31
On Thu, Dec 27, 2001 at 02:31:45AM +0100, Tomas Svensson wrote:
  | 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.

I would replace "int use_space" and "int use_decimal" with "int flags",
and define flag bits to control various features.

Luke Mewburn  <>
Luke Mewburn     <>
Wasabi Systems - NetBSD hackers for hire
NetBSD - the world's most portable UNIX-like operating system