diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-23 15:12:43 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-07-23 15:12:43 +0000 |
| commit | c051eda02824b48000b87e0507b36ed1fda9ff76 (patch) | |
| tree | 25ba53b7ef2b28c81801a2b51bb11cc842fc4cc5 /apps/plugins/search.c | |
| parent | a17df38de7370cf73041a45a2847657719f3f4a4 (diff) | |
| download | rockbox-c051eda02824b48000b87e0507b36ed1fda9ff76.zip rockbox-c051eda02824b48000b87e0507b36ed1fda9ff76.tar.gz rockbox-c051eda02824b48000b87e0507b36ed1fda9ff76.tar.bz2 rockbox-c051eda02824b48000b87e0507b36ed1fda9ff76.tar.xz | |
Added strcasecmp() to the plugin API
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4925 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/search.c')
| -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 55f65f2..8eb13c5 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 */ char resultfile[MAX_PATH]; char path[MAX_PATH]; -static int strpcasecmp(const char *s1, const char *s2) -{ - while (*s1 != '\0' && tolower(*s1) == tolower(*s2)) { - s1++; - s2++; - } - - return (*s1 == '\0') ; -} - static void fill_buffer(int pos) { int numread; @@ -94,7 +84,7 @@ static void fill_buffer(int pos) default: if (!found && tolower(buffer[i]) == tolower(search_string[0])) { - found = strpcasecmp(&search_string[0],&buffer[i]) ; + found = rb->strcasecmp(&search_string[0],&buffer[i]) ; } break; } @@ -152,7 +142,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) rb = api; /* Check the extension. We only allow .m3u files. */ - if(!strpcasecmp(&filename[rb->strlen(filename)-4], ".m3u")) { + if(!rb->strcasecmp(&filename[rb->strlen(filename)-4], ".m3u")) { rb->splash(HZ, true, "Not a .m3u file"); return PLUGIN_ERROR; } |