From: Max Kellermann Date: Thu, 7 Nov 2013 22:33:30 +0000 (+0100) Subject: match,charset: add obsolete GLib version checks X-Git-Tag: v0.22~24 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6d69c1f1ebaaf60b1d9a4c58ba17095ca53ccf9c;p=ncmpc.git match,charset: add obsolete GLib version checks --- diff --git a/src/charset.c b/src/charset.c index 157e022..909e776 100644 --- a/src/charset.c +++ b/src/charset.c @@ -39,10 +39,8 @@ charset_init(void) static inline unsigned unicode_char_width(gunichar ch) { -#if GLIB_CHECK_VERSION(2,14,0) if (g_unichar_iszerowidth(ch)) return 0; -#endif if (g_unichar_iswide(ch)) return 2; diff --git a/src/match.c b/src/match.c index b5d4c30..81a70f7 100644 --- a/src/match.c +++ b/src/match.c @@ -74,14 +74,10 @@ match_line(const char *line, const char *needle) char *line_folded = locale_casefold(line); char *needle_folded = locale_casefold(needle); -#if GLIB_CHECK_VERSION(2,14,0) bool ret = (bool)g_regex_match_simple((const gchar*)needle_folded, (const gchar*)line_folded, G_REGEX_CASELESS | G_REGEX_DOTALL | G_REGEX_OPTIMIZE, 0); -#else - bool ret = strstr(line_folded, needle_folded) != NULL; -#endif g_free(line_folded); g_free(needle_folded);