[MPlayer-cvslog] r32891 - trunk/gui/skin/font.c
ib
subversion at mplayerhq.hu
Fri Feb 11 17:30:35 CET 2011
Author: ib
Date: Fri Feb 11 17:30:35 2011
New Revision: 32891
Log:
Allow equals sign to be defined in the font description file.
Modified:
trunk/gui/skin/font.c
Modified: trunk/gui/skin/font.c
==============================================================================
--- trunk/gui/skin/font.c Fri Feb 11 15:43:28 2011 (r32890)
+++ trunk/gui/skin/font.c Fri Feb 11 17:30:35 2011 (r32891)
@@ -68,7 +68,7 @@ int fntRead( char * path,char * fname )
unsigned char * ptmp;
unsigned char command[32];
unsigned char param[256];
- int id = fntAddNewFont( fname );
+ int id = fntAddNewFont( fname ), n;
if ( id < 0 ) return id;
@@ -92,13 +92,15 @@ int fntRead( char * path,char * fname )
if (ptmp != tmp + 1 || tmp[0] != '"' || tmp[2] != '"') *ptmp = '\0';
}
if (!*tmp) continue;
- cutItem( tmp,command,'=',0 ); cutItem( tmp,param,'=',1 );
+ n = (strncmp(tmp, "\"=", 2) == 0 ? 1 : 0);
+ cutItem( tmp,command,'=',n ); cutItem( tmp,param,'=',n+1 );
if ( command[0] == '"' )
{
int i;
- cutItem( command,command,'"',1 );
- if ( !command[0] ) i='"';
- else if ( command[0] & 0x80 )
+ if (!command[1]) command[0] = '=';
+ else if (command[1] == '"') command[1] = '\0';
+ else cutItem(command, command, '"', 1);
+ if ( command[0] & 0x80 )
{
for ( i = 0; i < EXTRA_CHRS; i++ )
{
More information about the MPlayer-cvslog
mailing list