From dbbc677985e3a853f2e52b8a9d09660d3fa6d983 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 26 May 2014 16:10:33 -0700 Subject: Remove unused uStrCasePrefix fallback for strncasecmp Signed-off-by: Alan Coopersmith --- utils.c | 22 ---------------------- utils.h | 4 ---- 2 files changed, 26 deletions(-) diff --git a/utils.c b/utils.c index 877fe92..aa2d8ad 100644 --- a/utils.c +++ b/utils.c @@ -244,26 +244,4 @@ uStrCaseCmp(const char *str1, const char *str2) *s = '\0'; return (strcmp(buf1, buf2)); } - -int -uStrCasePrefix(const char *prefix, const char *str) -{ - char c1; - char c2; - - while (((c1 = *prefix) != '\0') && ((c2 = *str) != '\0')) { - if (isupper(c1)) - c1 = tolower(c1); - if (isupper(c2)) - c2 = tolower(c2); - if (c1 != c2) - return 0; - prefix++; - str++; - } - if (c1 != '\0') - return 0; - return 1; -} - #endif diff --git a/utils.h b/utils.h index 36288f7..4bf5825 100644 --- a/utils.h +++ b/utils.h @@ -120,13 +120,9 @@ extern void uInternalError(const char *s, ...); #define uStrCaseEqual(s1,s2) (uStrCaseCmp(s1,s2)==0) #ifdef HAVE_STRCASECMP #define uStrCaseCmp(s1,s2) (strcasecmp(s1,s2)) -#define uStrCasePrefix(p,s) (strncasecmp(p,s,strlen(p))==0) #else extern int uStrCaseCmp(const char * /* s1 */ , const char * /* s2 */); - -extern int uStrCasePrefix(const char * /* p */ , - const char * /* str */); #endif #ifdef HAVE_STRDUP #define uStringDup(s1) (strdup(s1)) -- cgit v1.2.3