Mercurial > octave-dspies
diff libinterp/parse-tree/oct-parse.in.yy @ 16198:2c5c538be353
clean up input.cc and eliminate ff_instream global variable
* input.h, input.cc (gnu_readline): Now static. Handle only
interactive input. Delete optional force_readline argument. Delete
single argument version. Change all callers.
(interactive_input): Delete force_readline argument. Delete single
argument version. Change all callers.
(octave_base_reader::octave_gets): Handle only interactive input.
(get_input_from_file): Delete.
(ff_instream): Delete global variable.
* oct-parse.in.yy (parse_fcn_file): Open file directly here without
using get_input_from_file. Don't protect ff_instream.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 05 Mar 2013 17:43:00 -0500 |
parents | b52d2f9294b6 |
children | 810a71122c25 |
line wrap: on
line diff
--- a/libinterp/parse-tree/oct-parse.in.yy Tue Mar 05 14:03:36 2013 -0800 +++ b/libinterp/parse-tree/oct-parse.in.yy Tue Mar 05 17:43:00 2013 -0500 @@ -3375,8 +3375,6 @@ frame.add_fcn (command_editor::set_input_stream, in_stream); - frame.protect_var (ff_instream); - frame.protect_var (reading_fcn_file); frame.protect_var (line_editing); @@ -3388,7 +3386,10 @@ command_history::ignore_entries (); - FILE *ffile = get_input_from_file (ff, 0); + FILE *ffile = 0; + + if (! ff.empty ()) + ffile = gnulib::fopen (ff.c_str (), "rb"); frame.add_fcn (safe_fclose, ffile);