ia64/xen-unstable

changeset 7583:7d0d88685f79

Remove stupid unused strtok() function.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Oct 30 23:30:41 2005 +0100 (2005-10-30)
parents 2947b0df5ffa
children 8cc7ce549d00
files xen/common/string.c xen/include/xen/string.h
line diff
     1.1 --- a/xen/common/string.c	Sun Oct 30 23:28:32 2005 +0100
     1.2 +++ b/xen/common/string.c	Sun Oct 30 23:30:41 2005 +0100
     1.3 @@ -4,17 +4,6 @@
     1.4   *  Copyright (C) 1991, 1992  Linus Torvalds
     1.5   */
     1.6  
     1.7 -/*
     1.8 - * stupid library routines.. The optimized versions should generally be found
     1.9 - * as inline code in <asm-xx/string.h>
    1.10 - *
    1.11 - * These are buggy as well..
    1.12 - *
    1.13 - * * Fri Jun 25 1999, Ingo Oeser <ioe@informatik.tu-chemnitz.de>
    1.14 - * -  Added strsep() which will replace strtok() soon (because strsep() is
    1.15 - *    reentrant and should be faster). Use only strsep() in new code, please.
    1.16 - */
    1.17 - 
    1.18  #include <xen/types.h>
    1.19  #include <xen/string.h>
    1.20  #include <xen/ctype.h>
    1.21 @@ -52,8 +41,6 @@ int strnicmp(const char *s1, const char 
    1.22  }
    1.23  #endif
    1.24  
    1.25 -char * ___strtok;
    1.26 -
    1.27  #ifndef __HAVE_ARCH_STRCPY
    1.28  /**
    1.29   * strcpy - Copy a %NUL terminated string
    1.30 @@ -316,35 +303,6 @@ char * strpbrk(const char * cs,const cha
    1.31  }
    1.32  #endif
    1.33  
    1.34 -#ifndef __HAVE_ARCH_STRTOK
    1.35 -/**
    1.36 - * strtok - Split a string into tokens
    1.37 - * @s: The string to be searched
    1.38 - * @ct: The characters to search for
    1.39 - *
    1.40 - * WARNING: strtok is deprecated, use strsep instead.
    1.41 - */
    1.42 -char * strtok(char * s,const char * ct)
    1.43 -{
    1.44 -	char *sbegin, *send;
    1.45 -
    1.46 -	sbegin  = s ? s : ___strtok;
    1.47 -	if (!sbegin) {
    1.48 -		return NULL;
    1.49 -	}
    1.50 -	sbegin += strspn(sbegin,ct);
    1.51 -	if (*sbegin == '\0') {
    1.52 -		___strtok = NULL;
    1.53 -		return( NULL );
    1.54 -	}
    1.55 -	send = strpbrk( sbegin, ct);
    1.56 -	if (send && *send != '\0')
    1.57 -		*send++ = '\0';
    1.58 -	___strtok = send;
    1.59 -	return (sbegin);
    1.60 -}
    1.61 -#endif
    1.62 -
    1.63  #ifndef __HAVE_ARCH_STRSEP
    1.64  /**
    1.65   * strsep - Split a string into tokens
     2.1 --- a/xen/include/xen/string.h	Sun Oct 30 23:28:32 2005 +0100
     2.2 +++ b/xen/include/xen/string.h	Sun Oct 30 23:30:41 2005 +0100
     2.3 @@ -9,9 +9,7 @@ extern "C" {
     2.4  
     2.5  #define __kernel_size_t size_t
     2.6  
     2.7 -extern char * ___strtok;
     2.8  extern char * strpbrk(const char *,const char *);
     2.9 -extern char * strtok(char *,const char *);
    2.10  extern char * strsep(char **,const char *);
    2.11  extern __kernel_size_t strspn(const char *,const char *);
    2.12