[MPlayer-cvslog] r35606 - in trunk/gui: interface.c interface.h win32/interface.c

ib subversion at mplayerhq.hu
Wed Dec 5 13:08:12 CET 2012


Author: ib
Date: Wed Dec  5 13:08:12 2012
New Revision: 35606

Log:
Cosmetic: Change variable names.

Modified:
   trunk/gui/interface.c
   trunk/gui/interface.h
   trunk/gui/win32/interface.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Wed Dec  5 13:00:52 2012	(r35605)
+++ trunk/gui/interface.c	Wed Dec  5 13:08:12 2012	(r35606)
@@ -853,11 +853,11 @@ int gui(int what, void *data)
     return True;
 }
 
-int guiPlaylist(int what, play_tree_t *my_playtree, m_config_t *config, int enqueue)
+int guiPlaylist(int what, play_tree_t *playtree, m_config_t *config, int enqueue)
 {
-    play_tree_iter_t *my_pt_iter = NULL;
+    play_tree_iter_t *pt_iter = NULL;
     int added = False;
-    plItem *save;
+    plItem *curr;
 
     switch (what) {
 // This function imports the initial playtree (based on cmd-line files)
@@ -869,8 +869,8 @@ int guiPlaylist(int what, play_tree_t *m
         if (!enqueue)
             listMgr(PLAYLIST_DELETE, 0);             // delete playlist before "appending"
 
-        if ((my_pt_iter = pt_iter_create(&my_playtree, config))) {
-            while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL)
+        if ((pt_iter = pt_iter_create(&playtree, config))) {
+            while ((filename = pt_iter_get_next_file(pt_iter)) != NULL)
                 /* add it to end of list */
                 if (add_to_gui_playlist(filename, PLAYLIST_ITEM_APPEND))
                     added = True;
@@ -894,23 +894,23 @@ int guiPlaylist(int what, play_tree_t *m
 // The file which contained the playlist is thereby replaced with it's contents.
     case GUI_PLAYLIST_ADD:
 
-        save = (plItem *)listMgr(PLAYLIST_ITEM_GET_CURR, 0);    // save current item
+        curr = (plItem *)listMgr(PLAYLIST_ITEM_GET_CURR, 0);
 
-        if ((my_pt_iter = pt_iter_create(&my_playtree, config))) {
-            while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL)
+        if ((pt_iter = pt_iter_create(&playtree, config))) {
+            while ((filename = pt_iter_get_next_file(pt_iter)) != NULL)
                 /* insert it into the list and set plCurrent=new item */
                 if (add_to_gui_playlist(filename, PLAYLIST_ITEM_INSERT))
                     added = True;
 
-            pt_iter_destroy(&my_pt_iter);
+            pt_iter_destroy(&pt_iter);
         }
 
-        if (save)
-            listMgr(PLAYLIST_ITEM_SET_CURR, save);
+        if (curr)
+            listMgr(PLAYLIST_ITEM_SET_CURR, curr);
         else
             listMgr(PLAYLIST_ITEM_SET_CURR, listMgr(PLAYLIST_GET, 0));    // go to head, if plList was empty before
 
-        if (save && added)
+        if (curr && added)
             listMgr(PLAYLIST_ITEM_DEL_CURR, 0);
 
         uiCurr();   // update filename

Modified: trunk/gui/interface.h
==============================================================================
--- trunk/gui/interface.h	Wed Dec  5 13:00:52 2012	(r35605)
+++ trunk/gui/interface.h	Wed Dec  5 13:08:12 2012	(r35606)
@@ -146,7 +146,7 @@ extern guiInterface_t guiInfo;
 int gui(int what, void *data);
 void guiDone(void);
 void guiInit(void);
-int guiPlaylist(int what, play_tree_t *my_playtree, m_config_t *config, int enqueue);
+int guiPlaylist(int what, play_tree_t *playtree, m_config_t *config, int enqueue);
 //@}
 
 /// @name GUI -> MPlayer

Modified: trunk/gui/win32/interface.c
==============================================================================
--- trunk/gui/win32/interface.c	Wed Dec  5 13:00:52 2012	(r35605)
+++ trunk/gui/win32/interface.c	Wed Dec  5 13:08:12 2012	(r35606)
@@ -842,9 +842,9 @@ static int import_file_into_gui(char *pa
     return 0;
 }
 
-int guiPlaylist (int what, play_tree_t *my_playtree, m_config_t *config, int enqueue)
+int guiPlaylist (int what, play_tree_t *playtree, m_config_t *config, int enqueue)
 {
-    play_tree_iter_t *my_pt_iter = NULL;
+    play_tree_iter_t *pt_iter = NULL;
     int added = FALSE;
 
     switch (what)
@@ -856,11 +856,11 @@ int guiPlaylist (int what, play_tree_t *
 
             if(!mygui) guiInit();
 
-            if((my_pt_iter = pt_iter_create(&my_playtree, config)))
+            if((pt_iter = pt_iter_create(&playtree, config)))
             {
-                while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL)
+                while ((filename = pt_iter_get_next_file(pt_iter)) != NULL)
                 {
-                    if (parse_filename(filename, my_playtree, config, 0))
+                    if (parse_filename(filename, playtree, config, 0))
                         added = TRUE;
                     else if (import_file_into_gui(filename, 0)) /* Add it to end of list */
                         added = TRUE;
@@ -883,12 +883,12 @@ int guiPlaylist (int what, play_tree_t *
            The file which contained the playlist is thereby replaced with it's contents. */
         case GUI_PLAYLIST_ADD:
 
-            if((my_pt_iter = pt_iter_create(&my_playtree, config)))
+            if((pt_iter = pt_iter_create(&playtree, config)))
             {
-                while ((filename = pt_iter_get_next_file(my_pt_iter)) != NULL)
+                while ((filename = pt_iter_get_next_file(pt_iter)) != NULL)
                     if (import_file_into_gui(filename, 1)) /* insert it into the list and set plCurrent = new item */
                         added = TRUE;
-                pt_iter_destroy(&my_pt_iter);
+                pt_iter_destroy(&pt_iter);
             }
 
             break;


More information about the MPlayer-cvslog mailing list