summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: de82a84)
raw | patch | inline | side by side (parent: de82a84)
author | Max Kellermann <max@duempel.org> | |
Wed, 10 Dec 2008 18:58:19 +0000 (19:58 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 10 Dec 2008 18:58:19 +0000 (19:58 +0100) |
Drop support for the expensive case insensitive search in ncmpc-mini
mode.
mode.
src/Makefile.am | patch | blob | history | |
src/match.h | patch | blob | history |
diff --git a/src/Makefile.am b/src/Makefile.am
index f16e775b18f29bcfaf486b56cb8ab2ab08d682ef..c91df2676a5d82f89c2531832ddc502361c89234 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
list_window.c\
colors.c\
charset.c \
- match.c \
wreadln.c\
strfsong.c\
utils.c\
else
ncmpc_SOURCES += \
hscroll.c \
+ match.c \
conf.c
endif
diff --git a/src/match.h b/src/match.h
index 1bb6ca33dbe02399f9f834a7b06ea68f02efa896..bd25805e30cec9230dcc8018fb2ca5d2933a5e66 100644 (file)
--- a/src/match.h
+++ b/src/match.h
#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.
match_line(const char *line, const char *needle);
#endif
+
+#endif