summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 21:59:02 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2014-05-31 21:59:02 -0700
commite2106f716f1aa4dace42a160dfecbf72c643342a (patch)
tree6fec5e4efbffc6a47513c120920c89237d607256
parent05757e21b7b51d1f59137693f051b19742d28072 (diff)
Remove unused uStrCasePrefix fallback for strncasecmp
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--utils.c22
-rw-r--r--utils.h4
2 files changed, 0 insertions, 26 deletions
diff --git a/utils.c b/utils.c
index 5f08204..a931e75 100644
--- a/utils.c
+++ b/utils.c
@@ -171,26 +171,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 5d04437..370311b 100644
--- a/utils.h
+++ b/utils.h
@@ -70,13 +70,9 @@ extern void uInternalError(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2);
#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
/***====================================================================***/