X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fterminal%2Fmsg-ui.c;h=1a2cd27f0d8cb12b41999342dc4cf8347d678057;hb=dda5e7a6be2af282b1644e04415f24b7b2381d97;hp=ddd927c58f1b31f4c746e704d0161a4c21ea66b6;hpb=2997cc6481d0744e910eccb6f23d56efe93d32d3;p=pspp-builds.git diff --git a/src/ui/terminal/msg-ui.c b/src/ui/terminal/msg-ui.c index ddd927c5..1a2cd27f 100644 --- a/src/ui/terminal/msg-ui.c +++ b/src/ui/terminal/msg-ui.c @@ -1,6 +1,5 @@ /* PSPP - computes sample statistics. Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc. - Written by Ben Pfaff . This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -24,10 +23,14 @@ #include "exit.h" #include "linebreak.h" -#include +#include +#include #include #include +#include #include +#include + #include "gettext.h" #define _(msgid) gettext (msgid) @@ -49,7 +52,7 @@ msg_ui_set_error_file (const char *filename) } void -msg_ui_init (void) +msg_ui_init (struct source_stream *ss) { msg_file = stdout; @@ -65,25 +68,25 @@ msg_ui_init (void) msg_file = stdout; } } - msg_init (handle_msg, get_msg_location); + msg_init (ss, handle_msg); } void msg_ui_done (void) { msg_done (); + msg_locator_done (); if ( msg_file ) /* FIXME: do we really want to close stdout ?? */ fclose (msg_file); } - /* Checks whether we've had so many errors that it's time to quit processing this syntax file. */ void -check_msg_count (void) +check_msg_count (struct source_stream *ss) { - if (!getl_is_interactive ()) + if (!getl_is_interactive (ss)) { if (get_errorbreak () && error_count) msg (MN, _("Terminating execution of syntax file due to error.")); @@ -96,7 +99,7 @@ check_msg_count (void) else return; - getl_abort_noninteractive (); + getl_abort_noninteractive (ss); } }