[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Remove stupid unused strtok() function.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 7d0d88685f797088c2f8e5e41055c2ad29552b4d
# Parent  2947b0df5ffabd3a70af384a8c6d6339142c7af7
Remove stupid unused strtok() function.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 2947b0df5ffa -r 7d0d88685f79 xen/common/string.c
--- a/xen/common/string.c       Sun Oct 30 22:28:32 2005
+++ b/xen/common/string.c       Sun Oct 30 22:30:41 2005
@@ -4,17 +4,6 @@
  *  Copyright (C) 1991, 1992  Linus Torvalds
  */
 
-/*
- * stupid library routines.. The optimized versions should generally be found
- * as inline code in <asm-xx/string.h>
- *
- * These are buggy as well..
- *
- * * Fri Jun 25 1999, Ingo Oeser <ioe@xxxxxxxxxxxxxxxxxxxxxxxxx>
- * -  Added strsep() which will replace strtok() soon (because strsep() is
- *    reentrant and should be faster). Use only strsep() in new code, please.
- */
- 
 #include <xen/types.h>
 #include <xen/string.h>
 #include <xen/ctype.h>
@@ -52,8 +41,6 @@
 }
 #endif
 
-char * ___strtok;
-
 #ifndef __HAVE_ARCH_STRCPY
 /**
  * strcpy - Copy a %NUL terminated string
@@ -313,35 +300,6 @@
                }
        }
        return NULL;
-}
-#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
 
diff -r 2947b0df5ffa -r 7d0d88685f79 xen/include/xen/string.h
--- a/xen/include/xen/string.h  Sun Oct 30 22:28:32 2005
+++ b/xen/include/xen/string.h  Sun Oct 30 22:30:41 2005
@@ -9,9 +9,7 @@
 
 #define __kernel_size_t size_t
 
-extern char * ___strtok;
 extern char * strpbrk(const char *,const char *);
-extern char * strtok(char *,const char *);
 extern char * strsep(char **,const char *);
 extern __kernel_size_t strspn(const char *,const char *);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.