projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GNU standards require "file name" instead of "filename" in
[pspp-builds.git]
/
src
/
libpspp
/
message.h
diff --git
a/src/libpspp/message.h
b/src/libpspp/message.h
index 8f86d0a8f834110125bacf11da16f51c47ba3994..3422a6ed1e456c964915a493bf0674d4005e213f 100644
(file)
--- a/
src/libpspp/message.h
+++ b/
src/libpspp/message.h
@@
-22,28
+22,21
@@
#include <stdarg.h>
#include <stdbool.h>
#include <stdarg.h>
#include <stdbool.h>
+#include "compiler.h"
/* Message classes. */
enum
{
SE, SW, SM, /* Script error/warning/message. */
/* 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. */
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
{
/* A file location. */
struct file_locator
{
- const char *file
name; /* File
name. */
+ const char *file
_name; /* File
name. */
int line_number; /* Line number. */
};
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 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 *);
/* File-locator stack. */
void err_push_file_locator (const struct file_locator *);
void err_pop_file_locator (const struct file_locator *);