Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/man/man9 On 20 Feb 2000, the humanize_number() functio...
details: https://anonhg.NetBSD.org/src/rev/f5cb48bb42ef
branches: trunk
changeset: 495773:f5cb48bb42ef
user: briggs <briggs%NetBSD.org@localhost>
date: Sat Aug 05 14:58:03 2000 +0000
description:
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 6f18298c793b -r f5cb48bb42ef share/man/man9/humanize_number.9
--- a/share/man/man9/humanize_number.9 Sat Aug 05 10:17:35 2000 +0000
+++ b/share/man/man9/humanize_number.9 Sat Aug 05 14:58:03 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.2 2000/08/05 14:58:03 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