diff options
-rw-r--r-- | src/Makefile.am | 2 | ||||
-rw-r--r-- | src/match.h | 16 |
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 |