changeset 33092:83052a4ac698

Use more appropriate name for variable and reduce it to reasonable size. Besides, add an explanation for seemingly needless statement.
author ib
date Fri, 01 Apr 2011 12:48:40 +0000
parents 6ce0b74d03b7
children 3de646fca03b
files gui/skin/skin.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gui/skin/skin.c	Fri Apr 01 12:23:56 2011 +0000
+++ b/gui/skin/skin.c	Fri Apr 01 12:48:40 2011 +0000
@@ -655,7 +655,7 @@
 // font=fontfile
 static int cmd_font(char *in)
 {
-    char name[512];
+    char fnt[256];
     wItem *item;
 
     if (!window_cmd("font"))
@@ -666,12 +666,12 @@
     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 @@
         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;
 }