From 538f6fc202b07219ce78de54c0e05ab81e937154 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 21 Feb 2013 17:39:06 -0800 Subject: [PATCH] Stop advertising rindex(3), which is both deprecated and unimplemented. Change-Id: I3c775d9974e49c3f76a53e46e022659657b89034 --- libc/arch-x86/string/rindex.S | 29 ----------------------------- libc/arch-x86/string/strrchr.S | 3 --- libc/include/string.h | 1 - libc/include/strings.h | 1 - 4 files changed, 34 deletions(-) delete mode 100644 libc/arch-x86/string/rindex.S delete mode 100644 libc/arch-x86/string/strrchr.S diff --git a/libc/arch-x86/string/rindex.S b/libc/arch-x86/string/rindex.S deleted file mode 100644 index 0260d384c..000000000 --- a/libc/arch-x86/string/rindex.S +++ /dev/null @@ -1,29 +0,0 @@ -/* $OpenBSD: rindex.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */ -/* - * Written by J.T. Conklin . - * Public domain. - */ - -#include - -#ifdef STRRCHR -ENTRY(strrchr) -#else -ENTRY(rindex) -#endif - pushl %ebx - movl 8(%esp),%edx - movb 12(%esp),%cl - xorl %eax,%eax /* init pointer to null */ - .align 2,0x90 -L1: - movb (%edx),%bl - cmpb %bl,%cl - jne L2 - movl %edx,%eax -L2: - incl %edx - testb %bl,%bl /* null terminator??? */ - jnz L1 - popl %ebx - ret diff --git a/libc/arch-x86/string/strrchr.S b/libc/arch-x86/string/strrchr.S deleted file mode 100644 index 4ee153ff5..000000000 --- a/libc/arch-x86/string/strrchr.S +++ /dev/null @@ -1,3 +0,0 @@ -/* $OpenBSD: strrchr.S,v 1.3 2005/08/07 11:30:38 espie Exp $ */ -#define STRRCHR -#include "rindex.S" diff --git a/libc/include/string.h b/libc/include/string.h index 70e004204..63e768eb7 100644 --- a/libc/include/string.h +++ b/libc/include/string.h @@ -45,7 +45,6 @@ extern void* memmem(const void *, size_t, const void *, size_t) __purefunc; extern void memswap(void *, void *, size_t); extern char* index(const char *, int) __purefunc; -extern char* rindex(const char *, int) __purefunc; extern char* strchr(const char *, int) __purefunc; extern char* strrchr(const char *, int) __purefunc; diff --git a/libc/include/strings.h b/libc/include/strings.h index fbdcefc38..0ee691dec 100644 --- a/libc/include/strings.h +++ b/libc/include/strings.h @@ -47,7 +47,6 @@ void bcopy(const void *, void *, size_t); void bzero(void *, size_t); int ffs(int); char *index(const char *, int); -char *rindex(const char *, int); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, size_t);