diff options
author | schwarze <> | 2011-07-25 00:38:53 +0000 |
---|---|---|
committer | schwarze <> | 2011-07-25 00:38:53 +0000 |
commit | 339c056f856313e215baab8ddc4bc0ce064b4571 (patch) | |
tree | 7c0511efd76ae46bc18c0955627ddf69509014c6 | |
parent | 3ad0ccfe078fe407c711a9d1fb21b9b79aa67f2c (diff) | |
download | openbsd-339c056f856313e215baab8ddc4bc0ce064b4571.tar.gz openbsd-339c056f856313e215baab8ddc4bc0ce064b4571.tar.bz2 openbsd-339c056f856313e215baab8ddc4bc0ce064b4571.zip |
update HISTORY and SEE ALSO for all of string(3), together with various
smaller improvements; jmc@ and nicm@ both ask me to get this in because
further tweaking will be easier in-tree
53 files changed, 642 insertions, 237 deletions
diff --git a/src/lib/libc/string/bcmp.3 b/src/lib/libc/string/bcmp.3 index 1a77750627..1660b4356b 100644 --- a/src/lib/libc/string/bcmp.3 +++ b/src/lib/libc/string/bcmp.3 | |||
@@ -27,9 +27,9 @@ | |||
27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 | .\" SUCH DAMAGE. | 28 | .\" SUCH DAMAGE. |
29 | .\" | 29 | .\" |
30 | .\" $OpenBSD: bcmp.3,v 1.8 2010/09/24 13:33:00 matthew Exp $ | 30 | .\" $OpenBSD: bcmp.3,v 1.9 2011/07/25 00:38:52 schwarze Exp $ |
31 | .\" | 31 | .\" |
32 | .Dd $Mdocdate: September 24 2010 $ | 32 | .Dd $Mdocdate: July 25 2011 $ |
33 | .Dt BCMP 3 | 33 | .Dt BCMP 3 |
34 | .Os | 34 | .Os |
35 | .Sh NAME | 35 | .Sh NAME |
@@ -77,7 +77,7 @@ making it vulnerable to timing attacks. | |||
77 | .Xr strcoll 3 , | 77 | .Xr strcoll 3 , |
78 | .Xr strxfrm 3 | 78 | .Xr strxfrm 3 |
79 | .Sh HISTORY | 79 | .Sh HISTORY |
80 | A | 80 | The |
81 | .Fn bcmp | 81 | .Fn bcmp |
82 | function first appeared in | 82 | function first appeared in |
83 | .Bx 4.2 . | 83 | .Bx 4.2 . |
diff --git a/src/lib/libc/string/bcopy.3 b/src/lib/libc/string/bcopy.3 index 3d3c8ee958..3beaf09aca 100644 --- a/src/lib/libc/string/bcopy.3 +++ b/src/lib/libc/string/bcopy.3 | |||
@@ -28,9 +28,9 @@ | |||
28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
29 | .\" SUCH DAMAGE. | 29 | .\" SUCH DAMAGE. |
30 | .\" | 30 | .\" |
31 | .\" $OpenBSD: bcopy.3,v 1.9 2007/05/31 19:19:32 jmc Exp $ | 31 | .\" $OpenBSD: bcopy.3,v 1.10 2011/07/25 00:38:52 schwarze Exp $ |
32 | .\" | 32 | .\" |
33 | .Dd $Mdocdate: May 31 2007 $ | 33 | .Dd $Mdocdate: July 25 2011 $ |
34 | .Dt BCOPY 3 | 34 | .Dt BCOPY 3 |
35 | .Os | 35 | .Os |
36 | .Sh NAME | 36 | .Sh NAME |
@@ -61,7 +61,7 @@ is zero, no bytes are copied. | |||
61 | .Xr strlcpy 3 , | 61 | .Xr strlcpy 3 , |
62 | .Xr strncpy 3 | 62 | .Xr strncpy 3 |
63 | .Sh HISTORY | 63 | .Sh HISTORY |
64 | A | 64 | The |
65 | .Fn bcopy | 65 | .Fn bcopy |
66 | function appeared in | 66 | function first appeared in |
67 | .Bx 4.2 . | 67 | .Bx 4.2 . |
diff --git a/src/lib/libc/string/bm.3 b/src/lib/libc/string/bm.3 index 749ffc9b74..6c74848ecc 100644 --- a/src/lib/libc/string/bm.3 +++ b/src/lib/libc/string/bm.3 | |||
@@ -28,9 +28,9 @@ | |||
28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
29 | .\" SUCH DAMAGE. | 29 | .\" SUCH DAMAGE. |
30 | .\" | 30 | .\" |
31 | .\" $OpenBSD: bm.3,v 1.9 2007/05/31 19:19:32 jmc Exp $ | 31 | .\" $OpenBSD: bm.3,v 1.10 2011/07/25 00:38:52 schwarze Exp $ |
32 | .\" | 32 | .\" |
33 | .Dd $Mdocdate: May 31 2007 $ | 33 | .Dd $Mdocdate: July 25 2011 $ |
34 | .Dt BM 3 | 34 | .Dt BM 3 |
35 | .Os | 35 | .Os |
36 | .Sh NAME | 36 | .Sh NAME |
@@ -110,3 +110,11 @@ is | |||
110 | .%V Volume 21, 11 (November 1991) | 110 | .%V Volume 21, 11 (November 1991) |
111 | .%P 1221-48 | 111 | .%P 1221-48 |
112 | .Re | 112 | .Re |
113 | .Sh HISTORY | ||
114 | The | ||
115 | .Fn bm_comp , | ||
116 | .Fn bm_exec , | ||
117 | and | ||
118 | .Fn bm_free | ||
119 | functions first appeared in | ||
120 | .Nx 1.0 . | ||
diff --git a/src/lib/libc/string/bstring.3 b/src/lib/libc/string/bstring.3 index cd16ab022d..c44c5386c6 100644 --- a/src/lib/libc/string/bstring.3 +++ b/src/lib/libc/string/bstring.3 | |||
@@ -27,9 +27,9 @@ | |||
27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 | .\" SUCH DAMAGE. | 28 | .\" SUCH DAMAGE. |
29 | .\" | 29 | .\" |
30 | .\" $OpenBSD: bstring.3,v 1.8 2007/05/31 19:19:32 jmc Exp $ | 30 | .\" $OpenBSD: bstring.3,v 1.9 2011/07/25 00:38:52 schwarze Exp $ |
31 | .\" | 31 | .\" |
32 | .Dd $Mdocdate: May 31 2007 $ | 32 | .Dd $Mdocdate: July 25 2011 $ |
33 | .Dt BSTRING 3 | 33 | .Dt BSTRING 3 |
34 | .Os | 34 | .Os |
35 | .Sh NAME | 35 | .Sh NAME |
@@ -85,14 +85,24 @@ conform to | |||
85 | .St -ansiC . | 85 | .St -ansiC . |
86 | .Sh HISTORY | 86 | .Sh HISTORY |
87 | The | 87 | The |
88 | .Fn bzero | 88 | .Fn bcmp , |
89 | .Fn bcopy , | ||
89 | and | 90 | and |
90 | .Fn memccpy | 91 | .Fn bzero |
91 | functions appeared in | 92 | functions first appeared in |
92 | .Bx 4.3 . | 93 | .Bx 4.2 . |
93 | The | 94 | The |
94 | .Fn bcmp | 95 | .Fn memchr , |
96 | .Fn memcmp , | ||
97 | .Fn memccpy , | ||
98 | .Fn memcpy , | ||
95 | and | 99 | and |
96 | .Fn bcopy | 100 | .Fn memset |
97 | functions appeared in | 101 | functions first appeared in |
98 | .Bx 4.2 . | 102 | .At V |
103 | and were reimplemented for | ||
104 | .Bx 4.3 Tahoe . | ||
105 | The | ||
106 | .Fn memmove | ||
107 | function first appeared in | ||
108 | .Bx 4.3 Reno . | ||
diff --git a/src/lib/libc/string/bzero.3 b/src/lib/libc/string/bzero.3 index c5ca32f4d2..c79470377f 100644 --- a/src/lib/libc/string/bzero.3 +++ b/src/lib/libc/string/bzero.3 | |||
@@ -27,9 +27,9 @@ | |||
27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 | .\" SUCH DAMAGE. | 28 | .\" SUCH DAMAGE. |
29 | .\" | 29 | .\" |
30 | .\" $OpenBSD: bzero.3,v 1.7 2007/05/31 19:19:32 jmc Exp $ | 30 | .\" $OpenBSD: bzero.3,v 1.8 2011/07/25 00:38:52 schwarze Exp $ |
31 | .\" | 31 | .\" |
32 | .Dd $Mdocdate: May 31 2007 $ | 32 | .Dd $Mdocdate: July 25 2011 $ |
33 | .Dt BZERO 3 | 33 | .Dt BZERO 3 |
34 | .Os | 34 | .Os |
35 | .Sh NAME | 35 | .Sh NAME |
@@ -55,7 +55,7 @@ does nothing. | |||
55 | .Xr memset 3 , | 55 | .Xr memset 3 , |
56 | .Xr swab 3 | 56 | .Xr swab 3 |
57 | .Sh HISTORY | 57 | .Sh HISTORY |
58 | A | 58 | The |
59 | .Fn bzero | 59 | .Fn bzero |
60 | function appeared in | 60 | function first appeared in |
61 | .Bx 4.3 . | 61 | .Bx 4.2 . |
diff --git a/src/lib/libc/string/ffs.3 b/src/lib/libc/string/ffs.3 index 27b26969e5..6f150c46c4 100644 --- a/src/lib/libc/string/ffs.3 +++ b/src/lib/libc/string/ffs.3 | |||
@@ -27,9 +27,9 @@ | |||
27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
28 | .\" SUCH DAMAGE. | 28 | .\" SUCH DAMAGE. |
29 | .\" | 29 | .\" |
30 | .\" $OpenBSD: ffs.3,v 1.5 2007/05/31 19:19:32 jmc Exp $ | 30 | .\" $OpenBSD: ffs.3,v 1.6 2011/07/25 00:38:52 schwarze Exp $ |
31 | .\" | 31 | .\" |
32 | .Dd $Mdocdate: May 31 2007 $ | 32 | .Dd $Mdocdate: July 25 2011 $ |
33 | .Dt FFS 3 | 33 | .Dt FFS 3 |
34 | .Os | 34 | .Os |
35 | .Sh NAME | 35 | .Sh NAME |
@@ -52,5 +52,5 @@ A return value of 0 means that the argument was zero. | |||
52 | .Sh HISTORY | 52 | .Sh HISTORY |
53 | The | 53 | The |
54 | .Fn ffs | 54 | .Fn ffs |
55 | function appeared in | 55 | function first appeared in |
56 | .Bx 4.3 . | 56 | .Bx 4.2 . |
diff --git a/src/lib/libc/string/memccpy.3 b/src/lib/libc/string/memccpy.3 index ef53d95645..f8f880e3b1 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.9 2007/05/31 19:19:32 jmc Exp $ | 1 | .\" $OpenBSD: memccpy.3,v 1.10 2011/07/25 00:38:52 schwarze 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. |
@@ -29,7 +29,7 @@ | |||
29 | .\" | 29 | .\" |
30 | .\" @(#)memccpy.3 8.1 (Berkeley) 6/9/93 | 30 | .\" @(#)memccpy.3 8.1 (Berkeley) 6/9/93 |
31 | .\" | 31 | .\" |
32 | .Dd $Mdocdate: May 31 2007 $ | 32 | .Dd $Mdocdate: July 25 2011 $ |
33 | .Dt MEMCCPY 3 | 33 | .Dt MEMCCPY 3 |
34 | .Os | 34 | .Os |
35 | .Sh NAME | 35 | .Sh NAME |
@@ -70,4 +70,6 @@ bytes are copied, and a null pointer is returned. | |||
70 | The | 70 | The |
71 | .Fn memccpy | 71 | .Fn memccpy |
72 | function first appeared in | 72 | function first appeared in |
73 | .Bx 4.4 . | 73 | .At V |
74 | and was reimplemented for | ||
75 | .Bx 4.3 Tahoe . | ||
diff --git a/src/lib/libc/string/memchr.3 b/src/lib/libc/string/memchr.3 index 558848ac23..56a4e4780e 100644 --- a/src/lib/libc/string/memchr.3 +++ b/src/lib/libc/string/memchr.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: memchr.3,v 1.10 2011/07/25 00:38:52 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: memchr.3,v 1.9 2007/09/03 16:50:14 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: September 3 2007 $ | ||
35 | .Dt MEMCHR 3 | 35 | .Dt MEMCHR 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -79,7 +79,8 @@ bytes. | |||
79 | .Xr strsep 3 , | 79 | .Xr strsep 3 , |
80 | .Xr strspn 3 , | 80 | .Xr strspn 3 , |
81 | .Xr strstr 3 , | 81 | .Xr strstr 3 , |
82 | .Xr strtok 3 | 82 | .Xr strtok 3 , |
83 | .Xr wmemchr 3 | ||
83 | .Sh STANDARDS | 84 | .Sh STANDARDS |
84 | The | 85 | The |
85 | .Fn memchr | 86 | .Fn memchr |
@@ -91,3 +92,10 @@ The | |||
91 | function is an | 92 | function is an |
92 | .Ox | 93 | .Ox |
93 | extension. | 94 | extension. |
95 | .Sh HISTORY | ||
96 | The | ||
97 | .Fn memchr | ||
98 | function first appeared in | ||
99 | .At V | ||
100 | and was reimplemented for | ||
101 | .Bx 4.3 Tahoe . | ||
diff --git a/src/lib/libc/string/memcmp.3 b/src/lib/libc/string/memcmp.3 index 8c35f388f2..951a04ed8a 100644 --- a/src/lib/libc/string/memcmp.3 +++ b/src/lib/libc/string/memcmp.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: memcmp.3,v 1.7 2011/07/25 00:38:52 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: memcmp.3,v 1.6 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt MEMCMP 3 | 35 | .Dt MEMCMP 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -69,9 +69,17 @@ Zero-length strings are always identical. | |||
69 | .Xr strcasecmp 3 , | 69 | .Xr strcasecmp 3 , |
70 | .Xr strcmp 3 , | 70 | .Xr strcmp 3 , |
71 | .Xr strcoll 3 , | 71 | .Xr strcoll 3 , |
72 | .Xr strxfrm 3 | 72 | .Xr strxfrm 3 , |
73 | .Xr wmemcmp 3 | ||
73 | .Sh STANDARDS | 74 | .Sh STANDARDS |
74 | The | 75 | The |
75 | .Fn memcmp | 76 | .Fn memcmp |
76 | function conforms to | 77 | function conforms to |
77 | .St -ansiC . | 78 | .St -ansiC . |
79 | .Sh HISTORY | ||
80 | The | ||
81 | .Fn memcmp | ||
82 | function first appeared in | ||
83 | .At V | ||
84 | and was reimplemented for | ||
85 | .Bx 4.3 Tahoe . | ||
diff --git a/src/lib/libc/string/memcpy.3 b/src/lib/libc/string/memcpy.3 index 1deb03631b..e95d670ad9 100644 --- a/src/lib/libc/string/memcpy.3 +++ b/src/lib/libc/string/memcpy.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: memcpy.3,v 1.8 2011/07/25 00:38:52 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: memcpy.3,v 1.7 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt MEMCPY 3 | 35 | .Dt MEMCPY 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -60,18 +60,26 @@ function returns the original value of | |||
60 | .Xr memccpy 3 , | 60 | .Xr memccpy 3 , |
61 | .Xr memmove 3 , | 61 | .Xr memmove 3 , |
62 | .Xr strcpy 3 , | 62 | .Xr strcpy 3 , |
63 | .Xr strlcpy 3 | 63 | .Xr strlcpy 3 , |
64 | .Xr wmemcpy 3 | ||
64 | .Sh STANDARDS | 65 | .Sh STANDARDS |
65 | The | 66 | The |
66 | .Fn memcpy | 67 | .Fn memcpy |
67 | function conforms to | 68 | function conforms to |
68 | .St -ansiC . | 69 | .St -ansiC . |
69 | .Sh BUGS | 70 | .Sh HISTORY |
71 | The | ||
72 | .Fn memcpy | ||
73 | function first appeared in | ||
74 | .At V | ||
75 | and was reimplemented for | ||
76 | .Bx 4.3 Tahoe . | ||
77 | .Sh CAVEATS | ||
70 | In this implementation | 78 | In this implementation |
71 | .Fn memcpy | 79 | .Fn memcpy |
72 | is implemented using | 80 | is implemented using |
73 | .Xr bcopy 3 , | 81 | .Xr bcopy 3 , |
74 | and therefore the buffers may overlap. | 82 | and therefore the buffers may overlap. |
75 | On other systems, copying overlapping buffers may produce surprises. | 83 | On other systems, copying overlapping buffers may produce surprises. |
76 | A simpler solution is to not use | 84 | A portable, safe solution is to use |
77 | .Fn memcpy . | 85 | .Xr memmove 3 . |
diff --git a/src/lib/libc/string/memmove.3 b/src/lib/libc/string/memmove.3 index c6e3912669..ae8569a1c7 100644 --- a/src/lib/libc/string/memmove.3 +++ b/src/lib/libc/string/memmove.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: memmove.3,v 1.8 2011/07/25 00:38:52 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: memmove.3,v 1.7 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt MEMMOVE 3 | 35 | .Dt MEMMOVE 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -62,9 +62,15 @@ function returns the original value of | |||
62 | .Xr memccpy 3 , | 62 | .Xr memccpy 3 , |
63 | .Xr memcpy 3 , | 63 | .Xr memcpy 3 , |
64 | .Xr strcpy 3 , | 64 | .Xr strcpy 3 , |
65 | .Xr strlcpy 3 | 65 | .Xr strlcpy 3 , |
66 | .Xr wmemmove 3 | ||
66 | .Sh STANDARDS | 67 | .Sh STANDARDS |
67 | The | 68 | The |
68 | .Fn memmove | 69 | .Fn memmove |
69 | function conforms to | 70 | function conforms to |
70 | .St -ansiC . | 71 | .St -ansiC . |
72 | .Sh HISTORY | ||
73 | The | ||
74 | .Fn memmove | ||
75 | function first appeared in | ||
76 | .Bx 4.3 Reno . | ||
diff --git a/src/lib/libc/string/memset.3 b/src/lib/libc/string/memset.3 index 7799b5e2d2..db94cb9ba6 100644 --- a/src/lib/libc/string/memset.3 +++ b/src/lib/libc/string/memset.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: memset.3,v 1.7 2011/07/25 00:38:52 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: memset.3,v 1.6 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt MEMSET 3 | 35 | .Dt MEMSET 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -59,9 +59,17 @@ function returns the original value of | |||
59 | .Fa b . | 59 | .Fa b . |
60 | .Sh SEE ALSO | 60 | .Sh SEE ALSO |
61 | .Xr bzero 3 , | 61 | .Xr bzero 3 , |
62 | .Xr swab 3 | 62 | .Xr swab 3 , |
63 | .Xr wmemset 3 | ||
63 | .Sh STANDARDS | 64 | .Sh STANDARDS |
64 | The | 65 | The |
65 | .Fn memset | 66 | .Fn memset |
66 | function conforms to | 67 | function conforms to |
67 | .St -ansiC . | 68 | .St -ansiC . |
69 | .Sh HISTORY | ||
70 | The | ||
71 | .Fn memset | ||
72 | function first appeared in | ||
73 | .At V | ||
74 | and was reimplemented for | ||
75 | .Bx 4.3 Tahoe . | ||
diff --git a/src/lib/libc/string/strcasecmp.3 b/src/lib/libc/string/strcasecmp.3 index c17aa694d1..0900c8a97a 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.10 2007/05/31 19:19:32 jmc Exp $ | 1 | .\" $OpenBSD: strcasecmp.3,v 1.11 2011/07/25 00:38:52 schwarze 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. |
@@ -31,7 +31,7 @@ | |||
31 | .\" | 31 | .\" |
32 | .\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93 | 32 | .\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93 |
33 | .\" | 33 | .\" |
34 | .Dd $Mdocdate: May 31 2007 $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
35 | .Dt STRCASECMP 3 | 35 | .Dt STRCASECMP 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -74,11 +74,19 @@ characters. | |||
74 | .Xr memcmp 3 , | 74 | .Xr memcmp 3 , |
75 | .Xr strcmp 3 , | 75 | .Xr strcmp 3 , |
76 | .Xr strcoll 3 , | 76 | .Xr strcoll 3 , |
77 | .Xr strxfrm 3 | 77 | .Xr strxfrm 3 , |
78 | .Xr wcscasecmp 3 | ||
79 | .Sh STANDARDS | ||
80 | The | ||
81 | .Fn strcasecmp | ||
82 | and | ||
83 | .Fn strncasecmp | ||
84 | functions conform to | ||
85 | .St -p1003.1-2008 . | ||
78 | .Sh HISTORY | 86 | .Sh HISTORY |
79 | The | 87 | The |
80 | .Fn strcasecmp | 88 | .Fn strcasecmp |
81 | and | 89 | and |
82 | .Fn strncasecmp | 90 | .Fn strncasecmp |
83 | functions first appeared in | 91 | functions first appeared in |
84 | .Bx 4.4 . | 92 | .Bx 4.3 Tahoe . |
diff --git a/src/lib/libc/string/strcat.3 b/src/lib/libc/string/strcat.3 index 4068db752c..81aae19a63 100644 --- a/src/lib/libc/string/strcat.3 +++ b/src/lib/libc/string/strcat.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strcat.3,v 1.13 2011/07/25 00:38:52 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strcat.3,v 1.12 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt STRCAT 3 | 35 | .Dt STRCAT 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -122,8 +122,9 @@ functions are a better choice, as shown below. | |||
122 | .Xr memcpy 3 , | 122 | .Xr memcpy 3 , |
123 | .Xr memmove 3 , | 123 | .Xr memmove 3 , |
124 | .Xr strcpy 3 , | 124 | .Xr strcpy 3 , |
125 | .Xr strlcat 3 , | 125 | .Xr strlcpy 3 , |
126 | .Xr strlcpy 3 | 126 | .Xr wcscat 3 , |
127 | .Xr wcslcpy 3 | ||
127 | .Sh STANDARDS | 128 | .Sh STANDARDS |
128 | The | 129 | The |
129 | .Fn strcat | 130 | .Fn strcat |
@@ -131,3 +132,10 @@ and | |||
131 | .Fn strncat | 132 | .Fn strncat |
132 | functions conform to | 133 | functions conform to |
133 | .St -ansiC . | 134 | .St -ansiC . |
135 | .Sh HISTORY | ||
136 | The | ||
137 | .Fn strcat | ||
138 | and | ||
139 | .Fn strncat | ||
140 | functions first appeared in | ||
141 | .At v7 . | ||
diff --git a/src/lib/libc/string/strchr.3 b/src/lib/libc/string/strchr.3 index 6a9de9604e..d3194dffab 100644 --- a/src/lib/libc/string/strchr.3 +++ b/src/lib/libc/string/strchr.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strchr.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strchr.3,v 1.9 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt STRCHR 3 | 35 | .Dt STRCHR 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -90,7 +90,8 @@ p = strchr(s, 'o'); | |||
90 | .Xr strsep 3 , | 90 | .Xr strsep 3 , |
91 | .Xr strspn 3 , | 91 | .Xr strspn 3 , |
92 | .Xr strstr 3 , | 92 | .Xr strstr 3 , |
93 | .Xr strtok 3 | 93 | .Xr strtok 3 , |
94 | .Xr wcschr 3 | ||
94 | .Sh STANDARDS | 95 | .Sh STANDARDS |
95 | The | 96 | The |
96 | .Fn strchr | 97 | .Fn strchr |
@@ -100,3 +101,14 @@ function conforms to | |||
100 | The | 101 | The |
101 | .Fn index | 102 | .Fn index |
102 | function is deprecated and shouldn't be used in new code. | 103 | function is deprecated and shouldn't be used in new code. |
104 | .Sh HISTORY | ||
105 | The | ||
106 | .Fn index | ||
107 | function first appeared in | ||
108 | .At v7 . | ||
109 | The | ||
110 | .Fn strchr | ||
111 | function first appeared in | ||
112 | .At III | ||
113 | and was reimplemented for | ||
114 | .Bx 4.3 Tahoe . | ||
diff --git a/src/lib/libc/string/strcmp.3 b/src/lib/libc/string/strcmp.3 index 8b63772bdc..aea2023b7b 100644 --- a/src/lib/libc/string/strcmp.3 +++ b/src/lib/libc/string/strcmp.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strcmp.3,v 1.11 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strcmp.3,v 1.10 2009/12/05 07:45:48 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: December 5 2009 $ | ||
35 | .Dt STRCMP 3 | 35 | .Dt STRCMP 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -53,6 +53,11 @@ functions lexicographically compare the NUL-terminated strings | |||
53 | .Fa s1 | 53 | .Fa s1 |
54 | and | 54 | and |
55 | .Fa s2 . | 55 | .Fa s2 . |
56 | The | ||
57 | .Fn strncmp | ||
58 | function compares at most | ||
59 | .Fa len | ||
60 | characters. | ||
56 | .Sh RETURN VALUES | 61 | .Sh RETURN VALUES |
57 | The | 62 | The |
58 | .Fn strcmp | 63 | .Fn strcmp |
@@ -67,17 +72,13 @@ The comparison is done using unsigned characters, so that | |||
67 | .Ql \e200 | 72 | .Ql \e200 |
68 | is greater than | 73 | is greater than |
69 | .Ql \e0 . | 74 | .Ql \e0 . |
70 | .Pp | ||
71 | .Fn strncmp | ||
72 | compares at most | ||
73 | .Fa len | ||
74 | characters. | ||
75 | .Sh SEE ALSO | 75 | .Sh SEE ALSO |
76 | .Xr bcmp 3 , | 76 | .Xr bcmp 3 , |
77 | .Xr memcmp 3 , | 77 | .Xr memcmp 3 , |
78 | .Xr strcasecmp 3 , | 78 | .Xr strcasecmp 3 , |
79 | .Xr strcoll 3 , | 79 | .Xr strcoll 3 , |
80 | .Xr strxfrm 3 | 80 | .Xr strxfrm 3 , |
81 | .Xr wcscmp | ||
81 | .Sh STANDARDS | 82 | .Sh STANDARDS |
82 | The | 83 | The |
83 | .Fn strcmp | 84 | .Fn strcmp |
@@ -85,3 +86,10 @@ and | |||
85 | .Fn strncmp | 86 | .Fn strncmp |
86 | functions conform to | 87 | functions conform to |
87 | .St -ansiC . | 88 | .St -ansiC . |
89 | .Sh HISTORY | ||
90 | The | ||
91 | .Fn strcmp | ||
92 | and | ||
93 | .Fn strncmp | ||
94 | functions first appeared in | ||
95 | .At v7 . | ||
diff --git a/src/lib/libc/string/strcoll.3 b/src/lib/libc/string/strcoll.3 index ea7452a749..72e398c44c 100644 --- a/src/lib/libc/string/strcoll.3 +++ b/src/lib/libc/string/strcoll.3 | |||
@@ -29,9 +29,9 @@ | |||
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" $OpenBSD: strcoll.3,v 1.7 2007/05/31 19:19:32 jmc Exp $ | 32 | .\" $OpenBSD: strcoll.3,v 1.8 2011/07/25 00:38:53 schwarze Exp $ |
33 | .\" | 33 | .\" |
34 | .Dd $Mdocdate: May 31 2007 $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
35 | .Dt STRCOLL 3 | 35 | .Dt STRCOLL 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -66,3 +66,8 @@ The | |||
66 | .Fn strcoll | 66 | .Fn strcoll |
67 | function conforms to | 67 | function conforms to |
68 | .St -ansiC . | 68 | .St -ansiC . |
69 | .Sh HISTORY | ||
70 | The | ||
71 | .Fn strcoll | ||
72 | function first appeared in | ||
73 | .Bx 4.3 Reno . | ||
diff --git a/src/lib/libc/string/strcpy.3 b/src/lib/libc/string/strcpy.3 index 428e474d43..400eeee622 100644 --- a/src/lib/libc/string/strcpy.3 +++ b/src/lib/libc/string/strcpy.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strcpy.3,v 1.16 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strcpy.3,v 1.15 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt STRCPY 3 | 35 | .Dt STRCPY 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -57,8 +57,9 @@ to | |||
57 | .Ql \e0 | 57 | .Ql \e0 |
58 | character). | 58 | character). |
59 | .Pp | 59 | .Pp |
60 | The | ||
60 | .Fn strncpy | 61 | .Fn strncpy |
61 | copies not more than | 62 | function copies not more than |
62 | .Fa len | 63 | .Fa len |
63 | characters into | 64 | characters into |
64 | .Fa dst , | 65 | .Fa dst , |
@@ -141,7 +142,10 @@ is simply: | |||
141 | .Xr memccpy 3 , | 142 | .Xr memccpy 3 , |
142 | .Xr memcpy 3 , | 143 | .Xr memcpy 3 , |
143 | .Xr memmove 3 , | 144 | .Xr memmove 3 , |
144 | .Xr strlcpy 3 | 145 | .Xr strcat 3 , |
146 | .Xr strlcpy 3 , | ||
147 | .Xr wcscpy 3 , | ||
148 | .Xr wcslcpy 3 | ||
145 | .Sh STANDARDS | 149 | .Sh STANDARDS |
146 | The | 150 | The |
147 | .Fn strcpy | 151 | .Fn strcpy |
@@ -149,3 +153,10 @@ and | |||
149 | .Fn strncpy | 153 | .Fn strncpy |
150 | functions conform to | 154 | functions conform to |
151 | .St -ansiC . | 155 | .St -ansiC . |
156 | .Sh HISTORY | ||
157 | The | ||
158 | .Fn strcpy | ||
159 | and | ||
160 | .Fn strncpy | ||
161 | functions first appeared in | ||
162 | .At v7 . | ||
diff --git a/src/lib/libc/string/strcspn.3 b/src/lib/libc/string/strcspn.3 index 21c727344d..70c8ef7612 100644 --- a/src/lib/libc/string/strcspn.3 +++ b/src/lib/libc/string/strcspn.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strcspn.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strcspn.3,v 1.9 2007/08/08 07:20:45 ray Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: August 8 2007 $ | ||
35 | .Dt STRCSPN 3 | 35 | .Dt STRCSPN 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -92,9 +92,17 @@ if (fgets(line, sizeof(line), fp) != NULL) | |||
92 | .Xr strsep 3 , | 92 | .Xr strsep 3 , |
93 | .Xr strspn 3 , | 93 | .Xr strspn 3 , |
94 | .Xr strstr 3 , | 94 | .Xr strstr 3 , |
95 | .Xr strtok 3 | 95 | .Xr strtok 3 , |
96 | .Xr wcscspn 3 | ||
96 | .Sh STANDARDS | 97 | .Sh STANDARDS |
97 | The | 98 | The |
98 | .Fn strcspn | 99 | .Fn strcspn |
99 | function conforms to | 100 | function conforms to |
100 | .St -ansiC . | 101 | .St -ansiC . |
102 | .Sh HISTORY | ||
103 | The | ||
104 | .Fn strcspn | ||
105 | function first appeared in | ||
106 | .At III | ||
107 | and was reimplemented for | ||
108 | .Bx 4.3 Tahoe . | ||
diff --git a/src/lib/libc/string/strdup.3 b/src/lib/libc/string/strdup.3 index 42a578b913..02d5666a9c 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.17 2010/05/19 06:32:43 jmc Exp $ | 1 | .\" $OpenBSD: strdup.3,v 1.18 2011/07/25 00:38:53 schwarze 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. |
@@ -29,7 +29,7 @@ | |||
29 | .\" | 29 | .\" |
30 | .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 | 30 | .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 |
31 | .\" | 31 | .\" |
32 | .Dd $Mdocdate: May 19 2010 $ | 32 | .Dd $Mdocdate: July 25 2011 $ |
33 | .Dt STRDUP 3 | 33 | .Dt STRDUP 3 |
34 | .Os | 34 | .Os |
35 | .Sh NAME | 35 | .Sh NAME |
@@ -73,10 +73,8 @@ to an allocated area of memory containing the NUL-terminated string | |||
73 | char *p; | 73 | char *p; |
74 | 74 | ||
75 | p = strdup("foobar"); | 75 | p = strdup("foobar"); |
76 | if (p == NULL) { | 76 | if (p == NULL) |
77 | fprintf(stderr, "Out of memory.\en"); | 77 | err(1, NULL); |
78 | exit(1); | ||
79 | } | ||
80 | .Ed | 78 | .Ed |
81 | .Sh ERRORS | 79 | .Sh ERRORS |
82 | The | 80 | The |
@@ -90,7 +88,8 @@ for any of the errors specified for the library function | |||
90 | .Xr malloc 3 , | 88 | .Xr malloc 3 , |
91 | .Xr strcpy 3 , | 89 | .Xr strcpy 3 , |
92 | .Xr strlcpy 3 , | 90 | .Xr strlcpy 3 , |
93 | .Xr strlen 3 | 91 | .Xr strlen 3 , |
92 | .Xr wcsdup 3 | ||
94 | .Sh STANDARDS | 93 | .Sh STANDARDS |
95 | The | 94 | The |
96 | .Fn strdup | 95 | .Fn strdup |
@@ -102,8 +101,10 @@ functions conform to | |||
102 | The | 101 | The |
103 | .Fn strdup | 102 | .Fn strdup |
104 | function first appeared in | 103 | function first appeared in |
105 | .Bx 4.4 . | 104 | .Bx 4.3 Reno . |
106 | The | 105 | The |
107 | .Fn strndup | 106 | .Fn strndup |
108 | function first appeared in | 107 | function appeared in glibc 2.0, was reimplemented for |
108 | .Nx 4.0 , | ||
109 | and ported to | ||
109 | .Ox 4.8 . | 110 | .Ox 4.8 . |
diff --git a/src/lib/libc/string/strerror.3 b/src/lib/libc/string/strerror.3 index 84c64c10bb..f3f80432c3 100644 --- a/src/lib/libc/string/strerror.3 +++ b/src/lib/libc/string/strerror.3 | |||
@@ -29,9 +29,9 @@ | |||
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" $OpenBSD: strerror.3,v 1.9 2007/05/31 19:19:32 jmc Exp $ | 32 | .\" $OpenBSD: strerror.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $ |
33 | .\" | 33 | .\" |
34 | .Dd $Mdocdate: May 31 2007 $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
35 | .Dt STRERROR 3 | 35 | .Dt STRERROR 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -111,3 +111,12 @@ The | |||
111 | .Fn strerror_r | 111 | .Fn strerror_r |
112 | function conforms to | 112 | function conforms to |
113 | .St -p1003.1 . | 113 | .St -p1003.1 . |
114 | .Sh HISTORY | ||
115 | The | ||
116 | .Fn strerror | ||
117 | function first appeared in | ||
118 | .Bx 4.3 Reno . | ||
119 | The | ||
120 | .Fn strerror_r | ||
121 | function first appeared in | ||
122 | .Ox 3.3 . | ||
diff --git a/src/lib/libc/string/strlcpy.3 b/src/lib/libc/string/strlcpy.3 index feda63fae7..ead54ec438 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.19 2007/05/31 19:19:32 jmc Exp $ | 1 | .\" $OpenBSD: strlcpy.3,v 1.20 2011/07/25 00:38:53 schwarze Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com> | 3 | .\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com> |
4 | .\" | 4 | .\" |
@@ -14,7 +14,7 @@ | |||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | .\" | 16 | .\" |
17 | .Dd $Mdocdate: May 31 2007 $ | 17 | .Dd $Mdocdate: July 25 2011 $ |
18 | .Dt STRLCPY 3 | 18 | .Dt STRLCPY 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -176,7 +176,8 @@ As a matter of fact, the first version of this manual page got it wrong. | |||
176 | .Sh SEE ALSO | 176 | .Sh SEE ALSO |
177 | .Xr snprintf 3 , | 177 | .Xr snprintf 3 , |
178 | .Xr strncat 3 , | 178 | .Xr strncat 3 , |
179 | .Xr strncpy 3 | 179 | .Xr strncpy 3 , |
180 | .Xr wcslcpy 3 | ||
180 | .Sh HISTORY | 181 | .Sh HISTORY |
181 | The | 182 | The |
182 | .Fn strlcpy | 183 | .Fn strlcpy |
@@ -184,3 +185,10 @@ and | |||
184 | .Fn strlcat | 185 | .Fn strlcat |
185 | functions first appeared in | 186 | functions first appeared in |
186 | .Ox 2.4 . | 187 | .Ox 2.4 . |
188 | .Sh AUTHORS | ||
189 | The | ||
190 | .Fn strlcpy | ||
191 | and | ||
192 | .Fn strlcat | ||
193 | functions were created by | ||
194 | .An Todd C. Miller Aq Todd.Miller@courtesan.com . | ||
diff --git a/src/lib/libc/string/strlen.3 b/src/lib/libc/string/strlen.3 index 3607fde515..9187496a00 100644 --- a/src/lib/libc/string/strlen.3 +++ b/src/lib/libc/string/strlen.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strlen.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strlen.3,v 1.9 2010/05/24 21:27:25 millert Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 24 2010 $ | ||
35 | .Dt STRLEN 3 | 35 | .Dt STRLEN 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -78,7 +78,8 @@ or | |||
78 | .Fa maxlen , | 78 | .Fa maxlen , |
79 | whichever is smaller. | 79 | whichever is smaller. |
80 | .Sh SEE ALSO | 80 | .Sh SEE ALSO |
81 | .Xr string 3 | 81 | .Xr string 3 , |
82 | .Xr wcslen 3 | ||
82 | .Sh STANDARDS | 83 | .Sh STANDARDS |
83 | The | 84 | The |
84 | .Fn strlen | 85 | .Fn strlen |
@@ -98,5 +99,6 @@ function first appeared in | |||
98 | .At v7 . | 99 | .At v7 . |
99 | The | 100 | The |
100 | .Fn strnlen | 101 | .Fn strnlen |
101 | function first appeared in | 102 | function appeared in glibc 2.0 |
103 | and was reimplemented for | ||
102 | .Ox 4.8 . | 104 | .Ox 4.8 . |
diff --git a/src/lib/libc/string/strmode.3 b/src/lib/libc/string/strmode.3 index ebeafcaf6e..5d371b38c8 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.14 2007/05/31 19:19:32 jmc Exp $ | 1 | .\" $OpenBSD: strmode.3,v 1.15 2011/07/25 00:38:53 schwarze 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. |
@@ -29,7 +29,7 @@ | |||
29 | .\" | 29 | .\" |
30 | .\" @(#)strmode.3 8.3 (Berkeley) 7/28/94 | 30 | .\" @(#)strmode.3 8.3 (Berkeley) 7/28/94 |
31 | .\" | 31 | .\" |
32 | .Dd $Mdocdate: May 31 2007 $ | 32 | .Dd $Mdocdate: July 25 2011 $ |
33 | .Dt STRMODE 3 | 33 | .Dt STRMODE 3 |
34 | .Os | 34 | .Os |
35 | .Sh NAME | 35 | .Sh NAME |
@@ -154,4 +154,4 @@ function always returns 0. | |||
154 | The | 154 | The |
155 | .Fn strmode | 155 | .Fn strmode |
156 | function first appeared in | 156 | function first appeared in |
157 | .Bx 4.4 . | 157 | .Bx 4.3 Reno . |
diff --git a/src/lib/libc/string/strpbrk.3 b/src/lib/libc/string/strpbrk.3 index 9d6c676c8d..9e13c42ad0 100644 --- a/src/lib/libc/string/strpbrk.3 +++ b/src/lib/libc/string/strpbrk.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strpbrk.3,v 1.9 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strpbrk.3,v 1.8 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt STRPBRK 3 | 35 | .Dt STRPBRK 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -64,9 +64,17 @@ returns | |||
64 | .Xr strsep 3 , | 64 | .Xr strsep 3 , |
65 | .Xr strspn 3 , | 65 | .Xr strspn 3 , |
66 | .Xr strstr 3 , | 66 | .Xr strstr 3 , |
67 | .Xr strtok 3 | 67 | .Xr strtok 3 , |
68 | .Xr wcspbrk 3 | ||
68 | .Sh STANDARDS | 69 | .Sh STANDARDS |
69 | The | 70 | The |
70 | .Fn strpbrk | 71 | .Fn strpbrk |
71 | function conforms to | 72 | function conforms to |
72 | .St -ansiC . | 73 | .St -ansiC . |
74 | .Sh HISTORY | ||
75 | The | ||
76 | .Fn strpbrk | ||
77 | function first appeared in | ||
78 | .At III | ||
79 | and was reimplemented for | ||
80 | .Bx 4.3 Tahoe . | ||
diff --git a/src/lib/libc/string/strrchr.3 b/src/lib/libc/string/strrchr.3 index 0d1f4be971..9eea08b0a9 100644 --- a/src/lib/libc/string/strrchr.3 +++ b/src/lib/libc/string/strrchr.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strrchr.3,v 1.9 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strrchr.3,v 1.8 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt STRRCHR 3 | 35 | .Dt STRRCHR 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -92,7 +92,8 @@ p = strrchr(s, 'o'); | |||
92 | .Xr strsep 3 , | 92 | .Xr strsep 3 , |
93 | .Xr strspn 3 , | 93 | .Xr strspn 3 , |
94 | .Xr strstr 3 , | 94 | .Xr strstr 3 , |
95 | .Xr strtok 3 | 95 | .Xr strtok 3 , |
96 | .Xr wcsrchr 3 | ||
96 | .Sh STANDARDS | 97 | .Sh STANDARDS |
97 | The | 98 | The |
98 | .Fn strrchr | 99 | .Fn strrchr |
@@ -102,3 +103,14 @@ function conforms to | |||
102 | The | 103 | The |
103 | .Fn rindex | 104 | .Fn rindex |
104 | function is deprecated and shouldn't be used in new code. | 105 | function is deprecated and shouldn't be used in new code. |
106 | .Sh HISTORY | ||
107 | The | ||
108 | .Fn rindex | ||
109 | function first appeared in | ||
110 | .At v7 . | ||
111 | The | ||
112 | .Fn strrchr | ||
113 | function first appeared in | ||
114 | .At III | ||
115 | and was reimplemented for | ||
116 | .Bx 4.3 Tahoe . | ||
diff --git a/src/lib/libc/string/strsep.3 b/src/lib/libc/string/strsep.3 index cceeda7577..63cdf2333a 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.12 2007/05/31 19:19:32 jmc Exp $ | 1 | .\" $OpenBSD: strsep.3,v 1.13 2011/07/25 00:38:53 schwarze 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. |
@@ -32,7 +32,7 @@ | |||
32 | .\" | 32 | .\" |
33 | .\" @(#)strsep.3 8.1 (Berkeley) 6/9/93 | 33 | .\" @(#)strsep.3 8.1 (Berkeley) 6/9/93 |
34 | .\" | 34 | .\" |
35 | .Dd $Mdocdate: May 31 2007 $ | 35 | .Dd $Mdocdate: July 25 2011 $ |
36 | .Dt STRSEP 3 | 36 | .Dt STRSEP 3 |
37 | .Os | 37 | .Os |
38 | .Sh NAME | 38 | .Sh NAME |
@@ -96,17 +96,15 @@ for (ap = argv; ap < &argv[9] && | |||
96 | .Sh HISTORY | 96 | .Sh HISTORY |
97 | The | 97 | The |
98 | .Fn strsep | 98 | .Fn strsep |
99 | function is intended as a replacement for the | 99 | function first appeared in |
100 | .Fn strtok | 100 | .Bx 4.3 Reno . |
101 | It is intended as a replacement for the | ||
102 | .Xr strtok 3 | ||
101 | function. | 103 | function. |
102 | While the | 104 | While the |
103 | .Fn strtok | 105 | .Xr strtok 3 |
104 | function should be preferred for portability reasons (it conforms to | 106 | function should be preferred for portability reasons (it conforms to |
105 | .St -ansiC ) | 107 | .St -ansiC ) |
106 | it is unable to handle empty fields, i.e., detect fields delimited by | 108 | it is unable to handle empty fields, i.e., detect fields delimited by |
107 | two adjacent delimiter characters, or to be used for more than a single | 109 | two adjacent delimiter characters, or to be used for more than a single |
108 | string at a time. | 110 | string at a time. |
109 | The | ||
110 | .Fn strsep | ||
111 | function first appeared in | ||
112 | .Bx 4.4 . | ||
diff --git a/src/lib/libc/string/strsignal.3 b/src/lib/libc/string/strsignal.3 index 839402dcb1..1f9cfc7ef5 100644 --- a/src/lib/libc/string/strsignal.3 +++ b/src/lib/libc/string/strsignal.3 | |||
@@ -29,9 +29,9 @@ | |||
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" $OpenBSD: strsignal.3,v 1.5 2007/05/31 19:19:32 jmc Exp $ | 32 | .\" $OpenBSD: strsignal.3,v 1.6 2011/07/25 00:38:53 schwarze Exp $ |
33 | .\" | 33 | .\" |
34 | .Dd $Mdocdate: May 31 2007 $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
35 | .Dt STRSIGNAL 3 | 35 | .Dt STRSIGNAL 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -54,3 +54,10 @@ overwritten by subsequent calls to | |||
54 | .Xr intro 2 , | 54 | .Xr intro 2 , |
55 | .Xr psignal 3 , | 55 | .Xr psignal 3 , |
56 | .Xr setlocale 3 | 56 | .Xr setlocale 3 |
57 | .Sh HISTORY | ||
58 | The | ||
59 | .Fn strsignal | ||
60 | function first appeared in | ||
61 | .At V.4 | ||
62 | and was reimplemented for | ||
63 | .Nx 1.0 . | ||
diff --git a/src/lib/libc/string/strspn.3 b/src/lib/libc/string/strspn.3 index f902ca35d2..b1a2ae3014 100644 --- a/src/lib/libc/string/strspn.3 +++ b/src/lib/libc/string/strspn.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strspn.3,v 1.10 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strspn.3,v 1.9 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt STRSPN 3 | 35 | .Dt STRSPN 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -76,9 +76,17 @@ span = strspn(s, charset); | |||
76 | .Xr strrchr 3 , | 76 | .Xr strrchr 3 , |
77 | .Xr strsep 3 , | 77 | .Xr strsep 3 , |
78 | .Xr strstr 3 , | 78 | .Xr strstr 3 , |
79 | .Xr strtok 3 | 79 | .Xr strtok 3 , |
80 | .Xr wcsspn 3 | ||
80 | .Sh STANDARDS | 81 | .Sh STANDARDS |
81 | The | 82 | The |
82 | .Fn strspn | 83 | .Fn strspn |
83 | function conforms to | 84 | function conforms to |
84 | .St -ansiC . | 85 | .St -ansiC . |
86 | .Sh HISTORY | ||
87 | The | ||
88 | .Fn strspn | ||
89 | function first appeared in | ||
90 | .At III | ||
91 | and was reimplemented for | ||
92 | .Bx 4.3 Tahoe . | ||
diff --git a/src/lib/libc/string/strstr.3 b/src/lib/libc/string/strstr.3 index 38bd207727..4069d55ed2 100644 --- a/src/lib/libc/string/strstr.3 +++ b/src/lib/libc/string/strstr.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strstr.3,v 1.11 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strstr.3,v 1.10 2007/09/19 16:06:45 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: September 19 2007 $ | ||
35 | .Dt STRSTR 3 | 35 | .Dt STRSTR 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -79,7 +79,8 @@ is returned. | |||
79 | .Xr strrchr 3 , | 79 | .Xr strrchr 3 , |
80 | .Xr strsep 3 , | 80 | .Xr strsep 3 , |
81 | .Xr strspn 3 , | 81 | .Xr strspn 3 , |
82 | .Xr strtok 3 | 82 | .Xr strtok 3 , |
83 | .Xr wcsstr 3 | ||
83 | .Sh STANDARDS | 84 | .Sh STANDARDS |
84 | The | 85 | The |
85 | .Fn strstr | 86 | .Fn strstr |
@@ -87,6 +88,13 @@ function conforms to | |||
87 | .St -ansiC . | 88 | .St -ansiC . |
88 | .Sh HISTORY | 89 | .Sh HISTORY |
89 | The | 90 | The |
90 | .Fn strcasestr | 91 | .Fn strstr |
91 | function first appeared in | 92 | function first appeared in |
93 | .Bx 4.3 Reno . | ||
94 | The | ||
95 | .Fn strcasestr | ||
96 | function appeared in glibc 2.1, | ||
97 | was reimplemented for | ||
98 | .Fx 4.5 | ||
99 | and ported to | ||
92 | .Ox 3.8 . | 100 | .Ox 3.8 . |
diff --git a/src/lib/libc/string/strtok.3 b/src/lib/libc/string/strtok.3 index ed7d5158ed..fbf0abfc26 100644 --- a/src/lib/libc/string/strtok.3 +++ b/src/lib/libc/string/strtok.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: strtok.3,v 1.20 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1988, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1988, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: strtok.3,v 1.19 2007/05/31 19:19:32 jmc Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: May 31 2007 $ | ||
35 | .Dt STRTOK 3 | 35 | .Dt STRTOK 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -73,6 +73,14 @@ function is a version of | |||
73 | .Fn strtok | 73 | .Fn strtok |
74 | that takes an explicit context argument and is reentrant. | 74 | that takes an explicit context argument and is reentrant. |
75 | .Pp | 75 | .Pp |
76 | Since | ||
77 | .Fn strtok | ||
78 | and | ||
79 | .Fn strtok_r | ||
80 | modify the string, | ||
81 | .Fa str | ||
82 | should not point to an area in the initialized data segment. | ||
83 | .Sh RETURN VALUES | ||
76 | The | 84 | The |
77 | .Fn strtok | 85 | .Fn strtok |
78 | and | 86 | and |
@@ -82,14 +90,6 @@ in the string, after replacing the separator character itself with an | |||
82 | .Tn ASCII NUL | 90 | .Tn ASCII NUL |
83 | character. | 91 | character. |
84 | When no more tokens remain, a null pointer is returned. | 92 | When no more tokens remain, a null pointer is returned. |
85 | .Pp | ||
86 | Since | ||
87 | .Fn strtok | ||
88 | and | ||
89 | .Fn strtok_r | ||
90 | modify the string, | ||
91 | .Fa str | ||
92 | should not point to an area in the initialized data segment. | ||
93 | .Sh EXAMPLES | 93 | .Sh EXAMPLES |
94 | The following will construct an array of pointers to each individual word in | 94 | The following will construct an array of pointers to each individual word in |
95 | the string | 95 | the string |
@@ -133,12 +133,26 @@ will point to | |||
133 | .Xr strrchr 3 , | 133 | .Xr strrchr 3 , |
134 | .Xr strsep 3 , | 134 | .Xr strsep 3 , |
135 | .Xr strspn 3 , | 135 | .Xr strspn 3 , |
136 | .Xr strstr 3 | 136 | .Xr strstr 3 , |
137 | .Xr wcstok 3 | ||
137 | .Sh STANDARDS | 138 | .Sh STANDARDS |
138 | The | 139 | The |
139 | .Fn strtok | 140 | .Fn strtok |
140 | function conforms to | 141 | function conforms to |
141 | .St -ansiC . | 142 | .St -ansiC . |
143 | .Sh HISTORY | ||
144 | The | ||
145 | .Fn strtok | ||
146 | function first appeared in | ||
147 | .At III | ||
148 | and was reimplemented for | ||
149 | .Bx 4.3 Tahoe . | ||
150 | The | ||
151 | .Fn strtok_r | ||
152 | function first appeared in | ||
153 | .Nx 1.3 | ||
154 | and was reimplemented for | ||
155 | .Ox 2.7 . | ||
142 | .Sh BUGS | 156 | .Sh BUGS |
143 | The System V | 157 | The System V |
144 | .Fn strtok , | 158 | .Fn strtok , |
diff --git a/src/lib/libc/string/strxfrm.3 b/src/lib/libc/string/strxfrm.3 index 73ce135191..e4472946be 100644 --- a/src/lib/libc/string/strxfrm.3 +++ b/src/lib/libc/string/strxfrm.3 | |||
@@ -29,9 +29,9 @@ | |||
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
30 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
31 | .\" | 31 | .\" |
32 | .\" $OpenBSD: strxfrm.3,v 1.8 2007/05/31 19:19:32 jmc Exp $ | 32 | .\" $OpenBSD: strxfrm.3,v 1.9 2011/07/25 00:38:53 schwarze Exp $ |
33 | .\" | 33 | .\" |
34 | .Dd $Mdocdate: May 31 2007 $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
35 | .Dt STRXFRM 3 | 35 | .Dt STRXFRM 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -67,6 +67,11 @@ The | |||
67 | .Fn strxfrm | 67 | .Fn strxfrm |
68 | function conforms to | 68 | function conforms to |
69 | .St -ansiC . | 69 | .St -ansiC . |
70 | .Sh HISTORY | ||
71 | The | ||
72 | .Fn strxfrm | ||
73 | function first appeared in | ||
74 | .Bx 4.3 Reno . | ||
70 | .Sh BUGS | 75 | .Sh BUGS |
71 | Since locales are not fully implemented on | 76 | Since locales are not fully implemented on |
72 | .Ox , | 77 | .Ox , |
diff --git a/src/lib/libc/string/swab.3 b/src/lib/libc/string/swab.3 index 56def1ec88..5ebaa485e9 100644 --- a/src/lib/libc/string/swab.3 +++ b/src/lib/libc/string/swab.3 | |||
@@ -25,9 +25,9 @@ | |||
25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
26 | .\" SUCH DAMAGE. | 26 | .\" SUCH DAMAGE. |
27 | .\" | 27 | .\" |
28 | .\" $OpenBSD: swab.3,v 1.6 2007/05/31 19:19:32 jmc Exp $ | 28 | .\" $OpenBSD: swab.3,v 1.7 2011/07/25 00:38:53 schwarze Exp $ |
29 | .\" | 29 | .\" |
30 | .Dd $Mdocdate: May 31 2007 $ | 30 | .Dd $Mdocdate: July 25 2011 $ |
31 | .Dt SWAB 3 | 31 | .Dt SWAB 3 |
32 | .Os | 32 | .Os |
33 | .Sh NAME | 33 | .Sh NAME |
@@ -55,7 +55,7 @@ must be an even number. | |||
55 | .Xr bzero 3 , | 55 | .Xr bzero 3 , |
56 | .Xr memset 3 | 56 | .Xr memset 3 |
57 | .Sh HISTORY | 57 | .Sh HISTORY |
58 | A | 58 | The |
59 | .Fn swab | 59 | .Fn swab |
60 | function appeared in | 60 | function first appeared in |
61 | .At v7 . | 61 | .At v7 . |
diff --git a/src/lib/libc/string/wcscasecmp.3 b/src/lib/libc/string/wcscasecmp.3 index d76d33bd5c..94cd6e0c38 100644 --- a/src/lib/libc/string/wcscasecmp.3 +++ b/src/lib/libc/string/wcscasecmp.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: wcscasecmp.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 1 | .\" $OpenBSD: wcscasecmp.3,v 1.2 2011/07/25 00:38:53 schwarze 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. |
@@ -31,7 +31,7 @@ | |||
31 | .\" | 31 | .\" |
32 | .\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93 | 32 | .\" @(#)strcasecmp.3 8.1 (Berkeley) 6/9/93 |
33 | .\" | 33 | .\" |
34 | .Dd $Mdocdate: July 9 2011 $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
35 | .Dt WCSCASECMP 3 | 35 | .Dt WCSCASECMP 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -66,6 +66,7 @@ compares at most | |||
66 | .Fa len | 66 | .Fa len |
67 | wide characters. | 67 | wide characters. |
68 | .Sh SEE ALSO | 68 | .Sh SEE ALSO |
69 | .Xr strcasecmp 3 , | ||
69 | .Xr wcscmp 3 , | 70 | .Xr wcscmp 3 , |
70 | .Xr wmemcmp 3 | 71 | .Xr wmemcmp 3 |
71 | .Sh STANDARDS | 72 | .Sh STANDARDS |
@@ -75,3 +76,19 @@ and | |||
75 | .Fn wcsncasecmp | 76 | .Fn wcsncasecmp |
76 | functions conform to | 77 | functions conform to |
77 | .St -p1003.1-2008 . | 78 | .St -p1003.1-2008 . |
79 | .Sh HISTORY | ||
80 | The | ||
81 | .Fn wcscasecmp | ||
82 | and | ||
83 | .Fn wcsncasecmp | ||
84 | functions first appeared in | ||
85 | .Ox 5.0 . | ||
86 | .Sh AUTHORS | ||
87 | The | ||
88 | .Ox | ||
89 | versions of | ||
90 | .Fn wcscasecmp | ||
91 | and | ||
92 | .Fn wcsncasecmp | ||
93 | were implemented by | ||
94 | .An Marc Espie Aq espie@openbsd.org . | ||
diff --git a/src/lib/libc/string/wcscat.3 b/src/lib/libc/string/wcscat.3 index c5321d5a2a..d0281b8bd1 100644 --- a/src/lib/libc/string/wcscat.3 +++ b/src/lib/libc/string/wcscat.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcscat.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcscat.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSCAT 3 | 35 | .Dt WCSCAT 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -43,7 +43,7 @@ | |||
43 | .Ft wchar_t * | 43 | .Ft wchar_t * |
44 | .Fn wcscat "wchar_t * restrict s" "const wchar_t * restrict append" | 44 | .Fn wcscat "wchar_t * restrict s" "const wchar_t * restrict append" |
45 | .Ft wchar_t * | 45 | .Ft wchar_t * |
46 | .Fo strncat | 46 | .Fo wcsncat |
47 | .Fa "wchar_t * restrict s" | 47 | .Fa "wchar_t * restrict s" |
48 | .Fa "const wchar_t * restrict append" | 48 | .Fa "const wchar_t * restrict append" |
49 | .Fa "size_t count" | 49 | .Fa "size_t count" |
@@ -77,8 +77,9 @@ and | |||
77 | functions return the pointer | 77 | functions return the pointer |
78 | .Fa s . | 78 | .Fa s . |
79 | .Sh SEE ALSO | 79 | .Sh SEE ALSO |
80 | .Xr strcat 3 , | ||
81 | .Xr strlcpy 3 , | ||
80 | .Xr wcscpy 3 , | 82 | .Xr wcscpy 3 , |
81 | .Xr wcslcat 3 , | ||
82 | .Xr wcslcpy 3 , | 83 | .Xr wcslcpy 3 , |
83 | .Xr wmemcpy 3 , | 84 | .Xr wmemcpy 3 , |
84 | .Xr wmemmove 3 | 85 | .Xr wmemmove 3 |
@@ -91,3 +92,24 @@ functions conform to | |||
91 | .St -isoC-99 | 92 | .St -isoC-99 |
92 | and were first introduced in | 93 | and were first introduced in |
93 | .St -isoC-amd1 . | 94 | .St -isoC-amd1 . |
95 | .Sh HISTORY | ||
96 | The | ||
97 | .Fn wcscat | ||
98 | and | ||
99 | .Fn wcsncat | ||
100 | functions were ported from | ||
101 | .Nx | ||
102 | and first appeared in | ||
103 | .Ox 3.8 . | ||
104 | .Sh CAVEATS | ||
105 | Using the functions | ||
106 | .Fn wcscat | ||
107 | and | ||
108 | .Fn wcsncat | ||
109 | is very error-prone with respect to buffer overflows; | ||
110 | see the EXAMPLES section in | ||
111 | .Xr strcat 3 | ||
112 | for correct usage. | ||
113 | Using | ||
114 | .Xr wcslcat 3 | ||
115 | is a better choice in most cases. | ||
diff --git a/src/lib/libc/string/wcschr.3 b/src/lib/libc/string/wcschr.3 index 10c78f34e1..ffe42f7ae6 100644 --- a/src/lib/libc/string/wcschr.3 +++ b/src/lib/libc/string/wcschr.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcschr.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,10 +31,8 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcschr.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | 35 | .Dt WCSCHR 3 |
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt STRCHR 3 | ||
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
38 | .Nm wcschr | 38 | .Nm wcschr |
@@ -61,6 +61,7 @@ function returns a pointer to the located wide character or | |||
61 | .Dv NULL | 61 | .Dv NULL |
62 | if the wide character does not appear in the wide string. | 62 | if the wide character does not appear in the wide string. |
63 | .Sh SEE ALSO | 63 | .Sh SEE ALSO |
64 | .Xr strchr 3 , | ||
64 | .Xr wcscspn 3 , | 65 | .Xr wcscspn 3 , |
65 | .Xr wcspbrk 3 , | 66 | .Xr wcspbrk 3 , |
66 | .Xr wcsrchr 3 , | 67 | .Xr wcsrchr 3 , |
@@ -75,3 +76,10 @@ function conforms to | |||
75 | .St -isoC-99 | 76 | .St -isoC-99 |
76 | and was first introduced in | 77 | and was first introduced in |
77 | .St -isoC-amd1 . | 78 | .St -isoC-amd1 . |
79 | .Sh HISTORY | ||
80 | The | ||
81 | .Fn wcschr | ||
82 | function was ported from | ||
83 | .Nx | ||
84 | and first appeared in | ||
85 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wcscmp.3 b/src/lib/libc/string/wcscmp.3 index 15952b9022..b34e5c2168 100644 --- a/src/lib/libc/string/wcscmp.3 +++ b/src/lib/libc/string/wcscmp.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcscmp.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcscmp.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSCMP 3 | 35 | .Dt WCSCMP 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -55,7 +55,7 @@ and | |||
55 | .Fa s2 . | 55 | .Fa s2 . |
56 | The | 56 | The |
57 | .Fn wcsncmp | 57 | .Fn wcsncmp |
58 | compares at most | 58 | function compares at most |
59 | .Fa len | 59 | .Fa len |
60 | wide characters. | 60 | wide characters. |
61 | .Sh RETURN VALUES | 61 | .Sh RETURN VALUES |
@@ -69,6 +69,7 @@ to whether the wide string | |||
69 | is greater than, equal to, or less than the wide string | 69 | is greater than, equal to, or less than the wide string |
70 | .Fa s2 . | 70 | .Fa s2 . |
71 | .Sh SEE ALSO | 71 | .Sh SEE ALSO |
72 | .Xr strcmp 3 , | ||
72 | .Xr wcscasecmp 3 , | 73 | .Xr wcscasecmp 3 , |
73 | .Xr wmemcmp 3 | 74 | .Xr wmemcmp 3 |
74 | .Sh STANDARDS | 75 | .Sh STANDARDS |
@@ -80,3 +81,12 @@ functions conform to | |||
80 | .St -isoC-99 | 81 | .St -isoC-99 |
81 | and were first introduced in | 82 | and were first introduced in |
82 | .St -isoC-amd1 . | 83 | .St -isoC-amd1 . |
84 | .Sh HISTORY | ||
85 | The | ||
86 | .Fn wcscmp | ||
87 | and | ||
88 | .Fn wcsncmp | ||
89 | functions were ported from | ||
90 | .Nx | ||
91 | and first appeared in | ||
92 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wcscpy.3 b/src/lib/libc/string/wcscpy.3 index a71d54f886..dcc375acbf 100644 --- a/src/lib/libc/string/wcscpy.3 +++ b/src/lib/libc/string/wcscpy.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcscpy.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcscpy.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSCPY 3 | 35 | .Dt WCSCPY 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -51,7 +51,9 @@ | |||
51 | .Sh DESCRIPTION | 51 | .Sh DESCRIPTION |
52 | The | 52 | The |
53 | .Fn wcscpy | 53 | .Fn wcscpy |
54 | function copies the wide string | 54 | and |
55 | .Fn wcsncpy | ||
56 | functions copy the wide string | ||
55 | .Fa src | 57 | .Fa src |
56 | to | 58 | to |
57 | .Fa dst | 59 | .Fa dst |
@@ -83,6 +85,9 @@ and | |||
83 | functions return | 85 | functions return |
84 | .Fa dst . | 86 | .Fa dst . |
85 | .Sh SEE ALSO | 87 | .Sh SEE ALSO |
88 | .Xr strcpy 3 , | ||
89 | .Xr strlcpy 3 , | ||
90 | .Xr wcscat 3 , | ||
86 | .Xr wcslcpy 3 , | 91 | .Xr wcslcpy 3 , |
87 | .Xr wmemcpy 3 , | 92 | .Xr wmemcpy 3 , |
88 | .Xr wmemmove 3 | 93 | .Xr wmemmove 3 |
@@ -95,3 +100,24 @@ functions conform to | |||
95 | .St -isoC-99 | 100 | .St -isoC-99 |
96 | and were first introduced in | 101 | and were first introduced in |
97 | .St -isoC-amd1 . | 102 | .St -isoC-amd1 . |
103 | .Sh HISTORY | ||
104 | The | ||
105 | .Fn wcscpy | ||
106 | and | ||
107 | .Fn wcsncpy | ||
108 | functions were ported from | ||
109 | .Nx | ||
110 | and first appeared in | ||
111 | .Ox 3.8 . | ||
112 | .Sh CAVEATS | ||
113 | Using the functions | ||
114 | .Fn wcscpy | ||
115 | and | ||
116 | .Fn wcsncpy | ||
117 | is very error-prone with respect to buffer overflows; | ||
118 | see the EXAMPLES section in | ||
119 | .Xr strcpy 3 | ||
120 | for correct usage. | ||
121 | Using | ||
122 | .Xr wcslcpy 3 | ||
123 | is a better choice in most cases. | ||
diff --git a/src/lib/libc/string/wcscspn.3 b/src/lib/libc/string/wcscspn.3 index 7623e9985f..c17992501f 100644 --- a/src/lib/libc/string/wcscspn.3 +++ b/src/lib/libc/string/wcscspn.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcscspn.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcscspn.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSCSPN 3 | 35 | .Dt WCSCSPN 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -59,6 +59,7 @@ The | |||
59 | .Fn wcscspn | 59 | .Fn wcscspn |
60 | function returns the number of wide characters spanned. | 60 | function returns the number of wide characters spanned. |
61 | .Sh SEE ALSO | 61 | .Sh SEE ALSO |
62 | .Xr strcspn 3 , | ||
62 | .Xr wcschr 3 , | 63 | .Xr wcschr 3 , |
63 | .Xr wcspbrk 3 , | 64 | .Xr wcspbrk 3 , |
64 | .Xr wcsrchr 3 , | 65 | .Xr wcsrchr 3 , |
@@ -73,3 +74,10 @@ function conforms to | |||
73 | .St -isoC-99 | 74 | .St -isoC-99 |
74 | and was first introduced in | 75 | and was first introduced in |
75 | .St -isoC-amd1 . | 76 | .St -isoC-amd1 . |
77 | .Sh HISTORY | ||
78 | The | ||
79 | .Fn wcscspn | ||
80 | function was ported from | ||
81 | .Nx | ||
82 | and first appeared in | ||
83 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wcsdup.3 b/src/lib/libc/string/wcsdup.3 index 6588f14988..588a2571db 100644 --- a/src/lib/libc/string/wcsdup.3 +++ b/src/lib/libc/string/wcsdup.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: wcsdup.3,v 1.3 2011/07/08 17:46:45 nicm Exp $ | 1 | .\" $OpenBSD: wcsdup.3,v 1.4 2011/07/25 00:38:53 schwarze Exp $ |
2 | .\" $NetBSD: wcsdup.3,v 1.3 2010/12/16 17:42:28 wiz Exp $ | 2 | .\" $NetBSD: wcsdup.3,v 1.3 2010/12/16 17:42:28 wiz Exp $ |
3 | .\" | 3 | .\" |
4 | .\" Copyright (c) 1990, 1991, 1993 | 4 | .\" Copyright (c) 1990, 1991, 1993 |
@@ -28,14 +28,14 @@ | |||
28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 28 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
29 | .\" SUCH DAMAGE. | 29 | .\" SUCH DAMAGE. |
30 | .\" | 30 | .\" |
31 | .\" from: @(#)strdup.3 8.1 (Berkeley) 6/9/93 | 31 | .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 |
32 | .\" | 32 | .\" |
33 | .Dd $Mdocdate: July 8 2011 $ | 33 | .Dd $Mdocdate: July 25 2011 $ |
34 | .Dt WCSDUP 3 | 34 | .Dt WCSDUP 3 |
35 | .Os | 35 | .Os |
36 | .Sh NAME | 36 | .Sh NAME |
37 | .Nm wcsdup | 37 | .Nm wcsdup |
38 | .Nd save a copy of a string | 38 | .Nd save a copy of a wide string |
39 | .Sh SYNOPSIS | 39 | .Sh SYNOPSIS |
40 | .In wchar.h | 40 | .In wchar.h |
41 | .Ft wchar_t * | 41 | .Ft wchar_t * |
@@ -66,15 +66,11 @@ wchar_t *p, b[32]; | |||
66 | size_t blen; | 66 | size_t blen; |
67 | 67 | ||
68 | blen = sizeof(b) / sizeof(b[0]); | 68 | blen = sizeof(b) / sizeof(b[0]); |
69 | if (mbstowcs(b, o, blen) == (size_t)-1) { | 69 | if (mbstowcs(b, o, blen) == (size_t)-1) |
70 | fprintf(stderr, "Failed to convert string.\en"); | 70 | err(1, NULL); |
71 | exit(1); | ||
72 | } | ||
73 | b[blen - 1] = 0; | 71 | b[blen - 1] = 0; |
74 | if ((p = wcsdup(b)) == NULL) { | 72 | if ((p = wcsdup(b)) == NULL) |
75 | fprintf(stderr, "Out of memory.\en"); | 73 | err(1, NULL); |
76 | exit(1); | ||
77 | } | ||
78 | .Ed | 74 | .Ed |
79 | .Sh ERRORS | 75 | .Sh ERRORS |
80 | The | 76 | The |
@@ -87,8 +83,15 @@ for any of the errors specified for the library function | |||
87 | .Xr free 3 , | 83 | .Xr free 3 , |
88 | .Xr malloc 3 , | 84 | .Xr malloc 3 , |
89 | .Xr strdup 3 | 85 | .Xr strdup 3 |
86 | .Sh STANDARDS | ||
87 | The | ||
88 | .Fn wcsdup | ||
89 | function conforms to | ||
90 | .St -p1003.1-2008 . | ||
90 | .Sh HISTORY | 91 | .Sh HISTORY |
91 | The | 92 | The |
92 | .Fn wcsdup | 93 | .Fn wcsdup |
93 | function first appeared in | 94 | function was ported from |
95 | .Nx | ||
96 | and first appeared in | ||
94 | .Ox 5.0 . | 97 | .Ox 5.0 . |
diff --git a/src/lib/libc/string/wcslcpy.3 b/src/lib/libc/string/wcslcpy.3 index 6f068dc9df..ed6de07cbe 100644 --- a/src/lib/libc/string/wcslcpy.3 +++ b/src/lib/libc/string/wcslcpy.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: wcslcpy.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 1 | .\" $OpenBSD: wcslcpy.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com> | 3 | .\" Copyright (c) 1998, 2000 Todd C. Miller <Todd.Miller@courtesan.com> |
4 | .\" | 4 | .\" |
@@ -14,7 +14,7 @@ | |||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | .\" | 16 | .\" |
17 | .Dd $Mdocdate: July 9 2011 $ | 17 | .Dd $Mdocdate: July 25 2011 $ |
18 | .Dt WCSLCPY 3 | 18 | .Dt WCSLCPY 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -127,6 +127,7 @@ is incorrect or that | |||
127 | is not terminated with a null wide character). | 127 | is not terminated with a null wide character). |
128 | The check exists to prevent potential security problems in incorrect code. | 128 | The check exists to prevent potential security problems in incorrect code. |
129 | .Sh SEE ALSO | 129 | .Sh SEE ALSO |
130 | .Xr strlcpy 3 , | ||
130 | .Xr swprintf 3 , | 131 | .Xr swprintf 3 , |
131 | .Xr wcsncat 3 , | 132 | .Xr wcsncat 3 , |
132 | .Xr wcsncpy 3 | 133 | .Xr wcsncpy 3 |
@@ -137,3 +138,10 @@ and | |||
137 | .Fn wcslcat | 138 | .Fn wcslcat |
138 | functions first appeared in | 139 | functions first appeared in |
139 | .Ox 3.8 . | 140 | .Ox 3.8 . |
141 | .Sh AUTHORS | ||
142 | The | ||
143 | .Fn wcslcpy | ||
144 | and | ||
145 | .Fn wcslcat | ||
146 | functions are based on code by | ||
147 | .An Todd C. Miller Aq Todd.Miller@courtesan.com . | ||
diff --git a/src/lib/libc/string/wcslen.3 b/src/lib/libc/string/wcslen.3 index cf4813c4a4..1b2eceab93 100644 --- a/src/lib/libc/string/wcslen.3 +++ b/src/lib/libc/string/wcslen.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcslen.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcslen.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSLEN 3 | 35 | .Dt WCSLEN 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -52,6 +52,7 @@ The | |||
52 | function returns the number of wide characters that precede the terminating | 52 | function returns the number of wide characters that precede the terminating |
53 | null wide character. | 53 | null wide character. |
54 | .Sh SEE ALSO | 54 | .Sh SEE ALSO |
55 | .Xr strlen 3 , | ||
55 | .Xr wcswidth 3 | 56 | .Xr wcswidth 3 |
56 | .Sh STANDARDS | 57 | .Sh STANDARDS |
57 | The | 58 | The |
@@ -60,3 +61,10 @@ function conforms to | |||
60 | .St -isoC-99 | 61 | .St -isoC-99 |
61 | and was first introduced in | 62 | and was first introduced in |
62 | .St -isoC-amd1 . | 63 | .St -isoC-amd1 . |
64 | .Sh HISTORY | ||
65 | The | ||
66 | .Fn wcslen | ||
67 | function was ported from | ||
68 | .Nx | ||
69 | and first appeared in | ||
70 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wcspbrk.3 b/src/lib/libc/string/wcspbrk.3 index 81f08a8f1e..6589e83c83 100644 --- a/src/lib/libc/string/wcspbrk.3 +++ b/src/lib/libc/string/wcspbrk.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcspbrk.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcspbrk.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSPBRK 3 | 35 | .Dt WCSPBRK 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -57,13 +57,14 @@ occur anywhere in | |||
57 | returns | 57 | returns |
58 | .Dv NULL . | 58 | .Dv NULL . |
59 | .Sh SEE ALSO | 59 | .Sh SEE ALSO |
60 | .Xr wmemchr 3 , | 60 | .Xr strpbrk 3 , |
61 | .Xr wcschr 3 , | 61 | .Xr wcschr 3 , |
62 | .Xr wcscspn 3 , | 62 | .Xr wcscspn 3 , |
63 | .Xr wcsrchr 3 , | 63 | .Xr wcsrchr 3 , |
64 | .Xr wcsspn 3 , | 64 | .Xr wcsspn 3 , |
65 | .Xr wcsstr 3 , | 65 | .Xr wcsstr 3 , |
66 | .Xr wcstok 3 | 66 | .Xr wcstok 3 , |
67 | .Xr wmemchr 3 | ||
67 | .Sh STANDARDS | 68 | .Sh STANDARDS |
68 | The | 69 | The |
69 | .Fn wcspbrk | 70 | .Fn wcspbrk |
@@ -71,3 +72,10 @@ function conforms to | |||
71 | .St -isoC-99 | 72 | .St -isoC-99 |
72 | and was first introduced in | 73 | and was first introduced in |
73 | .St -isoC-amd1 . | 74 | .St -isoC-amd1 . |
75 | .Sh HISTORY | ||
76 | The | ||
77 | .Fn wcspbrk | ||
78 | function was ported from | ||
79 | .Nx | ||
80 | and first appeared in | ||
81 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wcsrchr.3 b/src/lib/libc/string/wcsrchr.3 index 5e0c1f8835..d65caa4292 100644 --- a/src/lib/libc/string/wcsrchr.3 +++ b/src/lib/libc/string/wcsrchr.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcsrchr.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcsrchr.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSRCHR 3 | 35 | .Dt WCSRCHR 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -61,6 +61,7 @@ function returns a pointer to the located wide character or | |||
61 | .Dv NULL | 61 | .Dv NULL |
62 | if the wide character does not appear in the wide string. | 62 | if the wide character does not appear in the wide string. |
63 | .Sh SEE ALSO | 63 | .Sh SEE ALSO |
64 | .Xr strrchr 3 , | ||
64 | .Xr wcschr 3 , | 65 | .Xr wcschr 3 , |
65 | .Xr wcscspn 3 , | 66 | .Xr wcscspn 3 , |
66 | .Xr wcspbrk 3 , | 67 | .Xr wcspbrk 3 , |
@@ -75,3 +76,10 @@ function conforms to | |||
75 | .St -isoC-99 | 76 | .St -isoC-99 |
76 | and was first introduced in | 77 | and was first introduced in |
77 | .St -isoC-amd1 . | 78 | .St -isoC-amd1 . |
79 | .Sh HISTORY | ||
80 | The | ||
81 | .Fn wcsrchr | ||
82 | function was ported from | ||
83 | .Nx | ||
84 | and first appeared in | ||
85 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wcsspn.3 b/src/lib/libc/string/wcsspn.3 index c73e13076e..66505c59d1 100644 --- a/src/lib/libc/string/wcsspn.3 +++ b/src/lib/libc/string/wcsspn.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcsspn.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcsspn.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSSPN 3 | 35 | .Dt WCSSPN 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -55,6 +55,7 @@ The | |||
55 | .Fn wcsspn | 55 | .Fn wcsspn |
56 | function returns the number of wide characters spanned. | 56 | function returns the number of wide characters spanned. |
57 | .Sh SEE ALSO | 57 | .Sh SEE ALSO |
58 | .Xr strspn 3 , | ||
58 | .Xr wcschr 3 , | 59 | .Xr wcschr 3 , |
59 | .Xr wcscspn 3 , | 60 | .Xr wcscspn 3 , |
60 | .Xr wcspbrk 3 , | 61 | .Xr wcspbrk 3 , |
@@ -69,3 +70,10 @@ function conforms to | |||
69 | .St -isoC-99 | 70 | .St -isoC-99 |
70 | and was first introduced in | 71 | and was first introduced in |
71 | .St -isoC-amd1 . | 72 | .St -isoC-amd1 . |
73 | .Sh HISTORY | ||
74 | The | ||
75 | .Fn wcsspn | ||
76 | function was ported from | ||
77 | .Nx | ||
78 | and first appeared in | ||
79 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wcsstr.3 b/src/lib/libc/string/wcsstr.3 index dc99b70667..73f85c3504 100644 --- a/src/lib/libc/string/wcsstr.3 +++ b/src/lib/libc/string/wcsstr.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wcsstr.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wcsstr.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WCSSTR 3 | 35 | .Dt WCSSTR 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -64,13 +64,14 @@ otherwise a pointer to the first wide character of the first occurrence of | |||
64 | .Fa little | 64 | .Fa little |
65 | is returned. | 65 | is returned. |
66 | .Sh SEE ALSO | 66 | .Sh SEE ALSO |
67 | .Xr strstr 3 , | ||
67 | .Xr wcschr 3 , | 68 | .Xr wcschr 3 , |
68 | .Xr wcscspn 3 , | 69 | .Xr wcscspn 3 , |
69 | .Xr wcspbrk 3 , | 70 | .Xr wcspbrk 3 , |
70 | .Xr wcsrchr 3 , | 71 | .Xr wcsrchr 3 , |
71 | .Xr wcsspn 3 , | 72 | .Xr wcsspn 3 , |
72 | .Xr wcstok 3 , | 73 | .Xr wcstok 3 , |
73 | .Xr wmemchr 3 , | 74 | .Xr wmemchr 3 |
74 | .Sh STANDARDS | 75 | .Sh STANDARDS |
75 | The | 76 | The |
76 | .Fn wcsstr | 77 | .Fn wcsstr |
@@ -78,3 +79,10 @@ function conforms to | |||
78 | .St -isoC-99 | 79 | .St -isoC-99 |
79 | and was first introduced in | 80 | and was first introduced in |
80 | .St -isoC-amd1 . | 81 | .St -isoC-amd1 . |
82 | .Sh HISTORY | ||
83 | The | ||
84 | .Fn wcsstr | ||
85 | function was ported from | ||
86 | .Nx | ||
87 | and first appeared in | ||
88 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wcstok.3 b/src/lib/libc/string/wcstok.3 index 945ec9b990..33ba1318a1 100644 --- a/src/lib/libc/string/wcstok.3 +++ b/src/lib/libc/string/wcstok.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: wcstok.3,v 1.6 2010/09/10 18:38:20 jmc Exp $ | 1 | .\" $OpenBSD: wcstok.3,v 1.7 2011/07/25 00:38:53 schwarze Exp $ |
2 | .\" | 2 | .\" |
3 | .\" $NetBSD: wcstok.3,v 1.3 2003/09/08 17:54:33 wiz Exp $ | 3 | .\" $NetBSD: wcstok.3,v 1.3 2003/09/08 17:54:33 wiz Exp $ |
4 | .\" | 4 | .\" |
@@ -54,7 +54,7 @@ | |||
54 | .\" Original version ID: | 54 | .\" Original version ID: |
55 | .\" FreeBSD: src/lib/libc/string/wcstok.3,v 1.4 2002/10/15 09:49:54 tjr Exp | 55 | .\" FreeBSD: src/lib/libc/string/wcstok.3,v 1.4 2002/10/15 09:49:54 tjr Exp |
56 | .\" | 56 | .\" |
57 | .Dd $Mdocdate: September 10 2010 $ | 57 | .Dd $Mdocdate: July 25 2011 $ |
58 | .Dt WCSTOK 3 | 58 | .Dt WCSTOK 3 |
59 | .Os | 59 | .Os |
60 | .Sh NAME | 60 | .Sh NAME |
@@ -90,8 +90,14 @@ must be provided on each call. | |||
90 | The | 90 | The |
91 | .Fn wcstok | 91 | .Fn wcstok |
92 | function is the wide-character counterpart of the | 92 | function is the wide-character counterpart of the |
93 | .Fn strtok_r | 93 | .Xr strtok_r 3 |
94 | function. | 94 | function. |
95 | .Pp | ||
96 | Since | ||
97 | .Fn wcstok | ||
98 | modifies the string, | ||
99 | .Fa str | ||
100 | should not point to an area in the initialized data segment. | ||
95 | .Sh RETURN VALUES | 101 | .Sh RETURN VALUES |
96 | The | 102 | The |
97 | .Fn wcstok | 103 | .Fn wcstok |
@@ -118,7 +124,9 @@ for (tok = wcstok(text, seps, &last); tok != NULL; | |||
118 | .Xr wcscspn 3 , | 124 | .Xr wcscspn 3 , |
119 | .Xr wcspbrk 3 , | 125 | .Xr wcspbrk 3 , |
120 | .Xr wcsrchr 3 , | 126 | .Xr wcsrchr 3 , |
121 | .Xr wcsspn 3 | 127 | .Xr wcsspn 3 , |
128 | .Xr wcsstr 3 , | ||
129 | .Xr wmemchr 3 | ||
122 | .Sh STANDARDS | 130 | .Sh STANDARDS |
123 | The | 131 | The |
124 | .Fn wcstok | 132 | .Fn wcstok |
@@ -126,11 +134,18 @@ function | |||
126 | conforms to | 134 | conforms to |
127 | .St -isoC-99 . | 135 | .St -isoC-99 . |
128 | .Sh HISTORY | 136 | .Sh HISTORY |
137 | The | ||
138 | .Fn wcstok | ||
139 | function was ported from | ||
140 | .Nx | ||
141 | and first appeared in | ||
142 | .Ox 3.8 . | ||
143 | .Pp | ||
129 | Some early implementations of | 144 | Some early implementations of |
130 | .Fn wcstok | 145 | .Fn wcstok |
131 | omit the | 146 | omit the |
132 | context pointer argument, | 147 | context pointer argument, |
133 | .Fa last , | 148 | .Fa last , |
134 | and maintain state across calls in a static variable like | 149 | and maintain state across calls in a static variable like |
135 | .Fn strtok | 150 | .Xr strtok 3 |
136 | does. | 151 | does. |
diff --git a/src/lib/libc/string/wcswidth.3 b/src/lib/libc/string/wcswidth.3 index a68ec33cad..a2a5b2df86 100644 --- a/src/lib/libc/string/wcswidth.3 +++ b/src/lib/libc/string/wcswidth.3 | |||
@@ -1,4 +1,5 @@ | |||
1 | .\" $OpenBSD: wcswidth.3,v 1.1 2011/04/04 18:16:24 stsp Exp $ | 1 | .\" $OpenBSD: wcswidth.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ |
2 | .\" | ||
2 | .\" Copyright (c) 2002 Tim J. Robbins | 3 | .\" Copyright (c) 2002 Tim J. Robbins |
3 | .\" All rights reserved. | 4 | .\" All rights reserved. |
4 | .\" | 5 | .\" |
@@ -23,8 +24,7 @@ | |||
23 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 24 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
24 | .\" SUCH DAMAGE. | 25 | .\" SUCH DAMAGE. |
25 | .\" | 26 | .\" |
26 | .\" | 27 | .Dd $Mdocdate: July 25 2011 $ |
27 | .Dd $Mdocdate: April 4 2011 $ | ||
28 | .Dt WCSWIDTH 3 | 28 | .Dt WCSWIDTH 3 |
29 | .Os | 29 | .Os |
30 | .Sh NAME | 30 | .Sh NAME |
@@ -52,9 +52,18 @@ is an empty string (L""), | |||
52 | otherwise it returns the number of column positions occupied. | 52 | otherwise it returns the number of column positions occupied. |
53 | .Sh SEE ALSO | 53 | .Sh SEE ALSO |
54 | .Xr iswprint 3 , | 54 | .Xr iswprint 3 , |
55 | .Xr strlen 3 , | ||
56 | .Xr wcslen 3 , | ||
55 | .Xr wcwidth 3 | 57 | .Xr wcwidth 3 |
56 | .Sh STANDARDS | 58 | .Sh STANDARDS |
57 | The | 59 | The |
58 | .Fn wcswidth | 60 | .Fn wcswidth |
59 | function conforms to | 61 | function conforms to |
60 | .St -p1003.1-2001 . | 62 | .St -p1003.1-2001 . |
63 | .Sh HISTORY | ||
64 | The | ||
65 | .Fn wcswidth | ||
66 | function was ported from | ||
67 | .Nx | ||
68 | and first appeared in | ||
69 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wmemchr.3 b/src/lib/libc/string/wmemchr.3 index 9d95015468..21df1aaa88 100644 --- a/src/lib/libc/string/wmemchr.3 +++ b/src/lib/libc/string/wmemchr.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wmemchr.3,v 1.9 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wmemchr.3,v 1.8 2011/07/09 16:46:58 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WMEMCHR 3 | 35 | .Dt WMEMCHR 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -57,6 +57,7 @@ if no such wide character exists within | |||
57 | .Fa len | 57 | .Fa len |
58 | wide characters. | 58 | wide characters. |
59 | .Sh SEE ALSO | 59 | .Sh SEE ALSO |
60 | .Xr memchr 3 , | ||
60 | .Xr wcschr 3 , | 61 | .Xr wcschr 3 , |
61 | .Xr wcscspn 3 , | 62 | .Xr wcscspn 3 , |
62 | .Xr wcspbrk 3 , | 63 | .Xr wcspbrk 3 , |
@@ -71,3 +72,10 @@ function conforms to | |||
71 | .St -isoC-99 | 72 | .St -isoC-99 |
72 | and was first introduced in | 73 | and was first introduced in |
73 | .St -isoC-amd1 . | 74 | .St -isoC-amd1 . |
75 | .Sh HISTORY | ||
76 | The | ||
77 | .Fn wmemchr | ||
78 | function was ported from | ||
79 | .Nx | ||
80 | and first appeared in | ||
81 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wmemcmp.3 b/src/lib/libc/string/wmemcmp.3 index e1d56ec30e..6006b4e5c1 100644 --- a/src/lib/libc/string/wmemcmp.3 +++ b/src/lib/libc/string/wmemcmp.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wmemcmp.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wmemcmp.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WMEMCMP 3 | 35 | .Dt WMEMCMP 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -59,8 +59,9 @@ otherwise the difference between the first two differing wide characters is | |||
59 | returned. | 59 | returned. |
60 | Zero-length wide strings are always identical. | 60 | Zero-length wide strings are always identical. |
61 | .Sh SEE ALSO | 61 | .Sh SEE ALSO |
62 | .Xr memcmp 3 , | ||
62 | .Xr wcscasecmp 3 , | 63 | .Xr wcscasecmp 3 , |
63 | .Xr wcscmp 3 , | 64 | .Xr wcscmp 3 |
64 | .Sh STANDARDS | 65 | .Sh STANDARDS |
65 | The | 66 | The |
66 | .Fn wmemcmp | 67 | .Fn wmemcmp |
@@ -68,3 +69,10 @@ function conforms to | |||
68 | .St -isoC-99 | 69 | .St -isoC-99 |
69 | and was first introduced in | 70 | and was first introduced in |
70 | .St -isoC-amd1 . | 71 | .St -isoC-amd1 . |
72 | .Sh HISTORY | ||
73 | The | ||
74 | .Fn wmemcmp | ||
75 | function was ported from | ||
76 | .Nx | ||
77 | and first appeared in | ||
78 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wmemcpy.3 b/src/lib/libc/string/wmemcpy.3 index 9147bb7964..1102640ad4 100644 --- a/src/lib/libc/string/wmemcpy.3 +++ b/src/lib/libc/string/wmemcpy.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wmemcpy.3,v 1.3 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wmemcpy.3,v 1.2 2011/07/09 16:46:58 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WMEMCPY 3 | 35 | .Dt WMEMCPY 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -56,6 +56,7 @@ The | |||
56 | function returns the original value of | 56 | function returns the original value of |
57 | .Fa dst . | 57 | .Fa dst . |
58 | .Sh SEE ALSO | 58 | .Sh SEE ALSO |
59 | .Xr memcpy 3 , | ||
59 | .Xr wcscpy 3 , | 60 | .Xr wcscpy 3 , |
60 | .Xr wcslcpy 3 , | 61 | .Xr wcslcpy 3 , |
61 | .Xr wmemmove 3 | 62 | .Xr wmemmove 3 |
@@ -66,12 +67,19 @@ function conforms to | |||
66 | .St -isoC-99 | 67 | .St -isoC-99 |
67 | and was first introduced in | 68 | and was first introduced in |
68 | .St -isoC-amd1 . | 69 | .St -isoC-amd1 . |
69 | .Sh BUGS | 70 | .Sh HISTORY |
71 | The | ||
72 | .Fn wmemcpy | ||
73 | function was ported from | ||
74 | .Nx | ||
75 | and first appeared in | ||
76 | .Ox 3.8 . | ||
77 | .Sh CAVEATS | ||
70 | In this implementation | 78 | In this implementation |
71 | .Fn wmemcpy | 79 | .Fn wmemcpy |
72 | is implemented using | 80 | is implemented using |
73 | .Xr bcopy 3 , | 81 | .Xr bcopy 3 , |
74 | and therefore the buffers may overlap. | 82 | and therefore the buffers may overlap. |
75 | On other systems, copying overlapping buffers may produce surprises. | 83 | On other systems, copying overlapping buffers may produce surprises. |
76 | A simpler solution is to not use | 84 | A portable, safe solution is to use |
77 | .Fn wmemcpy . | 85 | .Xr wmemmove 3 . |
diff --git a/src/lib/libc/string/wmemmove.3 b/src/lib/libc/string/wmemmove.3 index b018bd5cbc..45daa854ba 100644 --- a/src/lib/libc/string/wmemmove.3 +++ b/src/lib/libc/string/wmemmove.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wmemmove.3,v 1.2 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wmemmove.3,v 1.1 2011/07/09 16:32:11 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WMEMMOVE 3 | 35 | .Dt WMEMMOVE 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -58,6 +58,7 @@ The | |||
58 | function returns the original value of | 58 | function returns the original value of |
59 | .Fa dst . | 59 | .Fa dst . |
60 | .Sh SEE ALSO | 60 | .Sh SEE ALSO |
61 | .Xr memmove 3 , | ||
61 | .Xr wcscpy 3 , | 62 | .Xr wcscpy 3 , |
62 | .Xr wcslcpy 3 , | 63 | .Xr wcslcpy 3 , |
63 | .Xr wmemcpy 3 | 64 | .Xr wmemcpy 3 |
@@ -68,3 +69,10 @@ function conforms to | |||
68 | .St -isoC-99 | 69 | .St -isoC-99 |
69 | and was first introduced in | 70 | and was first introduced in |
70 | .St -isoC-amd1 . | 71 | .St -isoC-amd1 . |
72 | .Sh HISTORY | ||
73 | The | ||
74 | .Fn wmemmove | ||
75 | function was ported from | ||
76 | .Nx | ||
77 | and first appeared in | ||
78 | .Ox 3.8 . | ||
diff --git a/src/lib/libc/string/wmemset.3 b/src/lib/libc/string/wmemset.3 index f1e52e6a8d..1b840762ec 100644 --- a/src/lib/libc/string/wmemset.3 +++ b/src/lib/libc/string/wmemset.3 | |||
@@ -1,3 +1,5 @@ | |||
1 | .\" $OpenBSD: wmemset.3,v 1.3 2011/07/25 00:38:53 schwarze Exp $ | ||
2 | .\" | ||
1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. | 3 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | 4 | .\" All rights reserved. |
3 | .\" | 5 | .\" |
@@ -29,9 +31,7 @@ | |||
29 | .\" 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 |
30 | .\" SUCH DAMAGE. | 32 | .\" SUCH DAMAGE. |
31 | .\" | 33 | .\" |
32 | .\" $OpenBSD: wmemset.3,v 1.2 2011/07/09 16:46:58 nicm Exp $ | 34 | .Dd $Mdocdate: July 25 2011 $ |
33 | .\" | ||
34 | .Dd $Mdocdate: July 9 2011 $ | ||
35 | .Dt WMEMSET 3 | 35 | .Dt WMEMSET 3 |
36 | .Os | 36 | .Os |
37 | .Sh NAME | 37 | .Sh NAME |
@@ -55,6 +55,8 @@ The | |||
55 | .Fn wmemset | 55 | .Fn wmemset |
56 | function returns the original value of | 56 | function returns the original value of |
57 | .Fa s . | 57 | .Fa s . |
58 | .Sh SEE ALSO | ||
59 | .Xr memset 3 | ||
58 | .Sh STANDARDS | 60 | .Sh STANDARDS |
59 | The | 61 | The |
60 | .Fn wmemset | 62 | .Fn wmemset |
@@ -62,3 +64,10 @@ function conforms to | |||
62 | .St -isoC-99 | 64 | .St -isoC-99 |
63 | and was first introduced in | 65 | and was first introduced in |
64 | .St -isoC-amd1 . | 66 | .St -isoC-amd1 . |
67 | .Sh HISTORY | ||
68 | The | ||
69 | .Fn wmemset | ||
70 | function was ported from | ||
71 | .Nx | ||
72 | and first appeared in | ||
73 | .Ox 3.8 . | ||