changeset 16208:ed91ab4d4515

eliminate stdin_is_tty global variable * input.h, input.cc (stdin_is_tty): Delete. * octave.cc (octave_initialize_interpreter): Declare stdin_is_tty as a local variable.
author John W. Eaton <jwe@octave.org>
date Wed, 06 Mar 2013 19:45:53 -0500
parents 0467d68ca891
children e7ff32e7cf82
files libinterp/interpfcn/input.cc libinterp/interpfcn/input.h libinterp/octave.cc
diffstat 3 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/interpfcn/input.cc
+++ b/libinterp/interpfcn/input.cc
@@ -94,9 +94,6 @@
 // Character to append after successful command-line completion attempts.
 static char Vcompletion_append_char = ' ';
 
-// TRUE means that stdin is a terminal, not a pipe or redirected file.
-bool stdin_is_tty = false;
-
 // TRUE means this is an interactive shell.
 bool interactive = false;
 
--- a/libinterp/interpfcn/input.h
+++ b/libinterp/interpfcn/input.h
@@ -37,9 +37,6 @@
 
 extern OCTINTERP_API FILE *get_input_from_stdin (void);
 
-// TRUE means that stdin is a terminal, not a pipe or redirected file.
-extern bool stdin_is_tty;
-
 // TRUE means this is an interactive shell.
 extern bool interactive;
 
--- a/libinterp/octave.cc
+++ b/libinterp/octave.cc
@@ -898,7 +898,7 @@
 
   // If stdin is not a tty, then we are reading commands from a pipe or
   // a redirected file.
-  stdin_is_tty = gnulib::isatty (fileno (stdin));
+  bool stdin_is_tty = gnulib::isatty (fileno (stdin));
 
   interactive = (! embedded && stdin_is_tty
                  && gnulib::isatty (fileno (stdout)));