GNU standards require "file name" instead of "filename" in
[pspp-builds.git] / src / libpspp / message.h
index 8f86d0a8f834110125bacf11da16f51c47ba3994..3422a6ed1e456c964915a493bf0674d4005e213f 100644 (file)
 
 #include <stdarg.h>
 #include <stdbool.h>
+#include "compiler.h"
 
 /* Message classes. */
 enum
   {
     SE, SW, SM,                        /* Script error/warning/message. */
-    IE, IS,                    /* Installation error/script error. */
     DE, DW,                    /* Data-file error/warning. */
     ME, MW, MM,                        /* General error/warning/message. */
-    ERR_CLASS_COUNT,           /* Number of message classes. */
-    ERR_CLASS_MASK = 0xf,      /* Bitmask for class. */
-    ERR_VERBOSITY_SHIFT = 4,   /* Shift count for verbosity. */
-    ERR_VERBOSITY_MASK = 0xf   /* Bitmask for verbosity. */
+    MSG_CLASS_CNT,
   };
 
-/* If passed to msg() as CLASS, the return value will cause the message
-   to be displayed only if `verbosity' is at least LEVEL. */
-#define VM(LEVEL) (MM | ((LEVEL) << ERR_VERBOSITY_SHIFT))
-
 /* A file location.  */
 struct file_locator
   {
-    const char *filename;              /* Filename. */
+    const char *file_name;             /* File name. */
     int line_number;                   /* Line number. */
   };
 
@@ -73,6 +66,9 @@ void msg (int class, const char *format, ...)
 void tmsg (int class, const char *title, const char *format, ...)
      PRINTF_FORMAT (3, 4);
 
+void verbose_msg (int level, const char *format, ...)
+     PRINTF_FORMAT (2, 3);
+
 /* File-locator stack. */
 void err_push_file_locator (const struct file_locator *);
 void err_pop_file_locator (const struct file_locator *);