From 03e185fda80186b470b9ed4a7dea03096314ab9f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 10 Dec 2008 19:58:19 +0100 Subject: match: case sensitive search with --enable-mini Drop support for the expensive case insensitive search in ncmpc-mini mode. --- src/Makefile.am | 2 +- src/match.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) 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 +#ifdef NCMPC_MINI + +#include + +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 -- cgit v1.2.3