From 4e59d26612d891249bc9249db1d72337790dfbb5 Mon Sep 17 00:00:00 2001 From: wiz Date: Sun, 16 Sep 2001 01:31:51 +0000 Subject: [PATCH] Drop unnecessary whitespace and .Pp, sort SEE ALSO, sort sections, and some minor fixes. --- lib/libc/stdlib/abs.3 | 6 +-- lib/libc/stdlib/alloca.3 | 6 +-- lib/libc/stdlib/atoll.3 | 4 +- lib/libc/stdlib/bsearch.3 | 8 ++-- lib/libc/stdlib/div.3 | 6 +-- lib/libc/stdlib/getenv.3 | 6 +-- lib/libc/stdlib/getopt.3 | 4 +- lib/libc/stdlib/getopt_long.3 | 49 ++++++++++----------- lib/libc/stdlib/getsubopt.3 | 4 +- lib/libc/stdlib/hcreate.3 | 8 ++-- lib/libc/stdlib/labs.3 | 6 +-- lib/libc/stdlib/ldiv.3 | 6 +-- lib/libc/stdlib/llabs.3 | 6 +-- lib/libc/stdlib/lldiv.3 | 6 +-- lib/libc/stdlib/malloc.3 | 83 +++++++++++++++++------------------ lib/libc/stdlib/qabs.3 | 6 +-- lib/libc/stdlib/qsort.3 | 8 ++-- lib/libc/stdlib/rand48.3 | 10 ++--- lib/libc/stdlib/random.3 | 6 +-- lib/libc/stdlib/strtod.3 | 6 +-- lib/libc/stdlib/strtol.3 | 8 ++-- lib/libc/stdlib/strtoul.3 | 12 ++--- lib/libc/stdlib/system.3 | 14 +++--- lib/libc/stdlib/tsearch.3 | 14 +++--- 24 files changed, 144 insertions(+), 148 deletions(-) diff --git a/lib/libc/stdlib/abs.3 b/lib/libc/stdlib/abs.3 index cb2a43b78757..6c134e367921 100644 --- a/lib/libc/stdlib/abs.3 +++ b/lib/libc/stdlib/abs.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: abs.3,v 1.7 2000/03/06 18:32:29 kleink Exp $ +.\" $NetBSD: abs.3,v 1.8 2001/09/16 01:31:51 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -63,11 +63,11 @@ function returns the absolute value. .Sh SEE ALSO +.Xr cabs 3 , .Xr floor 3 , +.Xr hypot 3 , .Xr labs 3 , .Xr llabs 3 , -.Xr cabs 3 , -.Xr hypot 3 , .Xr math 3 .Sh STANDARDS The diff --git a/lib/libc/stdlib/alloca.3 b/lib/libc/stdlib/alloca.3 index 846bcbedcd9f..2666ef3fdb4e 100644 --- a/lib/libc/stdlib/alloca.3 +++ b/lib/libc/stdlib/alloca.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: alloca.3,v 1.7 1999/03/22 19:44:57 garbled Exp $ +.\" $NetBSD: alloca.3,v 1.8 2001/09/16 01:31:51 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -49,7 +49,7 @@ The .Fn alloca function -allocates +allocates .Fa size bytes of space in the stack frame of the caller. This temporary space is automatically freed on @@ -77,6 +77,6 @@ is machine dependent; its use is discouraged. .\" .Fn alloca .\" function appeared in .\" .Bx ?? . -.\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd +.\" The function appeared in 32v, pwb and pwb.2 and in 3bsd 4bsd .\" The first man page (or link to a man page that I can find at the .\" moment is 4.3... diff --git a/lib/libc/stdlib/atoll.3 b/lib/libc/stdlib/atoll.3 index eda53f7bb65c..2c23a9ddc598 100644 --- a/lib/libc/stdlib/atoll.3 +++ b/lib/libc/stdlib/atoll.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: atoll.3,v 1.1 2000/03/06 18:32:29 kleink Exp $ +.\" $NetBSD: atoll.3,v 1.2 2001/09/16 01:31:51 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -71,7 +71,7 @@ strtoll(nptr, (char **)NULL, 10); .Xr strtod 3 , .Xr strtol 3 , .Xr strtoll 3 , -.Xr strtoul 3 +.Xr strtoul 3 , .Xr strtoull 3 .Sh STANDARDS The diff --git a/lib/libc/stdlib/bsearch.3 b/lib/libc/stdlib/bsearch.3 index 4f7a1679ec4a..f00d25014a80 100644 --- a/lib/libc/stdlib/bsearch.3 +++ b/lib/libc/stdlib/bsearch.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: bsearch.3,v 1.6 1998/02/05 18:49:50 perry Exp $ +.\" $NetBSD: bsearch.3,v 1.7 2001/09/16 01:31:51 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -54,12 +54,12 @@ The .Fn bsearch function searches an array of .Fa nmemb -objects, the initial member of which is +objects, the initial member of which is pointed to by .Fa base , for a member that matches the object pointed to by .Fa key . -The size of each member of the array is specified by +The size of each member of the array is specified by .Fa size . .Pp The contents of the array should be in ascending sorted order according @@ -86,7 +86,7 @@ If two members compare as equal, which member is matched is unspecified. .Xr db 3 , .Xr lsearch 3 , .Xr qsort 3 , -.\" .Xr tsearch 3 +.Xr tsearch 3 .Sh STANDARDS The .Fn bsearch diff --git a/lib/libc/stdlib/div.3 b/lib/libc/stdlib/div.3 index d46c482c3185..e10e8faf6318 100644 --- a/lib/libc/stdlib/div.3 +++ b/lib/libc/stdlib/div.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: div.3,v 1.7 2000/03/06 18:32:30 kleink Exp $ +.\" $NetBSD: div.3,v 1.8 2001/09/16 01:31:51 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -64,8 +64,8 @@ and .Sh SEE ALSO .Xr ldiv 3 , .Xr lldiv 3 , -.Xr qdiv 3 , -.Xr math 3 +.Xr math 3 , +.Xr qdiv 3 .Sh STANDARDS The .Fn div diff --git a/lib/libc/stdlib/getenv.3 b/lib/libc/stdlib/getenv.3 index 69813fe67185..a4b2ed223bce 100644 --- a/lib/libc/stdlib/getenv.3 +++ b/lib/libc/stdlib/getenv.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: getenv.3,v 1.10 1998/02/06 13:53:17 kleink Exp $ +.\" $NetBSD: getenv.3,v 1.11 2001/09/16 01:31:51 wiz Exp $ .\" .\" Copyright (c) 1988, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -67,7 +67,7 @@ the given arguments .Ar name and .Ar value -may be appended and prepended, +may be appended and prepended, respectively, with an equal sign .Dq Li \&= . @@ -90,7 +90,7 @@ If the variable .Ar name does not exist in the list, it is inserted with the given -.Ar value. +.Ar value . If the variable does exist, the argument .Ar overwrite is tested; if diff --git a/lib/libc/stdlib/getopt.3 b/lib/libc/stdlib/getopt.3 index 9bdc9f1e19c6..3f1e1ce963fe 100644 --- a/lib/libc/stdlib/getopt.3 +++ b/lib/libc/stdlib/getopt.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: getopt.3,v 1.19 2000/01/25 23:22:49 elric Exp $ +.\" $NetBSD: getopt.3,v 1.20 2001/09/16 01:31:51 wiz Exp $ .\" .\" Copyright (c) 1988, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -170,7 +170,7 @@ function multiple times. This is an extension to the .St -p1003.2 specification. -.Sh EXAMPLE +.Sh EXAMPLES .Bd -literal -compact extern char *optarg; extern int optind; diff --git a/lib/libc/stdlib/getopt_long.3 b/lib/libc/stdlib/getopt_long.3 index 74207ca18195..1d0dd8b3bda8 100644 --- a/lib/libc/stdlib/getopt_long.3 +++ b/lib/libc/stdlib/getopt_long.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: getopt_long.3,v 1.4 2000/11/26 22:35:53 wiz Exp $ +.\" $NetBSD: getopt_long.3,v 1.5 2001/09/16 01:31:52 wiz Exp $ .\" .\" Copyright (c) 1988, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -35,7 +35,7 @@ .\" .Dd April 1, 2000 .Dt GETOPT_LONG 3 -.Os +.Os .Sh NAME .Nm getopt_long .Nd get long options from command line argument list @@ -48,46 +48,46 @@ .Sh DESCRIPTION The .Fn getopt_long -function is similar to +function is similar to .Xr getopt 3 but it accepts options in two forms: words and characters. The .Fn getopt_long -function provides a superset of of the functionality of +function provides a superset of of the functionality of .Xr getopt 3 . .Fn getopt_long can be used in two ways. In the first way, every long option understood by the program has a corresponding short option, and the option structure is only used to translate from long options to short -options. When used in this fashion, +options. When used in this fashion, .Fn getopt_long -behaves identically to +behaves identically to .Xr getopt 3 . This is a good way to add long option processing to an existing program with the minimum of rewriting. .Pp -In the second mechanism, a long option sets a flag in the +In the second mechanism, a long option sets a flag in the .Fa option structure passed, or will store a pointer to the command line argument -in the -.Fa option +in the +.Fa option structure passed to it for options that take arguments. Additionally, the long option's argument may be specified as a single argument with -an equal sign, e.g. +an equal sign, e.g. .Bd -literal myprogram --myoption=somevalue .Ed .Pp -When a long option is processed the call to +When a long option is processed the call to .Fn getopt_long will return 0. For this reason, long option processing without -shortcuts is not backwards compatible with +shortcuts is not backwards compatible with .Xr getopt 3 . .Pp It is possible to combine these methods, providing for long options processing with short option equivalents for some options. Less frequently used options would be processed as long options only. .Pp -The +The .Fn getopt_long call requires a structure to be initialized describing the long options. The structure is: @@ -100,11 +100,11 @@ struct option { }; .Ed .Pp -The +The .Fa name field should contain the option name without the leading double dash. .Pp -The +The .Fa has_arg field should be one of: .Bl -tag -width "optional_argument" @@ -118,14 +118,14 @@ an argument to the option may be presented. .Pp If .Fa flag -is non-NULL, then the integer pointed to by it will be set to the -value in the +is non-NULL, then the integer pointed to by it will be set to the +value in the .Fa val -field. If the -.Fa flag -field is NULL, then the +field. If the +.Fa flag +field is NULL, then the .Fa val -field will be returned. Setting +field will be returned. Setting .Fa flag to NULL and setting .Fa val @@ -174,7 +174,6 @@ argc -= optind; argv += optind; .Ed .Sh IMPLEMENTATION DIFFERENCES -.Pp This section describes differences to the GNU implementation found in glibc-2.1.3: .Bl -tag -width "xxx" @@ -210,7 +209,7 @@ handling of --a in getopt: .It Li GNU parses this as option '-', option 'a'. .It Li NetBSD -parses this as '--', and returns -1 (ignoring the a). (Because +parses this as '--', and returns -1 (ignoring the a). (Because the original getopt does.) .El .It Li o @@ -227,7 +226,7 @@ handling of -W with W; in option string in getopt (not getopt_long): .It Li GNU causes a segfault. .It Li NetBSD -returns -1, with optind pointing past the argument of -W +returns -1, with optind pointing past the argument of -W (as if `-W arg' were `--arg', and thus '--' had been found). .\" How should we treat W; in the option string when called via .\" getopt? Ignore the ';' or treat it as a ':'? Issue a warning? @@ -266,7 +265,7 @@ swaps.) .Sh HISTORY The .Fn getopt_long -function first appeared in GNU libiberty. The first +function first appeared in GNU libiberty. The first .Nx implementation appeared in 1.5. .Sh BUGS diff --git a/lib/libc/stdlib/getsubopt.3 b/lib/libc/stdlib/getsubopt.3 index 7e3d560d475b..6f0f9016f95b 100644 --- a/lib/libc/stdlib/getsubopt.3 +++ b/lib/libc/stdlib/getsubopt.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: getsubopt.3,v 1.5 2001/04/24 09:07:43 joda Exp $ +.\" $NetBSD: getsubopt.3,v 1.6 2001/09/16 01:31:52 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -96,7 +96,7 @@ The argument will be set to point to the ``value'' portion of the token, or .Dv NULL if no ``value'' portion was present. -.Sh EXAMPLE +.Sh EXAMPLES .Bd -literal -compact char *tokens[] = { #define ONE 0 diff --git a/lib/libc/stdlib/hcreate.3 b/lib/libc/stdlib/hcreate.3 index cac2a929c79a..1bd40140b8cb 100644 --- a/lib/libc/stdlib/hcreate.3 +++ b/lib/libc/stdlib/hcreate.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: hcreate.3,v 1.2 2001/02/14 05:59:56 cgd Exp $ +.\" $NetBSD: hcreate.3,v 1.3 2001/09/16 01:31:52 wiz Exp $ .\" .\" Copyright (c) 1999 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -128,7 +128,6 @@ key must not be modified during the lifetime of the hash table. Search the hash table without inserting .Fa item . .El -.Pp .Sh RETURN VALUES If successful, the .Fn hcreate @@ -181,9 +180,6 @@ and .Fn hsearch functions conform to .St -xpg4.2 . -.Sh BUGS -.Pp -The interface permits the use of only one hash table at a time. .Sh HISTORY The .Fn hcreate , @@ -192,3 +188,5 @@ and .Fn hsearch functions first appeared in .At V . +.Sh BUGS +The interface permits the use of only one hash table at a time. diff --git a/lib/libc/stdlib/labs.3 b/lib/libc/stdlib/labs.3 index 81b9fe5ff0fb..3d73adea7327 100644 --- a/lib/libc/stdlib/labs.3 +++ b/lib/libc/stdlib/labs.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: labs.3,v 1.6 2000/03/06 18:32:30 kleink Exp $ +.\" $NetBSD: labs.3,v 1.7 2001/09/16 01:31:52 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -57,9 +57,9 @@ returns the absolute value of the long integer .Ar j . .Sh SEE ALSO .Xr abs 3 , -.Xr llabs 3 , -.Xr floor 3 , .Xr cabs 3 , +.Xr floor 3 , +.Xr llabs 3 , .Xr math 3 .Sh STANDARDS The diff --git a/lib/libc/stdlib/ldiv.3 b/lib/libc/stdlib/ldiv.3 index 3296efcf131c..f2d25d6ad9d4 100644 --- a/lib/libc/stdlib/ldiv.3 +++ b/lib/libc/stdlib/ldiv.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: ldiv.3,v 1.8 2000/03/06 18:32:30 kleink Exp $ +.\" $NetBSD: ldiv.3,v 1.9 2001/09/16 01:31:52 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -66,8 +66,8 @@ and .Sh SEE ALSO .Xr div 3 , .Xr lldiv 3 , -.Xr qdiv 3 , -.Xr math 3 +.Xr math 3 , +.Xr qdiv 3 .Sh STANDARDS The .Fn ldiv diff --git a/lib/libc/stdlib/llabs.3 b/lib/libc/stdlib/llabs.3 index 492807ba9ec5..d9adfdf08c94 100644 --- a/lib/libc/stdlib/llabs.3 +++ b/lib/libc/stdlib/llabs.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: llabs.3,v 1.1 2000/03/06 18:32:31 kleink Exp $ +.\" $NetBSD: llabs.3,v 1.2 2001/09/16 01:31:52 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -57,9 +57,9 @@ returns the absolute value of the long long integer .Ar j . .Sh SEE ALSO .Xr abs 3 , -.Xr labs 3 , -.Xr floor 3 , .Xr cabs 3 , +.Xr floor 3 , +.Xr labs 3 , .Xr math 3 .Sh STANDARDS The diff --git a/lib/libc/stdlib/lldiv.3 b/lib/libc/stdlib/lldiv.3 index 25cc475bbcbe..578704f5bff2 100644 --- a/lib/libc/stdlib/lldiv.3 +++ b/lib/libc/stdlib/lldiv.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: lldiv.3,v 1.1 2000/03/06 18:32:31 kleink Exp $ +.\" $NetBSD: lldiv.3,v 1.2 2001/09/16 01:31:52 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -66,8 +66,8 @@ and .Sh SEE ALSO .Xr div 3 , .Xr ldiv 3 , -.Xr qdiv 3 , -.Xr math 3 +.Xr math 3 , +.Xr qdiv 3 .Sh STANDARDS The .Fn lldiv diff --git a/lib/libc/stdlib/malloc.3 b/lib/libc/stdlib/malloc.3 index 0091d9ce040c..d0c039ef508d 100644 --- a/lib/libc/stdlib/malloc.3 +++ b/lib/libc/stdlib/malloc.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: malloc.3,v 1.12 2000/01/09 16:14:04 hubertf Exp $ +.\" $NetBSD: malloc.3,v 1.13 2001/09/16 01:31:53 wiz Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -36,7 +36,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)malloc.3 8.1 (Berkeley) 6/4/93 -.\" From FreeBSD: Id: malloc.3,v 1.18 1999/03/28 14:16:04 phk Exp +.\" From FreeBSD: Id: malloc.3,v 1.18 1999/03/28 14:16:04 phk Exp .\" .Dd August 2, 1999 .Dt MALLOC 3 @@ -146,7 +146,7 @@ The ``name'' of the file referenced by the symbolic link named the value of the environment variable .Ev MALLOC_OPTIONS , and the string pointed to by the global variable -.Va malloc_options +.Va malloc_options will be interpreted, in that order, character by character as flags. .Pp Most flags are single letters, @@ -205,7 +205,7 @@ Consult the source for details on this option. .It V Attempting to allocate zero bytes will return a NULL pointer instead of a valid pointer. -(The default behavior is to make a minimal allocation and return a +(The default behavior is to make a minimal allocation and return a pointer to it.) This option is provided for System V compatibility. .It X @@ -241,32 +241,8 @@ The and .Dq Z options are intended for testing and debugging. -An application which changes its behavior when these options are used +An application which changes its behavior when these options are used is flawed. -.Sh EXAMPLES -To set a systemwide reduction of cache size, and to dump core whenever -a problem occurs: -.Pp -.Bd -literal -offset indent -ln -s 'A<' /etc/malloc.conf -.Ed -.Pp -To specify in the source that a program does no return value checking -on calls to these functions: -.Bd -literal -offset indent -extern char *malloc_options; -malloc_options = "X"; -.Ed -.Sh ENVIRONMENT -The following environment variables affect the execution of the allocation -functions: -.Bl -tag -width MMM -.It Ev MALLOC_OPTIONS -If the environment variable -.Ev MALLOC_OPTIONS -is set, the characters it contains will be interpreted as flags to the -allocation functions. -.El .Sh RETURN VALUES The .Fn malloc @@ -292,8 +268,31 @@ is still available and intact. The .Fn free function returns no value. -.Sh "DEBUGGING MALLOC PROBLEMS" +.Sh ENVIRONMENT +The following environment variables affect the execution of the allocation +functions: +.Bl -tag -width MMM +.It Ev MALLOC_OPTIONS +If the environment variable +.Ev MALLOC_OPTIONS +is set, the characters it contains will be interpreted as flags to the +allocation functions. +.El +.Sh EXAMPLES +To set a systemwide reduction of cache size, and to dump core whenever +a problem occurs: .Pp +.Bd -literal -offset indent +ln -s 'A<' /etc/malloc.conf +.Ed +.Pp +To specify in the source that a program does no return value checking +on calls to these functions: +.Bd -literal -offset indent +extern char *malloc_options; +malloc_options = "X"; +.Ed +.Sh DEBUGGING MALLOC PROBLEMS The major difference between this implementation and other allocation implementations is that the free pages are not accessed unless allocated, and are aggressively returned to the kernel for reuse. @@ -311,8 +310,8 @@ done by a process. .Ed .Pp A side effect of this architecture is that many minor transgressions on -the interface which would traditionally not be detected are in fact -detected. As a result, programs that have been running happily for +the interface which would traditionally not be detected are in fact +detected. As a result, programs that have been running happily for years may suddenly start to complain loudly, when linked with this allocation implementation. .Pp @@ -351,8 +350,8 @@ would be prohibitive. There are a number of allocation implementations available on the 'Net which focus on detecting and pinpointing problems by trading performance for extra sanity checks and detailed diagnostics. -.Sh "DIAGNOSTIC MESSAGES -If +.Sh DIAGNOSTIC MESSAGES +If .Fn malloc , .Fn calloc , .Fn realloc @@ -441,6 +440,14 @@ and .Fn free functions conform to .St -ansiC . +.Sh HISTORY +The present allocation implementation started out as a filesystem for a +drum attached to a 20bit binary challenged computer which was built +with discrete germanium transistors. It has since graduated to +handle primary storage rather than secondary. +It first appeared in its new shape and ability in +.Fx 2.2 , and then in +.Nx 1.5 . .Sh BUGS The messages printed in case of problems provide no detail about the actual values. @@ -451,11 +458,3 @@ allocate zero bytes is a silly response to a silly question. This implementation was authored by Poul-Henning Kamp. Please report any problems to him at .Li . -.Sh HISTORY -The present allocation implementation started out as a filesystem for a -drum attached to a 20bit binary challenged computer which was built -with discrete germanium transistors. It has since graduated to -handle primary storage rather than secondary. -It first appeared in its new shape and ability in -.Fx 2.2 , and then in -.Nx 1.5 . diff --git a/lib/libc/stdlib/qabs.3 b/lib/libc/stdlib/qabs.3 index 229851bac23c..ef7520b1279d 100644 --- a/lib/libc/stdlib/qabs.3 +++ b/lib/libc/stdlib/qabs.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: qabs.3,v 1.4 2000/03/06 18:32:32 kleink Exp $ +.\" $NetBSD: qabs.3,v 1.5 2001/09/16 01:31:53 wiz Exp $ .\" .\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" All rights reserved. @@ -57,10 +57,10 @@ returns the absolute value of the quad integer .Ar j . .Sh SEE ALSO .Xr abs 3 , +.Xr cabs 3 , +.Xr floor 3 , .Xr labs 3 , .Xr llabs 3 , -.Xr floor 3 , -.Xr cabs 3 , .Xr math 3 .Sh BUGS The absolute value of the most negative integer remains negative. diff --git a/lib/libc/stdlib/qsort.3 b/lib/libc/stdlib/qsort.3 index 914ae750722f..a825823468ac 100644 --- a/lib/libc/stdlib/qsort.3 +++ b/lib/libc/stdlib/qsort.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: qsort.3,v 1.7 1998/08/29 08:32:35 lukem Exp $ +.\" $NetBSD: qsort.3,v 1.8 2001/09/16 01:31:53 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -41,8 +41,8 @@ .Dt QSORT 3 .Os .Sh NAME -.Nm qsort , -.Nm heapsort , +.Nm qsort , +.Nm heapsort , .Nm mergesort .Nd sort functions .Sh LIBRARY @@ -137,7 +137,7 @@ The function .Fn mergesort requires additional memory of size .Fa nmemb * -.Fa size +.Fa size bytes; it should be used only when space is not at a premium. .Fn mergesort is optimized for data with pre-existing order; its worst case diff --git a/lib/libc/stdlib/rand48.3 b/lib/libc/stdlib/rand48.3 index 8afd776f059d..7c635bce03f4 100644 --- a/lib/libc/stdlib/rand48.3 +++ b/lib/libc/stdlib/rand48.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: rand48.3,v 1.6 2000/07/05 15:45:33 msaitoh Exp $ +.\" $NetBSD: rand48.3,v 1.7 2001/09/16 01:31:53 wiz Exp $ .\" .\" Copyright (c) 1993 Martin Birgmeier .\" All rights reserved. @@ -29,7 +29,7 @@ .Lb libc .Sh SYNOPSIS .Fd #include -.Ft double +.Ft double .Fn drand48 void .Ft double .Fn erand48 "unsigned short xseed[3]" @@ -155,9 +155,9 @@ always also set the multiplicand and addend for any of the six generator calls. .Pp For a more powerful random number generator, see -.Xr random 3 -.Sh AUTHOR -Martin Birgmeier +.Xr random 3 . .Sh SEE ALSO .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 79dc04bbdff6..3110335c4beb 100644 --- a/lib/libc/stdlib/random.3 +++ b/lib/libc/stdlib/random.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: random.3,v 1.11 2001/06/09 01:43:53 assar Exp $ +.\" $NetBSD: random.3,v 1.12 2001/09/16 01:31:53 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -152,8 +152,6 @@ generator is greater than .if t 2\u\s769\s10\d, .if n 2**69 which should be sufficient for most purposes. -.Sh AUTHORS -.An Earl T. Cohen .Sh DIAGNOSTICS If .Fn initstate @@ -170,6 +168,8 @@ messages are printed on the standard error output. 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/strtod.3 b/lib/libc/stdlib/strtod.3 index 419a09892192..5a9b3628a99e 100644 --- a/lib/libc/stdlib/strtod.3 +++ b/lib/libc/stdlib/strtod.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: strtod.3,v 1.9 2001/03/21 22:42:29 kleink Exp $ +.\" $NetBSD: strtod.3,v 1.10 2001/09/16 01:31:53 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -54,7 +54,7 @@ string to double .Sh DESCRIPTION The .Fn strtod -function converts the initial portion of the string +function converts the initial portion of the string pointed to by .Fa nptr to @@ -97,7 +97,7 @@ is stored in If the correct value would cause underflow, zero is returned and .Dv ERANGE -is stored in +is stored in .Va errno . .Sh ERRORS .Bl -tag -width Er diff --git a/lib/libc/stdlib/strtol.3 b/lib/libc/stdlib/strtol.3 index fc2779067d2a..2ac65ff6e31c 100644 --- a/lib/libc/stdlib/strtol.3 +++ b/lib/libc/stdlib/strtol.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: strtol.3,v 1.14 2001/04/28 15:41:30 kleink Exp $ +.\" $NetBSD: strtol.3,v 1.15 2001/09/16 01:31:53 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -41,9 +41,9 @@ .Dt STRTOL 3 .Os .Sh NAME -.Nm strtol , -.Nm strtoll , -.Nm strtoimax , +.Nm strtol , +.Nm strtoll , +.Nm strtoimax , .Nm strtoq .Nd "convert string value to a long, long long, intmax_t or quad_t integer" .Sh LIBRARY diff --git a/lib/libc/stdlib/strtoul.3 b/lib/libc/stdlib/strtoul.3 index f2a61690c748..beedb3d5d28f 100644 --- a/lib/libc/stdlib/strtoul.3 +++ b/lib/libc/stdlib/strtoul.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: strtoul.3,v 1.12 2001/04/28 15:41:30 kleink Exp $ +.\" $NetBSD: strtoul.3,v 1.13 2001/09/16 01:31:54 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -41,9 +41,9 @@ .Dt STRTOUL 3 .Os .Sh NAME -.Nm strtoul , -.Nm strtoull , -.Nm strtoumax , +.Nm strtoul , +.Nm strtoull , +.Nm strtoumax , .Nm strtouq .Nd "convert a string to an unsigned long, unsigned long long, uintmax_t or uquad_t integer" .Sh LIBRARY @@ -187,9 +187,9 @@ is set to The given string was out of range; the value converted has been clamped. .El .Sh SEE ALSO +.Xr strtoimax 3 , .Xr strtol 3 , -.Xr strtoll 3 , -.Xr strtoimax 3 +.Xr strtoll 3 .Sh STANDARDS The .Fn strtoul diff --git a/lib/libc/stdlib/system.3 b/lib/libc/stdlib/system.3 index a4f74af549ee..a411535c8054 100644 --- a/lib/libc/stdlib/system.3 +++ b/lib/libc/stdlib/system.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: system.3,v 1.10 1999/04/06 19:44:42 tron Exp $ +.\" $NetBSD: system.3,v 1.11 2001/09/16 01:31:54 wiz Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -74,18 +74,18 @@ pointer, will return non-zero. Otherwise, .Fn system -returns the termination status of the shell in the format specified by +returns the termination status of the shell in the format specified by .Xr waitpid 2 . -.Sh RETURN VALUES +.Sh RETURN VALUES If a child process cannot be created, or the termination status of -the shell cannot be obtained, +the shell cannot be obtained, .Fn system returns -1 and sets .Va errno to indicate the error. -If execution of the shell fails, +If execution of the shell fails, .Fn system -returns the termination status for a program that terminates with a call of +returns the termination status for a program that terminates with a call of .Fn exit 127 . .Sh SEE ALSO .Xr sh 1 , @@ -97,6 +97,6 @@ The .Fn system function conforms to -.St -ansiC +.St -ansiC and .St -p1003.2-92 . diff --git a/lib/libc/stdlib/tsearch.3 b/lib/libc/stdlib/tsearch.3 index 25ff467991f9..95adb611f369 100644 --- a/lib/libc/stdlib/tsearch.3 +++ b/lib/libc/stdlib/tsearch.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: tsearch.3,v 1.1 1999/02/22 10:33:15 christos Exp $ +.\" $NetBSD: tsearch.3,v 1.2 2001/09/16 01:31:54 wiz Exp $ .\" Copyright (c) 1997 Todd C. Miller .\" All rights reserved. .\" @@ -24,7 +24,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.2 1998/06/21 22:13:49 millert Exp +.\" OpenBSD: tsearch.3,v 1.2 1998/06/21 22:13:49 millert Exp .\" .Dd June 15, 1997 .Dt TSEARCH 3 @@ -90,14 +90,10 @@ and calls the function on each node. .Fa Action is called with three arguments: a pointer to the current node, -a value from the enum +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 hsearch 3 , -.Xr lsearch 3 .Sh RETURN VALUES The .Fn tsearch @@ -115,3 +111,7 @@ is NULL or the datum cannot be found. The .Fn twalk function returns no value. +.Sh SEE ALSO +.Xr bsearch 3 , +.Xr hsearch 3 , +.Xr lsearch 3