# HG changeset patch # User cboesch # Date 1295293540 0 # Node ID 7a79424a81acf50fb600037ed5ebf3701ace0017 # Parent d39425c8fe53776644db1499b7848ad0da441348 Rename strcpy_strip_ext to strcpy_strip_ext_lower. strcpy_strip_ext is another function I will need. diff -r d39425c8fe53 -r 7a79424a81ac sub/subreader.c --- a/sub/subreader.c Sun Jan 16 12:18:39 2011 +0000 +++ b/sub/subreader.c Mon Jan 17 19:45:40 2011 +0000 @@ -1847,6 +1847,11 @@ strncpy(d, s, tmp-s); d[tmp-s] = 0; } +} + +static void strcpy_strip_ext_lower(char *d, const char *s) +{ + strcpy_strip_ext(d, s); while (*d) { *d = tolower(*d); d++; @@ -1929,7 +1934,7 @@ tmpresult = malloc(len); - strcpy_strip_ext(f_fname_noext, f_fname); + strcpy_strip_ext_lower(f_fname_noext, f_fname); strcpy_trim(f_fname_trim, f_fname_noext); tmp_sub_id = NULL; @@ -1947,7 +1952,7 @@ mp_msg(MSGT_SUBREADER, MSGL_INFO, "Load subtitles in %s\n", path); while ((de = readdir(d))) { // retrieve various parts of the filename - strcpy_strip_ext(tmp_fname_noext, de->d_name); + strcpy_strip_ext_lower(tmp_fname_noext, de->d_name); strcpy_get_ext(tmp_fname_ext, de->d_name); strcpy_trim(tmp_fname_trim, tmp_fname_noext);