projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed bug closing variable type dialog
[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 7d5cf72f84ff89fb689136ad820eb68c96477106..1a2cd27f0d8cb12b41999342dc4cf8347d678057 100644
(file)
--- 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.
/* PSPP - computes sample statistics.
Copyright (C) 1997-9, 2000, 2006 Free Software Foundation, Inc.
- Written by Ben Pfaff <blp@gnu.org>.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
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 "exit.h"
#include "linebreak.h"
-#include <language/line-buffer.h>
+#include <libpspp/msg-locator.h>
+#include <libpspp/getl.h>
#include <data/settings.h>
#include <libpspp/message.h>
#include <data/settings.h>
#include <libpspp/message.h>
+#include <libpspp/str.h>
#include <errno.h>
#include <errno.h>
+#include <stdio.h>
+
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "gettext.h"
#define _(msgid) gettext (msgid)
@@
-40,7
+43,7
@@
static const char *error_file;
static void handle_msg (const struct msg *);
static void handle_msg (const struct msg *);
-static FILE *msg_file;
+static FILE *msg_file
;
void
msg_ui_set_error_file (const char *filename)
void
msg_ui_set_error_file (const char *filename)
@@
-49,7
+52,7
@@
msg_ui_set_error_file (const char *filename)
}
void
}
void
-msg_ui_init (
void
)
+msg_ui_init (
struct source_stream *ss
)
{
msg_file = stdout;
{
msg_file = stdout;
@@
-65,23
+68,25
@@
msg_ui_init (void)
msg_file = stdout;
}
}
msg_file = stdout;
}
}
- msg_init (
handle_msg, get_msg_location
);
+ msg_init (
ss, handle_msg
);
}
void
msg_ui_done (void)
{
msg_done ();
}
void
msg_ui_done (void)
{
msg_done ();
- fclose (msg_file);
+ 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
/* 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."));
{
if (get_errorbreak () && error_count)
msg (MN, _("Terminating execution of syntax file due to error."));
@@
-94,7
+99,7
@@
check_msg_count (void)
else
return;
else
return;
- getl_abort_noninteractive ();
+ getl_abort_noninteractive (
ss
);
}
}
}
}