[MPlayer-cvslog] r32940 - trunk/gui/skin/skin.c
ib
subversion at mplayerhq.hu
Sun Feb 20 01:42:30 CET 2011
Author: ib
Date: Sun Feb 20 01:42:29 2011
New Revision: 32940
Log:
Fix buggy strlower(). It's wrong to add 'A'.
At the same time, simplify and optimize the function.
Modified:
trunk/gui/skin/skin.c
Modified: trunk/gui/skin/skin.c
==============================================================================
--- trunk/gui/skin/skin.c Sun Feb 20 01:04:19 2011 (r32939)
+++ trunk/gui/skin/skin.c Sun Feb 20 01:42:29 2011 (r32940)
@@ -92,8 +92,12 @@ static void ERRORMESSAGE( const char * f
static char * strlower( char * in )
{
- int i;
- for( i=0;i<(int)strlen( in );i++ ) in[i]=( in[i] >= 'A' ? ( in[i] <= 'Z' ? in[i]+='A' : in[i] ) : in[i] );
+ char *p = in;
+ while (*p)
+ {
+ if (*p >= 'A' && *p <= 'Z') *p += ' ';
+ p++;
+ }
return in;
}
More information about the MPlayer-cvslog
mailing list