]> git.sesse.net Git - vlc/blobdiff - src/misc/messages.c
* src/misc/win32_specific.c: WinCE build fixes.
[vlc] / src / misc / messages.c
index b30b51eb273ed084aaf30e91d6e564bd9eb5e767..1ff74c6f76adcbdaa186a0e2127c3b8a66885b6a 100644 (file)
@@ -3,8 +3,8 @@
  * This library provides an interface to the message queue to be used by other
  * modules, especially intf modules. See config.h for output configuration.
  *****************************************************************************
- * Copyright (C) 1998-2002 VideoLAN
- * $Id: messages.c,v 1.36 2003/12/03 23:01:48 sigmunau Exp $
+ * Copyright (C) 1998-2004 VideoLAN
+ * $Id$
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -38,9 +38,7 @@
 #   include <fcntl.h>                  /* O_CREAT, O_TRUNC, O_WRONLY, O_SYNC */
 #endif
 
-#ifdef HAVE_ERRNO_H
-#   include <errno.h>                                               /* errno */
-#endif
+#include <errno.h>                                                  /* errno */
 
 #ifdef HAVE_UNISTD_H
 #   include <unistd.h>                                   /* close(), write() */
@@ -229,6 +227,12 @@ void __msg_Generic( vlc_object_t *p_this, int i_type, const char *psz_module,
     va_end( args );
 }
 
+void __msg_GenericVa( vlc_object_t *p_this, int i_type, const char *psz_module,
+                      const char *psz_format, va_list args )
+{
+    QueueMsg( p_this, i_type, psz_module, psz_format, args );
+}
+
 /* Generic functions used when variadic macros are not available. */
 #define DECLARE_MSG_FN( FN_NAME, FN_TYPE ) \
     void FN_NAME( vlc_object_t *p_this, const char *psz_format, ... ) \
@@ -293,12 +297,8 @@ static void QueueMsg( vlc_object_t *p_this, int i_type, const char *psz_module,
 
     if( psz_str == NULL )
     {
-#ifdef HAVE_ERRNO_H
         fprintf( stderr, "main warning: can't store message (%s): ",
                  strerror(errno) );
-#else
-        fprintf( stderr, "main warning: can't store message: " );
-#endif
         vlc_va_copy( args, _args );
         vfprintf( stderr, psz_format, args );
         va_end( args );
@@ -485,6 +485,12 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
         case VLC_OBJECT_VOUT: psz_object = "video output"; break;
         case VLC_OBJECT_AOUT: psz_object = "audio output"; break;
         case VLC_OBJECT_SOUT: psz_object = "stream output"; break;
+        case VLC_OBJECT_HTTPD: psz_object = "http daemon"; break;
+        case VLC_OBJECT_DIALOGS: psz_object = "dialogs provider"; break;
+        case VLC_OBJECT_VLM: psz_object = "vlm"; break;
+        case VLC_OBJECT_ANNOUNCE: psz_object = "announce handler"; break;
+        case VLC_OBJECT_DEMUX: psz_object = "demuxer"; break;
+        case VLC_OBJECT_ACCESS: psz_object = "access"; break;
     }
 
 #ifdef UNDER_CE