summaryrefslogtreecommitdiff
path: root/libc/string/generic
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/generic')
-rw-r--r--libc/string/generic/strtok_r.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libc/string/generic/strtok_r.c b/libc/string/generic/strtok_r.c
index d082d226e..7648212f7 100644
--- a/libc/string/generic/strtok_r.c
+++ b/libc/string/generic/strtok_r.c
@@ -29,17 +29,17 @@
# define __rawmemchr strchr
/* Experimentally off - libc_hidden_proto(strchr) */
#endif
-
-/* Parse S into tokens separated by characters in DELIM.
+#if 0
+ Parse S into tokens separated by characters in DELIM.
If S is NULL, the saved pointer in SAVE_PTR is used as
the next starting point. For example:
char s[] = "-abc-=-def";
char *sp;
- x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
- x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
- x = strtok_r(NULL, "=", &sp); // x = NULL
- // s = "abc\0-def\0"
-*/
+ x = strtok_r(s, "-", &sp); /* x = "abc", sp = "=-def" */
+ x = strtok_r(NULL, "-=", &sp); /* x = "def", sp = NULL */
+ x = strtok_r(NULL, "=", &sp); /* x = NULL */
+ /* s = "abc\0-def\0" */
+#endif
char *strtok_r (char *s, const char *delim, char **save_ptr)
{
char *token;