[MPlayer-cvslog] r36056 - in trunk/gui/util: list.c list.h

ib subversion at mplayerhq.hu
Mon Mar 25 01:44:29 CET 2013


Author: ib
Date: Mon Mar 25 01:44:28 2013
New Revision: 36056

Log:
Add new listMgr command PLAYLIST_ITEM_GET_LAST.

Patch by Hans-Dieter Kosch, hdkosch kabelbw de.

Modified:
   trunk/gui/util/list.c
   trunk/gui/util/list.h

Modified: trunk/gui/util/list.c
==============================================================================
--- trunk/gui/util/list.c	Sun Mar 24 16:15:26 2013	(r36055)
+++ trunk/gui/util/list.c	Mon Mar 25 01:44:28 2013	(r36056)
@@ -165,6 +165,19 @@ void *listMgr(int cmd, void *data)
 
         return NULL;
 
+    case PLAYLIST_ITEM_GET_LAST:
+
+        if (plList) {
+            plItem *item = plList;
+
+            while (item->next)
+                item = item->next;
+
+            return item;
+        }
+
+        return NULL;
+
     case PLAYLIST_ITEM_DEL_CURR:
 
         if (plCurrent) {

Modified: trunk/gui/util/list.h
==============================================================================
--- trunk/gui/util/list.h	Sun Mar 24 16:15:26 2013	(r36055)
+++ trunk/gui/util/list.h	Mon Mar 25 01:44:28 2013	(r36056)
@@ -30,6 +30,7 @@ enum {
     PLAYLIST_ITEM_GET_POS,
     PLAYLIST_ITEM_GET_PREV,
     PLAYLIST_ITEM_GET_NEXT,
+    PLAYLIST_ITEM_GET_LAST,
     PLAYLIST_ITEM_DEL_CURR,
     PLAYLIST_DELETE,
     URLLIST_GET,


More information about the MPlayer-cvslog mailing list