*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
*
- * Authors:
+ * Authors: Vincent Seguin <seguin@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "common.h"
#include "threads.h"
#include "mtime.h"
-#include "plugins.h"
+
#include "intf_msg.h"
#include "interface.h"
#include "intf_console.h"
}
#endif
+#ifdef INTF_MSG_QUEUE
+ /* destroy lock */
+ vlc_mutex_destroy( &p_main->p_msg->lock );
+#endif
+
/* Free structure */
free( p_main->p_msg );
}
{
va_list ap;
- if( i_level >= p_main->p_intf->i_warning_level )
+ if( i_level >= p_main->i_warning_level )
{
va_start( ap, psz_format );
QueueMsg( p_main->p_msg, INTF_MSG_WARN, psz_format, ap );
{
va_list ap;
- if( i_level >= p_main->p_intf->i_warning_level )
+ if( i_level >= p_main->i_warning_level )
{
va_start( ap, psz_format );
QueueMsg( p_main->p_msg, INTF_MSG_WARN, psz_format, ap );
vasprintf( &psz_str, psz_format, ap );
#else
psz_str = (char*) malloc( strlen(psz_format) + INTF_MAX_MSG_SIZE );
- vsprintf( psz_str, psz_format, ap );
#endif
if( psz_str == NULL )
{
fprintf(stderr, "\n" );
exit( errno );
}
+#ifdef HAVE_VASPRINTF
+#else
+ vsprintf( psz_str, psz_format, ap );
+#endif
#ifdef INTF_MSG_QUEUE /*...................................... queue mode ...*/
vlc_mutex_lock( &p_msg->lock ); /* get lock */
p_msg_item->i_type = i_type;
p_msg_item->psz_msg = psz_str;
#ifdef DEBUG
- p_msg_item->date = mdate();
+ p_msg_item->date = mdate();
#endif
#ifdef INTF_MSG_QUEUE /*......................................... queue mode */