Subject: Re: NetBSD master CVS tree commits
To: Luke Mewburn <lukem@connect.com.au>
From: Chris G Demetriou <Chris_G_Demetriou@auchentoshan.pdl.cs.cmu.edu>
List: current-users
Date: 12/05/1996 22:50:53
> What the code does is something like:
> 	prefix_list[]="bKMGTP";
> 	current_prefix = 0;
> 	while (size >= 100000 && current_prefix < sizeof(prefix_list)) {
> 		current_prefix++;
> 		size >>= 10;	/* divide by 1024 */
> 	}
> 
> So, when the file hits 100000 bytes, the display changes from
> 	100000 b
> to
> 	    97 K
> etc. (97 because 100000 / 1024 == 97.65).

Wow, i'm glad you posted this, because otherwise i never would have
noticed.

'b' is bits, not bytes.  Please don't use 'b' for bytes.

Also, i'd say you really should have the character be a prefix
character after all, and print 'B' after it (again, for bytes 8-).
After all, what's a giga?



chris