summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libc/stdlib/a64l.315
-rw-r--r--src/lib/libc/stdlib/abort.311
-rw-r--r--src/lib/libc/stdlib/abs.310
-rw-r--r--src/lib/libc/stdlib/alloca.311
-rw-r--r--src/lib/libc/stdlib/atexit.38
-rw-r--r--src/lib/libc/stdlib/atoi.35
-rw-r--r--src/lib/libc/stdlib/atol.35
-rw-r--r--src/lib/libc/stdlib/bsearch.36
-rw-r--r--src/lib/libc/stdlib/div.38
-rw-r--r--src/lib/libc/stdlib/exit.311
-rw-r--r--src/lib/libc/stdlib/getenv.333
-rw-r--r--src/lib/libc/stdlib/getopt.333
-rw-r--r--src/lib/libc/stdlib/getsubopt.330
-rw-r--r--src/lib/libc/stdlib/labs.38
-rw-r--r--src/lib/libc/stdlib/ldiv.38
-rw-r--r--src/lib/libc/stdlib/memory.37
-rw-r--r--src/lib/libc/stdlib/qabs.35
-rw-r--r--src/lib/libc/stdlib/qsort.322
-rw-r--r--src/lib/libc/stdlib/radixsort.317
-rw-r--r--src/lib/libc/stdlib/rand.38
-rw-r--r--src/lib/libc/stdlib/rand48.326
-rw-r--r--src/lib/libc/stdlib/random.339
-rw-r--r--src/lib/libc/stdlib/realpath.37
-rw-r--r--src/lib/libc/stdlib/strtod.325
-rw-r--r--src/lib/libc/stdlib/strtol.334
-rw-r--r--src/lib/libc/stdlib/strtoul.328
-rw-r--r--src/lib/libc/stdlib/system.313
-rw-r--r--src/lib/libc/stdlib/tsearch.38
28 files changed, 195 insertions, 246 deletions
diff --git a/src/lib/libc/stdlib/a64l.3 b/src/lib/libc/stdlib/a64l.3
index 1074dbff2e..787634303c 100644
--- a/src/lib/libc/stdlib/a64l.3
+++ b/src/lib/libc/stdlib/a64l.3
@@ -1,4 +1,3 @@
1.\"
2.\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> 1.\" Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
3.\" All rights reserved. 2.\" All rights reserved.
4.\" 3.\"
@@ -24,7 +23,7 @@
24.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 23.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
25.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26.\" 25.\"
27.\" $OpenBSD: a64l.3,v 1.4 1999/06/29 18:36:15 aaron Exp $ 26.\" $OpenBSD: a64l.3,v 1.5 2000/04/20 13:50:01 aaron Exp $
28.\" 27.\"
29.Dd August 17, 1997 28.Dd August 17, 1997
30.Dt A64L 3 29.Dt A64L 3
@@ -46,9 +45,9 @@ and
46.Fn l64a 45.Fn l64a
47functions are used to maintain numbers stored in radix-64 46functions are used to maintain numbers stored in radix-64
48.Tn ASCII 47.Tn ASCII
49characters. This is a notation by which 32-bit integers 48characters.
50can be represented by up to six characters; each character 49This is a notation by which 32-bit integers
51represents a 50can be represented by up to six characters; each character represents a
52.Dq digit 51.Dq digit
53in a radix-64 notation. 52in a radix-64 notation.
54.Pp 53.Pp
@@ -73,14 +72,16 @@ for 38-63.
73The 72The
74.Fn a64l 73.Fn a64l
75function takes a pointer to a null-terminated radix-64 representation 74function takes a pointer to a null-terminated radix-64 representation
76and returns a corresponding 32-bit value. If the string pointed to by 75and returns a corresponding 32-bit value.
76If the string pointed to by
77.Fa s 77.Fa s
78contains more than six characters, 78contains more than six characters,
79.Fn a64l 79.Fn a64l
80will use the first six. 80will use the first six.
81.Fn a64l 81.Fn a64l
82scans the character string from left to right, decoding 82scans the character string from left to right, decoding
83each character as a 6-bit radix-64 number. If a long integer is 83each character as a 6-bit radix-64 number.
84If a long integer is
84larger than 32 bits, the return value will be sign-extended. 85larger than 32 bits, the return value will be sign-extended.
85.Pp 86.Pp
86.Fn l64a 87.Fn l64a
diff --git a/src/lib/libc/stdlib/abort.3 b/src/lib/libc/stdlib/abort.3
index a0dfba7e80..743d42dd8a 100644
--- a/src/lib/libc/stdlib/abort.3
+++ b/src/lib/libc/stdlib/abort.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: abort.3,v 1.5 1999/06/29 18:36:17 aaron Exp $ 36.\" $OpenBSD: abort.3,v 1.6 2000/04/20 13:50:01 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt ABORT 3 39.Dt ABORT 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn abort 50.Fn abort
51function causes abnormal program termination to occur, unless the 51function causes abnormal program termination to occur, unless the signal
52signal
53.Dv SIGABRT 52.Dv SIGABRT
54is being caught and the signal handler does not return. 53is being caught and the signal handler does not return.
55.Pp 54.Pp
@@ -57,14 +56,12 @@ Any open streams are flushed and closed.
57.Sh RETURN VALUES 56.Sh RETURN VALUES
58The 57The
59.Fn abort 58.Fn abort
60function 59function never returns.
61never returns.
62.Sh SEE ALSO 60.Sh SEE ALSO
63.Xr sigaction 2 , 61.Xr sigaction 2 ,
64.Xr exit 3 62.Xr exit 3
65.Sh STANDARDS 63.Sh STANDARDS
66The 64The
67.Fn abort 65.Fn abort
68function 66function conforms to
69conforms to
70.St -p1003.1-90 . 67.St -p1003.1-90 .
diff --git a/src/lib/libc/stdlib/abs.3 b/src/lib/libc/stdlib/abs.3
index 1e3675d7b5..0f7c097ade 100644
--- a/src/lib/libc/stdlib/abs.3
+++ b/src/lib/libc/stdlib/abs.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: abs.3,v 1.4 1999/06/29 18:36:17 aaron Exp $ 36.\" $OpenBSD: abs.3,v 1.5 2000/04/20 13:50:01 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt ABS 3 39.Dt ABS 3
@@ -48,16 +48,12 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn abs 50.Fn abs
51function 51function computes the absolute value of the integer
52computes
53the absolute value of the integer
54.Fa j . 52.Fa j .
55.Sh RETURN VALUES 53.Sh RETURN VALUES
56The 54The
57.Fn abs 55.Fn abs
58function 56function returns the absolute value.
59returns
60the absolute value.
61.Sh SEE ALSO 57.Sh SEE ALSO
62.Xr cabs 3 , 58.Xr cabs 3 ,
63.Xr floor 3 , 59.Xr floor 3 ,
diff --git a/src/lib/libc/stdlib/alloca.3 b/src/lib/libc/stdlib/alloca.3
index 56d52ebe1b..e9e0b67ee3 100644
--- a/src/lib/libc/stdlib/alloca.3
+++ b/src/lib/libc/stdlib/alloca.3
@@ -29,7 +29,7 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: alloca.3,v 1.7 1999/06/29 18:36:18 aaron Exp $ 32.\" $OpenBSD: alloca.3,v 1.8 2000/04/20 13:50:01 aaron Exp $
33.\" 33.\"
34.Dd May 2, 1991 34.Dd May 2, 1991
35.Dt ALLOCA 3 35.Dt ALLOCA 3
@@ -44,12 +44,10 @@
44.Sh DESCRIPTION 44.Sh DESCRIPTION
45The 45The
46.Fn alloca 46.Fn alloca
47function 47function allocates
48allocates
49.Fa size 48.Fa size
50bytes of space in the stack frame of the caller. 49bytes of space in the stack frame of the caller.
51This temporary space is automatically freed on 50This temporary space is automatically freed on return.
52return.
53.Sh RETURN VALUES 51.Sh RETURN VALUES
54The 52The
55.Fn alloca 53.Fn alloca
@@ -63,8 +61,7 @@ function returns a pointer to the beginning of the allocated space.
63.Sh BUGS 61.Sh BUGS
64The 62The
65.Fn alloca 63.Fn alloca
66function 64function is machine dependent; its use is discouraged.
67is machine dependent; its use is discouraged.
68.\" .Sh HISTORY 65.\" .Sh HISTORY
69.\" The 66.\" The
70.\" .Fn alloca 67.\" .Fn alloca
diff --git a/src/lib/libc/stdlib/atexit.3 b/src/lib/libc/stdlib/atexit.3
index cc37d08b00..5d79ede649 100644
--- a/src/lib/libc/stdlib/atexit.3
+++ b/src/lib/libc/stdlib/atexit.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: atexit.3,v 1.3 1999/06/29 18:36:18 aaron Exp $ 36.\" $OpenBSD: atexit.3,v 1.4 2000/04/20 13:50:01 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt ATEXIT 3 39.Dt ATEXIT 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn atexit 50.Fn atexit
51function 51function registers the given
52registers the given
53.Fa function 52.Fa function
54to be called at program exit, whether via 53to be called at program exit, whether via
55.Xr exit 3 54.Xr exit 3
@@ -72,6 +71,5 @@ The existing list of functions is unmodified.
72.Sh STANDARDS 71.Sh STANDARDS
73The 72The
74.Fn atexit 73.Fn atexit
75function 74function conforms to
76conforms to
77.St -ansiC . 75.St -ansiC .
diff --git a/src/lib/libc/stdlib/atoi.3 b/src/lib/libc/stdlib/atoi.3
index 80831bdd2f..69b94be70c 100644
--- a/src/lib/libc/stdlib/atoi.3
+++ b/src/lib/libc/stdlib/atoi.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: atoi.3,v 1.4 1999/09/13 07:14:13 deraadt Exp $ 36.\" $OpenBSD: atoi.3,v 1.5 2000/04/20 13:50:01 aaron Exp $
37.\" 37.\"
38.Dd June 4, 1993 38.Dd June 4, 1993
39.Dt ATOI 3 39.Dt ATOI 3
@@ -66,7 +66,8 @@ does no overflow checking, handles unsigned numbers poorly,
66and handles strings containing trailing extra characters 66and handles strings containing trailing extra characters
67(like 67(like
68.Dq "123abc" Ns ) 68.Dq "123abc" Ns )
69poorly. Careful use of 69poorly.
70Careful use of
70.Xr strtol 3 71.Xr strtol 3
71and 72and
72.Xr strtoul 3 73.Xr strtoul 3
diff --git a/src/lib/libc/stdlib/atol.3 b/src/lib/libc/stdlib/atol.3
index c7b4ff30da..53a518997f 100644
--- a/src/lib/libc/stdlib/atol.3
+++ b/src/lib/libc/stdlib/atol.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: atol.3,v 1.3 1999/06/29 18:36:19 aaron Exp $ 36.\" $OpenBSD: atol.3,v 1.4 2000/04/20 13:50:01 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt ATOL 3 39.Dt ATOL 3
@@ -69,6 +69,5 @@ strtol(nptr, (char **)NULL, 10);
69.Sh STANDARDS 69.Sh STANDARDS
70The 70The
71.Fn atol 71.Fn atol
72function 72function conforms to
73conforms to
74.St -ansiC . 73.St -ansiC .
diff --git a/src/lib/libc/stdlib/bsearch.3 b/src/lib/libc/stdlib/bsearch.3
index 63d4e6af69..9bb9d4ece4 100644
--- a/src/lib/libc/stdlib/bsearch.3
+++ b/src/lib/libc/stdlib/bsearch.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: bsearch.3,v 1.4 1999/06/29 18:36:19 aaron Exp $ 36.\" $OpenBSD: bsearch.3,v 1.5 2000/04/20 13:50:01 aaron Exp $
37.\" 37.\"
38.Dd April 19, 1994 38.Dd April 19, 1994
39.Dt BSEARCH 3 39.Dt BSEARCH 3
@@ -63,9 +63,7 @@ to the comparison function referenced by
63.Fa compar . 63.Fa compar .
64The 64The
65.Fa compar 65.Fa compar
66routine 66routine is expected to have two arguments which point to the
67is expected to have
68two arguments which point to the
69.Fa key 67.Fa key
70object and to an array member, in that order, and should return an integer 68object and to an array member, in that order, and should return an integer
71less than, equal to, or greater than zero if the 69less than, equal to, or greater than zero if the
diff --git a/src/lib/libc/stdlib/div.3 b/src/lib/libc/stdlib/div.3
index 5cc3b8757c..1f651d7fd3 100644
--- a/src/lib/libc/stdlib/div.3
+++ b/src/lib/libc/stdlib/div.3
@@ -31,7 +31,7 @@
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE. 32.\" SUCH DAMAGE.
33.\" 33.\"
34.\" $OpenBSD: div.3,v 1.4 1999/06/29 18:36:19 aaron Exp $ 34.\" $OpenBSD: div.3,v 1.5 2000/04/20 13:50:02 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt DIV 3 37.Dt DIV 3
@@ -46,8 +46,7 @@
46.Sh DESCRIPTION 46.Sh DESCRIPTION
47The 47The
48.Fn div 48.Fn div
49function 49function computes the value
50computes the value
51.Fa num Ns No / Ns Fa denom 50.Fa num Ns No / Ns Fa denom
52and returns the quotient and remainder in a structure named 51and returns the quotient and remainder in a structure named
53.Fa div_t 52.Fa div_t
@@ -64,6 +63,5 @@ and
64.Sh STANDARDS 63.Sh STANDARDS
65The 64The
66.Fn div 65.Fn div
67function 66function conforms to
68conforms to
69.St -ansiC . 67.St -ansiC .
diff --git a/src/lib/libc/stdlib/exit.3 b/src/lib/libc/stdlib/exit.3
index 326c5539a8..a17c1805f2 100644
--- a/src/lib/libc/stdlib/exit.3
+++ b/src/lib/libc/stdlib/exit.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: exit.3,v 1.3 1999/02/27 21:55:55 deraadt Exp $ 36.\" $OpenBSD: exit.3,v 1.4 2000/04/20 13:50:02 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt EXIT 3 39.Dt EXIT 3
@@ -46,8 +46,9 @@
46.Ft void 46.Ft void
47.Fn exit "int status" 47.Fn exit "int status"
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The
49.Fn exit 50.Fn exit
50terminates a process. 51function terminates a process.
51.Pp 52.Pp
52Before termination it performs the following functions in the 53Before termination it performs the following functions in the
53order listed: 54order listed:
@@ -68,8 +69,7 @@ function.
68.Sh RETURN VALUES 69.Sh RETURN VALUES
69The 70The
70.Fn exit 71.Fn exit
71function 72function never returns.
72never returns.
73.Sh SEE ALSO 73.Sh SEE ALSO
74.Xr _exit 2 , 74.Xr _exit 2 ,
75.Xr atexit 3 , 75.Xr atexit 3 ,
@@ -78,6 +78,5 @@ never returns.
78.Sh STANDARDS 78.Sh STANDARDS
79The 79The
80.Fn exit 80.Fn exit
81function 81function conforms to
82conforms to
83.St -ansiC . 82.St -ansiC .
diff --git a/src/lib/libc/stdlib/getenv.3 b/src/lib/libc/stdlib/getenv.3
index d6ffc8b1dd..b2aa0080d6 100644
--- a/src/lib/libc/stdlib/getenv.3
+++ b/src/lib/libc/stdlib/getenv.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: getenv.3,v 1.6 1999/09/06 23:26:30 aaron Exp $ 36.\" $OpenBSD: getenv.3,v 1.7 2000/04/20 13:50:02 aaron Exp $
37.\" 37.\"
38.Dd December 11, 1993 38.Dd December 11, 1993
39.Dt GETENV 3 39.Dt GETENV 3
@@ -55,17 +55,13 @@
55.Ft void 55.Ft void
56.Fn unsetenv "const char *name" 56.Fn unsetenv "const char *name"
57.Sh DESCRIPTION 57.Sh DESCRIPTION
58These functions set, unset and fetch environment variables from the 58These functions set, unset, and fetch environment variables from the host
59host
60.Em environment list . 59.Em environment list .
61For compatibility with differing environment conventions, 60For compatibility with differing environment conventions, the given arguments
62the given arguments
63.Fa name 61.Fa name
64and 62and
65.Fa value 63.Fa value
66may be appended and prepended, 64may be appended and prepended, respectively, with an equal sign
67respectively,
68with an equal sign
69.Dq Li \&= . 65.Dq Li \&= .
70.Pp 66.Pp
71The 67The
@@ -74,8 +70,7 @@ function obtains the current value of the environment variable,
74.Fa name . 70.Fa name .
75If the variable 71If the variable
76.Fa name 72.Fa name
77is not in the current environment, 73is not in the current environment, a null pointer is returned.
78a null pointer is returned.
79.Pp 74.Pp
80The 75The
81.Fn setenv 76.Fn setenv
@@ -84,30 +79,27 @@ function inserts or resets the environment variable
84in the current environment list. 79in the current environment list.
85If the variable 80If the variable
86.Fa name 81.Fa name
87does not exist in the list, 82does not exist in the list, it is inserted with the given
88it is inserted with the given
89.Fa value . 83.Fa value .
90If the variable does exist, the argument 84If the variable does exist, the argument
91.Fa overwrite 85.Fa overwrite
92is tested; if 86is tested; if
93.Fa overwrite 87.Fa overwrite
94is zero, 88is zero, the variable is not reset, otherwise it is reset to the given
95the variable is not reset, otherwise it is reset
96to the given
97.Fa value . 89.Fa value .
98.Pp 90.Pp
99The 91The
100.Fn putenv 92.Fn putenv
101function takes an argument of the form ``name=value'' and is 93function takes an argument of the form
102equivalent to: 94.Ar name Ns No = Ns Ar value
95and is equivalent to:
103.Bd -literal -offset indent 96.Bd -literal -offset indent
104setenv(name, value, 1); 97setenv(name, value, 1);
105.Ed 98.Ed
106.Pp 99.Pp
107The 100The
108.Fn unsetenv 101.Fn unsetenv
109function 102function deletes all instances of the variable name pointed to by
110deletes all instances of the variable name pointed to by
111.Fa name 103.Fa name
112from the list. 104from the list.
113.Sh RETURN VALUES 105.Sh RETURN VALUES
@@ -117,8 +109,7 @@ and
117.Fn putenv 109.Fn putenv
118return zero if successful; otherwise the global variable 110return zero if successful; otherwise the global variable
119.Va errno 111.Va errno
120is set to indicate the error and a 112is set to indicate the error and \-1 is returned.
121\-1 is returned.
122.Pp 113.Pp
123If 114If
124.Fn getenv 115.Fn getenv
diff --git a/src/lib/libc/stdlib/getopt.3 b/src/lib/libc/stdlib/getopt.3
index 637a81f1f0..ef132cafc5 100644
--- a/src/lib/libc/stdlib/getopt.3
+++ b/src/lib/libc/stdlib/getopt.3
@@ -29,7 +29,7 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: getopt.3,v 1.12 2000/03/04 22:19:31 aaron Exp $ 32.\" $OpenBSD: getopt.3,v 1.13 2000/04/20 13:50:02 aaron Exp $
33.\" 33.\"
34.Dd April 19, 1994 34.Dd April 19, 1994
35.Dt GETOPT 3 35.Dt GETOPT 3
@@ -51,27 +51,25 @@ The
51.Fn getopt 51.Fn getopt
52function incrementally parses a command line argument list 52function incrementally parses a command line argument list
53.Fa argv 53.Fa argv
54and returns the next 54and returns the next known option character.
55.Em known
56option character.
57An option character is 55An option character is
58.Em known 56.Dq known
59if it has been specified in the string of accepted option characters, 57if it has been specified in the string of accepted option characters,
60.Fa optstring . 58.Fa optstring .
61.Pp 59.Pp
62The option string 60The option string
63.Fa optstring 61.Fa optstring
64may contain the following elements: individual characters, and 62may contain the following elements: individual characters and
65characters followed by a colon to indicate an option argument 63characters followed by a colon to indicate an option argument
66is to follow. 64is to follow.
67For example, an option string 65For example, an option string
68.Li "\&""x"" 66.Qq x
69recognizes an option 67recognizes an option
70.Dq Fl x , 68.Fl x ,
71and an option string 69and an option string
72.Li "\&""x:"" 70.Qq Li x:
73recognizes an option and argument 71recognizes an option and argument
74.Dq Fl x Ar argument . 72.Fl x Ar argument .
75It does not matter to 73It does not matter to
76.Fn getopt 74.Fn getopt
77if a following argument has leading whitespace. 75if a following argument has leading whitespace.
@@ -89,12 +87,10 @@ to
89.Fn getopt . 87.Fn getopt .
90The variable 88The variable
91.Va optopt 89.Va optopt
92saves the last 90saves the last known option character returned by
93.Em known
94option character returned by
95.Fn getopt . 91.Fn getopt .
96.Pp 92.Pp
97The variable 93The variables
98.Va opterr 94.Va opterr
99and 95and
100.Va optind 96.Va optind
@@ -119,9 +115,7 @@ must be reinitialized.
119.Pp 115.Pp
120The 116The
121.Fn getopt 117.Fn getopt
122function 118function returns \-1 when the argument list is exhausted.
123returns \-1
124when the argument list is exhausted.
125The interpretation of options in the argument list may be cancelled 119The interpretation of options in the argument list may be cancelled
126by the option 120by the option
127.Ql -- 121.Ql --
@@ -157,9 +151,8 @@ then a missing option argument causes a
157to be returned in addition to suppressing any error messages. 151to be returned in addition to suppressing any error messages.
158.Pp 152.Pp
159Option arguments are allowed to begin with 153Option arguments are allowed to begin with
160.Dq Li \- ; 154.Ql - ;
161this is reasonable but 155this is reasonable but reduces the amount of error checking possible.
162reduces the amount of error checking possible.
163.Sh EXTENSIONS 156.Sh EXTENSIONS
164The 157The
165.Va optreset 158.Va optreset
diff --git a/src/lib/libc/stdlib/getsubopt.3 b/src/lib/libc/stdlib/getsubopt.3
index 0ea48864c3..a5f98e5d96 100644
--- a/src/lib/libc/stdlib/getsubopt.3
+++ b/src/lib/libc/stdlib/getsubopt.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: getsubopt.3,v 1.3 1999/06/29 18:36:20 aaron Exp $ 1.\" $OpenBSD: getsubopt.3,v 1.4 2000/04/20 13:50:02 aaron Exp $
2.\" 2.\"
3.\" Copyright (c) 1990, 1991, 1993 3.\" Copyright (c) 1990, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -41,15 +41,14 @@
41.Nd get sub options from an argument 41.Nd get sub options from an argument
42.Sh SYNOPSIS 42.Sh SYNOPSIS
43.Fd #include <stdlib.h> 43.Fd #include <stdlib.h>
44.Vt extern char *suboptarg 44.Vt extern char *suboptarg;
45.Ft int 45.Ft int
46.Fn getsubopt "char **optionp" "char * const *tokens" "char **valuep" 46.Fn getsubopt "char **optionp" "char * const *tokens" "char **valuep"
47.Sh DESCRIPTION 47.Sh DESCRIPTION
48The 48The
49.Fn getsubopt 49.Fn getsubopt
50function 50function parses a string containing tokens delimited by one or more
51parses a string containing tokens delimited by one or more tab, space or 51tab, space or comma
52comma
53.Pq Ql \&, 52.Pq Ql \&,
54characters. 53characters.
55It is intended for use in parsing groups of option arguments provided 54It is intended for use in parsing groups of option arguments provided
@@ -60,22 +59,24 @@ The argument
60is a pointer to a pointer to the string. 59is a pointer to a pointer to the string.
61The argument 60The argument
62.Fa tokens 61.Fa tokens
63is a pointer to a null-terminated 62is a pointer to a null-terminated array of pointers to strings.
64array of pointers to strings.
65.Pp 63.Pp
66The 64The
67.Fn getsubopt 65.Fn getsubopt
68function 66function returns the zero-based offset of the pointer in the
69returns the zero-based offset of the pointer in the
70.Fa tokens 67.Fa tokens
71array referencing a string which matches the first token 68array referencing a string which matches the first token
72in the string, or, \-1 if the string contains no tokens or 69in the string, or, \-1 if the string contains no tokens or
73.Fa tokens 70.Fa tokens
74does not contain a matching string. 71does not contain a matching string.
75.Pp 72.Pp
76If the token is of the form ``name=value'', the location referenced by 73If the token is of the form
74.Ar name Ns No = Ns Ar value ,
75the location referenced by
77.Fa valuep 76.Fa valuep
78will be set to point to the start of the ``value'' portion of the token. 77will be set to point to the start of the
78.Dq value
79portion of the token.
79.Pp 80.Pp
80On return from 81On return from
81.Fn getsubopt , 82.Fn getsubopt ,
@@ -86,13 +87,12 @@ The external variable
86.Fa suboptarg 87.Fa suboptarg
87will be set to point to the start of the current token, or 88will be set to point to the start of the current token, or
88.Dv NULL 89.Dv NULL
89if no 90if no tokens were present.
90tokens were present.
91The argument 91The argument
92.Fa valuep 92.Fa valuep
93will be set to point to the ``value'' portion of the token, or 93will be set to point to the value portion of the token, or
94.Dv NULL 94.Dv NULL
95if no ``value'' portion was present. 95if no value portion was present.
96.Sh EXAMPLE 96.Sh EXAMPLE
97.Bd -literal -compact 97.Bd -literal -compact
98char *tokens[] = { 98char *tokens[] = {
diff --git a/src/lib/libc/stdlib/labs.3 b/src/lib/libc/stdlib/labs.3
index de0b76ba1f..fe39ca24dc 100644
--- a/src/lib/libc/stdlib/labs.3
+++ b/src/lib/libc/stdlib/labs.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: labs.3,v 1.4 1999/06/29 18:36:20 aaron Exp $ 36.\" $OpenBSD: labs.3,v 1.5 2000/04/20 13:50:02 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt LABS 3 39.Dt LABS 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn labs 50.Fn labs
51function 51function returns the absolute value of the long integer
52returns the absolute value of the long integer
53.Fa j . 52.Fa j .
54.Sh SEE ALSO 53.Sh SEE ALSO
55.Xr abs 3 , 54.Xr abs 3 ,
@@ -59,8 +58,7 @@ returns the absolute value of the long integer
59.Sh STANDARDS 58.Sh STANDARDS
60The 59The
61.Fn labs 60.Fn labs
62function 61function conforms to
63conforms to
64.St -ansiC . 62.St -ansiC .
65.Sh BUGS 63.Sh BUGS
66The absolute value of the most negative integer remains negative. 64The absolute value of the most negative integer remains negative.
diff --git a/src/lib/libc/stdlib/ldiv.3 b/src/lib/libc/stdlib/ldiv.3
index 60b35dc98f..b5301b1b21 100644
--- a/src/lib/libc/stdlib/ldiv.3
+++ b/src/lib/libc/stdlib/ldiv.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ldiv.3,v 1.4 1999/06/29 18:36:21 aaron Exp $ 36.\" $OpenBSD: ldiv.3,v 1.5 2000/04/20 13:50:02 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt LDIV 3 39.Dt LDIV 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn ldiv 50.Fn ldiv
51function 51function computes the value
52computes the value
53.Fa num Ns No / Ns Fa denom 52.Fa num Ns No / Ns Fa denom
54and returns the quotient and remainder in a structure named 53and returns the quotient and remainder in a structure named
55.Li ldiv_t 54.Li ldiv_t
@@ -66,6 +65,5 @@ and
66.Sh STANDARDS 65.Sh STANDARDS
67The 66The
68.Fn ldiv 67.Fn ldiv
69function 68function conforms to
70conforms to
71.St -ansiC . 69.St -ansiC .
diff --git a/src/lib/libc/stdlib/memory.3 b/src/lib/libc/stdlib/memory.3
index 61bae4cc3c..959a173a03 100644
--- a/src/lib/libc/stdlib/memory.3
+++ b/src/lib/libc/stdlib/memory.3
@@ -29,7 +29,7 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: memory.3,v 1.4 1999/05/23 14:11:03 aaron Exp $ 32.\" $OpenBSD: memory.3,v 1.5 2000/04/20 13:50:02 aaron Exp $
33.\" 33.\"
34.Dd May 2, 1991 34.Dd May 2, 1991
35.Dt MEMORY 3 35.Dt MEMORY 3
@@ -55,8 +55,7 @@
55.Fn alloca "size_t size" 55.Fn alloca "size_t size"
56.Sh DESCRIPTION 56.Sh DESCRIPTION
57These functions allocate and free memory for the calling process. 57These functions allocate and free memory for the calling process.
58They are described in the 58They are described in the individual man pages.
59individual manual pages.
60.Sh SEE ALSO 59.Sh SEE ALSO
61.Xr alloca 3 , 60.Xr alloca 3 ,
62.Xr calloc 3 , 61.Xr calloc 3 ,
@@ -65,6 +64,6 @@ individual manual pages.
65.Xr realloc 3 64.Xr realloc 3
66.Sh STANDARDS 65.Sh STANDARDS
67These functions, with the exception of 66These functions, with the exception of
68.Fn alloca 67.Fn alloca ,
69conform to 68conform to
70.St -ansiC . 69.St -ansiC .
diff --git a/src/lib/libc/stdlib/qabs.3 b/src/lib/libc/stdlib/qabs.3
index 0f7ccdc78f..ef0307ab25 100644
--- a/src/lib/libc/stdlib/qabs.3
+++ b/src/lib/libc/stdlib/qabs.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: qabs.3,v 1.4 1999/06/29 18:36:21 aaron Exp $ 36.\" $OpenBSD: qabs.3,v 1.5 2000/04/20 13:50:02 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt QABS 3 39.Dt QABS 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn qabs 50.Fn qabs
51function 51function returns the absolute value of the quad integer
52returns the absolute value of the quad integer
53.Fa j . 52.Fa j .
54.Sh SEE ALSO 53.Sh SEE ALSO
55.Xr abs 3 , 54.Xr abs 3 ,
diff --git a/src/lib/libc/stdlib/qsort.3 b/src/lib/libc/stdlib/qsort.3
index 8d665187bf..632909dd3c 100644
--- a/src/lib/libc/stdlib/qsort.3
+++ b/src/lib/libc/stdlib/qsort.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: qsort.3,v 1.4 1999/06/29 18:36:22 aaron Exp $ 36.\" $OpenBSD: qsort.3,v 1.5 2000/04/20 13:50:02 aaron Exp $
37.\" 37.\"
38.Dd June 4, 1993 38.Dd June 4, 1993
39.Dt QSORT 3 39.Dt QSORT 3
@@ -105,7 +105,9 @@ is stable.
105.Pp 105.Pp
106The 106The
107.Fn qsort 107.Fn qsort
108function is an implementation of C.A.R. Hoare's ``quicksort'' algorithm, 108function is an implementation of C.A.R. Hoare's
109.Dq quicksort
110algorithm,
109a variant of partition-exchange sorting; in particular, see D.E. Knuth's 111a variant of partition-exchange sorting; in particular, see D.E. Knuth's
110Algorithm Q. 112Algorithm Q.
111.Fn qsort 113.Fn qsort
@@ -115,7 +117,9 @@ O N**2 worst-case behavior.
115.Pp 117.Pp
116The 118The
117.Fn heapsort 119.Fn heapsort
118function is an implementation of J.W.J. William's ``heapsort'' algorithm, 120function is an implementation of J.W.J. William's
121.Dq heapsort
122algorithm,
119a variant of selection sorting; in particular, see D.E. Knuth's Algorithm H. 123a variant of selection sorting; in particular, see D.E. Knuth's Algorithm H.
120.Fn heapsort 124.Fn heapsort
121takes O N lg N worst-case time. 125takes O N lg N worst-case time.
@@ -143,13 +147,11 @@ is faster than
143.Fn mergesort 147.Fn mergesort
144is faster than 148is faster than
145.Fn heapsort . 149.Fn heapsort .
146Memory availability and pre-existing order in the data can make this 150Memory availability and pre-existing order in the data can make this untrue.
147untrue.
148.Sh RETURN VALUES 151.Sh RETURN VALUES
149The 152The
150.Fn qsort 153.Fn qsort
151function 154function returns no value.
152returns no value.
153.Pp 155.Pp
154Upon successful completion, 156Upon successful completion,
155.Fn heapsort 157.Fn heapsort
@@ -167,8 +169,7 @@ function succeeds unless:
167.It Bq Er EINVAL 169.It Bq Er EINVAL
168The 170The
169.Fa size 171.Fa size
170argument is zero, or, 172argument is zero, or, the
171the
172.Fa size 173.Fa size
173argument to 174argument to
174.Fn mergesort 175.Fn mergesort
@@ -228,6 +229,5 @@ This is no longer true.
228.Sh STANDARDS 229.Sh STANDARDS
229The 230The
230.Fn qsort 231.Fn qsort
231function 232function conforms to
232conforms to
233.St -ansiC . 233.St -ansiC .
diff --git a/src/lib/libc/stdlib/radixsort.3 b/src/lib/libc/stdlib/radixsort.3
index a1a4ee4eab..64cc841a49 100644
--- a/src/lib/libc/stdlib/radixsort.3
+++ b/src/lib/libc/stdlib/radixsort.3
@@ -29,7 +29,7 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: radixsort.3,v 1.5 1999/06/29 18:36:22 aaron Exp $ 32.\" $OpenBSD: radixsort.3,v 1.6 2000/04/20 13:50:02 aaron Exp $
33.\" 33.\"
34.Dd January 27, 1994 34.Dd January 27, 1994
35.Dt RADIXSORT 3 35.Dt RADIXSORT 3
@@ -49,8 +49,7 @@ The
49.Fn radixsort 49.Fn radixsort
50and 50and
51.Fn sradixsort 51.Fn sradixsort
52functions 52functions are implementations of radix sort.
53are implementations of radix sort.
54.Pp 53.Pp
55These functions sort an array of pointers to byte strings, the initial 54These functions sort an array of pointers to byte strings, the initial
56member of which is referenced by 55member of which is referenced by
@@ -66,23 +65,20 @@ If non-null,
66.Fa table 65.Fa table
67must reference an array of 66must reference an array of
68.Dv UCHAR_MAX 67.Dv UCHAR_MAX
69+ 1 bytes which contains the sort 68+ 1 bytes which contains the sort weight of each possible byte value.
70weight of each possible byte value.
71The end-of-string byte must have a sort weight of 0 or 255 69The end-of-string byte must have a sort weight of 0 or 255
72(for sorting in reverse order). 70(for sorting in reverse order).
73More than one byte may have the same sort weight. 71More than one byte may have the same sort weight.
74The 72The
75.Fa table 73.Fa table
76argument 74argument is useful for applications which wish to sort different characters
77is useful for applications which wish to sort different characters
78equally, for example, providing a table with the same weights 75equally, for example, providing a table with the same weights
79for A-Z as for a-z will result in a case-insensitive sort. 76for A-Z as for a-z will result in a case-insensitive sort.
80If 77If
81.Fa table 78.Fa table
82is 79is
83.Dv NULL , 80.Dv NULL ,
84the contents of the array are sorted in ascending order 81the contents of the array are sorted in ascending order according to the
85according to the
86.Tn ASCII 82.Tn ASCII
87order of the byte strings they reference and 83order of the byte strings they reference and
88.Fa endbyte 84.Fa endbyte
@@ -122,8 +118,7 @@ is not 0 or 255.
122.Pp 118.Pp
123Additionally, the 119Additionally, the
124.Fn sradixsort 120.Fn sradixsort
125function 121function may fail and set
126may fail and set
127.Va errno 122.Va errno
128for any of the errors specified for the library routine 123for any of the errors specified for the library routine
129.Xr malloc 3 . 124.Xr malloc 3 .
diff --git a/src/lib/libc/stdlib/rand.3 b/src/lib/libc/stdlib/rand.3
index d5686e5f4c..4d4e91efe4 100644
--- a/src/lib/libc/stdlib/rand.3
+++ b/src/lib/libc/stdlib/rand.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: rand.3,v 1.6 1999/06/29 18:36:22 aaron Exp $ 36.\" $OpenBSD: rand.3,v 1.7 2000/04/20 13:50:02 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt RAND 3 39.Dt RAND 3
@@ -92,13 +92,11 @@ The
92.Fn rand 92.Fn rand
93and 93and
94.Fn srand 94.Fn srand
95functions 95functions conform to
96conform to
97.St -ansiC . 96.St -ansiC .
98.Pp 97.Pp
99The 98The
100.Fn rand_r 99.Fn rand_r
101function 100function conforms to ISO/IEC 9945-1 ANSI/IEEE
102conforms to ISO/IEC 9945-1 ANSI/IEEE
103.Pq Dq Tn POSIX 101.Pq Dq Tn POSIX
104Std 1003.1c Draft 10. 102Std 1003.1c Draft 10.
diff --git a/src/lib/libc/stdlib/rand48.3 b/src/lib/libc/stdlib/rand48.3
index 3d8d53862d..886e5273d9 100644
--- a/src/lib/libc/stdlib/rand48.3
+++ b/src/lib/libc/stdlib/rand48.3
@@ -9,7 +9,7 @@
9.\" of any kind. I shall in no event be liable for anything that happens 9.\" of any kind. I shall in no event be liable for anything that happens
10.\" to anyone/anything when using this software. 10.\" to anyone/anything when using this software.
11.\" 11.\"
12.\" $OpenBSD: rand48.3,v 1.6 1999/09/27 02:00:13 aaron Exp $ 12.\" $OpenBSD: rand48.3,v 1.7 2000/04/20 13:50:02 aaron Exp $
13.\" 13.\"
14.Dd October 8, 1993 14.Dd October 8, 1993
15.Dt RAND48 3 15.Dt RAND48 3
@@ -49,12 +49,13 @@
49The 49The
50.Fn rand48 50.Fn rand48
51family of functions generates pseudo-random numbers using a linear 51family of functions generates pseudo-random numbers using a linear
52congruential algorithm working on integers 48 bits in size. The 52congruential algorithm working on integers 48 bits in size.
53particular formula employed is 53The particular formula employed is
54r(n+1) = (a * r(n) + c) mod m 54r(n+1) = (a * r(n) + c) mod m
55where the default values are 55where the default values are
56for the multiplicand a = 0xfdeece66d = 25214903917 and 56for the multiplicand a = 0xfdeece66d = 25214903917 and
57the addend c = 0xb = 11. The modulus is always fixed at m = 2 ** 48. 57the addend c = 0xb = 11.
58The modulus is always fixed at m = 2 ** 48.
58r(n) is called the seed of the random number generator. 59r(n) is called the seed of the random number generator.
59.Pp 60.Pp
60For all the six generator routines described next, the first 61For all the six generator routines described next, the first
@@ -63,7 +64,8 @@ computational step is to perform a single iteration of the algorithm.
63.Fn drand48 64.Fn drand48
64and 65and
65.Fn erand48 66.Fn erand48
66return values of type double. The full 48 bits of r(n+1) are 67return values of type double.
68The full 48 bits of r(n+1) are
67loaded into the mantissa of the returned value, with the exponent set 69loaded into the mantissa of the returned value, with the exponent set
68such that the values produced lie in the interval [0.0, 1.0). 70such that the values produced lie in the interval [0.0, 1.0).
69.Pp 71.Pp
@@ -71,7 +73,8 @@ such that the values produced lie in the interval [0.0, 1.0).
71and 73and
72.Fn nrand48 74.Fn nrand48
73return values of type long in the range 75return values of type long in the range
74[0, 2**31-1]. The high-order (31) bits of 76[0, 2**31-1].
77The high-order (31) bits of
75r(n+1) are loaded into the lower bits of the returned value, with 78r(n+1) are loaded into the lower bits of the returned value, with
76the topmost (sign) bit set to zero. 79the topmost (sign) bit set to zero.
77.Pp 80.Pp
@@ -79,14 +82,15 @@ the topmost (sign) bit set to zero.
79and 82and
80.Fn jrand48 83.Fn jrand48
81return values of type long in the range 84return values of type long in the range
82[-2**31, 2**31-1]. The high-order (32) bits of 85[-2**31, 2**31-1].
83r(n+1) are loaded into the returned value. 86The high-order (32) bits of r(n+1) are loaded into the returned value.
84.Pp 87.Pp
85.Fn drand48 , 88.Fn drand48 ,
86.Fn lrand48 , 89.Fn lrand48 ,
87and 90and
88.Fn mrand48 91.Fn mrand48
89use an internal buffer to store r(n). For these functions 92use an internal buffer to store r(n).
93For these functions
90the initial value of r(0) = 0x1234abcd330e = 20017429951246. 94the initial value of r(0) = 0x1234abcd330e = 20017429951246.
91.Pp 95.Pp
92On the other hand, 96On the other hand,
@@ -118,8 +122,8 @@ also initializes the internal buffer r(n) of
118and 122and
119.Fn mrand48 , 123.Fn mrand48 ,
120but here all 48 bits of the seed can be specified in an array of 3 shorts, 124but here all 48 bits of the seed can be specified in an array of 3 shorts,
121where the zeroth member specifies the lowest bits. Again, 125where the zeroth member specifies the lowest bits.
122the constant multiplicand and addend of the algorithm are 126Again, the constant multiplicand and addend of the algorithm are
123reset to the default values given above. 127reset to the default values given above.
124.Fn seed48 128.Fn seed48
125returns a pointer to an array of 3 shorts which contains the old seed. 129returns a pointer to an array of 3 shorts which contains the old seed.
diff --git a/src/lib/libc/stdlib/random.3 b/src/lib/libc/stdlib/random.3
index 260c239816..d3a3198ebf 100644
--- a/src/lib/libc/stdlib/random.3
+++ b/src/lib/libc/stdlib/random.3
@@ -29,7 +29,7 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: random.3,v 1.11 2000/04/03 23:23:48 millert Exp $ 32.\" $OpenBSD: random.3,v 1.12 2000/04/20 13:50:02 aaron Exp $
33.\" 33.\"
34.Dd April 19, 1991 34.Dd April 19, 1991
35.Dt RANDOM 3 35.Dt RANDOM 3
@@ -56,23 +56,27 @@
56.Sh DESCRIPTION 56.Sh DESCRIPTION
57The 57The
58.Fn random 58.Fn random
59function 59function uses a non-linear additive feedback random number generator employing
60uses a non-linear additive feedback random number generator employing a 60a default table of size 31 long integers to return successive pseudo-random
61default table of size 31 long integers to return successive pseudo-random
62numbers in the range from 0 to (2**31)\-1. 61numbers in the range from 0 to (2**31)\-1.
63The period of this random number generator is very large, approximately 62The period of this random number generator is very large, approximately
6416*((2**31)\-1. 6316*((2**31)\-1.
65.Pp 64.Pp
66The 65The
67.Fn random Ns / Fn srandom 66.Fn random
68have (almost) the same calling sequence and initialization properties as 67and
68.Fn srandom
69functions have (almost) the same calling sequence and initialization
70properties as
69.Xr rand 3 Ns / Xr srand 3 . 71.Xr rand 3 Ns / Xr srand 3 .
70The difference is that 72The difference is that
71.Xr rand 73.Xr rand
72produces a much less random sequence \(em in fact, the low dozen bits 74produces a much less random sequence \(em in fact, the low dozen bits
73generated by rand go through a cyclic pattern. All the bits generated by 75generated by rand go through a cyclic pattern.
76All the bits generated by
74.Fn random 77.Fn random
75are usable. For example, 78are usable.
79For example,
76.Sq Li random()&01 80.Sq Li random()&01
77will produce a random binary 81will produce a random binary
78value. 82value.
@@ -81,9 +85,10 @@ Unlike
81.Xr srand , 85.Xr srand ,
82.Fn srandom 86.Fn srandom
83does not return the old seed; the reason for this is that the amount of 87does not return the old seed; the reason for this is that the amount of
84state information used is much more than a single word. (Two other 88state information used is much more than a single word.
85routines are provided to deal with restarting/changing random 89(Two other routines are provided to deal with restarting/changing random
86number generators). Like 90number generators).
91Like
87.Xr rand 3 , 92.Xr rand 3 ,
88however, 93however,
89.Fn random 94.Fn random
@@ -110,28 +115,28 @@ a fixed seed.
110The 115The
111.Fn initstate 116.Fn initstate
112routine allows a state array, passed in as an argument, to be initialized 117routine allows a state array, passed in as an argument, to be initialized
113for future use. The size of the state array (in bytes) is used by 118for future use.
119The size of the state array (in bytes) is used by
114.Fn initstate 120.Fn initstate
115to decide how sophisticated a random number generator it should use \(em the 121to decide how sophisticated a random number generator it should use \(em the
116more state, the better the random numbers will be. 122more state, the better the random numbers will be.
117(Current "optimal" values for the amount of state information are 123(Current "optimal" values for the amount of state information are
1188, 32, 64, 128, and 256 bytes; other amounts will be rounded down to 1248, 32, 64, 128, and 256 bytes; other amounts will be rounded down to
119the nearest known amount. Using less than 8 bytes will cause an error.) 125the nearest known amount.
126Using less than 8 bytes will cause an error.)
120The seed for the initialization (which specifies a starting point for 127The seed for the initialization (which specifies a starting point for
121the random number sequence, and provides for restarting at the same 128the random number sequence, and provides for restarting at the same
122point) is also an argument. 129point) is also an argument.
123The 130The
124.Fn initstate 131.Fn initstate
125function 132function returns a pointer to the previous state information array.
126returns a pointer to the previous state information array.
127.Pp 133.Pp
128Once a state has been initialized, the 134Once a state has been initialized, the
129.Fn setstate 135.Fn setstate
130routine provides for rapid switching between states. 136routine provides for rapid switching between states.
131The 137The
132.Fn setstate 138.Fn setstate
133function 139function returns a pointer to the previous state array; its
134returns a pointer to the previous state array; its
135argument state array is used for further random number generation 140argument state array is used for further random number generation
136until the next call to 141until the next call to
137.Fn initstate 142.Fn initstate
diff --git a/src/lib/libc/stdlib/realpath.3 b/src/lib/libc/stdlib/realpath.3
index 95c57b2e51..ffb763d475 100644
--- a/src/lib/libc/stdlib/realpath.3
+++ b/src/lib/libc/stdlib/realpath.3
@@ -32,7 +32,7 @@
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE. 33.\" SUCH DAMAGE.
34.\" 34.\"
35.\" $OpenBSD: realpath.3,v 1.6 1999/07/02 16:57:49 aaron Exp $ 35.\" $OpenBSD: realpath.3,v 1.7 2000/04/20 13:50:02 aaron Exp $
36.\" 36.\"
37.Dd February 16, 1994 37.Dd February 16, 1994
38.Dt REALPATH 3 38.Dt REALPATH 3
@@ -56,8 +56,7 @@ and
56.Pa /../ 56.Pa /../
57in 57in
58.Fa pathname , 58.Fa pathname ,
59and copies the resulting absolute pathname into 59and copies the resulting absolute pathname into the memory referenced by
60the memory referenced by
61.Fa resolvedname . 60.Fa resolvedname .
62The 61The
63.Fa resolvedname 62.Fa resolvedname
@@ -101,7 +100,7 @@ for any of the errors specified for the library functions
101.Xr fchdir 2 , 100.Xr fchdir 2 ,
102.Xr lstat 2 , 101.Xr lstat 2 ,
103.Xr open 2 , 102.Xr open 2 ,
104.Xr readlink 2 103.Xr readlink 2 ,
105and 104and
106.Xr getcwd 3 . 105.Xr getcwd 3 .
107.Sh CAVEATS 106.Sh CAVEATS
diff --git a/src/lib/libc/stdlib/strtod.3 b/src/lib/libc/stdlib/strtod.3
index 143fea34dc..4e04f6738e 100644
--- a/src/lib/libc/stdlib/strtod.3
+++ b/src/lib/libc/stdlib/strtod.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: strtod.3,v 1.6 2000/03/04 22:19:31 aaron Exp $ 36.\" $OpenBSD: strtod.3,v 1.7 2000/04/20 13:50:03 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRTOD 3 39.Dt STRTOD 3
@@ -50,18 +50,23 @@ string to double
50.Sh DESCRIPTION 50.Sh DESCRIPTION
51The 51The
52.Fn strtod 52.Fn strtod
53function converts the initial portion of the string 53function converts the initial portion of the string pointed to by
54pointed to by
55.Fa nptr 54.Fa nptr
56to 55to
57.Li double 56.Li double
58representation. 57representation.
59.Pp 58.Pp
60The expected form of the string is an optional plus (``+'') or minus 59The expected form of the string is an optional plus
61sign (``-'') followed by a sequence of digits optionally containing 60.Pq Ql +
61or minus sign
62.Pq Ql -
63followed by a sequence of digits optionally containing
62a decimal-point character, optionally followed by an exponent. 64a decimal-point character, optionally followed by an exponent.
63An exponent consists of an ``E'' or ``e'', followed by an optional plus 65An exponent consists of an
64or minus sign, followed by a sequence of digits. 66.Sq E
67or
68.Sq e ,
69followed by an optional plus or minus sign, followed by a sequence of digits.
65.Pp 70.Pp
66Leading whitespace characters in the string (as defined by the 71Leading whitespace characters in the string (as defined by the
67.Xr isspace 3 72.Xr isspace 3
@@ -90,8 +95,7 @@ is returned (according to the sign of the value), and
90.Er ERANGE 95.Er ERANGE
91is stored in 96is stored in
92.Va errno . 97.Va errno .
93If the correct value would cause underflow, zero is 98If the correct value would cause underflow, zero is returned and
94returned and
95.Er ERANGE 99.Er ERANGE
96is stored in 100is stored in
97.Va errno . 101.Va errno .
@@ -109,6 +113,5 @@ Overflow or underflow occurred.
109.Sh STANDARDS 113.Sh STANDARDS
110The 114The
111.Fn strtod 115.Fn strtod
112function 116function conforms to
113conforms to
114.St -ansiC . 117.St -ansiC .
diff --git a/src/lib/libc/stdlib/strtol.3 b/src/lib/libc/stdlib/strtol.3
index df696b7b85..fdc02b20b8 100644
--- a/src/lib/libc/stdlib/strtol.3
+++ b/src/lib/libc/stdlib/strtol.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: strtol.3,v 1.7 2000/03/04 22:19:31 aaron Exp $ 36.\" $OpenBSD: strtol.3,v 1.8 2000/04/20 13:50:03 aaron Exp $
37.\" 37.\"
38.Dd June 25, 1992 38.Dd June 25, 1992
39.Dt STRTOL 3 39.Dt STRTOL 3
@@ -46,7 +46,7 @@
46.Fd #include <limits.h> 46.Fd #include <limits.h>
47.Ft long 47.Ft long
48.Fn strtol "const char *nptr" "char **endptr" "int base" 48.Fn strtol "const char *nptr" "char **endptr" "int base"
49 49.Pp
50.Fd #include <sys/types.h> 50.Fd #include <sys/types.h>
51.Fd #include <stdlib.h> 51.Fd #include <stdlib.h>
52.Fd #include <limits.h> 52.Fd #include <limits.h>
@@ -55,24 +55,21 @@
55.Sh DESCRIPTION 55.Sh DESCRIPTION
56The 56The
57.Fn strtol 57.Fn strtol
58function 58function converts the string in
59converts the string in
60.Fa nptr 59.Fa nptr
61to a 60to a
62.Li long 61.Li long
63value. 62value.
64The 63The
65.Fn strtoq 64.Fn strtoq
66function 65function converts the string in
67converts the string in
68.Fa nptr 66.Fa nptr
69to a 67to a
70.Li quad_t 68.Li quad_t
71value. 69value.
72The conversion is done according to the given 70The conversion is done according to the given
73.Fa base , 71.Fa base ,
74which must be a number between 2 and 36 inclusive 72which must be a number between 2 and 36 inclusive or the special value 0.
75or the special value 0.
76.Pp 73.Pp
77The string may begin with an arbitrary amount of whitespace 74The string may begin with an arbitrary amount of whitespace
78(as determined by 75(as determined by
@@ -84,11 +81,9 @@ or
84sign. 81sign.
85If 82If
86.Fa base 83.Fa base
87is zero or 16, 84is zero or 16, the string may then include a
88the string may then include a
89.Ql 0x 85.Ql 0x
90prefix, 86prefix, and the number will be read in base 16; otherwise, a zero
91and the number will be read in base 16; otherwise, a zero
92.Fa base 87.Fa base
93is taken as 10 (decimal) unless the next character is 88is taken as 10 (decimal) unless the next character is
94.Ql 0 , 89.Ql 0 ,
@@ -101,8 +96,7 @@ stopping at the first character which is not a valid digit
101in the given base. 96in the given base.
102(In bases above 10, the letter 97(In bases above 10, the letter
103.Ql A 98.Ql A
104in either upper or lower case 99in either upper or lower case represents 10,
105represents 10,
106.Ql B 100.Ql B
107represents 11, and so forth, with 101represents 11, and so forth, with
108.Ql Z 102.Ql Z
@@ -110,7 +104,7 @@ representing 35.)
110.Pp 104.Pp
111If 105If
112.Fa endptr 106.Fa endptr
113is non nil, 107is non-null,
114.Fn strtol 108.Fn strtol
115stores the address of the first invalid character in 109stores the address of the first invalid character in
116.Fa *endptr . 110.Fa *endptr .
@@ -132,8 +126,7 @@ on return, the entire string was valid.)
132.Sh RETURN VALUES 126.Sh RETURN VALUES
133The 127The
134.Fn strtol 128.Fn strtol
135function 129function returns the result of the conversion,
136returns the result of the conversion,
137unless the value would underflow or overflow. 130unless the value would underflow or overflow.
138If an underflow occurs, 131If an underflow occurs,
139.Fn strtol 132.Fn strtol
@@ -191,8 +184,8 @@ error checking is further complicated because the desired return value is an
191.Li int 184.Li int
192rather than a 185rather than a
193.Li long ; 186.Li long ;
194however, on some architectures integers and long integers are the same 187however, on some architectures integers and long integers are the same size.
195size. Thus the following is necessary: 188Thus the following is necessary:
196.Bd -literal -offset indent 189.Bd -literal -offset indent
197char *ep; 190char *ep;
198int ival; 191int ival;
@@ -224,8 +217,7 @@ The given string was out of range; the value converted has been clamped.
224.Sh STANDARDS 217.Sh STANDARDS
225The 218The
226.Fn strtol 219.Fn strtol
227function 220function conforms to
228conforms to
229.St -ansiC . 221.St -ansiC .
230.Sh BUGS 222.Sh BUGS
231Ignores the current locale. 223Ignores the current locale.
diff --git a/src/lib/libc/stdlib/strtoul.3 b/src/lib/libc/stdlib/strtoul.3
index 572658bf7f..e090253566 100644
--- a/src/lib/libc/stdlib/strtoul.3
+++ b/src/lib/libc/stdlib/strtoul.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: strtoul.3,v 1.6 2000/03/04 22:19:31 aaron Exp $ 36.\" $OpenBSD: strtoul.3,v 1.7 2000/04/20 13:50:03 aaron Exp $
37.\" 37.\"
38.Dd June 25, 1992 38.Dd June 25, 1992
39.Dt STRTOUL 3 39.Dt STRTOUL 3
@@ -55,16 +55,14 @@
55.Sh DESCRIPTION 55.Sh DESCRIPTION
56The 56The
57.Fn strtoul 57.Fn strtoul
58function 58function converts the string in
59converts the string in
60.Fa nptr 59.Fa nptr
61to an 60to an
62.Li unsigned long 61.Li unsigned long
63value. 62value.
64The 63The
65.Fn strtouq 64.Fn strtouq
66function 65function converts the string in
67converts the string in
68.Fa nptr 66.Fa nptr
69to a 67to a
70.Li u_quad_t 68.Li u_quad_t
@@ -84,11 +82,9 @@ or
84sign. 82sign.
85If 83If
86.Fa base 84.Fa base
87is zero or 16, 85is zero or 16, the string may then include a
88the string may then include a
89.Ql 0x 86.Ql 0x
90prefix, 87prefix, and the number will be read in base 16; otherwise, a zero
91and the number will be read in base 16; otherwise, a zero
92.Fa base 88.Fa base
93is taken as 10 (decimal) unless the next character is 89is taken as 10 (decimal) unless the next character is
94.Ql 0 , 90.Ql 0 ,
@@ -96,14 +92,12 @@ in which case it is taken as 8 (octal).
96.Pp 92.Pp
97The remainder of the string is converted to an 93The remainder of the string is converted to an
98.Li unsigned long 94.Li unsigned long
99value in the obvious manner, 95value in the obvious manner, stopping at the end of the string
100stopping at the end of the string
101or at the first character that does not produce a valid digit 96or at the first character that does not produce a valid digit
102in the given base. 97in the given base.
103(In bases above 10, the letter 98(In bases above 10, the letter
104.Ql A 99.Ql A
105in either upper or lower case 100in either upper or lower case represents 10,
106represents 10,
107.Ql B 101.Ql B
108represents 11, and so forth, with 102represents 11, and so forth, with
109.Ql Z 103.Ql Z
@@ -111,7 +105,7 @@ representing 35.)
111.Pp 105.Pp
112If 106If
113.Fa endptr 107.Fa endptr
114is non nil, 108is non-null,
115.Fn strtoul 109.Fn strtoul
116stores the address of the first invalid character in 110stores the address of the first invalid character in
117.Fa *endptr . 111.Fa *endptr .
@@ -133,8 +127,7 @@ on return, the entire string was valid.)
133.Sh RETURN VALUES 127.Sh RETURN VALUES
134The 128The
135.Fn strtoul 129.Fn strtoul
136function 130function returns the result of the conversion,
137returns the result of the conversion,
138unless the value would overflow, in which case 131unless the value would overflow, in which case
139.Dv ULONG_MAX 132.Dv ULONG_MAX
140is returned and 133is returned and
@@ -206,8 +199,7 @@ The given string was out of range; the value converted has been clamped.
206.Sh STANDARDS 199.Sh STANDARDS
207The 200The
208.Fn strtoul 201.Fn strtoul
209function 202function conforms to
210conforms to
211.St -ansiC . 203.St -ansiC .
212.Sh BUGS 204.Sh BUGS
213Ignores the current locale. 205Ignores the current locale.
diff --git a/src/lib/libc/stdlib/system.3 b/src/lib/libc/stdlib/system.3
index f2d2693677..2db413934e 100644
--- a/src/lib/libc/stdlib/system.3
+++ b/src/lib/libc/stdlib/system.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: system.3,v 1.6 1999/06/29 18:36:24 aaron Exp $ 36.\" $OpenBSD: system.3,v 1.7 2000/04/20 13:50:03 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt SYSTEM 3 39.Dt SYSTEM 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn system 50.Fn system
51function 51function hands the argument
52hands the argument
53.Fa string 52.Fa string
54to the command interpreter 53to the command interpreter
55.Xr sh 1 . 54.Xr sh 1 .
@@ -63,9 +62,8 @@ and blocking
63.Pp 62.Pp
64If 63If
65.Fa string 64.Fa string
66is a 65is
67.Dv NULL 66.Dv NULL ,
68pointer,
69.Fn system 67.Fn system
70will return non-zero. 68will return non-zero.
71Otherwise, 69Otherwise,
@@ -91,8 +89,7 @@ returns the termination status for a program that terminates with a call of
91.Sh STANDARDS 89.Sh STANDARDS
92The 90The
93.Fn system 91.Fn system
94function 92function conforms to
95conforms to
96.St -ansiC 93.St -ansiC
97and 94and
98.St -p1003.2-92 . 95.St -p1003.2-92 .
diff --git a/src/lib/libc/stdlib/tsearch.3 b/src/lib/libc/stdlib/tsearch.3
index fa1d34afbb..72048a19fb 100644
--- a/src/lib/libc/stdlib/tsearch.3
+++ b/src/lib/libc/stdlib/tsearch.3
@@ -23,7 +23,7 @@
23.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 23.\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24.\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\" 25.\"
26.\" $OpenBSD: tsearch.3,v 1.7 2000/02/25 07:53:09 deraadt Exp $ 26.\" $OpenBSD: tsearch.3,v 1.8 2000/04/20 13:50:03 aaron Exp $
27.\" 27.\"
28.Dd June 15, 1997 28.Dd June 15, 1997
29.Dt TSEARCH 3 29.Dt TSEARCH 3
@@ -49,7 +49,8 @@ The
49and 49and
50.Fn twalk 50.Fn twalk
51functions manage binary search trees based on algorithms T and D 51functions manage binary search trees based on algorithms T and D
52from Knuth (6.2.2). The comparison function passed in by 52from Knuth (6.2.2).
53The comparison function passed in by
53the user has the same style of return values as 54the user has the same style of return values as
54.Xr strcmp 3 . 55.Xr strcmp 3 .
55.Pp 56.Pp
@@ -67,7 +68,8 @@ is identical to
67.Fn tfind 68.Fn tfind
68except that if no match is found, 69except that if no match is found,
69.Fa key 70.Fa key
70is inserted into the tree and a pointer to it is returned. If 71is inserted into the tree and a pointer to it is returned.
72If
71.Fa rootp 73.Fa rootp
72points to a null value a new binary search tree is created. 74points to a null value a new binary search tree is created.
73.Pp 75.Pp