Commit 08999a39 authored by Sam Hocevar's avatar Sam Hocevar

* ./src/interface/main.c: we no longer segfault if argc == 0.

  * ALL: renamed PLUGINS to __PLUGINS__ to avoid conflicts with libraries
    defining it. Grmbl.
  * ./src/input/input_ext-plugins.c: cosmetic change.
parent 4144b604
...@@ -128,7 +128,7 @@ Building Win32 interface with bcc32 (Borland's compiler) ...@@ -128,7 +128,7 @@ Building Win32 interface with bcc32 (Borland's compiler)
2) From the plugin\win32 directory, use Borland C++ command-line tools 2) From the plugin\win32 directory, use Borland C++ command-line tools
as follows: as follows:
bpr2mak intfwin.bpr -s \ bpr2mak intfwin.bpr -s \
| sed 's#^LIBPATH = .*#&;$$(RELEASELIBPATH)# ; s#^USERDEFINES = .*#& -DWIN32 -DPLUGIN -DMODULE_NAME_IS_intfwin -DMODULE_NAME=intfwin#' \ | sed 's#^LIBPATH = .*#&;$$(RELEASELIBPATH)# ; s#^USERDEFINES = .*#& -DWIN32 -D__PLUGIN__ -DMODULE_NAME_IS_intfwin -DMODULE_NAME=intfwin#' \
> intfwin.mak // Create a makefile from intfwin.bpr > intfwin.mak // Create a makefile from intfwin.bpr
make -fintfwin // It's Borland's make utility ! make -fintfwin // It's Borland's make utility !
......
...@@ -251,8 +251,9 @@ endif ...@@ -251,8 +251,9 @@ endif
# #
# C compiler flags: plugins and builtins compilation # C compiler flags: plugins and builtins compilation
# #
plugins_CFLAGS += -DPLUGIN -I../../include -I../../extras vlc_CFLAGS += -D__VLC__
builtins_CFLAGS += -DBUILTIN -I../../include -I../../extras plugins_CFLAGS += -D__PLUGIN__ -I../../include -I../../extras
builtins_CFLAGS += -D__BUILTIN__ -I../../include -I../../extras
# #
# Linker flags: plugins and builtins linking # Linker flags: plugins and builtins linking
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* audio_output.h : audio output thread interface * audio_output.h : audio output thread interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: audio_output.h,v 1.45 2002/03/26 23:08:40 gbazin Exp $ * $Id: audio_output.h,v 1.46 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Michel Kaempf <maxx@via.ecp.fr> * Authors: Michel Kaempf <maxx@via.ecp.fr>
* Cyril Deguet <asmax@via.ecp.fr> * Cyril Deguet <asmax@via.ecp.fr>
...@@ -37,7 +37,7 @@ typedef struct aout_bank_s ...@@ -37,7 +37,7 @@ typedef struct aout_bank_s
} aout_bank_t; } aout_bank_t;
#ifndef PLUGIN #ifndef __PLUGIN__
extern aout_bank_t *p_aout_bank; extern aout_bank_t *p_aout_bank;
#else #else
# define p_aout_bank (p_symbols->p_aout_bank) # define p_aout_bank (p_symbols->p_aout_bank)
...@@ -207,7 +207,7 @@ typedef struct aout_thread_s ...@@ -207,7 +207,7 @@ typedef struct aout_thread_s
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void aout_InitBank ( void ); void aout_InitBank ( void );
void aout_EndBank ( void ); void aout_EndBank ( void );
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.96 2002/04/21 11:23:03 gbazin Exp $ * $Id: common.h,v 1.97 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -682,7 +682,7 @@ typedef struct module_symbols_s ...@@ -682,7 +682,7 @@ typedef struct module_symbols_s
} module_symbols_t; } module_symbols_t;
#ifdef PLUGIN #ifdef __PLUGIN__
extern module_symbols_t* p_symbols; extern module_symbols_t* p_symbols;
#endif #endif
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* It includes functions allowing to declare, get or set configuration options. * It includes functions allowing to declare, get or set configuration options.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: configuration.h,v 1.8 2002/04/23 14:16:19 sam Exp $ * $Id: configuration.h,v 1.9 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -65,7 +65,7 @@ typedef struct module_config_s ...@@ -65,7 +65,7 @@ typedef struct module_config_s
* Prototypes - these methods are used to get, set or manipulate configuration * Prototypes - these methods are used to get, set or manipulate configuration
* data. * data.
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
int config_GetIntVariable( const char *psz_name ); int config_GetIntVariable( const char *psz_name );
float config_GetFloatVariable( const char *psz_name ); float config_GetFloatVariable( const char *psz_name );
char * config_GetPszVariable( const char *psz_name ); char * config_GetPszVariable( const char *psz_name );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders * input_ext-dec.h: structures exported to the VideoLAN decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: input_ext-dec.h,v 1.55 2002/04/23 23:44:36 fenrir Exp $ * $Id: input_ext-dec.h,v 1.56 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr> * Michel Kaempf <maxx@via.ecp.fr>
...@@ -210,7 +210,7 @@ typedef struct bit_stream_s ...@@ -210,7 +210,7 @@ typedef struct bit_stream_s
/***************************************************************************** /*****************************************************************************
* Prototypes from input_ext-dec.c * Prototypes from input_ext-dec.c
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void InitBitstream ( struct bit_stream_s *, struct decoder_fifo_s *, void InitBitstream ( struct bit_stream_s *, struct decoder_fifo_s *,
void (* pf_bitstream_callback)( struct bit_stream_s *, void (* pf_bitstream_callback)( struct bit_stream_s *,
boolean_t ), boolean_t ),
...@@ -542,7 +542,7 @@ typedef struct decoder_config_s ...@@ -542,7 +542,7 @@ typedef struct decoder_config_s
/***************************************************************************** /*****************************************************************************
* Prototypes from input_dec.c * Prototypes from input_dec.c
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void DecoderError ( struct decoder_fifo_s * p_fifo ); void DecoderError ( struct decoder_fifo_s * p_fifo );
#else #else
# define DecoderError p_symbols->DecoderError # define DecoderError p_symbols->DecoderError
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* control the pace of reading. * control the pace of reading.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.64 2002/04/23 14:16:20 sam Exp $ * $Id: input_ext-intf.h,v 1.65 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -49,7 +49,7 @@ typedef struct input_bank_s ...@@ -49,7 +49,7 @@ typedef struct input_bank_s
} input_bank_t; } input_bank_t;
#ifndef PLUGIN #ifndef __PLUGIN__
extern input_bank_t *p_input_bank; extern input_bank_t *p_input_bank;
#else #else
# define p_input_bank (p_symbols->p_input_bank) # define p_input_bank (p_symbols->p_input_bank)
...@@ -329,7 +329,7 @@ typedef struct input_thread_s ...@@ -329,7 +329,7 @@ typedef struct input_thread_s
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void input_InitBank ( void ); void input_InitBank ( void );
void input_EndBank ( void ); void input_EndBank ( void );
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* but exported to plug-ins * but exported to plug-ins
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2002 VideoLAN * Copyright (C) 1999-2002 VideoLAN
* $Id: input_ext-plugins.h,v 1.21 2002/03/04 23:56:37 massiot Exp $ * $Id: input_ext-plugins.h,v 1.22 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
/***************************************************************************** /*****************************************************************************
* Prototypes from input_programs.c * Prototypes from input_programs.c
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
int input_InitStream( struct input_thread_s *, size_t ); int input_InitStream( struct input_thread_s *, size_t );
void input_EndStream ( struct input_thread_s * ); void input_EndStream ( struct input_thread_s * );
struct pgrm_descriptor_s * input_FindProgram( struct input_thread_s *, u16 ); struct pgrm_descriptor_s * input_FindProgram( struct input_thread_s *, u16 );
...@@ -73,7 +73,7 @@ int input_UnselectES( struct input_thread_s *, struct es_descriptor_s * ); ...@@ -73,7 +73,7 @@ int input_UnselectES( struct input_thread_s *, struct es_descriptor_s * );
/***************************************************************************** /*****************************************************************************
* Prototypes from input_dec.c * Prototypes from input_dec.c
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
//decoder_capabilities_s * input_ProbeDecoder( void ); //decoder_capabilities_s * input_ProbeDecoder( void );
vlc_thread_t input_RunDecoder( struct input_thread_s *, vlc_thread_t input_RunDecoder( struct input_thread_s *,
struct es_descriptor_s * ); struct es_descriptor_s * );
...@@ -89,7 +89,7 @@ void input_EscapeAudioDiscontinuity( struct input_thread_s * ); ...@@ -89,7 +89,7 @@ void input_EscapeAudioDiscontinuity( struct input_thread_s * );
/***************************************************************************** /*****************************************************************************
* Prototypes from input_clock.c * Prototypes from input_clock.c
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void input_ClockInit( struct pgrm_descriptor_s * ); void input_ClockInit( struct pgrm_descriptor_s * );
int input_ClockManageControl( struct input_thread_s *, int input_ClockManageControl( struct input_thread_s *,
struct pgrm_descriptor_s *, mtime_t ); struct pgrm_descriptor_s *, mtime_t );
...@@ -104,7 +104,7 @@ mtime_t input_ClockGetTS( struct input_thread_s *, ...@@ -104,7 +104,7 @@ mtime_t input_ClockGetTS( struct input_thread_s *,
/***************************************************************************** /*****************************************************************************
* Prototypes from input_ext-plugins.h (buffers management) * Prototypes from input_ext-plugins.h (buffers management)
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void * input_BuffersInit( void ); void * input_BuffersInit( void );
void input_BuffersEnd( struct input_buffers_s * ); void input_BuffersEnd( struct input_buffers_s * );
struct data_buffer_s * input_NewBuffer( struct input_buffers_s *, size_t ); struct data_buffer_s * input_NewBuffer( struct input_buffers_s *, size_t );
...@@ -283,7 +283,7 @@ typedef struct stream_ps_data_s ...@@ -283,7 +283,7 @@ typedef struct stream_ps_data_s
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void input_ParsePES ( struct input_thread_s *, struct es_descriptor_s * ); void input_ParsePES ( struct input_thread_s *, struct es_descriptor_s * );
void input_GatherPES ( struct input_thread_s *, struct data_packet_s *, void input_GatherPES ( struct input_thread_s *, struct data_packet_s *,
struct es_descriptor_s *, boolean_t, boolean_t ); struct es_descriptor_s *, boolean_t, boolean_t );
...@@ -323,7 +323,7 @@ typedef struct input_socket_s ...@@ -323,7 +323,7 @@ typedef struct input_socket_s
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void input_FDClose( struct input_thread_s * ); void input_FDClose( struct input_thread_s * );
ssize_t input_FDRead( input_thread_t *, byte_t *, size_t ); ssize_t input_FDRead( input_thread_t *, byte_t *, size_t );
ssize_t input_FDNetworkRead( input_thread_t *, byte_t *, size_t ); ssize_t input_FDNetworkRead( input_thread_t *, byte_t *, size_t );
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* interface, such as message output. * interface, such as message output.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: interface.h,v 1.27 2002/02/19 00:50:18 sam Exp $ * $Id: interface.h,v 1.28 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -100,7 +100,7 @@ void intf_Destroy ( intf_thread_t * p_intf ); ...@@ -100,7 +100,7 @@ void intf_Destroy ( intf_thread_t * p_intf );
void intf_MsgCreate ( void ); void intf_MsgCreate ( void );
void intf_MsgDestroy ( void ); void intf_MsgDestroy ( void );
#ifndef PLUGIN #ifndef __PLUGIN__
intf_subscription_t* intf_MsgSub ( void ); intf_subscription_t* intf_MsgSub ( void );
void intf_MsgUnsub ( intf_subscription_t * ); void intf_MsgUnsub ( intf_subscription_t * );
#else #else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_eject.h: CD/DVD-ROM ejection handling functions * intf_eject.h: CD/DVD-ROM ejection handling functions
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: intf_eject.h,v 1.1 2002/01/09 02:01:14 sam Exp $ * $Id: intf_eject.h,v 1.2 2002/04/24 00:36:24 sam Exp $
* *
* Author: Julien Blache <jb@technologeek.org> * Author: Julien Blache <jb@technologeek.org>
* *
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
int intf_Eject( const char * ); int intf_Eject( const char * );
#else #else
# define intf_Eject p_symbols->intf_Eject # define intf_Eject p_symbols->intf_Eject
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* interface, such as message output. See config.h for output configuration. * interface, such as message output. See config.h for output configuration.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_msg.h,v 1.18 2002/02/19 00:50:19 sam Exp $ * $Id: intf_msg.h,v 1.19 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void intf_Msg ( char *psz_format, ... ); void intf_Msg ( char *psz_format, ... );
void intf_ErrMsg ( char *psz_format, ... ); void intf_ErrMsg ( char *psz_format, ... );
void intf_WarnMsg ( int i_level, char *psz_format, ... ); void intf_WarnMsg ( int i_level, char *psz_format, ... );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_playlist.h : Playlist functions * intf_playlist.h : Playlist functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_playlist.h,v 1.5 2001/12/30 07:09:54 sam Exp $ * $Id: intf_playlist.h,v 1.6 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -69,7 +69,7 @@ typedef struct playlist_s ...@@ -69,7 +69,7 @@ typedef struct playlist_s
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
playlist_t * intf_PlaylistCreate ( void ); playlist_t * intf_PlaylistCreate ( void );
void intf_PlaylistInit ( playlist_t * p_playlist ); void intf_PlaylistInit ( playlist_t * p_playlist );
int intf_PlaylistAdd ( playlist_t * p_playlist, int intf_PlaylistAdd ( playlist_t * p_playlist,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* iso_lang.h: function to decode language code (in dvd or a52 for instance). * iso_lang.h: function to decode language code (in dvd or a52 for instance).
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: iso_lang.h,v 1.2 2001/12/30 07:09:54 sam Exp $ * $Id: iso_lang.h,v 1.3 2002/04/24 00:36:24 sam Exp $
* *
* Author: Stéphane Borel <stef@via.ecp.fr> * Author: Stéphane Borel <stef@via.ecp.fr>
* *
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
char * DecodeLanguage( u16 ); char * DecodeLanguage( u16 );
#else #else
# define DecodeLanguage p_symbols->DecodeLanguage # define DecodeLanguage p_symbols->DecodeLanguage
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Declaration and extern access to global program object. * Declaration and extern access to global program object.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: main.h,v 1.33 2002/03/21 07:11:57 gbazin Exp $ * $Id: main.h,v 1.34 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -69,7 +69,7 @@ typedef struct main_s ...@@ -69,7 +69,7 @@ typedef struct main_s
vlc_mutex_t config_lock; /* lock for the config file */ vlc_mutex_t config_lock; /* lock for the config file */
} main_t; } main_t;
#ifndef PLUGIN #ifndef __PLUGIN__
extern main_t *p_main; extern main_t *p_main;
#else #else
# define p_main (p_symbols->p_main) # define p_main (p_symbols->p_main)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules.h : Module management functions. * modules.h : Module management functions.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules.h,v 1.47 2002/04/19 13:56:10 sam Exp $ * $Id: modules.h,v 1.48 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -96,7 +96,7 @@ typedef struct module_bank_s ...@@ -96,7 +96,7 @@ typedef struct module_bank_s
it is to design thread-safe linked lists */ it is to design thread-safe linked lists */
} module_bank_t; } module_bank_t;
#ifndef PLUGIN #ifndef __PLUGIN__
extern module_bank_t *p_module_bank; extern module_bank_t *p_module_bank;
#else #else
# define p_module_bank (p_symbols->p_module_bank) # define p_module_bank (p_symbols->p_module_bank)
...@@ -335,7 +335,7 @@ typedef struct module_functions_s * p_module_functions_t; ...@@ -335,7 +335,7 @@ typedef struct module_functions_s * p_module_functions_t;
/***************************************************************************** /*****************************************************************************
* Exported functions. * Exported functions.
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void module_InitBank ( void ); void module_InitBank ( void );
void module_LoadMain ( void ); void module_LoadMain ( void );
void module_LoadBuiltins ( void ); void module_LoadBuiltins ( void );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules_inner.h : Macros used from within a module. * modules_inner.h : Macros used from within a module.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules_inner.h,v 1.15 2002/04/23 14:16:20 sam Exp $ * $Id: modules_inner.h,v 1.16 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
* #define MODULE_STRING "foo" * #define MODULE_STRING "foo"
* #define MODULE_VAR(blah) "VLC_MODULE_foo_blah" * #define MODULE_VAR(blah) "VLC_MODULE_foo_blah"
* *
* and, if BUILTIN is set, we will also need: * and, if __BUILTIN__ is set, we will also need:
* #define MODULE_FUNC( zog ) module_foo_zog * #define MODULE_FUNC( zog ) module_foo_zog
* *
* this can't easily be done with the C preprocessor, thus a few ugly hacks. * this can't easily be done with the C preprocessor, thus a few ugly hacks.
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
/* If the module is built-in, then we need to define foo_InitModule instead /* If the module is built-in, then we need to define foo_InitModule instead
* of InitModule. Same for Activate- and DeactivateModule. */ * of InitModule. Same for Activate- and DeactivateModule. */
#ifdef BUILTIN #ifdef __BUILTIN__
# define _M( function ) CONCATENATE( function, MODULE_NAME ) # define _M( function ) CONCATENATE( function, MODULE_NAME )
# define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_NAME ) # define __VLC_SYMBOL( symbol ) CONCATENATE( symbol, MODULE_NAME )
# define DECLARE_SYMBOLS ; # define DECLARE_SYMBOLS ;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Functions prototyped are implemented in interface/mtime.c. * Functions prototyped are implemented in interface/mtime.c.
***************************************************************************** *****************************************************************************
* Copyright (C) 1996, 1997, 1998, 1999, 2000 VideoLAN * Copyright (C) 1996, 1997, 1998, 1999, 2000 VideoLAN
* $Id: mtime.h,v 1.10 2002/01/29 20:11:18 gbazin Exp $ * $Id: mtime.h,v 1.11 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
char * mstrtime ( char *psz_buffer, mtime_t date ); char * mstrtime ( char *psz_buffer, mtime_t date );
mtime_t mdate ( void ); mtime_t mdate ( void );
void mwait ( mtime_t date ); void mwait ( mtime_t date );
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* modules. * modules.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: netutils.h,v 1.18 2001/12/30 07:09:54 sam Exp $ * $Id: netutils.h,v 1.19 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Henri Fallon <henri@videolan.org> * Henri Fallon <henri@videolan.org>
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
struct sockaddr_in; struct sockaddr_in;
int network_BuildAddr ( struct sockaddr_in *, char *, int ); int network_BuildAddr ( struct sockaddr_in *, char *, int );
#ifndef PLUGIN #ifndef __PLUGIN__
int network_ChannelJoin ( int ); int network_ChannelJoin ( int );
int network_ChannelCreate ( void ); int network_ChannelCreate ( void );
#else #else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* os_specific.h: OS specific features * os_specific.h: OS specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: os_specific.h,v 1.1 2002/04/02 23:43:57 gbazin Exp $ * $Id: os_specific.h,v 1.2 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -41,7 +41,7 @@ extern "C" { ...@@ -41,7 +41,7 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
struct main_sys_s; struct main_sys_s;
#ifndef PLUGIN #ifndef __PLUGIN__
extern struct main_sys_s *p_main_sys; extern struct main_sys_s *p_main_sys;
#else #else
# define p_main_sys (p_symbols->p_main_sys) # define p_main_sys (p_symbols->p_main_sys)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* thread, and destroy a previously opened video output thread. * thread, and destroy a previously opened video output thread.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: video_output.h,v 1.73 2002/04/04 05:08:05 sam Exp $ * $Id: video_output.h,v 1.74 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -39,7 +39,7 @@ typedef struct vout_bank_s ...@@ -39,7 +39,7 @@ typedef struct vout_bank_s
} vout_bank_t; } vout_bank_t;
#ifndef PLUGIN #ifndef __PLUGIN__
extern vout_bank_t *p_vout_bank; extern vout_bank_t *p_vout_bank;
#else #else
# define p_vout_bank (p_symbols->p_vout_bank) # define p_vout_bank (p_symbols->p_vout_bank)
...@@ -189,7 +189,7 @@ typedef struct vout_thread_s ...@@ -189,7 +189,7 @@ typedef struct vout_thread_s
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
#ifndef PLUGIN #ifndef __PLUGIN__
void vout_InitBank ( void ); void vout_InitBank ( void );
void vout_EndBank ( void ); void vout_EndBank ( void );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlc.h: global header for vlc * vlc.h: global header for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc.h,v 1.6 2002/04/02 23:43:57 gbazin Exp $ * $Id: vlc.h,v 1.7 2002/04/24 00:36:24 sam Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -26,21 +26,26 @@ ...@@ -26,21 +26,26 @@
/***************************************************************************** /*****************************************************************************
* Required vlc headers * Required vlc headers
*****************************************************************************/ *****************************************************************************/
#include "defs.h" #if defined( __VLC__ ) || defined( __PLUGIN__ ) || defined( __BUILTIN__ )
#include "config.h" # include "defs.h"
# include "config.h"
#if defined( PLUGIN ) || defined( BUILTIN ) # if defined( __PLUGIN__ ) || defined( __BUILTIN__ )
# include "modules_inner.h" # include "modules_inner.h"
#endif # endif
# include "common.h"
#include "common.h" # include "os_specific.h"
#include "os_specific.h" # include "intf_msg.h"
# include "threads.h"
# include "mtime.h"
# include "modules.h"
# include "main.h"
# include "configuration.h"
#endif
#include "intf_msg.h" int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] );
#include "threads.h"
#include "mtime.h"
#include "modules.h"
#include "main.h"
#include "configuration.h"
...@@ -11,6 +11,6 @@ intfwin_CUSTOM = yes ...@@ -11,6 +11,6 @@ intfwin_CUSTOM = yes
../intfwin.so: Makefile ../intfwin.so: Makefile
rm -f intfwin.mak rm -f intfwin.mak
$(BCBUILDER)/Bin/bpr2mak intfwin.bpr -s | sed 's#^LIBPATH = .*#&;$$(RELEASELIBPATH)# ; s#^USERDEFINES = .*#& -DWIN32 -DPLUGIN -DMODULE_NAME_IS_intfwin -DMODULE_NAME=intfwin#' > intfwin.mak $(BCBUILDER)/Bin/bpr2mak intfwin.bpr -s | sed 's#^LIBPATH = .*#&;$$(RELEASELIBPATH)# ; s#^USERDEFINES = .*#& -DWIN32 -D__PLUGIN__ -DMODULE_NAME_IS_intfwin -DMODULE_NAME=intfwin#' > intfwin.mak
$(BCBUILDER)/Bin/make -f intfwin.mak -b $(BCBUILDER)/Bin/make -f intfwin.mak -b
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-plugins.c: useful functions for access and demux plug-ins * input_ext-plugins.c: useful functions for access and demux plug-ins
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: input_ext-plugins.c,v 1.5 2002/04/02 22:46:25 massiot Exp $ * $Id: input_ext-plugins.c,v 1.6 2002/04/24 00:36:24 sam Exp $