diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/search.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/apps/plugins/search.c b/apps/plugins/search.c index 55f65f2b2a..8eb13c5842 100644 --- a/apps/plugins/search.c +++ b/apps/plugins/search.c | |||
@@ -40,16 +40,6 @@ static int line_end; /* Index of the end of line */ | |||
40 | char resultfile[MAX_PATH]; | 40 | char resultfile[MAX_PATH]; |
41 | char path[MAX_PATH]; | 41 | char path[MAX_PATH]; |
42 | 42 | ||
43 | static int strpcasecmp(const char *s1, const char *s2) | ||
44 | { | ||
45 | while (*s1 != '\0' && tolower(*s1) == tolower(*s2)) { | ||
46 | s1++; | ||
47 | s2++; | ||
48 | } | ||
49 | |||
50 | return (*s1 == '\0') ; | ||
51 | } | ||
52 | |||
53 | static void fill_buffer(int pos) | 43 | static void fill_buffer(int pos) |
54 | { | 44 | { |
55 | int numread; | 45 | int numread; |
@@ -94,7 +84,7 @@ static void fill_buffer(int pos) | |||
94 | default: | 84 | default: |
95 | if (!found && tolower(buffer[i]) == tolower(search_string[0])) | 85 | if (!found && tolower(buffer[i]) == tolower(search_string[0])) |
96 | { | 86 | { |
97 | found = strpcasecmp(&search_string[0],&buffer[i]) ; | 87 | found = rb->strcasecmp(&search_string[0],&buffer[i]) ; |
98 | } | 88 | } |
99 | break; | 89 | break; |
100 | } | 90 | } |
@@ -152,7 +142,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
152 | rb = api; | 142 | rb = api; |
153 | 143 | ||
154 | /* Check the extension. We only allow .m3u files. */ | 144 | /* Check the extension. We only allow .m3u files. */ |
155 | if(!strpcasecmp(&filename[rb->strlen(filename)-4], ".m3u")) { | 145 | if(!rb->strcasecmp(&filename[rb->strlen(filename)-4], ".m3u")) { |
156 | rb->splash(HZ, true, "Not a .m3u file"); | 146 | rb->splash(HZ, true, "Not a .m3u file"); |
157 | return PLUGIN_ERROR; | 147 | return PLUGIN_ERROR; |
158 | } | 148 | } |