[MPlayer-cvslog] r32793 - trunk/sub/subreader.c

cboesch subversion at mplayerhq.hu
Mon Jan 17 20:45:41 CET 2011


Author: cboesch
Date: Mon Jan 17 20:45:40 2011
New Revision: 32793

Log:
Rename strcpy_strip_ext to strcpy_strip_ext_lower.
strcpy_strip_ext is another function I will need.

Modified:
   trunk/sub/subreader.c

Modified: trunk/sub/subreader.c
==============================================================================
--- trunk/sub/subreader.c	Sun Jan 16 13:18:39 2011	(r32792)
+++ trunk/sub/subreader.c	Mon Jan 17 20:45:40 2011	(r32793)
@@ -1847,6 +1847,11 @@ static void strcpy_strip_ext(char *d, co
 	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 @@ static void append_dir_subtitles(struct 
 
     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 @@ static void append_dir_subtitles(struct 
 	    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);
 


More information about the MPlayer-cvslog mailing list