Module Name:    src
Committed By:   wiz
Date:           Tue Mar 15 08:33:35 UTC 2011

Modified Files:
        src/lib/libc/gen: commaize_number.3

Log Message:
Shorten Nd by putting the comment there in a paragraph in the body.
Use more markup. Sort SEE ALSO. Fix typo. Capitalize NetBSD like
we all love it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/commaize_number.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/gen/commaize_number.3
diff -u src/lib/libc/gen/commaize_number.3:1.1 src/lib/libc/gen/commaize_number.3:1.2
--- src/lib/libc/gen/commaize_number.3:1.1	Tue Mar 15 03:47:04 2011
+++ src/lib/libc/gen/commaize_number.3	Tue Mar 15 08:33:35 2011
@@ -1,4 +1,4 @@
-.\"	$NetBSD: commaize_number.3,v 1.1 2011/03/15 03:47:04 erh Exp $
+.\"	$NetBSD: commaize_number.3,v 1.2 2011/03/15 08:33:35 wiz Exp $
 .\"
 .\" Copyright (c) 2011 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .Os
 .Sh NAME
 .Nm commaize_number
-.Nd format a number into a human readable form by adding commas (actually, the locale specific thousands separator)
+.Nd format a number into a human readable form by grouping the digits
 .Sh SYNOPSIS
 .In stdlib.h
 .Ft int
@@ -40,23 +40,28 @@
 .Sh DESCRIPTION
 The
 .Fn commaize_number
-function formats the signed 64 bit quantity given in
+function formats the signed 64-bit quantity given in
 .Fa number
 into
 .Fa buffer ,
-which 
-must be at least
+which must be at least
 .Fa len
 bytes long.
 .Pp
 If the formatted number would be too long to fit into
 .Fa buffer ,
 then an error is returned.
+.Pp
+The function name is slightly mistaken,
+since actually, the locale specific thousands separator is used, which
+might not be comma.
 .Sh RETURN VALUES
 .Fn commaize_number
 returns the number of characters stored in
 .Fa buffer
-(excluding the terminating NUL) upon success, or \-1 upon failure with 
+(excluding the terminating
+.Dv NUL )
+upon success, or \-1 upon failure with
 .Va errno
 set to indicate the error.
 .Sh ERRORS
@@ -66,18 +71,19 @@
 if:
 .Bl -tag -width Er
 .It Bq Er ENOMEM
-The formatted number, including commas and terminating NUL, is too long to fit in
+The formatted number, including commas and terminating
+.Dv NUL ,
+is too long to fit in
 .Fa len
 bytes.
 .El
 .Sh SEE ALSO
-.Xr humanize_number 9 ,
+.Xr ls 1 ,
 .Xr setlocale 3 ,
-.Xr ls 1 .
+.Xr humanize_number 9
 .Sh HISTORY
-.Fn humanize_number
+.Fn commaize_number
 first appeared in
 .Nx 6.0 .
-.Pp
 .Sh AUTHORS
-.An Eric Haszlakiewicz Aq e...@netbsd.org
+.An Eric Haszlakiewicz Aq e...@netbsd.org

Reply via email to