summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraaron <>1999-06-29 18:01:34 +0000
committeraaron <>1999-06-29 18:01:34 +0000
commit403f5844d16c63a63b8ce33a354e4871cb93df4c (patch)
tree8cb26f4259822c517bec5c7028ba41be89eb964b
parente5791ef4d456e0071415b711d9969fb50535b063 (diff)
downloadopenbsd-403f5844d16c63a63b8ce33a354e4871cb93df4c.tar.gz
openbsd-403f5844d16c63a63b8ce33a354e4871cb93df4c.tar.bz2
openbsd-403f5844d16c63a63b8ce33a354e4871cb93df4c.zip
repairs
-rw-r--r--src/lib/libc/string/bcmp.34
-rw-r--r--src/lib/libc/string/bcopy.34
-rw-r--r--src/lib/libc/string/bzero.34
-rw-r--r--src/lib/libc/string/index.38
-rw-r--r--src/lib/libc/string/memccpy.34
-rw-r--r--src/lib/libc/string/memchr.36
-rw-r--r--src/lib/libc/string/rindex.310
-rw-r--r--src/lib/libc/string/strcpy.320
-rw-r--r--src/lib/libc/string/strpbrk.35
-rw-r--r--src/lib/libc/string/strstr.35
-rw-r--r--src/lib/libc/string/strtok.34
11 files changed, 41 insertions, 33 deletions
diff --git a/src/lib/libc/string/bcmp.3 b/src/lib/libc/string/bcmp.3
index 9012f31baa..15ebd39ccc 100644
--- a/src/lib/libc/string/bcmp.3
+++ b/src/lib/libc/string/bcmp.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: bcmp.3,v 1.3 1999/05/23 14:11:03 aaron Exp $ 34.\" $OpenBSD: bcmp.3,v 1.4 1999/06/29 18:01:30 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt BCMP 3 37.Dt BCMP 3
@@ -67,5 +67,5 @@ The strings may overlap.
67.Sh HISTORY 67.Sh HISTORY
68A 68A
69.Fn bcmp 69.Fn bcmp
70function first appeared in 70function first appeared in
71.Bx 4.2 . 71.Bx 4.2 .
diff --git a/src/lib/libc/string/bcopy.3 b/src/lib/libc/string/bcopy.3
index 43cb59e4b5..da144e7d17 100644
--- a/src/lib/libc/string/bcopy.3
+++ b/src/lib/libc/string/bcopy.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: bcopy.3,v 1.3 1999/05/23 14:11:03 aaron Exp $ 35.\" $OpenBSD: bcopy.3,v 1.4 1999/06/29 18:01:31 aaron Exp $
36.\" 36.\"
37.Dd April 19, 1991 37.Dd April 19, 1991
38.Dt BCOPY 3 38.Dt BCOPY 3
@@ -67,5 +67,5 @@ is zero, no bytes are copied.
67.Sh HISTORY 67.Sh HISTORY
68A 68A
69.Fn bcopy 69.Fn bcopy
70function appeared in 70function appeared in
71.Bx 4.2 . 71.Bx 4.2 .
diff --git a/src/lib/libc/string/bzero.3 b/src/lib/libc/string/bzero.3
index b567e07532..4a35aafa1b 100644
--- a/src/lib/libc/string/bzero.3
+++ b/src/lib/libc/string/bzero.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: bzero.3,v 1.3 1999/05/23 14:11:03 aaron Exp $ 34.\" $OpenBSD: bzero.3,v 1.4 1999/06/29 18:01:32 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt BZERO 3 37.Dt BZERO 3
@@ -63,5 +63,5 @@ does nothing.
63A 63A
64.Fn bzero 64.Fn bzero
65function 65function
66appeared in 66appeared in
67.Bx 4.3 . 67.Bx 4.3 .
diff --git a/src/lib/libc/string/index.3 b/src/lib/libc/string/index.3
index d236a73a48..e70b13c55b 100644
--- a/src/lib/libc/string/index.3
+++ b/src/lib/libc/string/index.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: index.3,v 1.4 1997/12/30 01:09:49 deraadt Exp $ 34.\" $OpenBSD: index.3,v 1.5 1999/06/29 18:01:32 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt INDEX 3 37.Dt INDEX 3
@@ -50,13 +50,13 @@ function
50locates the first character matching 50locates the first character matching
51.Fa c 51.Fa c
52(converted to a 52(converted to a
53.Em char ) 53.Li char )
54in the null-terminated string 54in the null-terminated string
55.Fa s . 55.Fa s .
56.Sh RETURN VALUES 56.Sh RETURN VALUES
57If the character 57If the character
58.Fa c 58.Fa c
59is found, a pointer to it is returned; otherwise 59is found, a pointer to it is returned; otherwise,
60.Dv NULL 60.Dv NULL
61is returned. 61is returned.
62If 62If
@@ -78,5 +78,5 @@ locates the terminating '\e0'.
78.Sh HISTORY 78.Sh HISTORY
79An 79An
80.Fn index 80.Fn index
81function appeared in 81function appeared in
82.At v6 . 82.At v6 .
diff --git a/src/lib/libc/string/memccpy.3 b/src/lib/libc/string/memccpy.3
index c2e15b1405..873d3f784b 100644
--- a/src/lib/libc/string/memccpy.3
+++ b/src/lib/libc/string/memccpy.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: memccpy.3,v 1.4 1998/06/15 17:55:09 mickey Exp $ 1.\" $OpenBSD: memccpy.3,v 1.5 1999/06/29 18:01:32 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.
@@ -62,7 +62,7 @@ in the string
62is returned. 62is returned.
63Otherwise, 63Otherwise,
64.Fa len 64.Fa len
65bytes are copied, and a NULL pointer is returned. 65bytes are copied, and a null pointer is returned.
66.Sh SEE ALSO 66.Sh SEE ALSO
67.Xr bcopy 3 , 67.Xr bcopy 3 ,
68.Xr memcpy 3 , 68.Xr memcpy 3 ,
diff --git a/src/lib/libc/string/memchr.3 b/src/lib/libc/string/memchr.3
index 56a2aee9ce..81c524458c 100644
--- a/src/lib/libc/string/memchr.3
+++ b/src/lib/libc/string/memchr.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: memchr.3,v 1.2 1996/08/19 08:34:04 tholo Exp $ 36.\" $OpenBSD: memchr.3,v 1.3 1999/06/29 18:01:32 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt MEMCHR 3 39.Dt MEMCHR 3
@@ -59,7 +59,9 @@ The
59.Fn memchr 59.Fn memchr
60function 60function
61returns a pointer to the byte located, 61returns a pointer to the byte located,
62or NULL if no such byte exists within 62or
63.Dv NULL
64if no such byte exists within
63.Fa len 65.Fa len
64bytes. 66bytes.
65.Sh SEE ALSO 67.Sh SEE ALSO
diff --git a/src/lib/libc/string/rindex.3 b/src/lib/libc/string/rindex.3
index db7f8e1cd8..d4bcbbea54 100644
--- a/src/lib/libc/string/rindex.3
+++ b/src/lib/libc/string/rindex.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: rindex.3,v 1.3 1997/12/30 01:09:49 deraadt Exp $ 34.\" $OpenBSD: rindex.3,v 1.4 1999/06/29 18:01:33 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt RINDEX 3 37.Dt RINDEX 3
@@ -51,10 +51,12 @@ locates the last character
51matching 51matching
52.Fa c 52.Fa c
53(converted to a 53(converted to a
54.Em char ) 54.Li char )
55in the null-terminated string 55in the null-terminated string
56.Fa s . 56.Fa s .
57If the character c is found, a pointer to it is returned; otherwise NULL is returned. 57If the character c is found, a pointer to it is returned; otherwise,
58.Dv NULL
59is returned.
58If 60If
59.Fa c 61.Fa c
60is 62is
@@ -76,5 +78,5 @@ locates the terminating
76.Sh HISTORY 78.Sh HISTORY
77A 79A
78.Fn rindex 80.Fn rindex
79function appeared in 81function appeared in
80.At v6 . 82.At v6 .
diff --git a/src/lib/libc/string/strcpy.3 b/src/lib/libc/string/strcpy.3
index 36434ca04b..aab10f9ba8 100644
--- a/src/lib/libc/string/strcpy.3
+++ b/src/lib/libc/string/strcpy.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: strcpy.3,v 1.8 1999/06/06 15:17:32 aaron Exp $ 36.\" $OpenBSD: strcpy.3,v 1.9 1999/06/29 18:01:33 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRCPY 3 39.Dt STRCPY 3
@@ -92,20 +92,22 @@ return
92.Fa dst . 92.Fa dst .
93.Sh EXAMPLES 93.Sh EXAMPLES
94The following sets 94The following sets
95.Dq Li chararray 95.Va chararray
96to 96to
97.Dq Li abc\e0\e0\e0 : 97.Dq abc\e0\e0\e0 :
98.Bd -literal -offset indent 98.Bd -literal -offset indent
99(void)strncpy(chararray, "abc", 6); 99(void)strncpy(chararray, "abc", 6);
100.Ed 100.Ed
101.Pp 101.Pp
102The following sets 102The following sets
103.Dq Li chararray 103.Va chararray
104to 104to
105.Dq Li abcdef 105.Dq abcdef
106and does 106and does
107.Em not 107.Em not
108null terminate chararray because the source string is >= the length parameter. 108null terminate
109.Va chararray
110because the source string is >= the length parameter.
109.Fn strncpy 111.Fn strncpy
110.Em only 112.Em only
111null terminates the destination string when then length of the source 113null terminates the destination string when then length of the source
@@ -115,9 +117,9 @@ string is less than the length parameter.
115.Ed 117.Ed
116.Pp 118.Pp
117The following copies as many characters from 119The following copies as many characters from
118.Dq Li input 120.Va input
119to 121to
120.Dq Li buf 122.Va buf
121as will fit and null terminates the result. Because 123as will fit and null terminates the result. Because
122.Fn strncpy 124.Fn strncpy
123does 125does
@@ -143,7 +145,7 @@ is simply:
143.Xr memccpy 3 , 145.Xr memccpy 3 ,
144.Xr memcpy 3 , 146.Xr memcpy 3 ,
145.Xr memmove 3 , 147.Xr memmove 3 ,
146.Xr strlcpy 3 148.Xr strlcpy 3
147.Sh STANDARDS 149.Sh STANDARDS
148The 150The
149.Fn strcpy 151.Fn strcpy
diff --git a/src/lib/libc/string/strpbrk.3 b/src/lib/libc/string/strpbrk.3
index 5876f560a9..66b9cb2683 100644
--- a/src/lib/libc/string/strpbrk.3
+++ b/src/lib/libc/string/strpbrk.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: strpbrk.3,v 1.2 1996/08/19 08:34:22 tholo Exp $ 36.\" $OpenBSD: strpbrk.3,v 1.3 1999/06/29 18:01:33 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRPBRK 3 39.Dt STRPBRK 3
@@ -59,7 +59,8 @@ If no characters from
59occur anywhere in 59occur anywhere in
60.Fa s 60.Fa s
61.Fn strpbrk 61.Fn strpbrk
62returns NULL. 62returns
63.Dv NULL .
63.Sh SEE ALSO 64.Sh SEE ALSO
64.Xr index 3 , 65.Xr index 3 ,
65.Xr memchr 3 , 66.Xr memchr 3 ,
diff --git a/src/lib/libc/string/strstr.3 b/src/lib/libc/string/strstr.3
index fa455b426a..773163ecc6 100644
--- a/src/lib/libc/string/strstr.3
+++ b/src/lib/libc/string/strstr.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: strstr.3,v 1.2 1996/08/19 08:34:26 tholo Exp $ 36.\" $OpenBSD: strstr.3,v 1.3 1999/06/29 18:01:33 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRSTR 3 39.Dt STRSTR 3
@@ -64,7 +64,8 @@ if
64occurs nowhere in 64occurs nowhere in
65.Fa big , 65.Fa big ,
66.Fn strstr 66.Fn strstr
67returns NULL; 67returns
68.Dv NULL ;
68otherwise 69otherwise
69.Fn strstr 70.Fn strstr
70returns a pointer to the first character of the first occurrence of 71returns a pointer to the first character of the first occurrence of
diff --git a/src/lib/libc/string/strtok.3 b/src/lib/libc/string/strtok.3
index 62f0d7a501..c8463200bf 100644
--- a/src/lib/libc/string/strtok.3
+++ b/src/lib/libc/string/strtok.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: strtok.3,v 1.5 1999/06/04 19:14:56 aaron Exp $ 36.\" $OpenBSD: strtok.3,v 1.6 1999/06/29 18:01:34 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRTOK 3 39.Dt STRTOK 3
@@ -47,7 +47,7 @@
47.Fn strtok "char *str" "const char *sep" 47.Fn strtok "char *str" "const char *sep"
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49.Bf -symbolic 49.Bf -symbolic
50This interface is obsoleted by 50This interface is obsoleted by
51.Xr strsep 3 . 51.Xr strsep 3 .
52.Ef 52.Ef
53.Pp 53.Pp