[MPlayer-cvslog] r33179 - trunk/gui/skin/skin.c

ib subversion at mplayerhq.hu
Fri Apr 1 14:48:40 CEST 2011


Author: ib
Date: Fri Apr  1 14:48:40 2011
New Revision: 33179

Log:
Use more appropriate name for variable and reduce it to reasonable size.

Besides, add an explanation for seemingly needless statement.

Modified:
   trunk/gui/skin/skin.c

Modified: trunk/gui/skin/skin.c
==============================================================================
--- trunk/gui/skin/skin.c	Fri Apr  1 14:23:56 2011	(r33178)
+++ trunk/gui/skin/skin.c	Fri Apr  1 14:48:40 2011	(r33179)
@@ -655,7 +655,7 @@ static int cmd_potmeter(char *in)
 // font=fontfile
 static int cmd_font(char *in)
 {
-    char name[512];
+    char fnt[256];
     wItem *item;
 
     if (!window_cmd("font"))
@@ -666,12 +666,12 @@ static int cmd_font(char *in)
     if (in_window("menu"))
         return 1;
 
-    cutItem(in, name, ',', 0);
-
+    cutItem(in, fnt, ',', 0);   // Note: This seems needless but isn't for compatibility
+                                // reasons with a meanwhile depreciated second parameter.
     (*currWinItemIdx)++;
     item         = &currWinItems[*currWinItemIdx];
     item->type   = itFont;
-    item->fontid = fntRead(path, name);
+    item->fontid = fntRead(path, fnt);
 
     switch (item->fontid) {
     case -1:
@@ -691,7 +691,7 @@ static int cmd_font(char *in)
         return 1;
     }
 
-    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    font: %s (#%d)\n", name, fntFindID(name));
+    mp_dbg(MSGT_GPLAYER, MSGL_DBG2, "[skin]    font: %s (#%d)\n", fnt, fntFindID(fnt));
 
     return 0;
 }


More information about the MPlayer-cvslog mailing list