Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/share/man/man9 Approved by: thorpej



details:   https://anonhg.NetBSD.org/src/rev/04880ffafcf4
branches:  netbsd-1-5
changeset: 488886:04880ffafcf4
user:      briggs <briggs%NetBSD.org@localhost>
date:      Sun Aug 06 00:28:49 2000 +0000

description:
Approved by: thorpej
Pullup revision 1.2--
On 20 Feb 2000, the humanize_number() function got a fifth argument--a
divisor.  This divisor replaces a hard-coded divisor of 1024.  To remain
consistent with the hard-coded SI prefix list, humanize_number should
probably only be called with a divisor of 1000 or 1024.
This is now documented.

diffstat:

 share/man/man9/humanize_number.9 |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r 444bbe1f8361 -r 04880ffafcf4 share/man/man9/humanize_number.9
--- a/share/man/man9/humanize_number.9  Sun Aug 06 00:11:24 2000 +0000
+++ b/share/man/man9/humanize_number.9  Sun Aug 06 00:28:49 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: humanize_number.9,v 1.1 1999/05/21 06:26:15 lukem Exp $
+.\"    $NetBSD: humanize_number.9,v 1.1.8.1 2000/08/06 00:28:49 briggs Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -45,6 +45,7 @@
 .Ft int
 .Fo humanize_number
 .Fa "char *buf" "size_t len" "u_int64_t number" "const char *suffix"
+.Fa "int divisor"
 .Fc
 .Ft int
 .Fn format_bytes "char *buf" "size_t len" "u_int64_t number"
@@ -71,10 +72,16 @@
 .Fa buffer ,
 then divide
 .Fa number
-by 1024 until it will.
+by
+.Fa divisor
+until it will.
 In this case, prefix
 .Fa suffix
 with the appropriate SI designator.
+Suitable values of
+.Fa divisor
+are 1024 or 1000 to remain consistent with the common meanings of the
+SI designator prefixes.
 .Pp
 The prefixes are:
 .Bl -column "Prefix" "Description" "Multiplier" -offset indent



Home | Main Index | Thread Index | Old Index