WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Remove stupid unused strtok() function.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 31 Oct 2005 10:50:09 +0000
Delivery-date: Mon, 31 Oct 2005 10:47:58 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Remove stupid unused strtok() function., Xen patchbot -unstable <=