[MPlayer-cvslog] r34773 - in trunk/gui: ui/gtk/preferences.c util/string.c util/string.h
ib
subversion at mplayerhq.hu
Fri Feb 24 18:26:35 CET 2012
Author: ib
Date: Fri Feb 24 18:26:35 2012
New Revision: 34773
Log:
Remove gstrcasecmp().
This function isn't necessary. strcasecmp() can be used just as well,
because both arguments to the gstrcasecmp() calls have been checked
to be not NULL prior to the call.
Modified:
trunk/gui/ui/gtk/preferences.c
trunk/gui/util/string.c
trunk/gui/util/string.h
Modified: trunk/gui/ui/gtk/preferences.c
==============================================================================
--- trunk/gui/ui/gtk/preferences.c Fri Feb 24 18:16:54 2012 (r34772)
+++ trunk/gui/ui/gtk/preferences.c Fri Feb 24 18:26:35 2012 (r34773)
@@ -319,7 +319,7 @@ void ShowPreferences( void )
{
int i;
for ( i=0;lEncoding[i].name;i++ )
- if ( !gstrcasecmp( sub_cp,lEncoding[i].name ) ) break;
+ if ( !strcasecmp( sub_cp,lEncoding[i].name ) ) break;
if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),lEncoding[i].comment );
}
#endif
@@ -338,7 +338,7 @@ void ShowPreferences( void )
{
int i;
for ( i=0;lEncoding[i].name;i++ )
- if ( !gstrcasecmp( subtitle_font_encoding,lEncoding[i].name ) ) break;
+ if ( !strcasecmp( subtitle_font_encoding,lEncoding[i].name ) ) break;
if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),lEncoding[i].comment );
}
switch ( subtitle_autoscale )
Modified: trunk/gui/util/string.c
==============================================================================
--- trunk/gui/util/string.c Fri Feb 24 18:16:54 2012 (r34772)
+++ trunk/gui/util/string.c Fri Feb 24 18:26:35 2012 (r34773)
@@ -163,16 +163,6 @@ int gstrcmp(const char *a, const char *b
return strcmp(a, b);
}
-int gstrcasecmp(const char *a, const char *b)
-{
- if (!a && !b)
- return 0;
- if (!a || !b)
- return -1;
-
- return strcasecmp(a, b);
-}
-
/**
* @brief A strncmp() that can handle NULL pointers.
*
Modified: trunk/gui/util/string.h
==============================================================================
--- trunk/gui/util/string.h Fri Feb 24 18:16:54 2012 (r34772)
+++ trunk/gui/util/string.h Fri Feb 24 18:26:35 2012 (r34773)
@@ -23,7 +23,6 @@
char *decomment(char *in);
char *fgetstr(char *str, int size, FILE *file);
-int gstrcasecmp(const char *a, const char *b);
char *gstrchr(const char *str, int c);
int gstrcmp(const char *a, const char *b);
char *gstrdup(const char *str);
More information about the MPlayer-cvslog
mailing list