summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraaron <>2000-04-21 15:24:20 +0000
committeraaron <>2000-04-21 15:24:20 +0000
commit9fb35611cc3d03bef8b690b62e0904507c414a61 (patch)
treecbb158a96fec3a91f1d59c3e9f768b10d6ed872e
parenta4336f357f9e30dffdfad4909b24bd2e82c096a2 (diff)
downloadopenbsd-9fb35611cc3d03bef8b690b62e0904507c414a61.tar.gz
openbsd-9fb35611cc3d03bef8b690b62e0904507c414a61.tar.bz2
openbsd-9fb35611cc3d03bef8b690b62e0904507c414a61.zip
Flesh out libc string function man pages.
-rw-r--r--src/lib/libc/string/bcmp.35
-rw-r--r--src/lib/libc/string/bcopy.35
-rw-r--r--src/lib/libc/string/bm.34
-rw-r--r--src/lib/libc/string/bstring.317
-rw-r--r--src/lib/libc/string/bzero.38
-rw-r--r--src/lib/libc/string/ffs.38
-rw-r--r--src/lib/libc/string/memccpy.39
-rw-r--r--src/lib/libc/string/memchr.315
-rw-r--r--src/lib/libc/string/memcmp.315
-rw-r--r--src/lib/libc/string/memcpy.311
-rw-r--r--src/lib/libc/string/memmove.38
-rw-r--r--src/lib/libc/string/memset.315
-rw-r--r--src/lib/libc/string/strcasecmp.35
-rw-r--r--src/lib/libc/string/strcat.321
-rw-r--r--src/lib/libc/string/strchr.35
-rw-r--r--src/lib/libc/string/strcmp.38
-rw-r--r--src/lib/libc/string/strcoll.38
-rw-r--r--src/lib/libc/string/strcpy.317
-rw-r--r--src/lib/libc/string/strcspn.314
-rw-r--r--src/lib/libc/string/strdup.39
-rw-r--r--src/lib/libc/string/string.35
-rw-r--r--src/lib/libc/string/strlcpy.312
-rw-r--r--src/lib/libc/string/strlen.314
-rw-r--r--src/lib/libc/string/strmode.38
-rw-r--r--src/lib/libc/string/strpbrk.310
-rw-r--r--src/lib/libc/string/strrchr.39
-rw-r--r--src/lib/libc/string/strsep.35
-rw-r--r--src/lib/libc/string/strspn.311
-rw-r--r--src/lib/libc/string/strstr.38
-rw-r--r--src/lib/libc/string/strtok.327
-rw-r--r--src/lib/libc/string/strxfrm.38
31 files changed, 141 insertions, 183 deletions
diff --git a/src/lib/libc/string/bcmp.3 b/src/lib/libc/string/bcmp.3
index 15ebd39ccc..d880c1e6f0 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.4 1999/06/29 18:01:30 aaron Exp $ 34.\" $OpenBSD: bcmp.3,v 1.5 2000/04/21 15:24:18 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt BCMP 3 37.Dt BCMP 3
@@ -46,8 +46,7 @@
46.Sh DESCRIPTION 46.Sh DESCRIPTION
47The 47The
48.Fn bcmp 48.Fn bcmp
49function 49function compares byte string
50compares byte string
51.Fa b1 50.Fa b1
52against byte string 51against byte string
53.Fa b2 , 52.Fa b2 ,
diff --git a/src/lib/libc/string/bcopy.3 b/src/lib/libc/string/bcopy.3
index da144e7d17..b290418f4a 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.4 1999/06/29 18:01:31 aaron Exp $ 35.\" $OpenBSD: bcopy.3,v 1.5 2000/04/21 15:24:19 aaron Exp $
36.\" 36.\"
37.Dd April 19, 1991 37.Dd April 19, 1991
38.Dt BCOPY 3 38.Dt BCOPY 3
@@ -47,8 +47,7 @@
47.Sh DESCRIPTION 47.Sh DESCRIPTION
48The 48The
49.Fn bcopy 49.Fn bcopy
50function 50function copies
51copies
52.Fa len 51.Fa len
53bytes from string 52bytes from string
54.Fa src 53.Fa src
diff --git a/src/lib/libc/string/bm.3 b/src/lib/libc/string/bm.3
index afab2334db..15277de885 100644
--- a/src/lib/libc/string/bm.3
+++ b/src/lib/libc/string/bm.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: bm.3,v 1.4 1999/06/29 17:49:24 aaron Exp $ 35.\" $OpenBSD: bm.3,v 1.5 2000/04/21 15:24:19 aaron Exp $
36.\" 36.\"
37.Dd June 29, 1999 37.Dd June 29, 1999
38.Dt BM 3 38.Dt BM 3
@@ -59,7 +59,7 @@ occurrence of a byte string within another byte string.
59evaluates 59evaluates
60.Fa patlen 60.Fa patlen
61bytes starting at 61bytes starting at
62.Fa pattern , 62.Fa pattern
63and returns a pointer to a structure describing them. 63and returns a pointer to a structure describing them.
64The bytes referenced by 64The bytes referenced by
65.Fa pattern 65.Fa pattern
diff --git a/src/lib/libc/string/bstring.3 b/src/lib/libc/string/bstring.3
index 0dda6c7278..85283321c8 100644
--- a/src/lib/libc/string/bstring.3
+++ b/src/lib/libc/string/bstring.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: bstring.3,v 1.3 1999/06/06 15:17:31 aaron Exp $ 34.\" $OpenBSD: bstring.3,v 1.4 2000/04/21 15:24:19 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt BSTRING 3 37.Dt BSTRING 3
@@ -96,14 +96,15 @@ and
96conform to 96conform to
97.St -ansiC . 97.St -ansiC .
98.Sh HISTORY 98.Sh HISTORY
99The functions 99The
100.Fn bzero 100.Fn bzero
101and 101and
102.Fn memccpy 102.Fn memccpy
103appeared in 103functions appeared in
104.Bx 4.3 ; 104.Bx 4.3 .
105the functions 105The
106.Fn bcmp , 106.Fn bcmp
107.Fn bcopy , 107and
108appeared in 108.Fn bcopy
109functions appeared in
109.Bx 4.2 . 110.Bx 4.2 .
diff --git a/src/lib/libc/string/bzero.3 b/src/lib/libc/string/bzero.3
index 4a35aafa1b..a735d5ef3f 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.4 1999/06/29 18:01:32 aaron Exp $ 34.\" $OpenBSD: bzero.3,v 1.5 2000/04/21 15:24:19 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt BZERO 3 37.Dt BZERO 3
@@ -46,8 +46,7 @@
46.Sh DESCRIPTION 46.Sh DESCRIPTION
47The 47The
48.Fn bzero 48.Fn bzero
49function 49function writes
50writes
51.Fa len 50.Fa len
52zero bytes to the string 51zero bytes to the string
53.Fa b . 52.Fa b .
@@ -62,6 +61,5 @@ does nothing.
62.Sh HISTORY 61.Sh HISTORY
63A 62A
64.Fn bzero 63.Fn bzero
65function 64function appeared in
66appeared in
67.Bx 4.3 . 65.Bx 4.3 .
diff --git a/src/lib/libc/string/ffs.3 b/src/lib/libc/string/ffs.3
index 9ef08aef8e..dc7a20741e 100644
--- a/src/lib/libc/string/ffs.3
+++ b/src/lib/libc/string/ffs.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: ffs.3,v 1.2 1996/08/19 08:34:01 tholo Exp $ 34.\" $OpenBSD: ffs.3,v 1.3 2000/04/21 15:24:19 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt FFS 3 37.Dt FFS 3
@@ -46,12 +46,10 @@
46.Sh DESCRIPTION 46.Sh DESCRIPTION
47The 47The
48.Fn ffs 48.Fn ffs
49function 49function finds the first bit set in
50finds the first bit set in
51.Fa value 50.Fa value
52and returns the index of that bit. 51and returns the index of that bit.
53Bits are numbered starting from 1, starting at the right-most 52Bits are numbered starting from 1, starting at the rightmost bit.
54bit.
55A return value of 0 means that the argument was zero. 53A return value of 0 means that the argument was zero.
56.Sh SEE ALSO 54.Sh SEE ALSO
57.Xr bitstring 3 55.Xr bitstring 3
diff --git a/src/lib/libc/string/memccpy.3 b/src/lib/libc/string/memccpy.3
index 873d3f784b..feedeff3a6 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.5 1999/06/29 18:01:32 aaron Exp $ 1.\" $OpenBSD: memccpy.3,v 1.6 2000/04/21 15:24:19 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.
@@ -46,14 +46,15 @@
46.Sh DESCRIPTION 46.Sh DESCRIPTION
47The 47The
48.Fn memccpy 48.Fn memccpy
49function 49function copies bytes from string
50copies bytes from string
51.Fa src 50.Fa src
52to string 51to string
53.Fa dst . 52.Fa dst .
54If the character 53If the character
55.Fa c 54.Fa c
56(as converted to an unsigned char) occurs in the string 55(as converted to an
56.Li unsigned char )
57occurs in the string
57.Fa src , 58.Fa src ,
58the copy stops and a pointer to the byte after the copy of 59the copy stops and a pointer to the byte after the copy of
59.Fa c 60.Fa c
diff --git a/src/lib/libc/string/memchr.3 b/src/lib/libc/string/memchr.3
index 0bcdde698e..632c440b5b 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.4 1999/09/21 16:44:01 espie Exp $ 36.\" $OpenBSD: memchr.3,v 1.5 2000/04/21 15:24:19 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt MEMCHR 3 39.Dt MEMCHR 3
@@ -48,18 +48,16 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn memchr 50.Fn memchr
51function 51function locates the first occurrence of
52locates the first occurrence of
53.Fa c 52.Fa c
54(converted to an unsigned char) 53(converted to an
54.Li unsigned char )
55in string 55in string
56.Fa b . 56.Fa b .
57.Sh RETURN VALUES 57.Sh RETURN VALUES
58The 58The
59.Fn memchr 59.Fn memchr
60function 60function returns a pointer to the byte located, or
61returns a pointer to the byte located,
62or
63.Dv NULL 61.Dv NULL
64if no such byte exists within 62if no such byte exists within
65.Fa len 63.Fa len
@@ -76,6 +74,5 @@ bytes.
76.Sh STANDARDS 74.Sh STANDARDS
77The 75The
78.Fn memchr 76.Fn memchr
79function 77function conforms to
80conforms to
81.St -ansiC . 78.St -ansiC .
diff --git a/src/lib/libc/string/memcmp.3 b/src/lib/libc/string/memcmp.3
index 34c5f60861..db4fef364b 100644
--- a/src/lib/libc/string/memcmp.3
+++ b/src/lib/libc/string/memcmp.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: memcmp.3,v 1.3 1996/12/10 09:06:11 deraadt Exp $ 36.\" $OpenBSD: memcmp.3,v 1.4 2000/04/21 15:24:19 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt MEMCMP 3 39.Dt MEMCMP 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn memcmp 50.Fn memcmp
51function 51function compares byte string
52compares byte string
53.Fa b1 52.Fa b1
54against byte string 53against byte string
55.Fa b2 . 54.Fa b2 .
@@ -59,10 +58,11 @@ bytes long.
59.Sh RETURN VALUES 58.Sh RETURN VALUES
60The 59The
61.Fn memcmp 60.Fn memcmp
62function 61function returns zero if the two strings are identical,
63returns zero if the two strings are identical,
64otherwise returns the difference between the first two differing bytes 62otherwise returns the difference between the first two differing bytes
65(treated as unsigned char values, so that 63(treated as
64.Li unsigned char
65values, so that
66.Sq Li \e200 66.Sq Li \e200
67is greater than 67is greater than
68.Sq Li \&\e0 , 68.Sq Li \&\e0 ,
@@ -77,6 +77,5 @@ Zero-length strings are always identical.
77.Sh STANDARDS 77.Sh STANDARDS
78The 78The
79.Fn memcmp 79.Fn memcmp
80function 80function conforms to
81conforms to
82.St -ansiC . 81.St -ansiC .
diff --git a/src/lib/libc/string/memcpy.3 b/src/lib/libc/string/memcpy.3
index 75eb00b2d5..030eadff20 100644
--- a/src/lib/libc/string/memcpy.3
+++ b/src/lib/libc/string/memcpy.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: memcpy.3,v 1.2 1996/08/19 08:34:06 tholo Exp $ 36.\" $OpenBSD: memcpy.3,v 1.3 2000/04/21 15:24:19 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt MEMCPY 3 39.Dt MEMCPY 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn memcpy 50.Fn memcpy
51function 51function copies
52copies
53.Fa len 52.Fa len
54bytes from string 53bytes from string
55.Fa src 54.Fa src
@@ -58,8 +57,7 @@ to string
58.Sh RETURN VALUES 57.Sh RETURN VALUES
59The 58The
60.Fn memcpy 59.Fn memcpy
61function 60function returns the original value of
62returns the original value of
63.Fa dst . 61.Fa dst .
64.Sh SEE ALSO 62.Sh SEE ALSO
65.Xr bcopy 3 , 63.Xr bcopy 3 ,
@@ -69,8 +67,7 @@ returns the original value of
69.Sh STANDARDS 67.Sh STANDARDS
70The 68The
71.Fn memcpy 69.Fn memcpy
72function 70function conforms to
73conforms to
74.St -ansiC . 71.St -ansiC .
75.Sh BUGS 72.Sh BUGS
76In this implementation 73In this implementation
diff --git a/src/lib/libc/string/memmove.3 b/src/lib/libc/string/memmove.3
index 95f6b7596c..026dab0f9f 100644
--- a/src/lib/libc/string/memmove.3
+++ b/src/lib/libc/string/memmove.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: memmove.3,v 1.2 1996/08/19 08:34:07 tholo Exp $ 36.\" $OpenBSD: memmove.3,v 1.3 2000/04/21 15:24:19 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt MEMMOVE 3 39.Dt MEMMOVE 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn memmove 50.Fn memmove
51function 51function copies
52copies
53.Fa len 52.Fa len
54bytes from string 53bytes from string
55.Fa src 54.Fa src
@@ -70,6 +69,5 @@ function returns the original value of
70.Sh STANDARDS 69.Sh STANDARDS
71The 70The
72.Fn memmove 71.Fn memmove
73function 72function conforms to
74conforms to
75.St -ansiC . 73.St -ansiC .
diff --git a/src/lib/libc/string/memset.3 b/src/lib/libc/string/memset.3
index e1d8583732..9da14983c7 100644
--- a/src/lib/libc/string/memset.3
+++ b/src/lib/libc/string/memset.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: memset.3,v 1.3 1997/08/24 21:56:45 deraadt Exp $ 36.\" $OpenBSD: memset.3,v 1.4 2000/04/21 15:24:19 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt MEMSET 3 39.Dt MEMSET 3
@@ -48,18 +48,18 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn memset 50.Fn memset
51function 51function writes
52writes
53.Fa len 52.Fa len
54bytes of value 53bytes of value
55.Fa c 54.Fa c
56(converted to an unsigned char) to the string 55(converted to an
56.Li unsigned char )
57to the string
57.Fa b . 58.Fa b .
58.Sh RETURN VALUES 59.Sh RETURN VALUES
59The 60The
60.Fn memset 61.Fn memset
61function 62function returns the original value of
62returns the original value of
63.Fa b . 63.Fa b .
64.Sh SEE ALSO 64.Sh SEE ALSO
65.Xr bzero 3 , 65.Xr bzero 3 ,
@@ -67,6 +67,5 @@ returns the original value of
67.Sh STANDARDS 67.Sh STANDARDS
68The 68The
69.Fn memset 69.Fn memset
70function 70function conforms to
71conforms to
72.St -ansiC . 71.St -ansiC .
diff --git a/src/lib/libc/string/strcasecmp.3 b/src/lib/libc/string/strcasecmp.3
index be4e96a1c5..3cfc76e36f 100644
--- a/src/lib/libc/string/strcasecmp.3
+++ b/src/lib/libc/string/strcasecmp.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: strcasecmp.3,v 1.5 1999/06/06 15:17:32 aaron Exp $ 1.\" $OpenBSD: strcasecmp.3,v 1.6 2000/04/21 15:24:19 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.
@@ -53,8 +53,7 @@ The
53.Fn strcasecmp 53.Fn strcasecmp
54and 54and
55.Fn strncasecmp 55.Fn strncasecmp
56functions 56functions compare the null-terminated strings
57compare the null-terminated strings
58.Fa s1 57.Fa s1
59and 58and
60.Fa s2 59.Fa s2
diff --git a/src/lib/libc/string/strcat.3 b/src/lib/libc/string/strcat.3
index 6a7c51c487..e9e5163bd3 100644
--- a/src/lib/libc/string/strcat.3
+++ b/src/lib/libc/string/strcat.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: strcat.3,v 1.7 1999/06/06 06:57:52 pjanzen Exp $ 36.\" $OpenBSD: strcat.3,v 1.8 2000/04/21 15:24:19 aaron Exp $
37.\" 37.\"
38.Dd July 8, 1997 38.Dd July 8, 1997
39.Dt STRCAT 3 39.Dt STRCAT 3
@@ -53,8 +53,7 @@ The
53.Fn strcat 53.Fn strcat
54and 54and
55.Fn strncat 55.Fn strncat
56functions 56functions append a copy of the null-terminated string
57append a copy of the null-terminated string
58.Fa append 57.Fa append
59to the end of the null-terminated string 58to the end of the null-terminated string
60.Fa s , 59.Fa s ,
@@ -66,8 +65,7 @@ must have sufficient space to hold the result.
66.Pp 65.Pp
67The 66The
68.Fn strncat 67.Fn strncat
69function 68function appends not more than
70appends not more than
71.Fa count 69.Fa count
72characters where space for the terminating 70characters where space for the terminating
73.Ql \e0 71.Ql \e0
@@ -78,8 +76,7 @@ The
78.Fn strcat 76.Fn strcat
79and 77and
80.Fn strncat 78.Fn strncat
81functions 79functions return the pointer
82return the pointer
83.Fa s . 80.Fa s .
84.Sh EXAMPLES 81.Sh EXAMPLES
85The following appends 82The following appends
@@ -109,9 +106,10 @@ The above will copy as many characters from
109.Dq Li input 106.Dq Li input
110to 107to
111.Dq Li buf 108.Dq Li buf
112as will 109as will fit.
113fit. It then appends as many characters from suffix as will fit (or none 110It then appends as many characters from suffix as will fit (or none
114if there is no space). For operations like this, the 111if there is no space).
112For operations like this, the
115.Xr strlcpy 3 113.Xr strlcpy 3
116and 114and
117.Xr strlcat 3 115.Xr strlcat 3
@@ -133,6 +131,5 @@ The
133.Fn strcat 131.Fn strcat
134and 132and
135.Fn strncat 133.Fn strncat
136functions 134functions conform to
137conform to
138.St -ansiC . 135.St -ansiC .
diff --git a/src/lib/libc/string/strchr.3 b/src/lib/libc/string/strchr.3
index 5b117b83ca..1333a305d6 100644
--- a/src/lib/libc/string/strchr.3
+++ b/src/lib/libc/string/strchr.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: strchr.3,v 1.6 1999/09/21 16:44:01 espie Exp $ 36.\" $OpenBSD: strchr.3,v 1.7 2000/04/21 15:24:19 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRCHR 3 39.Dt STRCHR 3
@@ -98,8 +98,7 @@ p = strchr(s, 'o');
98.Sh STANDARDS 98.Sh STANDARDS
99The 99The
100.Fn strchr 100.Fn strchr
101function 101function conforms to
102conforms to
103.St -ansiC . 102.St -ansiC .
104.Pp 103.Pp
105The 104The
diff --git a/src/lib/libc/string/strcmp.3 b/src/lib/libc/string/strcmp.3
index a1f59b4dd9..c1173a423a 100644
--- a/src/lib/libc/string/strcmp.3
+++ b/src/lib/libc/string/strcmp.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: strcmp.3,v 1.4 1999/06/06 15:17:32 aaron Exp $ 36.\" $OpenBSD: strcmp.3,v 1.5 2000/04/21 15:24:19 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRCMP 3 39.Dt STRCMP 3
@@ -53,8 +53,7 @@ The
53.Fn strcmp 53.Fn strcmp
54and 54and
55.Fn strncmp 55.Fn strncmp
56functions 56functions lexicographically compare the null-terminated strings
57lexicographically compare the null-terminated strings
58.Fa s1 57.Fa s1
59and 58and
60.Fa s2 . 59.Fa s2 .
@@ -88,6 +87,5 @@ The
88.Fn strcmp 87.Fn strcmp
89and 88and
90.Fn strncmp 89.Fn strncmp
91functions 90functions conform to
92conform to
93.St -ansiC . 91.St -ansiC .
diff --git a/src/lib/libc/string/strcoll.3 b/src/lib/libc/string/strcoll.3
index 20af998885..5d3e44ee96 100644
--- a/src/lib/libc/string/strcoll.3
+++ b/src/lib/libc/string/strcoll.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: strcoll.3,v 1.2 1996/08/19 08:34:12 tholo Exp $ 36.\" $OpenBSD: strcoll.3,v 1.3 2000/04/21 15:24:19 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRCOLL 3 39.Dt STRCOLL 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn strcoll 50.Fn strcoll
51function 51function lexicographically compares the null-terminated strings
52lexicographically compares the null-terminated strings
53.Fa s1 52.Fa s1
54and 53and
55.Fa s2 54.Fa s2
@@ -69,6 +68,5 @@ is greater than, equal to, or less than
69.Sh STANDARDS 68.Sh STANDARDS
70The 69The
71.Fn strcoll 70.Fn strcoll
72function 71function conforms to
73conforms to
74.St -ansiC . 72.St -ansiC .
diff --git a/src/lib/libc/string/strcpy.3 b/src/lib/libc/string/strcpy.3
index aab10f9ba8..1dbeafa6e8 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.9 1999/06/29 18:01:33 aaron Exp $ 36.\" $OpenBSD: strcpy.3,v 1.10 2000/04/21 15:24:20 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRCPY 3 39.Dt STRCPY 3
@@ -53,8 +53,7 @@ The
53.Fn strcpy 53.Fn strcpy
54and 54and
55.Fn strncpy 55.Fn strncpy
56functions 56functions copy the string
57copy the string
58.Fa src 57.Fa src
59to 58to
60.Fa dst 59.Fa dst
@@ -87,8 +86,7 @@ The
87.Fn strcpy 86.Fn strcpy
88and 87and
89.Fn strncpy 88.Fn strncpy
90functions 89functions return
91return
92.Fa dst . 90.Fa dst .
93.Sh EXAMPLES 91.Sh EXAMPLES
94The following sets 92The following sets
@@ -120,7 +118,8 @@ The following copies as many characters from
120.Va input 118.Va input
121to 119to
122.Va buf 120.Va buf
123as will fit and null terminates the result. Because 121as will fit and null terminates the result.
122Because
124.Fn strncpy 123.Fn strncpy
125does 124does
126.Em not 125.Em not
@@ -134,7 +133,8 @@ buf[sizeof(buf) - 1] = '\e0';
134.Pp 133.Pp
135Note that 134Note that
136.Xr strlcpy 3 135.Xr strlcpy 3
137is a better choice for this kind of operation. The equivalent using 136is a better choice for this kind of operation.
137The equivalent using
138.Xr strlcpy 3 138.Xr strlcpy 3
139is simply: 139is simply:
140.Bd -literal -offset indent 140.Bd -literal -offset indent
@@ -151,6 +151,5 @@ The
151.Fn strcpy 151.Fn strcpy
152and 152and
153.Fn strncpy 153.Fn strncpy
154functions 154functions conform to
155conform to
156.St -ansiC . 155.St -ansiC .
diff --git a/src/lib/libc/string/strcspn.3 b/src/lib/libc/string/strcspn.3
index 6f7233a3e4..37e8f163f1 100644
--- a/src/lib/libc/string/strcspn.3
+++ b/src/lib/libc/string/strcspn.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: strcspn.3,v 1.4 1999/09/21 16:44:01 espie Exp $ 36.\" $OpenBSD: strcspn.3,v 1.5 2000/04/21 15:24:20 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRCSPN 3 39.Dt STRCSPN 3
@@ -48,23 +48,20 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn strcspn 50.Fn strcspn
51function 51function spans the initial part of the null-terminated string
52spans the initial part of the null-terminated string
53.Fa s 52.Fa s
54as long as the characters from 53as long as the characters from
55.Fa s 54.Fa s
56do not occur in string 55do not occur in string
57.Fa charset 56.Fa charset
58(it 57(it spans the
59spans the
60.Em complement 58.Em complement
61of 59of
62.Fa charset ) . 60.Fa charset ) .
63.Sh RETURN VALUES 61.Sh RETURN VALUES
64The 62The
65.Fn strcspn 63.Fn strcspn
66function 64function returns the number of characters spanned.
67returns the number of characters spanned.
68.Sh EXAMPLES 65.Sh EXAMPLES
69The following call to 66The following call to
70.Fn strcspn 67.Fn strcspn
@@ -91,6 +88,5 @@ span = strcspn(s, charset);
91.Sh STANDARDS 88.Sh STANDARDS
92The 89The
93.Fn strcspn 90.Fn strcspn
94function 91function conforms to
95conforms to
96.St -ansiC . 92.St -ansiC .
diff --git a/src/lib/libc/string/strdup.3 b/src/lib/libc/string/strdup.3
index 73c144d6e4..457b8322cf 100644
--- a/src/lib/libc/string/strdup.3
+++ b/src/lib/libc/string/strdup.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: strdup.3,v 1.7 1999/06/04 19:14:56 aaron Exp $ 1.\" $OpenBSD: strdup.3,v 1.8 2000/04/21 15:24:20 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.
@@ -46,13 +46,10 @@
46.Sh DESCRIPTION 46.Sh DESCRIPTION
47The 47The
48.Fn strdup 48.Fn strdup
49function 49function allocates sufficient memory for a copy of the string
50allocates sufficient memory for a copy
51of the string
52.Fa s , 50.Fa s ,
53does the copy, and returns a pointer to it. 51does the copy, and returns a pointer to it.
54The pointer may subsequently be used as an 52The pointer may subsequently be used as an argument to the function
55argument to the function
56.Xr free 3 . 53.Xr free 3 .
57.Pp 54.Pp
58If insufficient memory is available, 55If insufficient memory is available,
diff --git a/src/lib/libc/string/string.3 b/src/lib/libc/string/string.3
index ee74224967..7a67b96b53 100644
--- a/src/lib/libc/string/string.3
+++ b/src/lib/libc/string/string.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: string.3,v 1.7 1999/06/06 15:17:32 aaron Exp $ 34.\" $OpenBSD: string.3,v 1.8 2000/04/21 15:24:20 aaron Exp $
35.\" 35.\"
36.Dd April 19, 1991 36.Dd April 19, 1991
37.Dt STRING 3 37.Dt STRING 3
@@ -157,6 +157,5 @@ The
157.Fn strstr , 157.Fn strstr ,
158and 158and
159.Fn strtok 159.Fn strtok
160functions 160functions conform to
161conform to
162.St -ansiC . 161.St -ansiC .
diff --git a/src/lib/libc/string/strlcpy.3 b/src/lib/libc/string/strlcpy.3
index b07e30e6ea..03a80e6c79 100644
--- a/src/lib/libc/string/strlcpy.3
+++ b/src/lib/libc/string/strlcpy.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: strlcpy.3,v 1.6 1999/09/04 02:22:46 pjanzen Exp $ 1.\" $OpenBSD: strlcpy.3,v 1.7 2000/04/21 15:24:20 aaron Exp $
2.\" 2.\"
3.\" Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> 3.\" Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
4.\" All rights reserved. 4.\" All rights reserved.
@@ -43,7 +43,8 @@ The
43.Fn strlcpy 43.Fn strlcpy
44and 44and
45.Fn strlcat 45.Fn strlcat
46functions copy and concatenate strings respectively. They are designed 46functions copy and concatenate strings respectively.
47They are designed
47to be safer, more consistent, and less error prone replacements for 48to be safer, more consistent, and less error prone replacements for
48.Xr strncpy 3 49.Xr strncpy 3
49and 50and
@@ -55,7 +56,8 @@ and
55take the full size of the buffer (not just the length) and guarantee to 56take the full size of the buffer (not just the length) and guarantee to
56NUL-terminate the result (as long as 57NUL-terminate the result (as long as
57.Fa size 58.Fa size
58is larger than 0). Note that you should include a byte for the NUL in 59is larger than 0).
60Note that you should include a byte for the NUL in
59.Fa size . 61.Fa size .
60.Pp 62.Pp
61The 63The
@@ -82,8 +84,8 @@ The
82.Fn strlcpy 84.Fn strlcpy
83and 85and
84.Fn strlcat 86.Fn strlcat
85functions return the total length of the string they tried to 87functions return the total length of the string they tried to create.
86create. For 88For
87.Fn strlcpy 89.Fn strlcpy
88that means the length of 90that means the length of
89.Fa src . 91.Fa src .
diff --git a/src/lib/libc/string/strlen.3 b/src/lib/libc/string/strlen.3
index 9db28cd184..759e724056 100644
--- a/src/lib/libc/string/strlen.3
+++ b/src/lib/libc/string/strlen.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: strlen.3,v 1.3 1999/06/04 19:14:56 aaron Exp $ 36.\" $OpenBSD: strlen.3,v 1.4 2000/04/21 15:24:20 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRLEN 3 39.Dt STRLEN 3
@@ -48,22 +48,18 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn strlen 50.Fn strlen
51function 51function computes the length of the string
52computes the length of the string
53.Fa s . 52.Fa s .
54.Sh RETURN VALUES 53.Sh RETURN VALUES
55The 54The
56.Fn strlen 55.Fn strlen
57function 56function returns the number of characters that precede the terminating
58returns 57.Tn NUL
59the number of characters that precede the
60terminating NUL
61character. 58character.
62.Sh SEE ALSO 59.Sh SEE ALSO
63.Xr string 3 60.Xr string 3
64.Sh STANDARDS 61.Sh STANDARDS
65The 62The
66.Fn strlen 63.Fn strlen
67function 64function conforms to
68conforms to
69.St -ansiC . 65.St -ansiC .
diff --git a/src/lib/libc/string/strmode.3 b/src/lib/libc/string/strmode.3
index 3703a7adaf..bf311f1f99 100644
--- a/src/lib/libc/string/strmode.3
+++ b/src/lib/libc/string/strmode.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: strmode.3,v 1.7 2000/02/29 03:45:12 aaron Exp $ 1.\" $OpenBSD: strmode.3,v 1.8 2000/04/21 15:24:20 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.
@@ -46,8 +46,7 @@
46.Sh DESCRIPTION 46.Sh DESCRIPTION
47The 47The
48.Fn strmode 48.Fn strmode
49function 49function converts a file
50converts a file
51.Fa mode 50.Fa mode
52(the type and permission information associated with an inode, see 51(the type and permission information associated with an inode, see
53.Xr stat 2 ) 52.Xr stat 2 )
@@ -150,8 +149,7 @@ it will be a space.
150.Sh RETURN VALUES 149.Sh RETURN VALUES
151The 150The
152.Fn strmode 151.Fn strmode
153function 152function always returns 0.
154always returns 0.
155.Sh SEE ALSO 153.Sh SEE ALSO
156.Xr chmod 1 , 154.Xr chmod 1 ,
157.Xr find 1 , 155.Xr find 1 ,
diff --git a/src/lib/libc/string/strpbrk.3 b/src/lib/libc/string/strpbrk.3
index c7b7731ec2..52bf13b924 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.4 1999/09/21 16:44:01 espie Exp $ 36.\" $OpenBSD: strpbrk.3,v 1.5 2000/04/21 15:24:20 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRPBRK 3 39.Dt STRPBRK 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn strpbrk 50.Fn strpbrk
51function 51function locates in the null-terminated string
52locates in the null-terminated string
53.Fa s 52.Fa s
54the first occurrence of any character in the string 53the first occurrence of any character in the string
55.Fa charset 54.Fa charset
@@ -57,7 +56,7 @@ and returns a pointer to this character.
57If no characters from 56If no characters from
58.Fa charset 57.Fa charset
59occur anywhere in 58occur anywhere in
60.Fa s 59.Fa s ,
61.Fn strpbrk 60.Fn strpbrk
62returns 61returns
63.Dv NULL . 62.Dv NULL .
@@ -73,6 +72,5 @@ returns
73.Sh STANDARDS 72.Sh STANDARDS
74The 73The
75.Fn strpbrk 74.Fn strpbrk
76function 75function conforms to
77conforms to
78.St -ansiC . 76.St -ansiC .
diff --git a/src/lib/libc/string/strrchr.3 b/src/lib/libc/string/strrchr.3
index 8de041810b..394fc2aad3 100644
--- a/src/lib/libc/string/strrchr.3
+++ b/src/lib/libc/string/strrchr.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: strrchr.3,v 1.5 1999/09/21 16:44:01 espie Exp $ 36.\" $OpenBSD: strrchr.3,v 1.6 2000/04/21 15:24:20 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRRCHR 3 39.Dt STRRCHR 3
@@ -55,7 +55,9 @@ function locates the last occurrence of the character
55.Fa c 55.Fa c
56in the string 56in the string
57.Fa s . 57.Fa s .
58The terminating NUL character is considered part of the string. 58The terminating
59.Tn NUL
60character is considered part of the string.
59If 61If
60.Fa c 62.Fa c
61is 63is
@@ -98,8 +100,7 @@ p = strrchr(s, 'o');
98.Sh STANDARDS 100.Sh STANDARDS
99The 101The
100.Fn strrchr 102.Fn strrchr
101function 103function conforms to
102conforms to
103.St -ansiC . 104.St -ansiC .
104.Pp 105.Pp
105The 106The
diff --git a/src/lib/libc/string/strsep.3 b/src/lib/libc/string/strsep.3
index 9f44a22d9b..b15915ab37 100644
--- a/src/lib/libc/string/strsep.3
+++ b/src/lib/libc/string/strsep.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: strsep.3,v 1.7 2000/03/04 22:19:32 aaron Exp $ 1.\" $OpenBSD: strsep.3,v 1.8 2000/04/21 15:24:20 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.
@@ -97,8 +97,7 @@ for (ap = argv; (*ap = strsep(&inputstring, " \et")) != NULL;)
97.Sh HISTORY 97.Sh HISTORY
98The 98The
99.Fn strsep 99.Fn strsep
100function 100function is intended as a replacement for the
101is intended as a replacement for the
102.Fn strtok 101.Fn strtok
103function. 102function.
104While the 103While the
diff --git a/src/lib/libc/string/strspn.3 b/src/lib/libc/string/strspn.3
index 8274a06b65..ca965aeb18 100644
--- a/src/lib/libc/string/strspn.3
+++ b/src/lib/libc/string/strspn.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: strspn.3,v 1.5 1999/09/21 16:44:01 espie Exp $ 36.\" $OpenBSD: strspn.3,v 1.6 2000/04/21 15:24:20 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRSPN 3 39.Dt STRSPN 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn strspn 50.Fn strspn
51function 51function spans the initial part of the null-terminated string
52spans the initial part of the null-terminated string
53.Fa s 52.Fa s
54as long as the characters from 53as long as the characters from
55.Fa s 54.Fa s
@@ -58,8 +57,7 @@ occur in string
58.Sh RETURN VALUES 57.Sh RETURN VALUES
59The 58The
60.Fn strspn 59.Fn strspn
61function 60function returns the number of characters spanned.
62returns the number of characters spanned.
63.Sh EXAMPLES 61.Sh EXAMPLES
64The following call to 62The following call to
65.Fn strspn 63.Fn strspn
@@ -86,6 +84,5 @@ span = strspn(s, charset);
86.Sh STANDARDS 84.Sh STANDARDS
87The 85The
88.Fn strspn 86.Fn strspn
89function 87function conforms to
90conforms to
91.St -ansiC . 88.St -ansiC .
diff --git a/src/lib/libc/string/strstr.3 b/src/lib/libc/string/strstr.3
index 3287cce0ce..10beea42ca 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.4 1999/09/21 16:44:01 espie Exp $ 36.\" $OpenBSD: strstr.3,v 1.5 2000/04/21 15:24:20 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRSTR 3 39.Dt STRSTR 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn strstr 50.Fn strstr
51function 51function locates the first occurrence of the null-terminated string
52locates the first occurrence of the null-terminated string
53.Fa little 52.Fa little
54in the null-terminated string 53in the null-terminated string
55.Fa big . 54.Fa big .
@@ -82,6 +81,5 @@ returns a pointer to the first character of the first occurrence of
82.Sh STANDARDS 81.Sh STANDARDS
83The 82The
84.Fn strstr 83.Fn strstr
85function 84function conforms to
86conforms to
87.St -ansiC . 85.St -ansiC .
diff --git a/src/lib/libc/string/strtok.3 b/src/lib/libc/string/strtok.3
index fa2ec28cf0..143ffc2e42 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.10 1999/11/09 11:20:13 art Exp $ 36.\" $OpenBSD: strtok.3,v 1.11 2000/04/21 15:24:20 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRTOK 3 39.Dt STRTOK 3
@@ -55,8 +55,7 @@ This interface is obsoleted by
55.Pp 55.Pp
56The 56The
57.Fn strtok 57.Fn strtok
58function 58function is used to isolate sequential tokens in a null-terminated string,
59is used to isolate sequential tokens in a null-terminated string,
60.Fa str . 59.Fa str .
61These tokens are separated in the string by at least one of the 60These tokens are separated in the string by at least one of the
62characters in 61characters in
@@ -81,9 +80,8 @@ The
81.Fn strtok 80.Fn strtok
82and 81and
83.Fn strtok_r 82.Fn strtok_r
84functions 83functions return a pointer to the beginning of each subsequent token
85return a pointer to the beginning of each subsequent token in the string, 84in the string, after replacing the separator character itself with an
86after replacing the separator character itself with an
87.Tn ASCII NUL 85.Tn ASCII NUL
88character. 86character.
89When no more tokens remain, a null pointer is returned. 87When no more tokens remain, a null pointer is returned.
@@ -116,13 +114,19 @@ for ((p = strtok_r(s, " ", &last)); p; (p = strtok_r(NULL, " ", &last)), i++) {
116tokens[i] = '\e0'; 114tokens[i] = '\e0';
117.Ed 115.Ed
118.Pp 116.Pp
119That is, tokens[0] will point to 117That is,
118.Li tokens[0]
119will point to
120.Qq cat , 120.Qq cat ,
121tokens[1] will point to 121.Li tokens[1]
122will point to
122.Qq dog , 123.Qq dog ,
123tokens[2] will point to 124.Li tokens[2]
125will point to
124.Qq horse , 126.Qq horse ,
125and tokens[3] will point to 127and
128.Li tokens[3]
129will point to
126.Qq cow . 130.Qq cow .
127.Sh SEE ALSO 131.Sh SEE ALSO
128.Xr memchr 3 , 132.Xr memchr 3 ,
@@ -136,8 +140,7 @@ and tokens[3] will point to
136.Sh STANDARDS 140.Sh STANDARDS
137The 141The
138.Fn strtok 142.Fn strtok
139function 143function conforms to
140conforms to
141.St -ansiC . 144.St -ansiC .
142.Sh BUGS 145.Sh BUGS
143The System V 146The System V
diff --git a/src/lib/libc/string/strxfrm.3 b/src/lib/libc/string/strxfrm.3
index 3ebdd42c29..1e5338993a 100644
--- a/src/lib/libc/string/strxfrm.3
+++ b/src/lib/libc/string/strxfrm.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: strxfrm.3,v 1.2 1996/08/19 08:34:28 tholo Exp $ 36.\" $OpenBSD: strxfrm.3,v 1.3 2000/04/21 15:24:20 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRXFRM 3 39.Dt STRXFRM 3
@@ -48,8 +48,7 @@
48.Sh DESCRIPTION 48.Sh DESCRIPTION
49The 49The
50.Fn strxfrm 50.Fn strxfrm
51function 51function does something horrible (see
52does something horrible (see
53.Tn ANSI 52.Tn ANSI
54standard). 53standard).
55In this implementation it just copies. 54In this implementation it just copies.
@@ -63,6 +62,5 @@ In this implementation it just copies.
63.Sh STANDARDS 62.Sh STANDARDS
64The 63The
65.Fn strxfrm 64.Fn strxfrm
66function 65function conforms to
67conforms to
68.St -ansiC . 66.St -ansiC .