X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fterminal%2Fmsg-ui.c;h=fb0e7557e2e017da38c9b4c41f8715b3122a0ba2;hb=5b5f08a99c564c2f3e981ae0efe21ffc3c578ac4;hp=93c3683f220f9d084a2e00defb97f23fefff073e;hpb=f2ccb1b5f0ad814c1e6fcbc8f1ecaa62913b7e53;p=pspp-builds.git diff --git a/src/ui/terminal/msg-ui.c b/src/ui/terminal/msg-ui.c index 93c3683f..fb0e7557 100644 --- a/src/ui/terminal/msg-ui.c +++ b/src/ui/terminal/msg-ui.c @@ -19,6 +19,7 @@ #include "msg-ui.h" #include "linebreak.h" +#include "localcharset.h" #include #include @@ -31,6 +32,7 @@ #include #include #include +#include #include "gettext.h" #define _(msgid) gettext (msgid) @@ -88,14 +90,14 @@ check_msg_count (struct source_stream *ss) { if (!getl_is_interactive (ss)) { - if (get_errorbreak () && error_count) + if (settings_get_errorbreak () && error_count) msg (MN, _("Terminating execution of syntax file due to error.")); - else if (error_count > get_mxerrs() ) + else if (error_count > settings_get_mxerrs () ) msg (MN, _("Errors (%d) exceeds limit (%d)."), - error_count, get_mxerrs()); - else if (error_count + warning_count > get_mxwarns() ) + error_count, settings_get_mxerrs ()); + else if (error_count + warning_count > settings_get_mxwarns () ) msg (MN, _("Warnings (%d) exceed limit (%d)."), - error_count + warning_count, get_mxwarns() ); + error_count + warning_count, settings_get_mxwarns () ); else return; @@ -173,13 +175,14 @@ handle_msg (const struct msg *m) ds_put_cstr (&string, m->text); - if (msg_file != stdout || get_error_routing_to_terminal ()) - dump_message (ds_cstr (&string), get_viewwidth (), 8, + if (msg_file != stdout || settings_get_error_routing_to_terminal ()) + dump_message (ds_cstr (&string), + isatty (fileno (msg_file)) ? settings_get_viewwidth () : INT_MAX, 8, write_stream, msg_file); dump_message (ds_cstr (&string), 78, 0, write_journal, NULL); - if (get_error_routing_to_listing ()) + if (settings_get_error_routing_to_listing ()) { /* Disable screen output devices, because the error should already have been reported to the screen with the