summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5a4d469)
raw | patch | inline | side by side (parent: 5a4d469)
author | Max Kellermann <max@duempel.org> | |
Wed, 10 Dec 2008 18:47:56 +0000 (19:47 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 10 Dec 2008 18:47:56 +0000 (19:47 +0100) |
The code which used to call strcasestr() has been converted to
match_line().
match_line().
configure.ac | patch | blob | history | |
src/support.c | patch | blob | history | |
src/support.h | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index e85570bd4bef1c07ef75778245c3620eb239e4bd..ebc19fdeaddec6467b9d795fc4a1d2fca16fd176 100644 (file)
--- a/configure.ac
+++ b/configure.ac
,)
-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 68dc558873cff4830e0ffabd9e7cb827864bdf72..3dbebd0e12f0bd5bb1fb06a1dbec1774835b88ef 100644 (file)
--- a/src/support.c
+++ b/src/support.c
#include <ctype.h>
#include <string.h>
-#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 bebbbdad0c60fa05762fb9d8230b763135e5984e..4886292362d0e4651badfc57c1ecb48dc5bdec2d 100644 (file)
--- a/src/support.h
+++ b/src/support.h
#include <glib.h>
-#ifndef HAVE_STRCASESTR
-const char *strcasestr(const char *haystack, const char *needle);
-#endif
-
#ifndef NCMPC_MINI
typedef struct {