diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-10-03 13:59:52 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-10-03 13:59:52 +0000 |
commit | 2ba017a2d5af01cc3ef0dc554252a521e8d7c4f8 (patch) | |
tree | 0e0db7e3fbb4fbe1be3c56ad6c80bb7d63effb93 /libc/string/generic | |
parent | 94bbeb72728193288f2bf071cf0e40293499045b (diff) |
- use c89-style comments
Closes issue #5194
Diffstat (limited to 'libc/string/generic')
-rw-r--r-- | libc/string/generic/strtok_r.c | 14 |
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; |