strstr() is no longer used in the kernel. G/C it.
This commit is contained in:
parent
e2b24925d1
commit
b9ded015f4
|
@ -1,68 +0,0 @@
|
||||||
/* $NetBSD: strstr.c,v 1.1 2001/03/04 08:25:39 matt Exp $ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (c) 1990 The Regents of the University of California.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This code is derived from software contributed to Berkeley by
|
|
||||||
* Chris Torek.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
* 3. All advertising materials mentioning features or use of this software
|
|
||||||
* must display the following acknowledgement:
|
|
||||||
* This product includes software developed by the University of
|
|
||||||
* California, Berkeley and its contributors.
|
|
||||||
* 4. Neither the name of the University nor the names of its contributors
|
|
||||||
* may be used to endorse or promote products derived from this software
|
|
||||||
* without specific prior written permission.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
||||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
||||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
||||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
||||||
* SUCH DAMAGE.
|
|
||||||
*
|
|
||||||
* from: strstr.c,v 1.4 1995/06/15 00:08:43 jtc Exp
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/systm.h>
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Find the first occurrence of find in s.
|
|
||||||
*/
|
|
||||||
|
|
||||||
char *
|
|
||||||
strstr(s, find)
|
|
||||||
const char *s, *find;
|
|
||||||
{
|
|
||||||
char c, sc;
|
|
||||||
size_t len;
|
|
||||||
|
|
||||||
if ((c = *find++) != 0) {
|
|
||||||
len = strlen(find);
|
|
||||||
do {
|
|
||||||
do {
|
|
||||||
if ((sc = *s++) == 0)
|
|
||||||
return (NULL);
|
|
||||||
} while (sc != c);
|
|
||||||
} while (strncmp(s, find, len) != 0);
|
|
||||||
s--;
|
|
||||||
}
|
|
||||||
return ((char *)s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* End of strstr.c */
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $NetBSD: files.arm,v 1.26 2001/05/13 13:44:34 bjh21 Exp $
|
# $NetBSD: files.arm,v 1.27 2001/05/13 14:17:36 bjh21 Exp $
|
||||||
|
|
||||||
# temporary define to allow easy moving to ../arch/arm/arm32
|
# temporary define to allow easy moving to ../arch/arm/arm32
|
||||||
defopt ARM32
|
defopt ARM32
|
||||||
|
@ -64,7 +64,6 @@ file arch/arm/arm32/syscall.c arm32
|
||||||
file arch/arm/arm32/sys_machdep.c arm32
|
file arch/arm/arm32/sys_machdep.c arm32
|
||||||
|
|
||||||
# arm32 library functions
|
# arm32 library functions
|
||||||
file arch/arm/arm32/strstr.c arm32
|
|
||||||
file arch/arm/arm32/bcopy_page.S arm32
|
file arch/arm/arm32/bcopy_page.S arm32
|
||||||
file arch/arm/arm32/bcopyinout.S arm32
|
file arch/arm/arm32/bcopyinout.S arm32
|
||||||
file arch/arm/arm32/copystr.S arm32
|
file arch/arm/arm32/copystr.S arm32
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: cpu.h,v 1.11 2001/04/24 18:20:21 bjh21 Exp $ */
|
/* $NetBSD: cpu.h,v 1.12 2001/05/13 14:17:37 bjh21 Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994-1996 Mark Brinicombe.
|
* Copyright (c) 1994-1996 Mark Brinicombe.
|
||||||
|
@ -267,9 +267,6 @@ void userret __P((register struct proc *p));
|
||||||
/* machdep.h */
|
/* machdep.h */
|
||||||
void bootsync __P((void));
|
void bootsync __P((void));
|
||||||
|
|
||||||
/* strstr.c */
|
|
||||||
char *strstr __P((const char *s1, const char *s2));
|
|
||||||
|
|
||||||
/* syscall.c */
|
/* syscall.c */
|
||||||
void child_return __P((void *));
|
void child_return __P((void *));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue