diff options
author | Max Kellermann <max@duempel.org> | 2008-12-10 19:47:25 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-12-10 19:47:25 +0100 |
commit | 7a3feb12511fa02361f3cdd0e62396c084b143ad (patch) | |
tree | 0e6237f1c98b774ecd1810fca2c2bdbf7288a395 /src/list_window.c | |
parent | ec5c3eef2838a8849acb4bfba5b75171715183fb (diff) | |
download | mpd-7a3feb12511fa02361f3cdd0e62396c084b143ad.tar.gz mpd-7a3feb12511fa02361f3cdd0e62396c084b143ad.tar.xz mpd-7a3feb12511fa02361f3cdd0e62396c084b143ad.zip |
list_window: moved string matching to match.h
Provide the new function match_line() which searches a string for a
needle (ignoring case). This wraps the non-standard function
strcasestr().
Diffstat (limited to 'src/list_window.c')
-rw-r--r-- | src/list_window.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/list_window.c b/src/list_window.c index ea4b3c28e..010deb860 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -20,7 +20,7 @@ #include "config.h" #include "options.h" #include "charset.h" -#include "support.h" +#include "match.h" #include "command.h" #include "colors.h" @@ -223,7 +223,7 @@ list_window_find(struct list_window *lw, do { while ((label = callback(i,&h,callback_data))) { - if (str && label && strcasestr(label, str)) { + if (str && label && match_line(label, str)) { lw->selected = i; return true; } @@ -259,7 +259,7 @@ list_window_rfind(struct list_window *lw, do { while (i >= 0 && (label = callback(i,&h,callback_data))) { - if( str && label && strcasestr(label, str) ) { + if( str && label && match_line(label, str) ) { lw->selected = i; return true; } |