]> git.sesse.net Git - vlc/commitdiff
* ./include/vlc_common.h: fixed win32 plugin compilation.
authorSam Hocevar <sam@videolan.org>
Thu, 16 Jan 2003 09:02:46 +0000 (09:02 +0000)
committerSam Hocevar <sam@videolan.org>
Thu, 16 Jan 2003 09:02:46 +0000 (09:02 +0000)
include/vlc_common.h
include/vlc_threads_funcs.h
modules/gui/win32/Modules.am
modules/gui/win32/mainframe.cpp
modules/gui/win32/menu.cpp
modules/gui/win32/win32_common.h

index e4eaff3931ff4c22913b07c1f632a7583d844bbe..b57e934b06d03e5093f42f159bef6a1dff545566 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.47 2002/12/30 17:36:01 gbazin Exp $
+ * $Id: vlc_common.h,v 1.48 2003/01/16 09:02:46 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -37,6 +37,7 @@
 #   undef HAVE_VARIADIC_MACROS
 #   undef HAVE_STDINT_H
 #   undef HAVE_INTTYPES_H
+#   undef off_t
 #endif
 
 #include "vlc_config.h"
index c3996b6e00baff055d2b1a613c242392e2fab63c..ebfb43e15c8236428e08954db133a7fa20c95ef9 100644 (file)
@@ -3,7 +3,7 @@
  * This header provides a portable threads implementation.
  *****************************************************************************
  * Copyright (C) 1999, 2002 VideoLAN
- * $Id: vlc_threads_funcs.h,v 1.11 2002/12/18 11:47:35 sam Exp $
+ * $Id: vlc_threads_funcs.h,v 1.12 2003/01/16 09:02:46 sam Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -80,7 +80,7 @@ static inline int __vlc_mutex_lock( char * psz_file, int i_line,
 
 #elif defined( UNDER_CE )
     EnterCriticalSection( &p_mutex->csection );
-    return 0;
+    i_result = 0;
 
 #elif defined( WIN32 )
     if( p_mutex->mutex )
@@ -91,7 +91,7 @@ static inline int __vlc_mutex_lock( char * psz_file, int i_line,
     {
         EnterCriticalSection( &p_mutex->csection );
     }
-    return 0;
+    i_result = 0;
 
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
     i_result = pthread_mutex_lock( &p_mutex->mutex );
@@ -103,7 +103,7 @@ static inline int __vlc_mutex_lock( char * psz_file, int i_line,
 
 #elif defined( HAVE_CTHREADS_H )
     mutex_lock( p_mutex->mutex );
-    return 0;
+    i_result = 0;
 
 #elif defined( HAVE_KERNEL_SCHEDULER_H )
     if( p_mutex == NULL )
@@ -151,7 +151,7 @@ static inline int __vlc_mutex_unlock( char * psz_file, int i_line,
 
 #elif defined( UNDER_CE )
     LeaveCriticalSection( &p_mutex->csection );
-    return 0;
+    i_result = 0;
 
 #elif defined( WIN32 )
     if( p_mutex->mutex )
@@ -162,7 +162,7 @@ static inline int __vlc_mutex_unlock( char * psz_file, int i_line,
     {
         LeaveCriticalSection( &p_mutex->csection );
     }
-    return 0;
+    i_result = 0;
 
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
     i_result = pthread_mutex_unlock( &p_mutex->mutex );
@@ -174,7 +174,7 @@ static inline int __vlc_mutex_unlock( char * psz_file, int i_line,
 
 #elif defined( HAVE_CTHREADS_H )
     mutex_unlock( p_mutex );
-    return 0;
+    i_result = 0;
 
 #elif defined( HAVE_KERNEL_SCHEDULER_H )
     if( p_mutex == NULL )
@@ -236,7 +236,7 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line,
 
 #elif defined( UNDER_CE )
     PulseEvent( p_condvar->event );
-    return 0;
+    i_result = 0;
 
 #elif defined( WIN32 )
     /* Release one waiting thread if one is available. */
@@ -277,7 +277,7 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line,
             WaitForSingleObject( p_condvar->event, INFINITE );
         }
     }
-    return 0;
+    i_result = 0;
 
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
     i_result = pthread_cond_signal( &p_condvar->cond );
@@ -293,7 +293,7 @@ static inline int __vlc_cond_signal( char * psz_file, int i_line,
     {
         cond_signal( (condition_t)p_condvar );
     }
-    return 0;
+    i_result = 0;
 
 #elif defined( HAVE_KERNEL_SCHEDULER_H )
     if( p_condvar == NULL )
@@ -377,7 +377,7 @@ static inline int __vlc_cond_broadcast( char * psz_file, int i_line,
     {
         PulseEvent( p_condvar->event );
     }
-    return 0;
+    i_result = 0;
 
 #elif defined( WIN32 )
     int i;
@@ -423,7 +423,7 @@ static inline int __vlc_cond_broadcast( char * psz_file, int i_line,
             WaitForSingleObject( p_condvar->event, INFINITE );
         }
     }
-    return 0;
+    i_result = 0;
 
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
     i_result = pthread_cond_broadcast( &p_condvar->cond );
@@ -439,7 +439,7 @@ static inline int __vlc_cond_broadcast( char * psz_file, int i_line,
     {
         cond_signal( (condition_t)p_condvar );
     }
-    return 0;
+    i_result = 0;
 
 #elif defined( HAVE_KERNEL_SCHEDULER_H )
     if( p_condvar == NULL )
@@ -520,7 +520,7 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line,
     /* Reacquire the mutex before returning. */
     vlc_mutex_lock( p_mutex );
 
-    return 0;
+    i_result = 0;
 
 #elif defined( WIN32 )
     if( !p_condvar->semaphore )
@@ -596,7 +596,7 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line,
     /* Reacquire the mutex before returning. */
     vlc_mutex_lock( p_mutex );
 
-    return 0;
+    i_result = 0;
 
 #elif defined( PTHREAD_COND_T_IN_PTHREAD_H )
 
@@ -635,7 +635,7 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line,
 
 #elif defined( HAVE_CTHREADS_H )
     condition_wait( (condition_t)p_condvar, (mutex_t)p_mutex );
-    return 0;
+    i_result = 0;
 
 #elif defined( HAVE_KERNEL_SCHEDULER_H )
     if( p_condvar == NULL )
@@ -660,7 +660,7 @@ static inline int __vlc_cond_wait( char * psz_file, int i_line,
     p_condvar->thread = -1;
 
     vlc_mutex_lock( p_mutex );
-    return 0;
+    i_result = 0;
 
 #endif
 
index 3dd132134cce92ea3fa408187fb3c39381e81b70..2f79b1c24c7e21bad083409e8a87ba087c8ef860 100644 (file)
@@ -11,7 +11,10 @@ SOURCES_win32 = PRIVATE
 modules/gui/win32/libwin32_plugin.dll: $(BORLAND_win32)
        cd modules/gui/win32/ && \
        rm -f win32.mak && \
-       $(BCBUILDER)/Bin/bpr2mak win32.bpr -s | sed -e 's@^LIBPATH = .*@&;$$(RELEASELIBPATH)@' -e 's@^USERDEFINES = .*@& -DMODULE_NAME=win32@' > win32.mak && \
+       $(BCBUILDER)/Bin/bpr2mak win32.bpr -s | \
+               sed -e 's@^LIBPATH = .*@&;$$(RELEASELIBPATH)@' \
+                   -e 's@^USERDEFINES = .*@& -DMODULE_NAME=win32@' \
+               > win32.mak && \
        $(BCBUILDER)/Bin/make -f win32.mak -b
 
 BORLAND_win32 = \
index 22980a8212b08714346518abdb38e363b554f3ba..f3e1c57bf5ca0401689b2d127d1c07b87458ad35 100644 (file)
@@ -446,7 +446,7 @@ void __fastcall TMainFrameDlg::PrevTitleActionExecute( TObject *Sender )
 void __fastcall TMainFrameDlg::NextTitleActionExecute( TObject *Sender )\r
 {\r
     input_area_t  * p_area;\r
-    int             i_id;\r
+    unsigned int    i_id;\r
 \r
     i_id = p_intf->p_sys->p_input->stream.p_selected_area->i_id + 1;\r
 \r
index 08cc1936475539c1103ba3719239a18e5424affa..f8488682b27380cdf901bd1dfc040020627b63ba 100644 (file)
@@ -2,7 +2,7 @@
  * menu.cpp: functions to handle menu items
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: menu.cpp,v 1.4 2003/01/13 17:11:14 ipkiss Exp $
+ * $Id: menu.cpp,v 1.5 2003/01/16 09:02:46 sam Exp $
  *
  * Authors: Olivier Teuliere <ipkiss@via.ecp.fr>
  *
@@ -313,7 +313,7 @@ void __fastcall TMenusGen::SetupMenus()
     p_audio_es = NULL;
     p_spu_es = NULL;
 
-    for( int i = 0; i < p_input->stream.i_selected_es_number; i++ )
+    for( unsigned int i = 0; i < p_input->stream.i_selected_es_number; i++ )
     {
         if( p_input->stream.pp_selected_es[i]->i_cat == AUDIO_ES )
         {
@@ -618,7 +618,8 @@ void __fastcall TMenusGen::ProgramMenu( TMenuItem *Root,
     Root->Enabled = false;
 
     /* create a set of program buttons and append them to the container */
-    for( int i = 0; i < p_intf->p_sys->p_input->stream.i_pgrm_number; i++ )
+    for( unsigned int i = 0; i < p_intf->p_sys->p_input->stream.i_pgrm_number;
+         i++ )
     {
         AnsiString Name;
         Name.sprintf( "id %d",
@@ -771,7 +772,8 @@ void __fastcall TMenusGen::LanguageMenu( TMenuItem *Root, es_descriptor_t *p_es,
 
 #define ES p_intf->p_sys->p_input->stream.pp_es[i]
     /* create a set of language buttons and append them to the Root */
-    for( int i = 0; i < p_intf->p_sys->p_input->stream.i_es_number; i++ )
+    for( unsigned int i = 0; i < p_intf->p_sys->p_input->stream.i_es_number;
+         i++ )
     {
         if( ( ES->i_cat == i_cat ) &&
             ( !ES->p_pgrm ||
@@ -828,8 +830,8 @@ void __fastcall TMenusGen::NavigationMenu( TMenuItem *Root,
     TMenuItem     * ChapterGroup;
     TMenuItem     * ChapterItem;
     AnsiString      Name;
-    int             i_title_nb;
-    int             i_chapter_nb;
+    unsigned int    i_title_nb;
+    unsigned int    i_chapter_nb;
 
 
     /* remove previous menu */
@@ -839,7 +841,7 @@ void __fastcall TMenusGen::NavigationMenu( TMenuItem *Root,
     i_title_nb = p_intf->p_sys->p_input->stream.i_area_nb;
 
     /* loop on titles */
-    for( int i_title = 1; i_title < i_title_nb; i_title++ )
+    for( unsigned int i_title = 1; i_title < i_title_nb; i_title++ )
     {
         /* we group titles in packets of ten for small screens */
         if( ( i_title % 10 == 1 ) && ( i_title_nb > 20 ) )
@@ -868,7 +870,8 @@ void __fastcall TMenusGen::NavigationMenu( TMenuItem *Root,
                 p_intf->p_sys->p_input->stream.pp_areas[i_title]->i_part_nb;
 
             /* loop on chapters */
-            for( int i_chapter = 0; i_chapter < i_chapter_nb; i_chapter++ )
+            for( unsigned int i_chapter = 0; i_chapter < i_chapter_nb;
+                 i_chapter++ )
             {
                 /* we group chapters in packets of ten for small screens */
                 if( ( i_chapter % 10 == 0 ) && ( i_chapter_nb > 20 ) )
@@ -894,7 +897,7 @@ void __fastcall TMenusGen::NavigationMenu( TMenuItem *Root,
 
                 /* FIXME: temporary hack to save i_title and i_chapter with
                  * ChapterItem, since we will need them in the callback */
-                 ChapterItem->Tag = Pos2Data( i_title, i_chapter + 1 );
+                ChapterItem->Tag = Pos2Data( i_title, i_chapter + 1 );
 
 #define p_area p_intf->p_sys->p_input->stream.pp_areas[i_title]
                 /* check the currently selected chapter */
index 9896d18c1905649b917ac28a8e67fc17df6beb98..a64509501a7da0c624273084fe02ce1ab475954d 100644 (file)
@@ -81,7 +81,7 @@ struct intf_sys_t
     /* The window labels for DVD mode */\r
     TLabel            * p_label_title;\r
     TLabel            * p_label_chapter;\r
-    int                 i_part;                           /* current chapter */\r
+    unsigned int        i_part;                           /* current chapter */\r
 \r
     /* The input thread */\r
     input_thread_t    * p_input;\r