summaryrefslogtreecommitdiff
path: root/lib/string.c
diff options
context:
space:
mode:
authorRussell King <rmk@flint.arm.linux.org.uk>2002-04-04 11:45:09 +0100
committerRussell King <rmk@flint.arm.linux.org.uk>2002-04-04 11:45:09 +0100
commit94394e5bc92026a2ff31cd03e11e015adfdb3260 (patch)
tree8f24a3e60e98d45ba7416821aadb84508e18d79d /lib/string.c
parent3f4d4f4e46865cb01d2e2717c6906e2ae079c042 (diff)
parent5e4b50795ee8c7659a1181cea4c98712e02ea63e (diff)
Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5
into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
Diffstat (limited to 'lib/string.c')
-rw-r--r--lib/string.c37
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)