diff --git a/include/input_ext-intf.h b/include/input_ext-intf.h index 54cadba202918d740d223a37fbdaf856942dcb34..d9ea12dce304be11496535a8546e05eb897fa0f2 100644 --- a/include/input_ext-intf.h +++ b/include/input_ext-intf.h @@ -4,7 +4,7 @@ * control the pace of reading. ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: input_ext-intf.h,v 1.45 2001/11/08 14:45:44 stef Exp $ + * $Id: input_ext-intf.h,v 1.46 2001/11/11 18:15:41 sam Exp $ * * Authors: Christophe Massiot <massiot@via.ecp.fr> * @@ -289,6 +289,7 @@ typedef struct input_thread_s int i_handle; /* socket or file descriptor */ FILE * p_stream; /* if applicable */ + void * p_handle; /* if i_handle isn't suitable */ int i_read_once; /* number of packet read by * pf_read once */ void * p_method_data; /* data of the packet manager */ diff --git a/plugins/dvd/input_dvd.c b/plugins/dvd/input_dvd.c index 1586ecc6fac5c45dc86b6d18f53dd7d149cf561a..646a66454c48eb3879d5f4c3d83964eb9ea46797 100644 --- a/plugins/dvd/input_dvd.c +++ b/plugins/dvd/input_dvd.c @@ -10,7 +10,7 @@ * -dvd_udf to find files ***************************************************************************** * Copyright (C) 1998-2001 VideoLAN - * $Id: input_dvd.c,v 1.93 2001/11/11 01:32:03 stef Exp $ + * $Id: input_dvd.c,v 1.94 2001/11/11 18:15:41 sam Exp $ * * Author: St�phane Borel <stef@via.ecp.fr> * @@ -197,7 +197,7 @@ static void DVDInit( input_thread_t * p_input ) p_input->p_plugin_data = (void *)p_dvd; p_input->p_method_data = NULL; - p_dvd->dvdhandle = (dvdcss_handle) p_input->i_handle; + p_dvd->dvdhandle = (dvdcss_handle) p_input->p_handle; if( dvdcss_seek( p_dvd->dvdhandle, 0, DVDCSS_NOFLAGS ) < 0 ) { @@ -350,7 +350,7 @@ static void DVDOpen( struct input_thread_s *p_input ) return; } - p_input->i_handle = (int) dvdhandle; + p_input->p_handle = (void *) dvdhandle; } /***************************************************************************** @@ -359,7 +359,7 @@ static void DVDOpen( struct input_thread_s *p_input ) static void DVDClose( struct input_thread_s *p_input ) { /* Clean up libdvdcss */ - dvdcss_close( (dvdcss_handle) p_input->i_handle ); + dvdcss_close( (dvdcss_handle) p_input->p_handle ); } /***************************************************************************** diff --git a/plugins/gtk/gtk_menu.c b/plugins/gtk/gtk_menu.c index 8ff0d3b6c04194ec814e8cd202d8e821ca480cb4..2627da55f206eb45fc412f787553613717fe70ba 100644 --- a/plugins/gtk/gtk_menu.c +++ b/plugins/gtk/gtk_menu.c @@ -2,7 +2,7 @@ * gtk_menu.c : functions to handle menu items. ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: gtk_menu.c,v 1.13 2001/07/25 03:12:33 sam Exp $ + * $Id: gtk_menu.c,v 1.14 2001/11/11 18:15:41 sam Exp $ * * Authors: Samuel Hocevar <sam@zoy.org> * St�phane Borel <stef@via.ecp.fr> @@ -202,7 +202,7 @@ void GtkMenubarTitleToggle( GtkCheckMenuItem * menuitem, gpointer user_data ) if( menuitem->active && !p_intf->p_sys->b_title_update ) { - gint i_title = (gint)user_data; + gint i_title = (gint)((long)user_data); input_ChangeArea( p_intf->p_input, p_intf->p_input->stream.pp_areas[i_title] ); @@ -231,7 +231,7 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data ) p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" ); p_area = p_intf->p_input->stream.p_selected_area; - i_chapter = (gint)user_data; + i_chapter = (gint)((long)user_data); if( menuitem->active && !p_intf->p_sys->b_chapter_update ) { @@ -273,7 +273,7 @@ void GtkMenubarChapterToggle( GtkCheckMenuItem * menuitem, gpointer user_data ) p_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( \ p_intf->p_sys->window ), (menu) ) ); \ p_area = p_intf->p_input->stream.p_selected_area; \ - p_area->i_angle = (gint)user_data; \ + p_area->i_angle = (gint)((long)user_data); \ \ input_ChangeArea( p_intf->p_input, (input_area_t*)p_area ); \ \ @@ -379,7 +379,7 @@ static gint GtkRadioMenu( intf_thread_t * p_intf, gtk_signal_connect( GTK_OBJECT( p_item ), "toggled", GTK_SIGNAL_FUNC( pf_toggle ), - (gpointer)(i_item + 1) ); + (gpointer)((long)(i_item + 1)) ); if( i_nb > 20 ) { diff --git a/plugins/gtk/gtk_menu.h b/plugins/gtk/gtk_menu.h index 6e3ef82b26c81c94b3a952329ba6debafc1729b7..f22715dc5a3b91e09a6f1ed74ee869874019b094 100644 --- a/plugins/gtk/gtk_menu.h +++ b/plugins/gtk/gtk_menu.h @@ -2,7 +2,7 @@ * gtk_menu.h: prototypes for menu functions ***************************************************************************** * Copyright (C) 1999, 2000 VideoLAN - * $Id: gtk_menu.h,v 1.4 2001/06/14 01:49:44 sam Exp $ + * $Id: gtk_menu.h,v 1.5 2001/11/11 18:15:42 sam Exp $ * * Authors: Samuel Hocevar <sam@zoy.org> * St�phane Borel <stef@via.ecp.fr> @@ -34,7 +34,8 @@ gint GtkSetupMenus( struct intf_thread_s * ); /***************************************************************************** * Convert user_data structures to title and chapter information *****************************************************************************/ -#define DATA2TITLE( user_data ) ( (gint)(user_data) >> 16 ) -#define DATA2CHAPTER( user_data ) ( (gint)(user_data) & 0xffff ) -#define POS2DATA( title, chapter ) ( ((title) << 16) | ((chapter) & 0xffff) ) +#define DATA2TITLE( user_data ) ( (gint)((long)(user_data)) >> 16 ) +#define DATA2CHAPTER( user_data ) ( (gint)((long)(user_data)) & 0xffff ) +#define POS2DATA( title, chapter ) ( NULL + ( ((title) << 16) \ + | ((chapter) & 0xffff)) ) diff --git a/plugins/gtk/gtk_playlist.c b/plugins/gtk/gtk_playlist.c index 2f90becf11af9a55176f1ef78097f5110590b1fd..d1b14fa8b27ba9ce3992d5899941857ca47029b3 100644 --- a/plugins/gtk/gtk_playlist.c +++ b/plugins/gtk/gtk_playlist.c @@ -2,7 +2,7 @@ * gtk_playlist.c : Interface for the playlist dialog ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: gtk_playlist.c,v 1.19 2001/10/04 00:50:24 sam Exp $ + * $Id: gtk_playlist.c,v 1.20 2001/11/11 18:15:42 sam Exp $ * * Authors: Pierre Baillet <oct@zoy.org> * St�phane Borel <stef@via.ecp.fr> @@ -252,8 +252,8 @@ void GtkPlaylistInvert( GtkMenuItem * menuitem, gpointer user_data ) for( i_dummy = 0 ; i_dummy < i_sel_l ; i_dummy++) { - pi_selected[i_dummy] = (int)g_list_nth_data( p_clist->selection, - i_dummy ); + pi_selected[i_dummy] = (long)g_list_nth_data( p_clist->selection, + i_dummy ); } gtk_clist_freeze( p_clist ); @@ -512,7 +512,7 @@ void GtkDropDataReceived( intf_thread_t * p_intf, void GtkDeleteGListItem( gpointer data, gpointer param ) { - int i_cur_row = ( int )data; + int i_cur_row = (long)data; intf_thread_t * p_intf = param; intf_PlaylistDelete( p_main->p_playlist, i_cur_row );