Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen Shorten Nd by putting the comment there in a pa...
details: https://anonhg.NetBSD.org/src/rev/75b9aef019f4
branches: trunk
changeset: 763254:75b9aef019f4
user: wiz <wiz%NetBSD.org@localhost>
date: Tue Mar 15 08:33:35 2011 +0000
description:
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.
diffstat:
lib/libc/gen/commaize_number.3 | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
diffs (77 lines):
diff -r e14be09ff41e -r 75b9aef019f4 lib/libc/gen/commaize_number.3
--- a/lib/libc/gen/commaize_number.3 Tue Mar 15 07:42:36 2011 +0000
+++ b/lib/libc/gen/commaize_number.3 Tue Mar 15 08:33:35 2011 +0000
@@ -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 erh%netbsd.org@localhost
+.An Eric Haszlakiewicz Aq erh%NetBSD.org@localhost
Home |
Main Index |
Thread Index |
Old Index