aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-10 19:58:19 +0100
committerMax Kellermann <max@duempel.org>2008-12-10 19:58:19 +0100
commit03e185fda80186b470b9ed4a7dea03096314ab9f (patch)
tree6c0f82388c383c63bc1965c32a775e30e8867790
parentde82a840d22c418351036c09a7fb466d1ffb4efd (diff)
downloadmpd-03e185fda80186b470b9ed4a7dea03096314ab9f.tar.gz
mpd-03e185fda80186b470b9ed4a7dea03096314ab9f.tar.xz
mpd-03e185fda80186b470b9ed4a7dea03096314ab9f.zip
match: case sensitive search with --enable-mini
Drop support for the expensive case insensitive search in ncmpc-mini mode.
-rw-r--r--src/Makefile.am2
-rw-r--r--src/match.h16
2 files changed, 17 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index f16e775b1..c91df2676 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -67,7 +67,6 @@ ncmpc_SOURCES = \
list_window.c\
colors.c\
charset.c \
- match.c \
wreadln.c\
strfsong.c\
utils.c\
@@ -77,6 +76,7 @@ if NCMPC_MINI
else
ncmpc_SOURCES += \
hscroll.c \
+ match.c \
conf.c
endif
diff --git a/src/match.h b/src/match.h
index 1bb6ca33d..bd25805e3 100644
--- a/src/match.h
+++ b/src/match.h
@@ -19,8 +19,22 @@
#ifndef MATCH_H
#define MATCH_H
+#include "config.h"
+
#include <stdbool.h>
+#ifdef NCMPC_MINI
+
+#include <string.h>
+
+static inline bool
+match_line(const char *line, const char *needle)
+{
+ return strstr(line, needle) != NULL;
+}
+
+#else
+
/**
* Checks whether the specified line matches the search string. Case
* is ignored.
@@ -29,3 +43,5 @@ bool
match_line(const char *line, const char *needle);
#endif
+
+#endif