Mercurial > hg > octave-lyh
changeset 16210:78365c56a762
make global line_editing variable static in octave.cc
* octave.cc (line_editing): Declare static.
* input.h, input.cc (line_editing): Delete. Remove
* oct-parse.in.yy (eval_string, parse_fcn_file): Don't protect.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 06 Mar 2013 22:56:56 -0500 |
parents | e7ff32e7cf82 |
children | d2b268936783 b1283d4c06c2 |
files | libinterp/interpfcn/input.cc libinterp/octave.cc libinterp/parse-tree/oct-parse.in.yy libinterp/parse-tree/parse.h |
diffstat | 4 files changed, 4 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interpfcn/input.cc +++ b/libinterp/interpfcn/input.cc @@ -156,8 +156,6 @@ eof = false; - assert (line_editing); - std::string retval = command_editor::readline (s, eof); if (! eof && retval.empty ())
--- a/libinterp/octave.cc +++ b/libinterp/octave.cc @@ -97,6 +97,10 @@ // The last component of octave_program_invocation_name. static std::string octave_program_name; +// TRUE means we are using readline. +// (--no-line-editing) +static bool line_editing = true; + // TRUE means we read ~/.octaverc and ./.octaverc. // (--norc; --no-init-file; -f) static bool read_init_files = true;
--- a/libinterp/parse-tree/oct-parse.in.yy +++ b/libinterp/parse-tree/oct-parse.in.yy @@ -95,10 +95,6 @@ #define malloc GNULIB_NAMESPACE::malloc #endif -// TRUE means we are using readline. -// (--no-line-editing) -bool line_editing = true; - // TRUE means we printed messages about reading startup files. bool reading_startup_message_printed = false; @@ -3161,10 +3157,6 @@ frame.add_fcn (command_editor::set_input_stream, in_stream); - frame.protect_var (line_editing); - - line_editing = false; - frame.add_fcn (command_history::ignore_entries, command_history::ignoring_entries ()); @@ -3888,10 +3880,6 @@ octave_parser curr_parser (eval_str); - frame.protect_var (line_editing); - - line_editing = false; - do { curr_parser.reset ();
--- a/libinterp/parse-tree/parse.h +++ b/libinterp/parse-tree/parse.h @@ -70,9 +70,6 @@ // Nonzero means print parser debugging info (-d). extern int octave_debug; -// TRUE means we are using readline. -extern bool line_editing; - // TRUE means we printed messages about reading startup files. extern bool reading_startup_message_printed;