aboutsummaryrefslogtreecommitdiffstats
path: root/src/match.h
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 /src/match.h
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.
Diffstat (limited to 'src/match.h')
-rw-r--r--src/match.h16
1 files changed, 16 insertions, 0 deletions
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