Libc-763.13.tar.gz
[apple/libc.git] / string / strtok.3
index bc90987344b6ca2a68c23107f32f693688b8adaa..25b9179be126c31a75564d9fa85c3dad3f1f4d9a 100644 (file)
 .\"    disclaimer in the documentation and/or other materials provided
 .\"    with the distribution.
 .\"
-.\" 3. All advertising materials mentioning features or use of this
-.\"    software must display the following acknowledgement:
-.\"
-.\"    This product includes software developed by Softweyr LLC, the
-.\"      University of California, Berkeley, and its contributors.
-.\"
 .\" 4. Neither the name of Softweyr LLC, the University nor the names
 .\"    of its contributors may be used to endorse or promote products
 .\"    derived from this software without specific prior written
@@ -48,7 +42,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\"     @(#)strtok.3   8.2 (Berkeley) 2/3/94
-.\" $FreeBSD: src/lib/libc/string/strtok.3,v 1.22 2001/10/01 16:09:00 ru Exp $
+.\" $FreeBSD: src/lib/libc/string/strtok.3,v 1.26 2007/12/12 18:33:06 wes Exp $
 .\"
 .Dd November 27, 1998
 .Dt STRTOK 3
 .Sh SYNOPSIS
 .In string.h
 .Ft char *
-.Fn strtok "char *str" "const char *sep"
+.Fo strtok
+.Fa "char *restrict str"
+.Fa "const char *restrict sep"
+.Fc
 .Ft char *
-.Fn strtok_r "char *str" "const char *sep" "char **last"
+.Fo strtok_r
+.Fa "char *restrict str"
+.Fa "const char *restrict sep"
+.Fa "char **restrict lasts"
+.Fc
 .Sh DESCRIPTION
 .Bf -symbolic
 This interface is obsoleted by
@@ -98,7 +99,9 @@ function is a reentrant version of
 The context pointer
 .Fa last
 must be provided on each call.
+The
 .Fn strtok_r
+function
 may also be used to nest two parsing loops within one another, as
 long as separate context pointers are used.
 .Pp
@@ -145,13 +148,22 @@ for (word = strtok_r(test, sep, &brkt);
 .Xr strrchr 3 ,
 .Xr strsep 3 ,
 .Xr strspn 3 ,
-.Xr strstr 3
+.Xr strstr 3 ,
+.Xr wcstok 3
 .Sh STANDARDS
 The
 .Fn strtok
 function
 conforms to
 .St -isoC .
+.Sh AUTHORS
+.An Wes Peters ,
+Softweyr LLC:
+.Aq wes@softweyr.com
+.Pp
+Based on the
+.Fx 3.0
+implementation.
 .Sh BUGS
 The System V
 .Fn strtok ,
@@ -165,11 +177,3 @@ value.
 Since this implementation always alters the next starting point,
 such a sequence of calls would always return
 .Dv NULL .
-.Sh AUTHORS
-.An Wes Peters ,
-Softweyr LLC:
-.Aq wes@softweyr.com
-.Pp
-Based on the
-.Fx 3.0
-implementation.