projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
message: Give MSG_ values for categories and severities different prefixes
[pspp-builds.git]
/
src
/
ui
/
gui
/
message-dialog.c
diff --git
a/src/ui/gui/message-dialog.c
b/src/ui/gui/message-dialog.c
index 7513295323988677b38c26807cff73b96d10b04a..ccb436406c7edebcb1fdfd6d84a762d5b2960be5 100644
(file)
--- a/
src/ui/gui/message-dialog.c
+++ b/
src/ui/gui/message-dialog.c
@@
-1,5
+1,5
@@
/* PSPPIRE - a graphical user interface for PSPP.
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005
, 2010
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-23,6
+23,7
@@
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
+#include <libpspp/assertion.h>
#include <libpspp/message.h>
#include <libpspp/str.h>
#include <libpspp/msg-locator.h>
#include <libpspp/message.h>
#include <libpspp/str.h>
#include <libpspp/msg-locator.h>
@@
-92,53
+93,53
@@
format_message (struct msg *m, struct string *msg)
switch (m->severity)
{
switch (m->severity)
{
- case MSG_ERROR:
+ case MSG_
S_
ERROR:
switch (m->category)
{
switch (m->category)
{
- case MSG_SYNTAX:
+ case MSG_
C_
SYNTAX:
label = _("syntax error");
break;
label = _("syntax error");
break;
- case MSG_DATA:
+ case MSG_
C_
DATA:
label = _("data file error");
break;
label = _("data file error");
break;
- case MSG_GENERAL:
+ case MSG_
C_
GENERAL:
default:
label = _("PSPP error");
break;
}
break;
default:
label = _("PSPP error");
break;
}
break;
- case MSG_WARNING:
+ case MSG_
S_
WARNING:
switch (m->category)
{
switch (m->category)
{
- case MSG_SYNTAX:
+ case MSG_
C_
SYNTAX:
label = _("syntax warning");
break;
label = _("syntax warning");
break;
- case MSG_DATA:
+ case MSG_
C_
DATA:
label = _("data file warning");
break;
label = _("data file warning");
break;
- case MSG_GENERAL:
+ case MSG_
C_
GENERAL:
default:
label = _("PSPP warning");
break;
}
break;
default:
label = _("PSPP warning");
break;
}
break;
- case MSG_NOTE:
+ case MSG_
S_
NOTE:
default:
switch (m->category)
{
default:
switch (m->category)
{
- case MSG_SYNTAX:
+ case MSG_
C_
SYNTAX:
label = _("syntax information");
break;
label = _("syntax information");
break;
- case MSG_DATA:
+ case MSG_
C_
DATA:
label = _("data file information");
break;
label = _("data file information");
break;
- case MSG_GENERAL:
+ case MSG_
C_
GENERAL:
default:
label = _("PSPP information");
break;
default:
label = _("PSPP information");
break;
@@
-156,15
+157,17
@@
enqueue_msg (const struct msg *msg)
switch (m->severity)
{
switch (m->severity)
{
- case MSG_ERROR:
+ case MSG_
S_
ERROR:
error_cnt++;
break;
error_cnt++;
break;
- case MSG_WARNING:
+ case MSG_
S_
WARNING:
warning_cnt++;
break;
warning_cnt++;
break;
- case MSG_NOTE:
+ case MSG_
S_
NOTE:
note_cnt++;
break;
note_cnt++;
break;
+ case MSG_N_SEVERITIES:
+ NOT_REACHED ();
}
if (g_queue_get_length (early_queue) < MAX_EARLY_MESSAGES)
}
if (g_queue_get_length (early_queue) < MAX_EARLY_MESSAGES)