[MPlayer-cvslog] r36868 - in trunk/gui: dialog/playlist.c interface.c ui/actions.c util/list.c
ib
subversion at mplayerhq.hu
Mon Feb 17 01:39:10 CET 2014
Author: ib
Date: Mon Feb 17 01:39:09 2014
New Revision: 36868
Log:
Revise code of listMgr() command PLAYLIST_ITEM_GET_POS.
Use uintptr_t type return variable.
Additionally, include stdint.h.
Modified:
trunk/gui/dialog/playlist.c
trunk/gui/interface.c
trunk/gui/ui/actions.c
trunk/gui/util/list.c
Modified: trunk/gui/dialog/playlist.c
==============================================================================
--- trunk/gui/dialog/playlist.c Sun Feb 16 17:30:05 2014 (r36867)
+++ trunk/gui/dialog/playlist.c Mon Feb 17 01:39:09 2014 (r36868)
@@ -21,6 +21,7 @@
#include <string.h>
#include <dirent.h>
#include <unistd.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -158,7 +159,7 @@ static void plButtonReleased( GtkButton
if ( old )
{
listMgr( PLAYLIST_ITEM_SET_CURR,old );
- guiInfo.Track = (intptr_t) listMgr( PLAYLIST_ITEM_GET_POS,old );
+ guiInfo.Track = (uintptr_t) listMgr( PLAYLIST_ITEM_GET_POS,old );
item = NULL;
}
}
@@ -171,7 +172,7 @@ static void plButtonReleased( GtkButton
}
}
else if (isPlaylistStreamtype && !guiInfo.Playing) uiUnsetFile();
- guiInfo.Tracks = (intptr_t) listMgr( PLAYLIST_ITEM_GET_POS,0 );
+ guiInfo.Tracks = (uintptr_t) listMgr( PLAYLIST_ITEM_GET_POS,0 );
free(curr.path);
free(curr.name);
}
Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c Sun Feb 16 17:30:05 2014 (r36867)
+++ trunk/gui/interface.c Mon Feb 17 01:39:09 2014 (r36868)
@@ -17,6 +17,7 @@
*/
#include <stdarg.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -209,7 +210,7 @@ void guiInit(void)
if (playlist && !filename) {
uiSetFile(playlist->path, playlist->name, STREAMTYPE_FILE);
- guiInfo.Tracks = (intptr_t)listMgr(PLAYLIST_ITEM_GET_POS, 0);
+ guiInfo.Tracks = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, 0);
guiInfo.Track = 1;
filename = NULL; // don't start playing
}
@@ -619,7 +620,7 @@ int gui(int what, void *data)
switch (guiInfo.StreamType) {
case STREAMTYPE_FILE:
case STREAMTYPE_STREAM:
- guiInfo.Tracks = (intptr_t)listMgr(PLAYLIST_ITEM_GET_POS, 0);
+ guiInfo.Tracks = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, 0);
break;
case STREAMTYPE_CDDA:
@@ -812,7 +813,7 @@ int gui(int what, void *data)
if (next) {
uiSetFile(next->path, next->name, STREAMTYPE_FILE);
guiInfo.NewPlay = GUI_FILE_NEW;
- guiInfo.Track = (intptr_t)listMgr(PLAYLIST_ITEM_GET_POS, next);
+ guiInfo.Track = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, next);
} else {
if (guiInfo.NewPlay == GUI_FILE_NEW)
break;
Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c Sun Feb 16 17:30:05 2014 (r36867)
+++ trunk/gui/ui/actions.c Mon Feb 17 01:39:09 2014 (r36868)
@@ -21,6 +21,7 @@
* @brief User interface actions
*/
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@@ -745,7 +746,7 @@ void uiCurr(void)
if (curr) {
uiSetFile(curr->path, curr->name, STREAMTYPE_FILE);
guiInfo.PlaylistNext = False;
- guiInfo.Track = (intptr_t)listMgr(PLAYLIST_ITEM_GET_POS, curr);
+ guiInfo.Track = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, curr);
break;
}
@@ -815,7 +816,7 @@ void uiPrev(void)
if (prev) {
uiSetFile(prev->path, prev->name, STREAMTYPE_FILE);
guiInfo.PlaylistNext = !guiInfo.Playing;
- guiInfo.Track = (intptr_t)listMgr(PLAYLIST_ITEM_GET_POS, prev);
+ guiInfo.Track = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, prev);
break;
}
@@ -883,7 +884,7 @@ void uiNext(void)
if (next) {
uiSetFile(next->path, next->name, STREAMTYPE_FILE);
guiInfo.PlaylistNext = !guiInfo.Playing;
- guiInfo.Track = (intptr_t)listMgr(PLAYLIST_ITEM_GET_POS, next);
+ guiInfo.Track = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, next);
break;
}
Modified: trunk/gui/util/list.c
==============================================================================
--- trunk/gui/util/list.c Sun Feb 16 17:30:05 2014 (r36867)
+++ trunk/gui/util/list.c Mon Feb 17 01:39:09 2014 (r36868)
@@ -21,6 +21,7 @@
* @brief List management
*/
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
@@ -52,7 +53,7 @@ static urlItem *urlList;
*/
void *listMgr(int cmd, void *data)
{
- unsigned int pos;
+ uintptr_t pos;
plItem *pdat = (plItem *)data;
urlItem *udat = (urlItem *)data;
@@ -127,7 +128,7 @@ void *listMgr(int cmd, void *data)
pos = 0;
if (plList) {
- unsigned int i = 0;
+ uintptr_t i = 0;
plItem *item = plList;
do {
More information about the MPlayer-cvslog
mailing list