From: Max Kellermann Date: Wed, 10 Dec 2008 18:58:19 +0000 (+0100) Subject: match: case sensitive search with --enable-mini X-Git-Tag: release-0.13~74 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=03e185fda80186b470b9ed4a7dea03096314ab9f;p=ncmpc.git match: case sensitive search with --enable-mini Drop support for the expensive case insensitive search in ncmpc-mini mode. --- diff --git a/src/Makefile.am b/src/Makefile.am index f16e775..c91df26 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 1bb6ca3..bd25805 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