diff options
| author | Dave Jones <davej@suse.de> | 2002-04-02 20:02:51 -0800 |
|---|---|---|
| committer | Dave Jones <davej@suse.de> | 2002-04-02 20:02:51 -0800 |
| commit | c3a7bc4185cf786bfc28317a652a3b90e0fedb09 (patch) | |
| tree | 3ed051d754cab501054df5063baaeca2c6f644b5 /lib/string.c | |
| parent | 0d440bfb4a08ea62946aae14be0d82c6798efd1c (diff) | |
[PATCH] Remove last remaining bits of strtok.
Diffstat (limited to 'lib/string.c')
| -rw-r--r-- | lib/string.c | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/lib/string.c b/lib/string.c index 41a90d37e35a..97aa5eda3631 100644 --- a/lib/string.c +++ b/lib/string.c @@ -13,6 +13,10 @@ * * Fri Jun 25 1999, Ingo Oeser <ioe@informatik.tu-chemnitz.de> * - Added strsep() which will replace strtok() soon (because strsep() is * reentrant and should be faster). Use only strsep() in new code, please. + * + * * Sat Feb 09 2002, Jason Thomas <jason@topic.com.au>, + * Matthew Hawkins <matt@mh.dropbear.id.au> + * - Kissed strtok() goodbye */ #include <linux/types.h> @@ -52,8 +56,6 @@ int strnicmp(const char *s1, const char *s2, size_t len) } #endif -char * ___strtok; - #ifndef __HAVE_ARCH_STRCPY /** * strcpy - Copy a %NUL terminated string @@ -290,35 +292,6 @@ char * strpbrk(const char * cs,const char * ct) } #endif -#ifndef __HAVE_ARCH_STRTOK -/** - * strtok - Split a string into tokens - * @s: The string to be searched - * @ct: The characters to search for - * - * WARNING: strtok is deprecated, use strsep instead. - */ -char * strtok(char * s,const char * ct) -{ - char *sbegin, *send; - - sbegin = s ? s : ___strtok; - if (!sbegin) { - return NULL; - } - sbegin += strspn(sbegin,ct); - if (*sbegin == '\0') { - ___strtok = NULL; - return( NULL ); - } - send = strpbrk( sbegin, ct); - if (send && *send != '\0') - *send++ = '\0'; - ___strtok = send; - return (sbegin); -} -#endif - #ifndef __HAVE_ARCH_STRSEP /** * strsep - Split a string into tokens @@ -452,7 +425,7 @@ void * memmove(void * dest,const void *src,size_t count) int memcmp(const void * cs,const void * ct,size_t count) { const unsigned char *su1, *su2; - signed char res = 0; + int res = 0; for( su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) if ((res = *su1 - *su2) != 0) |
