summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-09-30 10:34:13 +0000
committerru <ru@FreeBSD.org>2006-09-30 10:34:13 +0000
commit81bed6b88448650d0a633e9997ee17df8b7d9d79 (patch)
treebd9e0c431c6189606806a096fb14fcdea697b3ae /lib/libc/stdlib
parent1da895d121c2157e12372a98c2305588092e1773 (diff)
downloadFreeBSD-src-81bed6b88448650d0a633e9997ee17df8b7d9d79.zip
FreeBSD-src-81bed6b88448650d0a633e9997ee17df8b7d9d79.tar.gz
Revise markup in recently added manpages.
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/a64l.353
-rw-r--r--lib/libc/stdlib/posix_memalign.310
-rw-r--r--lib/libc/stdlib/strtonum.328
3 files changed, 48 insertions, 43 deletions
diff --git a/lib/libc/stdlib/a64l.3 b/lib/libc/stdlib/a64l.3
index 50cb444..61fbffd 100644
--- a/lib/libc/stdlib/a64l.3
+++ b/lib/libc/stdlib/a64l.3
@@ -67,32 +67,26 @@ The characters used to represent
are
.Ql .\&
for 0,
-.Ql /\&
+.Ql /
for 1,
-.Ql 0\&
-.Fl
-.Ql 9\&
-for 2
-.Fl
-11,
-.Ql A\&
-.Fl
-.Ql Z\&
-for 12
-.Fl
-37, and
-.Ql a\&
-.Fl
-.Ql z\&
-for 38
-.Fl
-63.
+.Ql 0
+-
+.Ql 9
+for 2 - 11,
+.Ql A
+-
+.Ql Z
+for 12 - 37, and
+.Ql a
+-
+.Ql z
+for 38 - 63.
.Pp
The
.Fn a64l
function takes a pointer to a radix-64 representation, in which the first
digit is the least significant, and returns a corresponding
-.Ft long
+.Vt long
value.
If the string pointed to by
.Fa s
@@ -120,7 +114,9 @@ was not generated by a previous call to
.Pp
The
.Fn l64a
-function takes a long argument and returns a pointer to the corresponding
+function takes a
+.Vt long
+argument and returns a pointer to the corresponding
radix-64 representation.
The behavior of
.Fn l64a
@@ -141,19 +137,23 @@ and stores the resulting representation in the memory area pointed to by
.Fa buffer ,
consuming at most
.Fa buflen
-characters including the terminating NUL character.
+characters including the terminating
+.Dv NUL
+character.
.Sh RETURN VALUES
On successful completion,
.Fn a64l
returns the
-.Ft long
+.Vt long
value resulting from conversion of the input string.
-If a string pointed to by s is an empty string,
+If a string pointed to by
+.Fa s
+is an empty string,
.Fn a64l
returns 0.
.Pp
The
-l64a
+.Fn l64a
function returns a pointer to the radix-64 representation.
If value is 0,
.Fn l64a
@@ -169,7 +169,7 @@ and
functions are derived from
.Nx
with modifications.
-They were added to
+They appeared in
.Fx 6.1 .
.Sh AUTHORS
The
@@ -177,6 +177,7 @@ The
.Fn l64a ,
and
.Fn l64a_r
+functions
were added to
.Fx
by
diff --git a/lib/libc/stdlib/posix_memalign.3 b/lib/libc/stdlib/posix_memalign.3
index 6de2c4a..3af91c3 100644
--- a/lib/libc/stdlib/posix_memalign.3
+++ b/lib/libc/stdlib/posix_memalign.3
@@ -51,7 +51,8 @@ and returns the allocation in the value pointed to by
.Pp
The requested
.Fa alignment
-must be a power of 2 at least as large as sizeof(void *).
+must be a power of 2 at least as large as
+.Fn sizeof "void *" .
.Pp
Memory that is allocated via
.Fn posix_memalign
@@ -72,16 +73,17 @@ function will fail if:
.It Bq Er EINVAL
The
.Fa alignment
-parameter is not a power of 2 at least as large as sizeof(void *).
+parameter is not a power of 2 at least as large as
+.Fn sizeof "void *" .
.It Bq Er ENOMEM
Memory allocation error.
.El
.Sh SEE ALSO
+.Xr free 3 ,
.Xr malloc 3 ,
-.Xr valloc 3 ,
.Xr realloc 3 ,
.Xr reallocf 3 ,
-.Xr free 3
+.Xr valloc 3
.Sh STANDARDS
The
.Fn posix_memalign
diff --git a/lib/libc/stdlib/strtonum.3 b/lib/libc/stdlib/strtonum.3
index 5be86d7..90f0b57 100644
--- a/lib/libc/stdlib/strtonum.3
+++ b/lib/libc/stdlib/strtonum.3
@@ -22,8 +22,8 @@
.Nm strtonum
.Nd "reliably convert string value to an integer"
.Sh SYNOPSIS
-.Fd #include <stdlib.h>
-.Fd #include <limits.h>
+.In stdlib.h
+.In limits.h
.Ft long long
.Fo strtonum
.Fa "const char *nptr"
@@ -37,7 +37,7 @@ The
function converts the string in
.Fa nptr
to a
-.Li long long
+.Vt "long long"
value.
The
.Fn strtonum
@@ -58,7 +58,7 @@ or
sign.
.Pp
The remainder of the string is converted to a
-.Li long long
+.Vt "long long"
value according to base 10.
.Pp
The value obtained is then checked against the provided
@@ -83,10 +83,10 @@ On error, 0 is returned,
is set, and
.Fa errstr
will point to an error message.
+On success,
.Fa *errstr
will be set to
-.Dv NULL
-on success;
+.Dv NULL ;
this fact can be used to differentiate
a successful return of 0 from an error.
.Sh EXAMPLES
@@ -111,21 +111,22 @@ The given string was out of range.
.It Bq Er EINVAL
The given string did not consist solely of digit characters.
.It Bq Er EINVAL
-.Ar minval
+The supplied
+.Fa minval
was larger than
-.Ar maxval .
+.Fa maxval .
.El
.Pp
If an error occurs,
.Fa errstr
will be set to one of the following strings:
.Pp
-.Bl -tag -width "too largeXX" -compact
-.It too large
+.Bl -tag -width ".Li too large" -compact
+.It Li "too large"
The result was larger than the provided maximum value.
-.It too small
+.It Li "too small"
The result was smaller than the provided minimum value.
-.It invalid
+.It Li invalid
The string did not consist solely of digit characters.
.El
.Sh SEE ALSO
@@ -138,8 +139,9 @@ The string did not consist solely of digit characters.
.Xr strtol 3 ,
.Xr strtoul 3
.Sh STANDARDS
+The
.Fn strtonum
-is a
+function is a
.Bx
extension.
The existing alternatives, such as
OpenPOWER on IntegriCloud