diff options
author | aaron <> | 2000-04-21 15:24:20 +0000 |
---|---|---|
committer | aaron <> | 2000-04-21 15:24:20 +0000 |
commit | 9fb35611cc3d03bef8b690b62e0904507c414a61 (patch) | |
tree | cbb158a96fec3a91f1d59c3e9f768b10d6ed872e | |
parent | a4336f357f9e30dffdfad4909b24bd2e82c096a2 (diff) | |
download | openbsd-9fb35611cc3d03bef8b690b62e0904507c414a61.tar.gz openbsd-9fb35611cc3d03bef8b690b62e0904507c414a61.tar.bz2 openbsd-9fb35611cc3d03bef8b690b62e0904507c414a61.zip |
Flesh out libc string function man pages.
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 |
47 | The | 47 | The |
48 | .Fn bcmp | 48 | .Fn bcmp |
49 | function | 49 | function compares byte string |
50 | compares byte string | ||
51 | .Fa b1 | 50 | .Fa b1 |
52 | against byte string | 51 | against 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 |
48 | The | 48 | The |
49 | .Fn bcopy | 49 | .Fn bcopy |
50 | function | 50 | function copies |
51 | copies | ||
52 | .Fa len | 51 | .Fa len |
53 | bytes from string | 52 | bytes 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. | |||
59 | evaluates | 59 | evaluates |
60 | .Fa patlen | 60 | .Fa patlen |
61 | bytes starting at | 61 | bytes starting at |
62 | .Fa pattern , | 62 | .Fa pattern |
63 | and returns a pointer to a structure describing them. | 63 | and returns a pointer to a structure describing them. |
64 | The bytes referenced by | 64 | The 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 | |||
96 | conform to | 96 | conform to |
97 | .St -ansiC . | 97 | .St -ansiC . |
98 | .Sh HISTORY | 98 | .Sh HISTORY |
99 | The functions | 99 | The |
100 | .Fn bzero | 100 | .Fn bzero |
101 | and | 101 | and |
102 | .Fn memccpy | 102 | .Fn memccpy |
103 | appeared in | 103 | functions appeared in |
104 | .Bx 4.3 ; | 104 | .Bx 4.3 . |
105 | the functions | 105 | The |
106 | .Fn bcmp , | 106 | .Fn bcmp |
107 | .Fn bcopy , | 107 | and |
108 | appeared in | 108 | .Fn bcopy |
109 | functions 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 |
47 | The | 47 | The |
48 | .Fn bzero | 48 | .Fn bzero |
49 | function | 49 | function writes |
50 | writes | ||
51 | .Fa len | 50 | .Fa len |
52 | zero bytes to the string | 51 | zero bytes to the string |
53 | .Fa b . | 52 | .Fa b . |
@@ -62,6 +61,5 @@ does nothing. | |||
62 | .Sh HISTORY | 61 | .Sh HISTORY |
63 | A | 62 | A |
64 | .Fn bzero | 63 | .Fn bzero |
65 | function | 64 | function appeared in |
66 | appeared 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 |
47 | The | 47 | The |
48 | .Fn ffs | 48 | .Fn ffs |
49 | function | 49 | function finds the first bit set in |
50 | finds the first bit set in | ||
51 | .Fa value | 50 | .Fa value |
52 | and returns the index of that bit. | 51 | and returns the index of that bit. |
53 | Bits are numbered starting from 1, starting at the right-most | 52 | Bits are numbered starting from 1, starting at the rightmost bit. |
54 | bit. | ||
55 | A return value of 0 means that the argument was zero. | 53 | A 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 |
47 | The | 47 | The |
48 | .Fn memccpy | 48 | .Fn memccpy |
49 | function | 49 | function copies bytes from string |
50 | copies bytes from string | ||
51 | .Fa src | 50 | .Fa src |
52 | to string | 51 | to string |
53 | .Fa dst . | 52 | .Fa dst . |
54 | If the character | 53 | If 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 ) | ||
57 | occurs in the string | ||
57 | .Fa src , | 58 | .Fa src , |
58 | the copy stops and a pointer to the byte after the copy of | 59 | the 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 |
49 | The | 49 | The |
50 | .Fn memchr | 50 | .Fn memchr |
51 | function | 51 | function locates the first occurrence of |
52 | locates the first occurrence of | ||
53 | .Fa c | 52 | .Fa c |
54 | (converted to an unsigned char) | 53 | (converted to an |
54 | .Li unsigned char ) | ||
55 | in string | 55 | in string |
56 | .Fa b . | 56 | .Fa b . |
57 | .Sh RETURN VALUES | 57 | .Sh RETURN VALUES |
58 | The | 58 | The |
59 | .Fn memchr | 59 | .Fn memchr |
60 | function | 60 | function returns a pointer to the byte located, or |
61 | returns a pointer to the byte located, | ||
62 | or | ||
63 | .Dv NULL | 61 | .Dv NULL |
64 | if no such byte exists within | 62 | if no such byte exists within |
65 | .Fa len | 63 | .Fa len |
@@ -76,6 +74,5 @@ bytes. | |||
76 | .Sh STANDARDS | 74 | .Sh STANDARDS |
77 | The | 75 | The |
78 | .Fn memchr | 76 | .Fn memchr |
79 | function | 77 | function conforms to |
80 | conforms 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 |
49 | The | 49 | The |
50 | .Fn memcmp | 50 | .Fn memcmp |
51 | function | 51 | function compares byte string |
52 | compares byte string | ||
53 | .Fa b1 | 52 | .Fa b1 |
54 | against byte string | 53 | against byte string |
55 | .Fa b2 . | 54 | .Fa b2 . |
@@ -59,10 +58,11 @@ bytes long. | |||
59 | .Sh RETURN VALUES | 58 | .Sh RETURN VALUES |
60 | The | 59 | The |
61 | .Fn memcmp | 60 | .Fn memcmp |
62 | function | 61 | function returns zero if the two strings are identical, |
63 | returns zero if the two strings are identical, | ||
64 | otherwise returns the difference between the first two differing bytes | 62 | otherwise returns the difference between the first two differing bytes |
65 | (treated as unsigned char values, so that | 63 | (treated as |
64 | .Li unsigned char | ||
65 | values, so that | ||
66 | .Sq Li \e200 | 66 | .Sq Li \e200 |
67 | is greater than | 67 | is 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 |
78 | The | 78 | The |
79 | .Fn memcmp | 79 | .Fn memcmp |
80 | function | 80 | function conforms to |
81 | conforms 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 |
49 | The | 49 | The |
50 | .Fn memcpy | 50 | .Fn memcpy |
51 | function | 51 | function copies |
52 | copies | ||
53 | .Fa len | 52 | .Fa len |
54 | bytes from string | 53 | bytes from string |
55 | .Fa src | 54 | .Fa src |
@@ -58,8 +57,7 @@ to string | |||
58 | .Sh RETURN VALUES | 57 | .Sh RETURN VALUES |
59 | The | 58 | The |
60 | .Fn memcpy | 59 | .Fn memcpy |
61 | function | 60 | function returns the original value of |
62 | returns 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 |
70 | The | 68 | The |
71 | .Fn memcpy | 69 | .Fn memcpy |
72 | function | 70 | function conforms to |
73 | conforms to | ||
74 | .St -ansiC . | 71 | .St -ansiC . |
75 | .Sh BUGS | 72 | .Sh BUGS |
76 | In this implementation | 73 | In 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 |
49 | The | 49 | The |
50 | .Fn memmove | 50 | .Fn memmove |
51 | function | 51 | function copies |
52 | copies | ||
53 | .Fa len | 52 | .Fa len |
54 | bytes from string | 53 | bytes from string |
55 | .Fa src | 54 | .Fa src |
@@ -70,6 +69,5 @@ function returns the original value of | |||
70 | .Sh STANDARDS | 69 | .Sh STANDARDS |
71 | The | 70 | The |
72 | .Fn memmove | 71 | .Fn memmove |
73 | function | 72 | function conforms to |
74 | conforms 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 |
49 | The | 49 | The |
50 | .Fn memset | 50 | .Fn memset |
51 | function | 51 | function writes |
52 | writes | ||
53 | .Fa len | 52 | .Fa len |
54 | bytes of value | 53 | bytes 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 ) | ||
57 | to the string | ||
57 | .Fa b . | 58 | .Fa b . |
58 | .Sh RETURN VALUES | 59 | .Sh RETURN VALUES |
59 | The | 60 | The |
60 | .Fn memset | 61 | .Fn memset |
61 | function | 62 | function returns the original value of |
62 | returns 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 |
68 | The | 68 | The |
69 | .Fn memset | 69 | .Fn memset |
70 | function | 70 | function conforms to |
71 | conforms 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 |
54 | and | 54 | and |
55 | .Fn strncasecmp | 55 | .Fn strncasecmp |
56 | functions | 56 | functions compare the null-terminated strings |
57 | compare the null-terminated strings | ||
58 | .Fa s1 | 57 | .Fa s1 |
59 | and | 58 | and |
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 |
54 | and | 54 | and |
55 | .Fn strncat | 55 | .Fn strncat |
56 | functions | 56 | functions append a copy of the null-terminated string |
57 | append a copy of the null-terminated string | ||
58 | .Fa append | 57 | .Fa append |
59 | to the end of the null-terminated string | 58 | to 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 |
67 | The | 66 | The |
68 | .Fn strncat | 67 | .Fn strncat |
69 | function | 68 | function appends not more than |
70 | appends not more than | ||
71 | .Fa count | 69 | .Fa count |
72 | characters where space for the terminating | 70 | characters where space for the terminating |
73 | .Ql \e0 | 71 | .Ql \e0 |
@@ -78,8 +76,7 @@ The | |||
78 | .Fn strcat | 76 | .Fn strcat |
79 | and | 77 | and |
80 | .Fn strncat | 78 | .Fn strncat |
81 | functions | 79 | functions return the pointer |
82 | return the pointer | ||
83 | .Fa s . | 80 | .Fa s . |
84 | .Sh EXAMPLES | 81 | .Sh EXAMPLES |
85 | The following appends | 82 | The following appends |
@@ -109,9 +106,10 @@ The above will copy as many characters from | |||
109 | .Dq Li input | 106 | .Dq Li input |
110 | to | 107 | to |
111 | .Dq Li buf | 108 | .Dq Li buf |
112 | as will | 109 | as will fit. |
113 | fit. It then appends as many characters from suffix as will fit (or none | 110 | It then appends as many characters from suffix as will fit (or none |
114 | if there is no space). For operations like this, the | 111 | if there is no space). |
112 | For operations like this, the | ||
115 | .Xr strlcpy 3 | 113 | .Xr strlcpy 3 |
116 | and | 114 | and |
117 | .Xr strlcat 3 | 115 | .Xr strlcat 3 |
@@ -133,6 +131,5 @@ The | |||
133 | .Fn strcat | 131 | .Fn strcat |
134 | and | 132 | and |
135 | .Fn strncat | 133 | .Fn strncat |
136 | functions | 134 | functions conform to |
137 | conform 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 |
99 | The | 99 | The |
100 | .Fn strchr | 100 | .Fn strchr |
101 | function | 101 | function conforms to |
102 | conforms to | ||
103 | .St -ansiC . | 102 | .St -ansiC . |
104 | .Pp | 103 | .Pp |
105 | The | 104 | The |
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 |
54 | and | 54 | and |
55 | .Fn strncmp | 55 | .Fn strncmp |
56 | functions | 56 | functions lexicographically compare the null-terminated strings |
57 | lexicographically compare the null-terminated strings | ||
58 | .Fa s1 | 57 | .Fa s1 |
59 | and | 58 | and |
60 | .Fa s2 . | 59 | .Fa s2 . |
@@ -88,6 +87,5 @@ The | |||
88 | .Fn strcmp | 87 | .Fn strcmp |
89 | and | 88 | and |
90 | .Fn strncmp | 89 | .Fn strncmp |
91 | functions | 90 | functions conform to |
92 | conform 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 |
49 | The | 49 | The |
50 | .Fn strcoll | 50 | .Fn strcoll |
51 | function | 51 | function lexicographically compares the null-terminated strings |
52 | lexicographically compares the null-terminated strings | ||
53 | .Fa s1 | 52 | .Fa s1 |
54 | and | 53 | and |
55 | .Fa s2 | 54 | .Fa s2 |
@@ -69,6 +68,5 @@ is greater than, equal to, or less than | |||
69 | .Sh STANDARDS | 68 | .Sh STANDARDS |
70 | The | 69 | The |
71 | .Fn strcoll | 70 | .Fn strcoll |
72 | function | 71 | function conforms to |
73 | conforms 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 |
54 | and | 54 | and |
55 | .Fn strncpy | 55 | .Fn strncpy |
56 | functions | 56 | functions copy the string |
57 | copy the string | ||
58 | .Fa src | 57 | .Fa src |
59 | to | 58 | to |
60 | .Fa dst | 59 | .Fa dst |
@@ -87,8 +86,7 @@ The | |||
87 | .Fn strcpy | 86 | .Fn strcpy |
88 | and | 87 | and |
89 | .Fn strncpy | 88 | .Fn strncpy |
90 | functions | 89 | functions return |
91 | return | ||
92 | .Fa dst . | 90 | .Fa dst . |
93 | .Sh EXAMPLES | 91 | .Sh EXAMPLES |
94 | The following sets | 92 | The following sets |
@@ -120,7 +118,8 @@ The following copies as many characters from | |||
120 | .Va input | 118 | .Va input |
121 | to | 119 | to |
122 | .Va buf | 120 | .Va buf |
123 | as will fit and null terminates the result. Because | 121 | as will fit and null terminates the result. |
122 | Because | ||
124 | .Fn strncpy | 123 | .Fn strncpy |
125 | does | 124 | does |
126 | .Em not | 125 | .Em not |
@@ -134,7 +133,8 @@ buf[sizeof(buf) - 1] = '\e0'; | |||
134 | .Pp | 133 | .Pp |
135 | Note that | 134 | Note that |
136 | .Xr strlcpy 3 | 135 | .Xr strlcpy 3 |
137 | is a better choice for this kind of operation. The equivalent using | 136 | is a better choice for this kind of operation. |
137 | The equivalent using | ||
138 | .Xr strlcpy 3 | 138 | .Xr strlcpy 3 |
139 | is simply: | 139 | is simply: |
140 | .Bd -literal -offset indent | 140 | .Bd -literal -offset indent |
@@ -151,6 +151,5 @@ The | |||
151 | .Fn strcpy | 151 | .Fn strcpy |
152 | and | 152 | and |
153 | .Fn strncpy | 153 | .Fn strncpy |
154 | functions | 154 | functions conform to |
155 | conform 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 |
49 | The | 49 | The |
50 | .Fn strcspn | 50 | .Fn strcspn |
51 | function | 51 | function spans the initial part of the null-terminated string |
52 | spans the initial part of the null-terminated string | ||
53 | .Fa s | 52 | .Fa s |
54 | as long as the characters from | 53 | as long as the characters from |
55 | .Fa s | 54 | .Fa s |
56 | do not occur in string | 55 | do not occur in string |
57 | .Fa charset | 56 | .Fa charset |
58 | (it | 57 | (it spans the |
59 | spans the | ||
60 | .Em complement | 58 | .Em complement |
61 | of | 59 | of |
62 | .Fa charset ) . | 60 | .Fa charset ) . |
63 | .Sh RETURN VALUES | 61 | .Sh RETURN VALUES |
64 | The | 62 | The |
65 | .Fn strcspn | 63 | .Fn strcspn |
66 | function | 64 | function returns the number of characters spanned. |
67 | returns the number of characters spanned. | ||
68 | .Sh EXAMPLES | 65 | .Sh EXAMPLES |
69 | The following call to | 66 | The following call to |
70 | .Fn strcspn | 67 | .Fn strcspn |
@@ -91,6 +88,5 @@ span = strcspn(s, charset); | |||
91 | .Sh STANDARDS | 88 | .Sh STANDARDS |
92 | The | 89 | The |
93 | .Fn strcspn | 90 | .Fn strcspn |
94 | function | 91 | function conforms to |
95 | conforms 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 |
47 | The | 47 | The |
48 | .Fn strdup | 48 | .Fn strdup |
49 | function | 49 | function allocates sufficient memory for a copy of the string |
50 | allocates sufficient memory for a copy | ||
51 | of the string | ||
52 | .Fa s , | 50 | .Fa s , |
53 | does the copy, and returns a pointer to it. | 51 | does the copy, and returns a pointer to it. |
54 | The pointer may subsequently be used as an | 52 | The pointer may subsequently be used as an argument to the function |
55 | argument to the function | ||
56 | .Xr free 3 . | 53 | .Xr free 3 . |
57 | .Pp | 54 | .Pp |
58 | If insufficient memory is available, | 55 | If 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 , |
158 | and | 158 | and |
159 | .Fn strtok | 159 | .Fn strtok |
160 | functions | 160 | functions conform to |
161 | conform 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 |
44 | and | 44 | and |
45 | .Fn strlcat | 45 | .Fn strlcat |
46 | functions copy and concatenate strings respectively. They are designed | 46 | functions copy and concatenate strings respectively. |
47 | They are designed | ||
47 | to be safer, more consistent, and less error prone replacements for | 48 | to be safer, more consistent, and less error prone replacements for |
48 | .Xr strncpy 3 | 49 | .Xr strncpy 3 |
49 | and | 50 | and |
@@ -55,7 +56,8 @@ and | |||
55 | take the full size of the buffer (not just the length) and guarantee to | 56 | take the full size of the buffer (not just the length) and guarantee to |
56 | NUL-terminate the result (as long as | 57 | NUL-terminate the result (as long as |
57 | .Fa size | 58 | .Fa size |
58 | is larger than 0). Note that you should include a byte for the NUL in | 59 | is larger than 0). |
60 | Note that you should include a byte for the NUL in | ||
59 | .Fa size . | 61 | .Fa size . |
60 | .Pp | 62 | .Pp |
61 | The | 63 | The |
@@ -82,8 +84,8 @@ The | |||
82 | .Fn strlcpy | 84 | .Fn strlcpy |
83 | and | 85 | and |
84 | .Fn strlcat | 86 | .Fn strlcat |
85 | functions return the total length of the string they tried to | 87 | functions return the total length of the string they tried to create. |
86 | create. For | 88 | For |
87 | .Fn strlcpy | 89 | .Fn strlcpy |
88 | that means the length of | 90 | that 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 |
49 | The | 49 | The |
50 | .Fn strlen | 50 | .Fn strlen |
51 | function | 51 | function computes the length of the string |
52 | computes the length of the string | ||
53 | .Fa s . | 52 | .Fa s . |
54 | .Sh RETURN VALUES | 53 | .Sh RETURN VALUES |
55 | The | 54 | The |
56 | .Fn strlen | 55 | .Fn strlen |
57 | function | 56 | function returns the number of characters that precede the terminating |
58 | returns | 57 | .Tn NUL |
59 | the number of characters that precede the | ||
60 | terminating NUL | ||
61 | character. | 58 | character. |
62 | .Sh SEE ALSO | 59 | .Sh SEE ALSO |
63 | .Xr string 3 | 60 | .Xr string 3 |
64 | .Sh STANDARDS | 61 | .Sh STANDARDS |
65 | The | 62 | The |
66 | .Fn strlen | 63 | .Fn strlen |
67 | function | 64 | function conforms to |
68 | conforms 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 |
47 | The | 47 | The |
48 | .Fn strmode | 48 | .Fn strmode |
49 | function | 49 | function converts a file |
50 | converts 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 |
151 | The | 150 | The |
152 | .Fn strmode | 151 | .Fn strmode |
153 | function | 152 | function always returns 0. |
154 | always 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 |
49 | The | 49 | The |
50 | .Fn strpbrk | 50 | .Fn strpbrk |
51 | function | 51 | function locates in the null-terminated string |
52 | locates in the null-terminated string | ||
53 | .Fa s | 52 | .Fa s |
54 | the first occurrence of any character in the string | 53 | the 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. | |||
57 | If no characters from | 56 | If no characters from |
58 | .Fa charset | 57 | .Fa charset |
59 | occur anywhere in | 58 | occur anywhere in |
60 | .Fa s | 59 | .Fa s , |
61 | .Fn strpbrk | 60 | .Fn strpbrk |
62 | returns | 61 | returns |
63 | .Dv NULL . | 62 | .Dv NULL . |
@@ -73,6 +72,5 @@ returns | |||
73 | .Sh STANDARDS | 72 | .Sh STANDARDS |
74 | The | 73 | The |
75 | .Fn strpbrk | 74 | .Fn strpbrk |
76 | function | 75 | function conforms to |
77 | conforms 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 |
56 | in the string | 56 | in the string |
57 | .Fa s . | 57 | .Fa s . |
58 | The terminating NUL character is considered part of the string. | 58 | The terminating |
59 | .Tn NUL | ||
60 | character is considered part of the string. | ||
59 | If | 61 | If |
60 | .Fa c | 62 | .Fa c |
61 | is | 63 | is |
@@ -98,8 +100,7 @@ p = strrchr(s, 'o'); | |||
98 | .Sh STANDARDS | 100 | .Sh STANDARDS |
99 | The | 101 | The |
100 | .Fn strrchr | 102 | .Fn strrchr |
101 | function | 103 | function conforms to |
102 | conforms to | ||
103 | .St -ansiC . | 104 | .St -ansiC . |
104 | .Pp | 105 | .Pp |
105 | The | 106 | The |
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 |
98 | The | 98 | The |
99 | .Fn strsep | 99 | .Fn strsep |
100 | function | 100 | function is intended as a replacement for the |
101 | is intended as a replacement for the | ||
102 | .Fn strtok | 101 | .Fn strtok |
103 | function. | 102 | function. |
104 | While the | 103 | While 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 |
49 | The | 49 | The |
50 | .Fn strspn | 50 | .Fn strspn |
51 | function | 51 | function spans the initial part of the null-terminated string |
52 | spans the initial part of the null-terminated string | ||
53 | .Fa s | 52 | .Fa s |
54 | as long as the characters from | 53 | as 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 |
59 | The | 58 | The |
60 | .Fn strspn | 59 | .Fn strspn |
61 | function | 60 | function returns the number of characters spanned. |
62 | returns the number of characters spanned. | ||
63 | .Sh EXAMPLES | 61 | .Sh EXAMPLES |
64 | The following call to | 62 | The following call to |
65 | .Fn strspn | 63 | .Fn strspn |
@@ -86,6 +84,5 @@ span = strspn(s, charset); | |||
86 | .Sh STANDARDS | 84 | .Sh STANDARDS |
87 | The | 85 | The |
88 | .Fn strspn | 86 | .Fn strspn |
89 | function | 87 | function conforms to |
90 | conforms 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 |
49 | The | 49 | The |
50 | .Fn strstr | 50 | .Fn strstr |
51 | function | 51 | function locates the first occurrence of the null-terminated string |
52 | locates the first occurrence of the null-terminated string | ||
53 | .Fa little | 52 | .Fa little |
54 | in the null-terminated string | 53 | in 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 |
83 | The | 82 | The |
84 | .Fn strstr | 83 | .Fn strstr |
85 | function | 84 | function conforms to |
86 | conforms 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 |
56 | The | 56 | The |
57 | .Fn strtok | 57 | .Fn strtok |
58 | function | 58 | function is used to isolate sequential tokens in a null-terminated string, |
59 | is used to isolate sequential tokens in a null-terminated string, | ||
60 | .Fa str . | 59 | .Fa str . |
61 | These tokens are separated in the string by at least one of the | 60 | These tokens are separated in the string by at least one of the |
62 | characters in | 61 | characters in |
@@ -81,9 +80,8 @@ The | |||
81 | .Fn strtok | 80 | .Fn strtok |
82 | and | 81 | and |
83 | .Fn strtok_r | 82 | .Fn strtok_r |
84 | functions | 83 | functions return a pointer to the beginning of each subsequent token |
85 | return a pointer to the beginning of each subsequent token in the string, | 84 | in the string, after replacing the separator character itself with an |
86 | after replacing the separator character itself with an | ||
87 | .Tn ASCII NUL | 85 | .Tn ASCII NUL |
88 | character. | 86 | character. |
89 | When no more tokens remain, a null pointer is returned. | 87 | When 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++) { | |||
116 | tokens[i] = '\e0'; | 114 | tokens[i] = '\e0'; |
117 | .Ed | 115 | .Ed |
118 | .Pp | 116 | .Pp |
119 | That is, tokens[0] will point to | 117 | That is, |
118 | .Li tokens[0] | ||
119 | will point to | ||
120 | .Qq cat , | 120 | .Qq cat , |
121 | tokens[1] will point to | 121 | .Li tokens[1] |
122 | will point to | ||
122 | .Qq dog , | 123 | .Qq dog , |
123 | tokens[2] will point to | 124 | .Li tokens[2] |
125 | will point to | ||
124 | .Qq horse , | 126 | .Qq horse , |
125 | and tokens[3] will point to | 127 | and |
128 | .Li tokens[3] | ||
129 | will 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 |
137 | The | 141 | The |
138 | .Fn strtok | 142 | .Fn strtok |
139 | function | 143 | function conforms to |
140 | conforms to | ||
141 | .St -ansiC . | 144 | .St -ansiC . |
142 | .Sh BUGS | 145 | .Sh BUGS |
143 | The System V | 146 | The 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 |
49 | The | 49 | The |
50 | .Fn strxfrm | 50 | .Fn strxfrm |
51 | function | 51 | function does something horrible (see |
52 | does something horrible (see | ||
53 | .Tn ANSI | 52 | .Tn ANSI |
54 | standard). | 53 | standard). |
55 | In this implementation it just copies. | 54 | In this implementation it just copies. |
@@ -63,6 +62,5 @@ In this implementation it just copies. | |||
63 | .Sh STANDARDS | 62 | .Sh STANDARDS |
64 | The | 63 | The |
65 | .Fn strxfrm | 64 | .Fn strxfrm |
66 | function | 65 | function conforms to |
67 | conforms to | ||
68 | .St -ansiC . | 66 | .St -ansiC . |