Mercurial > mplayer.hg
changeset 32706:7a79424a81ac
Rename strcpy_strip_ext to strcpy_strip_ext_lower.
strcpy_strip_ext is another function I will need.
author | cboesch |
---|---|
date | Mon, 17 Jan 2011 19:45:40 +0000 |
parents | d39425c8fe53 |
children | 697fd62b65f9 |
files | sub/subreader.c |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);