diff options
Diffstat (limited to 'src/lib/libc/string/wcstok.3')
-rw-r--r-- | src/lib/libc/string/wcstok.3 | 25 |
1 files changed, 20 insertions, 5 deletions
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. |