driver: New function output_log_nocopy().
[pspp] / src / output / driver.c
index f40876449b9ef473121a7075a656fca171a8188b..f627e31248d69c1398739bd369307ec94dcd86fc 100644 (file)
@@ -91,7 +91,7 @@ put_strftime (const char *key, const char *format,
 void
 output_engine_push (void)
 {
-  struct output_engine *e = xzalloc (sizeof (*e));
+  struct output_engine *e = XZALLOC (struct output_engine);
 
   llx_init (&e->drivers);
 
@@ -366,6 +366,12 @@ output_log (const char *format, ...)
   char *s = xvasprintf (format, args);
   va_end (args);
 
+  output_log_nocopy (s);
+}
+
+void
+output_log_nocopy (char *s)
+{
   output_submit (text_item_create_nocopy (TEXT_ITEM_LOG, s, NULL));
 }