From 2ba017a2d5af01cc3ef0dc554252a521e8d7c4f8 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 3 Oct 2008 13:59:52 +0000 Subject: - use c89-style comments Closes issue #5194 --- libc/string/generic/strtok_r.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'libc/string/generic') 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; -- cgit v1.2.3