Commit 8450492c authored by Sam Hocevar's avatar Sam Hocevar

* ./include/vlc_common.h: fixed win32 plugin compilation.

parent d6e27e7b
......@@ -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"
......
......@@ -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
......
......@@ -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 = \
......
......@@ -446,7 +446,7 @@ void __fastcall TMainFrameDlg::PrevTitleActionExecute( TObject *Sender )
void __fastcall TMainFrameDlg::NextTitleActionExecute( TObject *Sender )
{
input_area_t * p_area;
int i_id;
unsigned int i_id;
i_id = p_intf->p_sys->p_input->stream.p_selected_area->i_id + 1;
......
......@@ -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 */
......
......@@ -81,7 +81,7 @@ struct intf_sys_t
/* The window labels for DVD mode */
TLabel * p_label_title;
TLabel * p_label_chapter;
int i_part; /* current chapter */
unsigned int i_part; /* current chapter */
/* The input thread */
input_thread_t * p_input;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment