[OpenBIOS] [commit] r742 - in trunk/openbios-devel: include/libc libc

repository service svn at openbios.org
Thu Apr 15 18:42:50 CEST 2010


Author: blueswirl
Date: Thu Apr 15 18:42:49 2010
New Revision: 742
URL: http://tracker.coreboot.org/trac/openbios/changeset/742

Log:
Remove unused strtok()

Signed-off-by: Blue Swirl <blauwirbel at gmail.com>

Modified:
   trunk/openbios-devel/include/libc/string.h
   trunk/openbios-devel/libc/string.c

Modified: trunk/openbios-devel/include/libc/string.h
==============================================================================
--- trunk/openbios-devel/include/libc/string.h	Mon Apr 12 22:02:53 2010	(r741)
+++ trunk/openbios-devel/include/libc/string.h	Thu Apr 15 18:42:49 2010	(r742)
@@ -39,7 +39,6 @@
 extern size_t	strnlen(const char * s, size_t count);
 extern size_t	strspn(const char *s, const char *accept);
 extern char 	*strpbrk(const char * cs,const char * ct);
-extern char 	*strtok(char * s,const char * ct);
 extern char 	*strsep(char **s, const char *ct);
 extern void	*memset(void * s,int c,size_t count);
 extern char 	*bcopy(const char * src, char * dest, int count);

Modified: trunk/openbios-devel/libc/string.c
==============================================================================
--- trunk/openbios-devel/libc/string.c	Mon Apr 12 22:02:53 2010	(r741)
+++ trunk/openbios-devel/libc/string.c	Thu Apr 15 18:42:49 2010	(r742)
@@ -50,8 +50,6 @@
 	return (int)c1 - (int)c2;
 }
 
-static char * ___strtok;
-
 /**
  * strcpy - Copy a %NUL terminated string
  * @dest: Where to copy the string to
@@ -266,33 +264,6 @@
 }
 
 /**
- * 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);
-}
-
-/**
  * strsep - Split a string into tokens
  * @s: The string to be searched
  * @ct: The characters to search for



More information about the OpenBIOS mailing list