projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Completely rewrite src/data/format.[ch], to achieve better
[pspp-builds.git]
/
src
/
ui
/
terminal
/
msg-ui.c
diff --git
a/src/ui/terminal/msg-ui.c
b/src/ui/terminal/msg-ui.c
index 3422da0292743065ab83bbd2b0def8b41e7a727c..9b71cb51eea1e69eb2c4670b91e171b3a765fcc1 100644
(file)
--- a/
src/ui/terminal/msg-ui.c
+++ b/
src/ui/terminal/msg-ui.c
@@
-41,7
+41,7
@@
static void handle_msg (const struct msg *);
void
msg_ui_init (void)
{
void
msg_ui_init (void)
{
- msg_init (handle_msg);
+ msg_init (handle_msg
, get_msg_location
);
}
void
}
void
@@
-50,6
+50,7
@@
msg_ui_done (void)
msg_done ();
}
msg_done ();
}
+
/* Checks whether we've had so many errors that it's time to quit
processing this syntax file. */
void
/* Checks whether we've had so many errors that it's time to quit
processing this syntax file. */
void
@@
-119,30
+120,30
@@
handle_msg (const struct msg *m)
const struct category *category = &categories[m->category];
const struct severity *severity = &severities[m->severity];
const struct category *category = &categories[m->category];
const struct severity *severity = &severities[m->severity];
- struct string string = DS_INITIALIZER;
+ struct string string = DS_
EMPTY_
INITIALIZER;
if (category->show_file_location && m->where.file_name)
{
if (category->show_file_location && m->where.file_name)
{
- ds_p
rintf
(&string, "%s:", m->where.file_name);
+ ds_p
ut_format
(&string, "%s:", m->where.file_name);
if (m->where.line_number != -1)
if (m->where.line_number != -1)
- ds_p
rintf
(&string, "%d:", m->where.line_number);
- ds_put
c
(&string, ' ');
+ ds_p
ut_format
(&string, "%d:", m->where.line_number);
+ ds_put
_char
(&string, ' ');
}
if (severity->name != NULL)
}
if (severity->name != NULL)
- ds_p
rintf
(&string, "%s: ", gettext (severity->name));
+ ds_p
ut_format
(&string, "%s: ", gettext (severity->name));
if (severity->count != NULL)
++*severity->count;
if (category->show_command_name && msg_get_command_name () != NULL)
if (severity->count != NULL)
++*severity->count;
if (category->show_command_name && msg_get_command_name () != NULL)
- ds_p
rintf
(&string, "%s: ", msg_get_command_name ());
+ ds_p
ut_format
(&string, "%s: ", msg_get_command_name ());
- ds_put
s
(&string, m->text);
+ ds_put
_cstr
(&string, m->text);
/* FIXME: Check set_messages and set_errors to determine where to
send errors and messages. */
/* FIXME: Check set_messages and set_errors to determine where to
send errors and messages. */
- dump_message (ds_c
_
str (&string), get_viewwidth (), 8, stdout);
+ dump_message (ds_cstr (&string), get_viewwidth (), 8, stdout);
ds_destroy (&string);
}
ds_destroy (&string);
}