Loading...
--- Libc/Libc-1725.40.4/string/FreeBSD/wcstok.3
+++ Libc/Libc-583/string/FreeBSD/wcstok.3
@@ -60,32 +60,28 @@
.Sh SYNOPSIS
.In wchar.h
.Ft wchar_t *
-.Fo wcstok
-.Fa "wchar_t *restrict ws1"
-.Fa "const wchar_t *restrict ws2"
-.Fa "wchar_t **restrict ptr"
-.Fc
+.Fn wcstok "wchar_t * restrict str" "const wchar_t * restrict sep" "wchar_t ** restrict last"
.Sh DESCRIPTION
The
.Fn wcstok
function
is used to isolate sequential tokens in a null-terminated wide character
string,
-.Fa ws1 .
+.Fa str .
These tokens are separated in the string by at least one of the
characters in
-.Fa ws2 .
+.Fa sep .
The first time that
.Fn wcstok
is called,
-.Fa ws1
+.Fa str
should be specified; subsequent calls, wishing to obtain further tokens
from the same string, should pass a null pointer instead.
The separator string,
-.Fa ws2 ,
+.Fa sep ,
must be supplied each time, and may change between calls.
-The context pointer,
-.Fa ptr ,
+The context pointer
+.Fa last
must be provided on each call.
.Pp
The
@@ -103,8 +99,8 @@
.Sh EXAMPLES
The following code fragment splits a wide character string on
.Tn ASCII
-space, tab, and newline characters,
-writing the resulting tokens to standard output:
+space, tab and newline characters and writes the tokens to
+standard output:
.Bd -literal -offset indent
const wchar_t *seps = L" \et\en";
wchar_t *last, *tok, text[] = L" \enone\ettwo\et\etthree \en";
@@ -118,7 +114,7 @@
.Fn wcstok
omit the
context pointer argument,
-.Fa ptr ,
+.Fa last ,
and maintain state across calls in a static variable like
.Fn strtok
does.