From: Max Kellermann Date: Wed, 10 Dec 2008 18:47:56 +0000 (+0100) Subject: support: removed fallback strcasestr() implementation X-Git-Tag: release-0.13~77 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d35bfe6d57bbd1adb830d7f7ae7ebc3c7dc9e644;p=ncmpc.git support: removed fallback strcasestr() implementation The code which used to call strcasestr() has been converted to match_line(). --- diff --git a/configure.ac b/configure.ac index e85570b..ebc19fd 100644 --- a/configure.ac +++ b/configure.ac @@ -27,12 +27,6 @@ AC_CHECK_HEADER([locale.h], ,) -dnl -dnl Check for functions -dnl -AC_CHECK_FUNCS([strcasestr]) - - dnl dnl ncmpc-mini dnl diff --git a/src/support.c b/src/support.c index 68dc558..3dbebd0 100644 --- a/src/support.c +++ b/src/support.c @@ -24,25 +24,6 @@ #include #include -#ifndef HAVE_STRCASESTR -const char * -strcasestr(const char *haystack, const char *needle) -{ - char *haystack2 = g_utf8_strdown(haystack, -1); - char *needle2 = g_utf8_strdown(needle, -1); - char *result; - - assert(haystack != NULL); - assert(needle != NULL); - - result = strstr(haystack2, needle2); - g_free(haystack2); - g_free(needle2); - - return haystack + (result - haystack2); -} -#endif /* HAVE_STRCASESTR */ - #ifndef NCMPC_MINI // FIXME: utf-8 length diff --git a/src/support.h b/src/support.h index bebbbda..4886292 100644 --- a/src/support.h +++ b/src/support.h @@ -24,10 +24,6 @@ #include -#ifndef HAVE_STRCASESTR -const char *strcasestr(const char *haystack, const char *needle); -#endif - #ifndef NCMPC_MINI typedef struct {