summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmc <>2003-06-01 19:27:27 +0000
committerjmc <>2003-06-01 19:27:27 +0000
commit5796457847338c884c1863d78addddafce4fc02f (patch)
tree5977475523d1ea29b76fe3415cdb1d3a83522e71
parent986591b4f6cea288e444153e4adc77d36f27fa67 (diff)
downloadopenbsd-5796457847338c884c1863d78addddafce4fc02f.tar.gz
openbsd-5796457847338c884c1863d78addddafce4fc02f.tar.bz2
openbsd-5796457847338c884c1863d78addddafce4fc02f.zip
- section reorder
- merge COMPATIBILITY - kill whitespace at EOL
-rw-r--r--src/lib/libc/stdlib/atoi.326
-rw-r--r--src/lib/libc/stdlib/getopt.310
-rw-r--r--src/lib/libc/stdlib/insque.38
-rw-r--r--src/lib/libc/stdlib/malloc.316
-rw-r--r--src/lib/libc/stdlib/qsort.314
-rw-r--r--src/lib/libc/stdlib/rand48.36
-rw-r--r--src/lib/libc/stdlib/random.36
-rw-r--r--src/lib/libc/stdlib/realpath.318
-rw-r--r--src/lib/libc/stdlib/tsearch.38
9 files changed, 56 insertions, 56 deletions
diff --git a/src/lib/libc/stdlib/atoi.3 b/src/lib/libc/stdlib/atoi.3
index 69b94be70c..6ba304cf46 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.5 2000/04/20 13:50:01 aaron Exp $ 36.\" $OpenBSD: atoi.3,v 1.6 2003/06/01 19:27:27 jmc Exp $
37.\" 37.\"
38.Dd June 4, 1993 38.Dd June 4, 1993
39.Dt ATOI 3 39.Dt ATOI 3
@@ -60,18 +60,6 @@ It is equivalent to:
60.Bd -literal -offset indent 60.Bd -literal -offset indent
61(int)strtol(nptr, (char **)NULL, 10); 61(int)strtol(nptr, (char **)NULL, 10);
62.Ed 62.Ed
63.Sh CAVEATS
64.Nm
65does no overflow checking, handles unsigned numbers poorly,
66and handles strings containing trailing extra characters
67(like
68.Dq "123abc" Ns )
69poorly.
70Careful use of
71.Xr strtol 3
72and
73.Xr strtoul 3
74can alleviate these problems.
75.Sh SEE ALSO 63.Sh SEE ALSO
76.Xr atof 3 , 64.Xr atof 3 ,
77.Xr atol 3 , 65.Xr atol 3 ,
@@ -83,3 +71,15 @@ The
83.Fn atoi 71.Fn atoi
84function conforms to 72function conforms to
85.St -ansiC . 73.St -ansiC .
74.Sh CAVEATS
75.Nm
76does no overflow checking, handles unsigned numbers poorly,
77and handles strings containing trailing extra characters
78(like
79.Dq "123abc" )
80poorly.
81Careful use of
82.Xr strtol 3
83and
84.Xr strtoul 3
85can alleviate these problems.
diff --git a/src/lib/libc/stdlib/getopt.3 b/src/lib/libc/stdlib/getopt.3
index d25b497035..ce85f678df 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.22 2003/05/10 06:48:30 jmc Exp $ 32.\" $OpenBSD: getopt.3,v 1.23 2003/06/01 19:27:27 jmc Exp $
33.\" 33.\"
34.Dd December 8, 2002 34.Dd December 8, 2002
35.Dt GETOPT 3 35.Dt GETOPT 3
@@ -174,10 +174,6 @@ while ((ch = getopt(argc, argv, "bf:")) != -1) {
174argc -= optind; 174argc -= optind;
175argv += optind; 175argv += optind;
176.Ed 176.Ed
177.Sh SEE ALSO
178.Xr getopt 1 ,
179.Xr getopt_long 3 ,
180.Xr getsubopt 3
181.Sh DIAGNOSTICS 177.Sh DIAGNOSTICS
182If the 178If the
183.Fn getopt 179.Fn getopt
@@ -202,6 +198,10 @@ to be returned in addition to suppressing any error messages.
202Option arguments are allowed to begin with 198Option arguments are allowed to begin with
203.Ql - ; 199.Ql - ;
204this is reasonable but reduces the amount of error checking possible. 200this is reasonable but reduces the amount of error checking possible.
201.Sh SEE ALSO
202.Xr getopt 1 ,
203.Xr getopt_long 3 ,
204.Xr getsubopt 3
205.Sh EXTENSIONS 205.Sh EXTENSIONS
206The 206The
207.Va optreset 207.Va optreset
diff --git a/src/lib/libc/stdlib/insque.3 b/src/lib/libc/stdlib/insque.3
index b87adb87bc..b09f1fdc04 100644
--- a/src/lib/libc/stdlib/insque.3
+++ b/src/lib/libc/stdlib/insque.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: insque.3,v 1.1 2003/05/08 23:26:30 millert Exp $ 1.\" $OpenBSD: insque.3,v 1.2 2003/06/01 19:27:27 jmc Exp $
2.\" Copyright (c) 1993 John Brezak 2.\" Copyright (c) 1993 John Brezak
3.\" All rights reserved. 3.\" All rights reserved.
4.\" 4.\"
@@ -83,13 +83,13 @@ These functions are not atomic unless that machine architecture allows it.
83.Xr queue 3 83.Xr queue 3
84.Sh STANDARDS 84.Sh STANDARDS
85The 85The
86.Fn lsearch 86.Fn lsearch
87and 87and
88.Fn lfind 88.Fn lfind
89functions conform to the 89functions conform to the
90.St -p1003.1-01 90.St -p1003.1-01
91and 91and
92.St -xpg4.3 . 92.St -xpg4.3 .
93specifications. 93specifications.
94.Sh HISTORY 94.Sh HISTORY
95The 95The
diff --git a/src/lib/libc/stdlib/malloc.3 b/src/lib/libc/stdlib/malloc.3
index aaba8c88c2..e18bdc98d9 100644
--- a/src/lib/libc/stdlib/malloc.3
+++ b/src/lib/libc/stdlib/malloc.3
@@ -34,7 +34,7 @@
34.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35.\" SUCH DAMAGE. 35.\" SUCH DAMAGE.
36.\" 36.\"
37.\" $OpenBSD: malloc.3,v 1.26 2003/05/14 04:48:06 krw Exp $ 37.\" $OpenBSD: malloc.3,v 1.27 2003/06/01 19:27:27 jmc Exp $
38.\" 38.\"
39.Dd August 27, 1996 39.Dd August 27, 1996
40.Dt MALLOC 3 40.Dt MALLOC 3
@@ -261,8 +261,6 @@ If a program changes behavior if either of these options are used,
261it is buggy. 261it is buggy.
262.Pp 262.Pp
263The default cache size is 16 pages. 263The default cache size is 16 pages.
264.Sh ENVIRONMENT
265See above.
266.Sh RETURN VALUES 264.Sh RETURN VALUES
267The 265The
268.Fn malloc 266.Fn malloc
@@ -287,6 +285,13 @@ if successful; otherwise, a null pointer is returned and
287.Va errno 285.Va errno
288is set to 286is set to
289.Er ENOMEM . 287.Er ENOMEM .
288.Sh ENVIRONMENT
289See above.
290.Sh FILES
291.Bl -tag -width "/etc/malloc.conf"
292.It Pa /etc/malloc.conf
293symbolic link to filename containing option flags
294.El
290.Sh DIAGNOSTICS 295.Sh DIAGNOSTICS
291If 296If
292.Fn malloc , 297.Fn malloc ,
@@ -377,11 +382,6 @@ routines).
377.It Dq unknown char in MALLOC_OPTIONS 382.It Dq unknown char in MALLOC_OPTIONS
378We found something we didn't understand. 383We found something we didn't understand.
379.El 384.El
380.Sh FILES
381.Bl -tag -width "/etc/malloc.conf"
382.It Pa /etc/malloc.conf
383symbolic link to filename containing option flags
384.El
385.Sh SEE ALSO 385.Sh SEE ALSO
386.Xr brk 2 , 386.Xr brk 2 ,
387.Xr alloca 3 , 387.Xr alloca 3 ,
diff --git a/src/lib/libc/stdlib/qsort.3 b/src/lib/libc/stdlib/qsort.3
index a0561cadbe..da2842aa92 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.10 2003/05/10 06:48:30 jmc Exp $ 36.\" $OpenBSD: qsort.3,v 1.11 2003/06/01 19:27:27 jmc Exp $
37.\" 37.\"
38.Dd June 4, 1993 38.Dd June 4, 1993
39.Dt QSORT 3 39.Dt QSORT 3
@@ -181,12 +181,6 @@ or
181.Fn mergesort 181.Fn mergesort
182were unable to allocate memory. 182were unable to allocate memory.
183.El 183.El
184.Sh COMPATIBILITY
185Previous versions of
186.Fn qsort
187did not permit the comparison routine itself to call
188.Fn qsort .
189This is no longer true.
190.Sh SEE ALSO 184.Sh SEE ALSO
191.Xr sort 1 , 185.Xr sort 1 ,
192.Xr radixsort 3 186.Xr radixsort 3
@@ -227,6 +221,12 @@ This is no longer true.
227.%V January 1992 221.%V January 1992
228.Re 222.Re
229.Sh STANDARDS 223.Sh STANDARDS
224Previous versions of
225.Fn qsort
226did not permit the comparison routine itself to call
227.Fn qsort .
228This is no longer true.
229.Pp
230The 230The
231.Fn qsort 231.Fn qsort
232function conforms to 232function conforms to
diff --git a/src/lib/libc/stdlib/rand48.3 b/src/lib/libc/stdlib/rand48.3
index 6b0831ead7..78cd0a7cd5 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.9 2003/05/10 06:48:30 jmc Exp $ 12.\" $OpenBSD: rand48.3,v 1.10 2003/06/01 19:27:27 jmc Exp $
13.\" 13.\"
14.Dd October 8, 1993 14.Dd October 8, 1993
15.Dt RAND48 3 15.Dt RAND48 3
@@ -157,9 +157,9 @@ generator calls.
157.Pp 157.Pp
158For a more powerful random number generator, see 158For a more powerful random number generator, see
159.Xr random 3 . 159.Xr random 3 .
160.Sh AUTHORS
161Martin Birgmeier
162.Sh SEE ALSO 160.Sh SEE ALSO
163.Xr arc4random 3 , 161.Xr arc4random 3 ,
164.Xr rand 3 , 162.Xr rand 3 ,
165.Xr random 3 163.Xr random 3
164.Sh AUTHORS
165Martin Birgmeier
diff --git a/src/lib/libc/stdlib/random.3 b/src/lib/libc/stdlib/random.3
index b98917a442..fba0f46d70 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.15 2003/05/10 06:48:30 jmc Exp $ 32.\" $OpenBSD: random.3,v 1.16 2003/06/01 19:27:27 jmc Exp $
33.\" 33.\"
34.Dd April 19, 1991 34.Dd April 19, 1991
35.Dt RANDOM 3 35.Dt RANDOM 3
@@ -154,8 +154,6 @@ it is initialized.
154With 256 bytes of state information, the period of the random number 154With 256 bytes of state information, the period of the random number
155generator is greater than 2**69 155generator is greater than 2**69
156which should be sufficient for most purposes. 156which should be sufficient for most purposes.
157.Sh AUTHORS
158.An Earl T. Cohen
159.Sh DIAGNOSTICS 157.Sh DIAGNOSTICS
160If 158If
161.Fn initstate 159.Fn initstate
@@ -185,6 +183,8 @@ function is an extension.
185These 183These
186functions appeared in 184functions appeared in
187.Bx 4.2 . 185.Bx 4.2 .
186.Sh AUTHORS
187.An Earl T. Cohen
188.Sh BUGS 188.Sh BUGS
189About 2/3 the speed of 189About 2/3 the speed of
190.Xr rand 3 . 190.Xr rand 3 .
diff --git a/src/lib/libc/stdlib/realpath.3 b/src/lib/libc/stdlib/realpath.3
index 56fbea9ede..fac9374b05 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.8 2001/04/23 15:30:25 aaron Exp $ 35.\" $OpenBSD: realpath.3,v 1.9 2003/06/01 19:27:27 jmc Exp $
36.\" 36.\"
37.Dd February 16, 1994 37.Dd February 16, 1994
38.Dt REALPATH 3 38.Dt REALPATH 3
@@ -76,7 +76,7 @@ All but the last component of
76must exist when 76must exist when
77.Fn realpath 77.Fn realpath
78is called. 78is called.
79.Sh "RETURN VALUES" 79.Sh RETURN VALUES
80The 80The
81.Fn realpath 81.Fn realpath
82function returns 82function returns
@@ -103,6 +103,13 @@ for any of the errors specified for the library functions
103.Xr readlink 2 , 103.Xr readlink 2 ,
104and 104and
105.Xr getcwd 3 . 105.Xr getcwd 3 .
106.Sh SEE ALSO
107.Xr getcwd 3
108.Sh HISTORY
109The
110.Fn realpath
111function call first appeared in
112.Bx 4.4 .
106.Sh CAVEATS 113.Sh CAVEATS
107This implementation of 114This implementation of
108.Fn realpath 115.Fn realpath
@@ -115,10 +122,3 @@ under certain circumstances, return a relative
115.Fa resolvedname 122.Fa resolvedname
116when given a relative 123when given a relative
117.Fa pathname . 124.Fa pathname .
118.Sh SEE ALSO
119.Xr getcwd 3
120.Sh HISTORY
121The
122.Fn realpath
123function call first appeared in
124.Bx 4.4 .
diff --git a/src/lib/libc/stdlib/tsearch.3 b/src/lib/libc/stdlib/tsearch.3
index b000a0a8b1..585ba6fe81 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.9 2000/08/09 15:51:21 aaron Exp $ 26.\" $OpenBSD: tsearch.3,v 1.10 2003/06/01 19:27:27 jmc Exp $
27.\" 27.\"
28.Dd June 15, 1997 28.Dd June 15, 1997
29.Dt TSEARCH 3 29.Dt TSEARCH 3
@@ -99,9 +99,6 @@ a value from the enum
99.Sy "typedef enum { preorder, postorder, endorder, leaf } VISIT;" 99.Sy "typedef enum { preorder, postorder, endorder, leaf } VISIT;"
100specifying the traversal type, and a node level (where level 100specifying the traversal type, and a node level (where level
101zero is the root of the tree). 101zero is the root of the tree).
102.Sh SEE ALSO
103.Xr bsearch 3 ,
104.Xr lsearch 3
105.Sh RETURN VALUES 102.Sh RETURN VALUES
106The 103The
107.Fn tsearch 104.Fn tsearch
@@ -125,3 +122,6 @@ or the datum cannot be found.
125The 122The
126.Fn twalk 123.Fn twalk
127function returns no value. 124function returns no value.
125.Sh SEE ALSO
126.Xr bsearch 3 ,
127.Xr lsearch 3