#include <string.h>
#include <unistd.h>
-#include <libpspp/alloc.h>
#include <libpspp/version.h>
#include "progname.h"
+#include "xalloc.h"
#include "xvasprintf.h"
/* Current command name as set by msg_set_command_name(). */
void
msg_emit (struct msg *m)
{
- get_msg_location (s_stream, &m->where);
+ if ( s_stream )
+ get_msg_location (s_stream, &m->where);
+
if (!messages_disabled)
- msg_handler (m);
+ msg_handler (m);
free (m->text);
}