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. */