summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2003-06-01 19:27:28 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2003-06-01 19:27:28 +0000
commit593a51980a92afc583faae94d80a860f19847b82 (patch)
tree619c5eb565454edb266020e31d8fc37642ba33f7 /lib/libc/stdlib
parentc015588fce23b571e5b96aa9c02d71c7d84ec3dc (diff)
- section reorder
- merge COMPATIBILITY - kill whitespace at EOL
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/atoi.326
-rw-r--r--lib/libc/stdlib/getopt.310
-rw-r--r--lib/libc/stdlib/insque.38
-rw-r--r--lib/libc/stdlib/malloc.316
-rw-r--r--lib/libc/stdlib/qsort.314
-rw-r--r--lib/libc/stdlib/rand48.36
-rw-r--r--lib/libc/stdlib/random.36
-rw-r--r--lib/libc/stdlib/realpath.318
-rw-r--r--lib/libc/stdlib/tsearch.38
9 files changed, 56 insertions, 56 deletions
diff --git a/lib/libc/stdlib/atoi.3 b/lib/libc/stdlib/atoi.3
index 69b94be70c2..6ba304cf461 100644
--- a/lib/libc/stdlib/atoi.3
+++ b/lib/libc/stdlib/atoi.3
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: atoi.3,v 1.5 2000/04/20 13:50:01 aaron Exp $
+.\" $OpenBSD: atoi.3,v 1.6 2003/06/01 19:27:27 jmc Exp $
.\"
.Dd June 4, 1993
.Dt ATOI 3
@@ -60,18 +60,6 @@ It is equivalent to:
.Bd -literal -offset indent
(int)strtol(nptr, (char **)NULL, 10);
.Ed
-.Sh CAVEATS
-.Nm
-does no overflow checking, handles unsigned numbers poorly,
-and handles strings containing trailing extra characters
-(like
-.Dq "123abc" Ns )
-poorly.
-Careful use of
-.Xr strtol 3
-and
-.Xr strtoul 3
-can alleviate these problems.
.Sh SEE ALSO
.Xr atof 3 ,
.Xr atol 3 ,
@@ -83,3 +71,15 @@ The
.Fn atoi
function conforms to
.St -ansiC .
+.Sh CAVEATS
+.Nm
+does no overflow checking, handles unsigned numbers poorly,
+and handles strings containing trailing extra characters
+(like
+.Dq "123abc" )
+poorly.
+Careful use of
+.Xr strtol 3
+and
+.Xr strtoul 3
+can alleviate these problems.
diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3
index d25b4970359..ce85f678dfa 100644
--- a/lib/libc/stdlib/getopt.3
+++ b/lib/libc/stdlib/getopt.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: getopt.3,v 1.22 2003/05/10 06:48:30 jmc Exp $
+.\" $OpenBSD: getopt.3,v 1.23 2003/06/01 19:27:27 jmc Exp $
.\"
.Dd December 8, 2002
.Dt GETOPT 3
@@ -174,10 +174,6 @@ while ((ch = getopt(argc, argv, "bf:")) != -1) {
argc -= optind;
argv += optind;
.Ed
-.Sh SEE ALSO
-.Xr getopt 1 ,
-.Xr getopt_long 3 ,
-.Xr getsubopt 3
.Sh DIAGNOSTICS
If the
.Fn getopt
@@ -202,6 +198,10 @@ to be returned in addition to suppressing any error messages.
Option arguments are allowed to begin with
.Ql - ;
this is reasonable but reduces the amount of error checking possible.
+.Sh SEE ALSO
+.Xr getopt 1 ,
+.Xr getopt_long 3 ,
+.Xr getsubopt 3
.Sh EXTENSIONS
The
.Va optreset
diff --git a/lib/libc/stdlib/insque.3 b/lib/libc/stdlib/insque.3
index b87adb87bcb..b09f1fdc048 100644
--- a/lib/libc/stdlib/insque.3
+++ b/lib/libc/stdlib/insque.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: insque.3,v 1.1 2003/05/08 23:26:30 millert Exp $
+.\" $OpenBSD: insque.3,v 1.2 2003/06/01 19:27:27 jmc Exp $
.\" Copyright (c) 1993 John Brezak
.\" All rights reserved.
.\"
@@ -83,13 +83,13 @@ These functions are not atomic unless that machine architecture allows it.
.Xr queue 3
.Sh STANDARDS
The
-.Fn lsearch
+.Fn lsearch
and
.Fn lfind
functions conform to the
.St -p1003.1-01
-and
-.St -xpg4.3 .
+and
+.St -xpg4.3 .
specifications.
.Sh HISTORY
The
diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3
index aaba8c88c23..e18bdc98d9a 100644
--- a/lib/libc/stdlib/malloc.3
+++ b/lib/libc/stdlib/malloc.3
@@ -34,7 +34,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: malloc.3,v 1.26 2003/05/14 04:48:06 krw Exp $
+.\" $OpenBSD: malloc.3,v 1.27 2003/06/01 19:27:27 jmc Exp $
.\"
.Dd August 27, 1996
.Dt MALLOC 3
@@ -261,8 +261,6 @@ If a program changes behavior if either of these options are used,
it is buggy.
.Pp
The default cache size is 16 pages.
-.Sh ENVIRONMENT
-See above.
.Sh RETURN VALUES
The
.Fn malloc
@@ -287,6 +285,13 @@ if successful; otherwise, a null pointer is returned and
.Va errno
is set to
.Er ENOMEM .
+.Sh ENVIRONMENT
+See above.
+.Sh FILES
+.Bl -tag -width "/etc/malloc.conf"
+.It Pa /etc/malloc.conf
+symbolic link to filename containing option flags
+.El
.Sh DIAGNOSTICS
If
.Fn malloc ,
@@ -377,11 +382,6 @@ routines).
.It Dq unknown char in MALLOC_OPTIONS
We found something we didn't understand.
.El
-.Sh FILES
-.Bl -tag -width "/etc/malloc.conf"
-.It Pa /etc/malloc.conf
-symbolic link to filename containing option flags
-.El
.Sh SEE ALSO
.Xr brk 2 ,
.Xr alloca 3 ,
diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3
index a0561cadbe9..da2842aa92f 100644
--- a/lib/libc/stdlib/qsort.3
+++ b/lib/libc/stdlib/qsort.3
@@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: qsort.3,v 1.10 2003/05/10 06:48:30 jmc Exp $
+.\" $OpenBSD: qsort.3,v 1.11 2003/06/01 19:27:27 jmc Exp $
.\"
.Dd June 4, 1993
.Dt QSORT 3
@@ -181,12 +181,6 @@ or
.Fn mergesort
were unable to allocate memory.
.El
-.Sh COMPATIBILITY
-Previous versions of
-.Fn qsort
-did not permit the comparison routine itself to call
-.Fn qsort .
-This is no longer true.
.Sh SEE ALSO
.Xr sort 1 ,
.Xr radixsort 3
@@ -227,6 +221,12 @@ This is no longer true.
.%V January 1992
.Re
.Sh STANDARDS
+Previous versions of
+.Fn qsort
+did not permit the comparison routine itself to call
+.Fn qsort .
+This is no longer true.
+.Pp
The
.Fn qsort
function conforms to
diff --git a/lib/libc/stdlib/rand48.3 b/lib/libc/stdlib/rand48.3
index 6b0831ead7d..78cd0a7cd5d 100644
--- a/lib/libc/stdlib/rand48.3
+++ b/lib/libc/stdlib/rand48.3
@@ -9,7 +9,7 @@
.\" of any kind. I shall in no event be liable for anything that happens
.\" to anyone/anything when using this software.
.\"
-.\" $OpenBSD: rand48.3,v 1.9 2003/05/10 06:48:30 jmc Exp $
+.\" $OpenBSD: rand48.3,v 1.10 2003/06/01 19:27:27 jmc Exp $
.\"
.Dd October 8, 1993
.Dt RAND48 3
@@ -157,9 +157,9 @@ generator calls.
.Pp
For a more powerful random number generator, see
.Xr random 3 .
-.Sh AUTHORS
-Martin Birgmeier
.Sh SEE ALSO
.Xr arc4random 3 ,
.Xr rand 3 ,
.Xr random 3
+.Sh AUTHORS
+Martin Birgmeier
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3
index b98917a4427..fba0f46d70d 100644
--- a/lib/libc/stdlib/random.3
+++ b/lib/libc/stdlib/random.3
@@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: random.3,v 1.15 2003/05/10 06:48:30 jmc Exp $
+.\" $OpenBSD: random.3,v 1.16 2003/06/01 19:27:27 jmc Exp $
.\"
.Dd April 19, 1991
.Dt RANDOM 3
@@ -154,8 +154,6 @@ it is initialized.
With 256 bytes of state information, the period of the random number
generator is greater than 2**69
which should be sufficient for most purposes.
-.Sh AUTHORS
-.An Earl T. Cohen
.Sh DIAGNOSTICS
If
.Fn initstate
@@ -185,6 +183,8 @@ function is an extension.
These
functions appeared in
.Bx 4.2 .
+.Sh AUTHORS
+.An Earl T. Cohen
.Sh BUGS
About 2/3 the speed of
.Xr rand 3 .
diff --git a/lib/libc/stdlib/realpath.3 b/lib/libc/stdlib/realpath.3
index 56fbea9edea..fac9374b05d 100644
--- a/lib/libc/stdlib/realpath.3
+++ b/lib/libc/stdlib/realpath.3
@@ -32,7 +32,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $OpenBSD: realpath.3,v 1.8 2001/04/23 15:30:25 aaron Exp $
+.\" $OpenBSD: realpath.3,v 1.9 2003/06/01 19:27:27 jmc Exp $
.\"
.Dd February 16, 1994
.Dt REALPATH 3
@@ -76,7 +76,7 @@ All but the last component of
must exist when
.Fn realpath
is called.
-.Sh "RETURN VALUES"
+.Sh RETURN VALUES
The
.Fn realpath
function returns
@@ -103,6 +103,13 @@ for any of the errors specified for the library functions
.Xr readlink 2 ,
and
.Xr getcwd 3 .
+.Sh SEE ALSO
+.Xr getcwd 3
+.Sh HISTORY
+The
+.Fn realpath
+function call first appeared in
+.Bx 4.4 .
.Sh CAVEATS
This implementation of
.Fn realpath
@@ -115,10 +122,3 @@ under certain circumstances, return a relative
.Fa resolvedname
when given a relative
.Fa pathname .
-.Sh SEE ALSO
-.Xr getcwd 3
-.Sh HISTORY
-The
-.Fn realpath
-function call first appeared in
-.Bx 4.4 .
diff --git a/lib/libc/stdlib/tsearch.3 b/lib/libc/stdlib/tsearch.3
index b000a0a8b16..585ba6fe81c 100644
--- a/lib/libc/stdlib/tsearch.3
+++ b/lib/libc/stdlib/tsearch.3
@@ -23,7 +23,7 @@
.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: tsearch.3,v 1.9 2000/08/09 15:51:21 aaron Exp $
+.\" $OpenBSD: tsearch.3,v 1.10 2003/06/01 19:27:27 jmc Exp $
.\"
.Dd June 15, 1997
.Dt TSEARCH 3
@@ -99,9 +99,6 @@ a value from the enum
.Sy "typedef enum { preorder, postorder, endorder, leaf } VISIT;"
specifying the traversal type, and a node level (where level
zero is the root of the tree).
-.Sh SEE ALSO
-.Xr bsearch 3 ,
-.Xr lsearch 3
.Sh RETURN VALUES
The
.Fn tsearch
@@ -125,3 +122,6 @@ or the datum cannot be found.
The
.Fn twalk
function returns no value.
+.Sh SEE ALSO
+.Xr bsearch 3 ,
+.Xr lsearch 3