Rewrite PSPP output engine.
[pspp] / src / ui / terminal / msg-ui.c
index fb0e7557e2e017da38c9b4c41f8715b3122a0ba2..1a5e2764be12579b308c29b60e7cfbe47cac518a 100644 (file)
 
 #include "msg-ui.h"
 
-#include "linebreak.h"
-#include "localcharset.h"
-
-#include <libpspp/msg-locator.h>
-#include <libpspp/getl.h>
 #include <data/settings.h>
+#include <libpspp/getl.h>
 #include <libpspp/message.h>
+#include <libpspp/msg-locator.h>
 #include <libpspp/str.h>
 #include <output/journal.h>
-#include <output/output.h>
-#include <output/table.h>
+#include <output/driver.h>
+#include <output/tab.h>
+
 #include <errno.h>
+#include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
 
+#include "unilbrk.h"
+#include "localcharset.h"
+
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 #define N_(msgid) msgid
@@ -187,9 +189,9 @@ handle_msg (const struct msg *m)
       /* Disable screen output devices, because the error should
          already have been reported to the screen with the
          dump_message call above. */
-      outp_enable_device (false, OUTP_DEV_SCREEN);
+      output_set_type_enabled (false, OUTPUT_DEVICE_SCREEN);
       tab_output_text (TAB_LEFT, ds_cstr (&string));
-      outp_enable_device (true, OUTP_DEV_SCREEN);
+      output_set_type_enabled (true, OUTPUT_DEVICE_SCREEN);
     }
 
   ds_destroy (&string);
@@ -224,7 +226,7 @@ dump_message (char *msg, unsigned width, unsigned indent,
   /* Break into lines. */
   if (indent > width / 3)
     indent = width / 3;
-  mbs_width_linebreaks (string, length,
+  ulc_width_linebreaks (string, length,
                         width - indent, -indent, 0,
                         NULL, locale_charset (), breaks);
 
@@ -267,7 +269,7 @@ write_stream (int line_indent, struct substring line, void *stream_)
 
 /* Writes LINE to the journal. */
 static void
-write_journal (int line_indent, struct substring line, void *unused UNUSED)
+write_journal (int line_indent UNUSED, struct substring line, void *unused UNUSED)
 {
   char *s = xstrndup (ss_data (line), ss_length (line));
   journal_write (true, s);