diff options
author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-11-17 17:56:41 +0000 |
---|---|---|
committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-11-17 17:56:41 +0000 |
commit | 644c442da3f0cea2a2aa591f57726e3e6de823e2 (patch) | |
tree | f8d49598d16d350059059ce23b758da4afde7b15 /libc/string/generic/strtok_r.c | |
parent | e0c796f1422f3617302e4ecafef6d1f461499eba (diff) | |
download | uClibc-alpine-644c442da3f0cea2a2aa591f57726e3e6de823e2.tar.bz2 uClibc-alpine-644c442da3f0cea2a2aa591f57726e3e6de823e2.tar.xz |
Synch with trunk @ 24075.
Step 4
libc/string and asm implementation
Diffstat (limited to 'libc/string/generic/strtok_r.c')
-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; |