summaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-19 04:10:58 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-19 04:10:58 +0000
commit3e45a7195d96b92f20d7937a5a8aec2a7921ada9 (patch)
treee8f95541146ff846daf5d9ce7654cb1a96a92a80 /libgfortran/runtime
parent0e94b693cdedae5053cdd1d92ca7676fc5db39f6 (diff)
downloadgcc-3e45a7195d96b92f20d7937a5a8aec2a7921ada9.tar.gz
2007-10-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libfortran/33795 * libgfortran.h: Add unbuffered_preconnected. * io/unix.c (output_stream): Set stream unbuffered flag if options.unbuffered_preconnected has been set. (error_stream): Ditto. * runtime/environ.c (variable_table): Add to environment variable table the entry: GFORTRAN_UNBUFFERED_PRECONNECTED. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/runtime')
-rw-r--r--libgfortran/runtime/environ.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c
index a7ee3a771cb..ba8283e68aa 100644
--- a/libgfortran/runtime/environ.c
+++ b/libgfortran/runtime/environ.c
@@ -299,6 +299,10 @@ static variable variable_table[] = {
"If TRUE, all output is unbuffered. This will slow down large writes "
"but can be\nuseful for forcing data to be displayed immediately.", 0},
+ {"GFORTRAN_UNBUFFERED_PRECONNECTED", 0, &options.unbuffered_preconnected,
+ init_boolean, show_boolean,
+ "If TRUE, output to preconnected units is unbuffered.", 0},
+
{"GFORTRAN_SHOW_LOCUS", 1, &options.locus, init_boolean, show_boolean,
"If TRUE, print filename and line number where runtime errors happen.", 0},
@@ -346,32 +350,6 @@ init_variables (void)
}
-/* check_buffered()-- Given an unit number n, determine if an override
- * for the stream exists. Returns zero for unbuffered, one for
- * buffered or two for not set. */
-
-int
-check_buffered (int n)
-{
- char name[22 + sizeof (n) * 3];
- variable v;
- int rv;
-
- if (options.all_unbuffered)
- return 0;
-
- sprintf (name, "GFORTRAN_UNBUFFERED_%d", n);
-
- v.name = name;
- v.value = 2;
- v.var = &rv;
-
- init_boolean (&v);
-
- return rv;
-}
-
-
void
show_variables (void)
{