# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <stdarg.h> /* va_list for BSD */
#ifdef UNDER_CE
int i_dummy;
#endif
- static const char * ppsz_type[4] = { "", " error", " warning", " debug" };
- static const char *ppsz_color[4] = { WHITE, RED, YELLOW, GRAY };
+ static const char ppsz_type[4][9] = { "", " error", " warning", " debug" };
+ static const char ppsz_color[4][8] = { WHITE, RED, YELLOW, GRAY };
const char *psz_object;
libvlc_priv_t *priv = libvlc_priv (p_this->p_libvlc);
int i_type = p_item->i_type;
return p_ctx;
}
+void msg_StackDestroy (void *data)
+{
+ msg_context_t *p_ctx = data;
+
+ free (p_ctx->psz_message);
+ free (p_ctx);
+}
+
void msg_StackSet( int i_code, const char *psz_message, ... )
{
va_list ap;
if( p_ctx == NULL )
return;
-
- va_start( ap, psz_message );
free( p_ctx->psz_message );
+ va_start( ap, psz_message );
if( vasprintf( &p_ctx->psz_message, psz_message, ap ) == -1 )
p_ctx->psz_message = NULL;
va_end( ap );