Continue reforming error message support. In this phase, rename
[pspp-builds.git] / src / data / sys-file-reader.c
index 7ccf969b775e9ea763d1b35cae40bc345d696ac3..4c69d2bfa295cec42b33b347c032ffbfabe988fb 100644 (file)
@@ -123,17 +123,22 @@ corrupt_msg (int class, const char *format,...)
 static void
 corrupt_msg (int class, const char *format,...)
 {
-  struct error e;
+  struct msg m;
   va_list args;
+  struct string text;
 
-  e.class = class;
-  e.where.file_name = NULL;
-  e.where.line_number = 0;
-  e.title = _("corrupt system file: ");
-
+  ds_create (&text, _("corrupt system file: "));
   va_start (args, format);
-  err_vmsg (&e, format, args);
+  ds_vprintf (&text, format, args);
   va_end (args);
+
+  m.category = msg_class_to_category (class);
+  m.severity = msg_class_to_severity (class);
+  m.where.file_name = NULL;
+  m.where.line_number = 0;
+  m.text = ds_c_str (&text);
+
+  msg_emit (&m);
 }
 
 /* Closes a system file after we're done with it. */