mirror of https://github.com/mkerrisk/man-pages
strtok.3: Add portability note for strtok_r() '*saveptr' value
On some implementations, '*saveptr' must be NULL on first call to strtok_r(). Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
85987f9818
commit
e72ae85154
|
@ -147,7 +147,7 @@ On the first call to
|
|||
.I str
|
||||
should point to the string to be parsed, and the value of
|
||||
.I *saveptr
|
||||
is ignored.
|
||||
is ignored (but see NOTES).
|
||||
In subsequent calls,
|
||||
.I str
|
||||
should be NULL, and
|
||||
|
@ -189,6 +189,14 @@ POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
|
|||
.TP
|
||||
.BR strtok_r ()
|
||||
POSIX.1-2001, POSIX.1-2008.
|
||||
.SH NOTES
|
||||
On some implementations,
|
||||
.\" Tru64, according to its manual page
|
||||
.I *saveptr
|
||||
is required to be NULL on the first call to
|
||||
.BR strtok_r ()
|
||||
that is being used to parse
|
||||
.IR str .
|
||||
.SH BUGS
|
||||
Be cautious when using these functions.
|
||||
If you do use them, note that:
|
||||
|
|
Loading…
Reference in New Issue