summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2fab7c7)
raw | patch | inline | side by side (parent: 2fab7c7)
author | Max Kellermann <max@duempel.org> | |
Thu, 7 Nov 2013 22:33:30 +0000 (23:33 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 7 Nov 2013 22:33:30 +0000 (23:33 +0100) |
src/charset.c | patch | blob | history | |
src/match.c | patch | blob | history |
diff --git a/src/charset.c b/src/charset.c
index 157e022e48a0c3bd30c34544cdfcce786d547ec7..909e77656faca5a9b18bf769271f0afa8956da3a 100644 (file)
--- a/src/charset.c
+++ b/src/charset.c
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 b5d4c30f2422618a0a6f3ee125d2420f8ff4c5f5..81a70f7f7d48fcd137434a82febec112880fa401 100644 (file)
--- a/src/match.c
+++ b/src/match.c
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);