]> git.saurik.com Git - apple/libc.git/blame - string/FreeBSD/wcstok.3.patch
Libc-498.1.7.tar.gz
[apple/libc.git] / string / FreeBSD / wcstok.3.patch
CommitLineData
224c7076
A
1--- _SB/Libc/string/FreeBSD/wcstok.3 2003-05-20 15:23:56.000000000 -0700
2+++ _SB/Libc/string/FreeBSD/wcstok.3.edit 2006-06-28 16:55:53.000000000 -0700
3@@ -60,28 +60,32 @@
4 .Sh SYNOPSIS
5 .In wchar.h
6 .Ft wchar_t *
7-.Fn wcstok "wchar_t * restrict str" "const wchar_t * restrict sep" "wchar_t ** restrict last"
8+.Fo wcstok
9+.Fa "wchar_t *restrict ws1"
10+.Fa "const wchar_t *restrict ws2"
11+.Fa "wchar_t **restrict ptr"
12+.Fc
13 .Sh DESCRIPTION
14 The
15 .Fn wcstok
16 function
17 is used to isolate sequential tokens in a null-terminated wide character
18 string,
19-.Fa str .
20+.Fa ws1 .
21 These tokens are separated in the string by at least one of the
22 characters in
23-.Fa sep .
24+.Fa ws2 .
25 The first time that
26 .Fn wcstok
27 is called,
28-.Fa str
29+.Fa ws1
30 should be specified; subsequent calls, wishing to obtain further tokens
31 from the same string, should pass a null pointer instead.
32 The separator string,
33-.Fa sep ,
34+.Fa ws2 ,
35 must be supplied each time, and may change between calls.
36-The context pointer
37-.Fa last
38+The context pointer,
39+.Fa ptr ,
40 must be provided on each call.
41 .Pp
42 The
43@@ -99,8 +103,8 @@
44 .Sh EXAMPLES
45 The following code fragment splits a wide character string on
46 .Tn ASCII
47-space, tab and newline characters and writes the tokens to
48-standard output:
49+space, tab, and newline characters,
50+writing the resulting tokens to standard output:
51 .Bd -literal -offset indent
52 const wchar_t *seps = L" \et\en";
53 wchar_t *last, *tok, text[] = L" \enone\ettwo\et\etthree \en";
54@@ -114,7 +118,7 @@
55 .Fn wcstok
56 omit the
57 context pointer argument,
58-.Fa last ,
59+.Fa ptr ,
60 and maintain state across calls in a static variable like
61 .Fn strtok
62 does.