]> git.sesse.net Git - vlc/commitdiff
* ./src/interface/main.c: we no longer segfault if argc == 0.
authorSam Hocevar <sam@videolan.org>
Wed, 24 Apr 2002 00:36:24 +0000 (00:36 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 24 Apr 2002 00:36:24 +0000 (00:36 +0000)
  * ALL: renamed PLUGINS to __PLUGINS__ to avoid conflicts with libraries
    defining it. Grmbl.
  * ./src/input/input_ext-plugins.c: cosmetic change.

25 files changed:
INSTALL.win32
Makefile.opts.in
include/audio_output.h
include/common.h
include/configuration.h
include/input_ext-dec.h
include/input_ext-intf.h
include/input_ext-plugins.h
include/interface.h
include/intf_eject.h
include/intf_msg.h
include/intf_playlist.h
include/iso_lang.h
include/main.h
include/modules.h
include/modules_inner.h
include/mtime.h
include/netutils.h
include/os_specific.h
include/video_output.h
include/videolan/vlc.h
plugins/win32/Makefile
src/input/input_ext-plugins.c
src/interface/intf_msg.c
src/interface/main.c

index 117952b8fcafd7fd41898113bf90b3c425f75e16..66552ad34b9263a0dafbbdb0636e0b6e7640f8a2 100644 (file)
@@ -128,7 +128,7 @@ Building Win32 interface with bcc32 (Borland's compiler)
 2) From the plugin\win32 directory, use Borland C++ command-line tools
 as follows:
 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
 make -fintfwin                 // It's Borland's make utility !
 
index 8a5ba96190f4c0875e97d8d05c37c81defe20b1e..52b1ec6e0000b3ff2b696318c4dcd9e92b61ad8f 100644 (file)
@@ -251,8 +251,9 @@ endif
 #
 # C compiler flags: plugins and builtins compilation
 #
-plugins_CFLAGS += -DPLUGIN -I../../include -I../../extras
-builtins_CFLAGS += -DBUILTIN -I../../include -I../../extras
+vlc_CFLAGS += -D__VLC__
+plugins_CFLAGS += -D__PLUGIN__ -I../../include -I../../extras
+builtins_CFLAGS += -D__BUILTIN__ -I../../include -I../../extras
 
 #
 # Linker flags: plugins and builtins linking
index ea7822462de9bf24e543da32462cb9a87191ac13..beba49e0637a13e79039d66153870bfc583812d1 100644 (file)
@@ -2,7 +2,7 @@
  * audio_output.h : audio output thread interface
  *****************************************************************************
  * 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>
  *          Cyril Deguet <asmax@via.ecp.fr>
@@ -37,7 +37,7 @@ typedef struct aout_bank_s
 
 } aout_bank_t;
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 extern aout_bank_t *p_aout_bank;
 #else
 #   define p_aout_bank (p_symbols->p_aout_bank)
@@ -207,7 +207,7 @@ typedef struct aout_thread_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void            aout_InitBank           ( void );
 void            aout_EndBank            ( void );
 
index 033f1af3778a5983fc45abea9bc463c28e9427fd..7226b3946c0bd3d4210788146e4c2730db7560e7 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * 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>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -682,7 +682,7 @@ typedef struct module_symbols_s
 
 } module_symbols_t;
 
-#ifdef PLUGIN
+#ifdef __PLUGIN__
 extern module_symbols_t* p_symbols;
 #endif
 
index b4de8cbf9a8f22ae183dbf102519c5bbd6e56527..31ed23e1536bb260efdb27df1b2f3125fdefd8f3 100644 (file)
@@ -4,7 +4,7 @@
  * It includes functions allowing to declare, get or set configuration options.
  *****************************************************************************
  * 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>
  *
@@ -65,7 +65,7 @@ typedef struct module_config_s
  * Prototypes - these methods are used to get, set or manipulate configuration
  * data.
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 int    config_GetIntVariable( const char *psz_name );
 float  config_GetFloatVariable( const char *psz_name );
 char * config_GetPszVariable( const char *psz_name );
index ea2657ac150187babc66ebabe0ca18bf3b1e4f29..801f0a54e70420f0845fd18e9da933eee14ed722 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-dec.h: structures exported to the VideoLAN decoders
  *****************************************************************************
  * 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>
  *          Michel Kaempf <maxx@via.ecp.fr>
@@ -210,7 +210,7 @@ typedef struct bit_stream_s
 /*****************************************************************************
  * Prototypes from input_ext-dec.c
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void InitBitstream  ( struct bit_stream_s *, struct decoder_fifo_s *,
                       void (* pf_bitstream_callback)( struct bit_stream_s *,
                                                       boolean_t ),
@@ -542,7 +542,7 @@ typedef struct decoder_config_s
 /*****************************************************************************
  * Prototypes from input_dec.c
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void DecoderError      ( struct decoder_fifo_s * p_fifo );
 #else
 #   define DecoderError p_symbols->DecoderError
index 70a95b6bc9314f05c2c15315304d8b58ad6fc09e..ebeacb452275654a718f45ca23994f764b0e9632 100644 (file)
@@ -4,7 +4,7 @@
  * control the pace of reading. 
  *****************************************************************************
  * 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>
  *
@@ -49,7 +49,7 @@ typedef struct input_bank_s
 
 } input_bank_t;
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 extern input_bank_t *p_input_bank;
 #else
 #   define p_input_bank (p_symbols->p_input_bank)
@@ -329,7 +329,7 @@ typedef struct input_thread_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void   input_InitBank       ( void );
 void   input_EndBank        ( void );
 
index f83e04376cda787e00f3429effe6a738009e72c4..106c9326ba753e46b4774fe3cc166eca5e74223d 100644 (file)
@@ -3,7 +3,7 @@
  *                      but exported to plug-ins
  *****************************************************************************
  * 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>
  *
@@ -38,7 +38,7 @@
 /*****************************************************************************
  * Prototypes from input_programs.c
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 int  input_InitStream( struct input_thread_s *, size_t );
 void input_EndStream ( struct input_thread_s * );
 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 * );
 /*****************************************************************************
  * Prototypes from input_dec.c
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 //decoder_capabilities_s * input_ProbeDecoder( void );
 vlc_thread_t input_RunDecoder( struct input_thread_s *,
                                struct es_descriptor_s * );
@@ -89,7 +89,7 @@ void input_EscapeAudioDiscontinuity( struct input_thread_s * );
 /*****************************************************************************
  * Prototypes from input_clock.c
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void input_ClockInit( struct pgrm_descriptor_s * );
 int  input_ClockManageControl( struct input_thread_s *,
                                struct pgrm_descriptor_s *, mtime_t );
@@ -104,7 +104,7 @@ mtime_t input_ClockGetTS( struct input_thread_s *,
 /*****************************************************************************
  * Prototypes from input_ext-plugins.h (buffers management)
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void * input_BuffersInit( void );
 void input_BuffersEnd( struct input_buffers_s * );
 struct data_buffer_s * input_NewBuffer( struct input_buffers_s *, size_t );
@@ -283,7 +283,7 @@ typedef struct stream_ps_data_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void input_ParsePES  ( struct input_thread_s *, struct es_descriptor_s * );
 void input_GatherPES ( struct input_thread_s *, struct data_packet_s *,
                        struct es_descriptor_s *, boolean_t, boolean_t );
@@ -323,7 +323,7 @@ typedef struct input_socket_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void input_FDClose( struct input_thread_s * );
 ssize_t input_FDRead( input_thread_t *, byte_t *, size_t );
 ssize_t input_FDNetworkRead( input_thread_t *, byte_t *, size_t );
index 95e56afae90921118f4f0294ce75f917bb2f46ef..a688c423c94a2f3eaf6e7e9062e038e3728e3776 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output.
  *****************************************************************************
  * 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>
  *
@@ -100,7 +100,7 @@ void            intf_Destroy      ( intf_thread_t * p_intf );
 void            intf_MsgCreate    ( void );
 void            intf_MsgDestroy   ( void );
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 intf_subscription_t* intf_MsgSub    ( void );
 void                 intf_MsgUnsub  ( intf_subscription_t * );
 #else
index 71e7c1de826254bd3db19cd697435ce6181ccc70..0a65a6c7622980b8048b17f16bfa34f905ddd124 100644 (file)
@@ -2,7 +2,7 @@
  * intf_eject.h: CD/DVD-ROM ejection handling functions
  *****************************************************************************
  * 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>
  *
@@ -21,7 +21,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 int intf_Eject( const char * );
 #else
 #   define intf_Eject p_symbols->intf_Eject
index c55fb9eaf79125a2e318e90473c836c2eeb9d728..873d9b02e9cd9b1c9a96050b462d78d07772da7b 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output. See config.h for output configuration.
  *****************************************************************************
  * 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>
  *
@@ -26,7 +26,7 @@
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void intf_Msg            ( char *psz_format, ... );
 void intf_ErrMsg         ( char *psz_format, ... );
 void intf_WarnMsg        ( int i_level, char *psz_format, ... );
index 050abf1435c541d9b3bf70039973d0658929998f..0294467ad4c528e13c5d975e6460a6651298ff27 100644 (file)
@@ -2,7 +2,7 @@
  * intf_playlist.h : Playlist functions
  *****************************************************************************
  * 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>
  *
@@ -69,7 +69,7 @@ typedef struct playlist_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 playlist_t * intf_PlaylistCreate   ( void );
 void         intf_PlaylistInit     ( playlist_t * p_playlist );
 int          intf_PlaylistAdd      ( playlist_t * p_playlist,
index 5960506a08e2b04af37a451319f400a92308885d..bbcc5ea1fe9f5b91218770b45e29353ab0d1675c 100644 (file)
@@ -2,7 +2,7 @@
  * iso_lang.h: function to decode language code (in dvd or a52 for instance).
  *****************************************************************************
  * 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>
  *
@@ -21,7 +21,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 char * DecodeLanguage( u16 );
 #else
 #   define DecodeLanguage p_symbols->DecodeLanguage
index 70d79203acc272168becbc3846938e23a994a85f..9b3862a45288859ef48f823c7c85ca3ea38d96e3 100644 (file)
@@ -3,7 +3,7 @@
  * Declaration and extern access to global program object.
  *****************************************************************************
  * 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>
  *
@@ -69,7 +69,7 @@ typedef struct main_s
     vlc_mutex_t            config_lock;          /* lock for the config file */
 } main_t;
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 extern main_t *p_main;
 #else
 #   define p_main (p_symbols->p_main)
index faae707de32805e396ea2f305771c65a05f12de2..7638f7fafea8ad6062898342d0bce2945b6e9f5b 100644 (file)
@@ -2,7 +2,7 @@
  * modules.h : Module management functions.
  *****************************************************************************
  * 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>
  *
@@ -96,7 +96,7 @@ typedef struct module_bank_s
                                     it is to design thread-safe linked lists */
 } module_bank_t;
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 extern module_bank_t *p_module_bank;
 #else
 #   define p_module_bank (p_symbols->p_module_bank)
@@ -335,7 +335,7 @@ typedef struct module_functions_s * p_module_functions_t;
 /*****************************************************************************
  * Exported functions.
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void            module_InitBank     ( void );
 void            module_LoadMain     ( void );
 void            module_LoadBuiltins ( void );
index a06e1e9a5e3397852c3b9711cc5314423b8e7ae5..9d2d149cc5164d8c9a64fc8855d1a848b19b0b3e 100644 (file)
@@ -2,7 +2,7 @@
  * modules_inner.h : Macros used from within a module.
  *****************************************************************************
  * 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>
  *
@@ -38,7 +38,7 @@
  * #define MODULE_STRING "foo"
  * #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
  *
  * this can't easily be done with the C preprocessor, thus a few ugly hacks.
@@ -55,7 +55,7 @@
 
 /* If the module is built-in, then we need to define foo_InitModule instead
  * of InitModule. Same for Activate- and DeactivateModule. */
-#ifdef BUILTIN
+#ifdef __BUILTIN__
 #   define _M( function )          CONCATENATE( function, MODULE_NAME )
 #   define __VLC_SYMBOL( symbol )  CONCATENATE( symbol, MODULE_NAME )
 #   define DECLARE_SYMBOLS         ;
index 0fa3c4c8120e18e6bd1bdaadc5cf824f0fa972bd..c435769a2ac0739bb9640a1fbdcc0a8a2f7a16ba 100644 (file)
@@ -9,7 +9,7 @@
  * Functions prototyped are implemented in interface/mtime.c.
  *****************************************************************************
  * 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>
  *
@@ -50,7 +50,7 @@
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 char *  mstrtime ( char *psz_buffer, mtime_t date );
 mtime_t mdate    ( void );
 void    mwait    ( mtime_t date );
index 552a94e0ff6001f444de2d19eeb53e5a8854d304..bd0612cdbad4c8afdb94d906508a8d8351e846dd 100644 (file)
@@ -4,7 +4,7 @@
  * modules.
  *****************************************************************************
  * 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>
  *          Henri Fallon <henri@videolan.org>
@@ -33,7 +33,7 @@
 struct sockaddr_in;
 int   network_BuildAddr       ( struct sockaddr_in *, char *, int ); 
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 int   network_ChannelJoin     ( int );
 int   network_ChannelCreate   ( void );
 #else
index 80c54b2a6476561e4cf44c75ed775ede296a4864..6e39125839daf7eb983ac7d19fe8137e9e712c25 100644 (file)
@@ -2,7 +2,7 @@
  * os_specific.h: OS specific features
  *****************************************************************************
  * 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>
  *          Gildas Bazin <gbazin@netcourrier.com>
@@ -41,7 +41,7 @@ extern "C" {
  ****************************************************************************/
 struct main_sys_s;
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 extern struct main_sys_s *p_main_sys;
 #else
 #   define p_main_sys (p_symbols->p_main_sys)
index e54664b5c91535cdb5e6c7ceee7d0e726fee9cba..d981456425b3caddac7c3a176aaba25a6f618a1e 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously opened video output thread.
  *****************************************************************************
  * 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>
  *
@@ -39,7 +39,7 @@ typedef struct vout_bank_s
 
 } vout_bank_t;
 
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 extern vout_bank_t *p_vout_bank;
 #else
 #   define p_vout_bank (p_symbols->p_vout_bank)
@@ -189,7 +189,7 @@ typedef struct vout_thread_s
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-#ifndef PLUGIN
+#ifndef __PLUGIN__
 void            vout_InitBank       ( void );
 void            vout_EndBank        ( void );
 
index 41e1e153ad7994f33d8fce07cf7bde73af8c0d41..3bc61b93ed474f14c74f70402162037eb4a73797 100644 (file)
@@ -2,7 +2,7 @@
  * vlc.h: global header for vlc
  *****************************************************************************
  * 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>
  *          Vincent Seguin <seguin@via.ecp.fr>
 /*****************************************************************************
  * Required vlc headers
  *****************************************************************************/
-#include "defs.h"
-#include "config.h"
+#if defined( __VLC__ ) || defined( __PLUGIN__ ) || defined( __BUILTIN__ )
+#   include "defs.h"
+#   include "config.h"
 
-#if defined( PLUGIN ) || defined( BUILTIN )
-#   include "modules_inner.h"
-#endif
+#   if defined( __PLUGIN__ ) || defined( __BUILTIN__ )
+#       include "modules_inner.h"
+#   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"
-#include "threads.h"
-#include "mtime.h"
-#include "modules.h"
+int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] );
 
-#include "main.h"
-#include "configuration.h"
index 938d21a60b4c6b5e19e2fc1d833c36b7add69a47..e13b09a69297b5d3e595e544e2d5523c2f4034fd 100644 (file)
@@ -11,6 +11,6 @@ intfwin_CUSTOM = yes
 
 ../intfwin.so: Makefile
        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
 
index 50f6ea6eb667ca22a41f24437067176f77ffe624..a96532e73aac891d234c1ac40da5d600ae377288 100644 (file)
@@ -2,7 +2,7 @@
  * input_ext-plugins.c: useful functions for access and demux plug-ins
  *****************************************************************************
  * 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 $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -726,7 +726,7 @@ static __inline__ int NetworkSelect( input_thread_t * p_input )
     i_ret = select( p_access_data->i_handle + 1, &fds,
                      NULL, NULL, &timeout );
  
-    if( i_ret == -1 )
+    if( i_ret == -1 && errno != EINTR )
     {
         intf_ErrMsg( "input error: network select error (%s)", strerror(errno) );
     }
index 7be9155daaf3d26445d903a4c9a1fb7cbd00117e..d17fa554d6bc9054beb6dea151c047218a5cb1fe 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: intf_msg.c,v 1.47 2002/03/20 23:00:15 gbazin Exp $
+ * $Id: intf_msg.c,v 1.48 2002/04/24 00:36:24 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -291,10 +291,10 @@ void intf_WarnHexDump( int i_level, void *p_data, int i_size )
 /*****************************************************************************
  * QueueMsg: add a message to a queue
  *****************************************************************************
- * This function provide basic functionnalities to other intf_*Msg functions.
- * It add a message to a queue (after having printed all stored messages if it
- * is full. If the message can't be converted to string in memory, it exit the
- * program. If the queue is not used, it prints the message immediately.
+ * This function provides basic functionnalities to other intf_*Msg functions.
+ * It adds a message to a queue (after having printed all stored messages if it
+ * is full). If the message can't be converted to string in memory, it issues
+ * a warning.
  *****************************************************************************/
 static void QueueMsg( int i_type, int i_level, char *psz_format, va_list ap )
 {
@@ -319,7 +319,7 @@ static void QueueMsg( int i_type, int i_level, char *psz_format, va_list ap )
                 strerror(errno) );
         vfprintf(stderr, psz_format, ap );
         fprintf(stderr, "\n" );
-        exit( errno );
+        return;
     }
 
 #ifndef HAVE_VASPRINTF
index 71032974c627530cd88fe9fe65c6cf453ba43f8f..99d4c867fa55ed35744c6e5fead319878018d302 100644 (file)
@@ -4,7 +4,7 @@
  * and spawn threads.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: main.c,v 1.186 2002/04/23 14:16:21 sam Exp $
+ * $Id: main.c,v 1.187 2002/04/24 00:36:24 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -89,7 +89,7 @@
  * macros.
  *
  *****************************************************************************/
-#define BUILTIN
+#define __BUILTIN__
 #define MODULE_NAME main
 #include "modules_inner.h"                        /* for configuration stuff */
 
@@ -542,11 +542,18 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
 
 
     /* Get the executable name (similar to the basename command) */
-    p_main->psz_arg0 = p_tmp = ppsz_argv[ 0 ];
-    while( *p_tmp )
+    if( i_argc > 0 )
     {
-        if( *p_tmp == '/' ) p_main->psz_arg0 = ++p_tmp;
-        else ++p_tmp;
+        p_main->psz_arg0 = p_tmp = ppsz_argv[ 0 ];
+        while( *p_tmp )
+        {
+            if( *p_tmp == '/' ) p_main->psz_arg0 = ++p_tmp;
+            else ++p_tmp;
+        }
+    }
+    else
+    {
+        p_main->psz_arg0 = "vlc";
     }
 
     /*