]> git.sesse.net Git - vlc/commitdiff
Added intf_DbgMsg and intf_DbgMsgImm symbols to modules_export.h
authorGildas Bazin <gbazin@videolan.org>
Mon, 16 Jul 2001 22:00:45 +0000 (22:00 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 16 Jul 2001 22:00:45 +0000 (22:00 +0000)
This fixes the TRACE build.

include/modules_export.h
src/interface/main.c
src/misc/modules.c

index 439a13b3c170125b6fc68c55ff36cff7a6b233aa..bd785dd1589a305424c51efa13dc4fc284f4d2b5 100644 (file)
@@ -42,6 +42,10 @@ typedef struct module_symbols_s
     void ( * intf_ErrMsg )     ( char *, ... );
     void ( * intf_WarnMsg )    ( int, char *, ... );
     void ( * intf_WarnMsgImm ) ( int, char *, ... );
+#ifdef TRACE
+    void ( * intf_DbgMsg )     ( char *, char *, int, char *, ... );
+    void ( * intf_DbgMsgImm )  ( char *, char *, int, char *, ... );
+#endif
 
     int  ( * intf_PlaylistAdd )     ( struct playlist_s *, int, const char* );
     int  ( * intf_PlaylistDelete )  ( struct playlist_s *, int );
@@ -181,6 +185,10 @@ typedef struct module_symbols_s
     (p_symbols)->input_NetlistDeletePES = input_NetlistDeletePES; \
     (p_symbols)->input_NetlistEnd = input_NetlistEnd;
     
+#define STORE_TRACE_SYMBOLS( p_symbols ) \
+    (p_symbols)->intf_DbgMsg = _intf_DbgMsg; \
+    (p_symbols)->intf_DbgMsgImm = _intf_DbgMsgImm;
+
 #ifdef PLUGIN
 extern module_symbols_t* p_symbols;
 
@@ -204,6 +212,16 @@ extern module_symbols_t* p_symbols;
 #   define intf_ErrMsg p_symbols->intf_ErrMsg
 #   define intf_WarnMsg p_symbols->intf_WarnMsg
 #   define intf_WarnMsgImm p_symbols->intf_WarnMsgImm
+#ifdef TRACE
+#   undef  intf_DbgMsg
+#   undef  intf_DbgMsgImm
+#   define intf_DbgMsg( format, args... ) \
+    p_symbols->intf_DbgMsg( __FILE__, __FUNCTION__, \
+                            __LINE__, format, ## args )
+#   define intf_DbgMsgImm( format, args... ) \
+    p_symbols->intf_DbgMsgImm( __FILE__, __FUNCTION__, \
+                               __LINE__, format, ## args )
+#endif
 
 #   define intf_PlaylistAdd(a,b,c) p_symbols->intf_PlaylistAdd(a,b,c)
 #   define intf_PlaylistDelete(a,b) p_symbols->intf_PlaylistDelete(a,b)
index 2160fa8adc860edd81e962701072db281b5a70da..459b880c78b09fdd94d31a0196733b56fa90e193 100644 (file)
@@ -4,7 +4,7 @@
  * and spawn threads.
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: main.c,v 1.106 2001/06/27 06:29:59 gbazin Exp $
+ * $Id: main.c,v 1.107 2001/07/16 22:00:45 gbazin Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -860,9 +860,9 @@ static void Usage( int i_fashion )
     /* Interface parameters */
     intf_MsgImm( "\nInterface parameters:"
         "\n  " INTF_METHOD_VAR "=<method name>        \tinterface method"
-        "\n  " INTF_INIT_SCRIPT_VAR "=<filename>      \tinitialization script"
+        "\n  " INTF_INIT_SCRIPT_VAR "=<filename>              \tinitialization script"
         "\n  " INTF_CHANNELS_VAR "=<filename>         \tchannels list"
-        "\n  " INTF_STDOUT_VAR "=<filename>       \tredirect console stdout" );
+        "\n  " INTF_STDOUT_VAR "=<filename>           \tredirect console stdout" );
 
     /* Audio parameters */
     intf_MsgImm( "\nAudio parameters:"
index 4fa2dead6faaf6e232960a150998d9a6b44ac994..dd99683b55e6a2c52e080a00ba61690927ffb84e 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Built-in and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.38 2001/07/11 02:01:05 sam Exp $
+ * $Id: modules.c,v 1.39 2001/07/16 22:00:45 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -141,6 +141,9 @@ void module_InitBank( void )
      * Store the symbols to be exported
      */
     STORE_SYMBOLS( &symbols );
+#ifdef TRACE
+    STORE_TRACE_SYMBOLS( &symbols );
+#endif
 
     /*
      * Check all the built-in modules