# HG changeset patch # User John W. Eaton # Date 1202458419 18000 # Node ID d3fe4d466bc2466acf85f5490d171adb92b1abbb # Parent 1032e24f199f6679577c9f73af138913705d27d5 don't inhibit drawnow in debug mode diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2008-02-08 John W. Eaton + + * input.cc (interactive_input): Eliminate debug arg. Change All uses. + (get_user_input): Don't process input_buf if there is an error. + Call reset_error_handler instead of setting error_state to 0. + 2008-02-07 John W. Eaton * ov-range.h (octave_range::sort): New functions. diff --git a/src/input.cc b/src/input.cc --- a/src/input.cc +++ b/src/input.cc @@ -213,13 +213,11 @@ } static inline std::string -interactive_input (const std::string& s, bool debug = false, - bool force_readline = false) +interactive_input (const std::string& s, bool force_readline = false) { Vlast_prompt_time.stamp (); - if (! debug - && (Vdrawnow_requested && (interactive || forced_interactive))) + if (Vdrawnow_requested && (interactive || forced_interactive)) { feval ("drawnow"); @@ -658,9 +656,9 @@ octave_diary << prompt; - std::string input_buf = interactive_input (prompt.c_str (), debug, true); + std::string input_buf = interactive_input (prompt.c_str (), true); - if (! input_buf.empty ()) + if (! (error_state || input_buf.empty ())) { if (! input_from_startup_file) command_history::add (input_buf); @@ -740,7 +738,7 @@ // evaluating user input, extra error messages will not be // printed after we return. - error_state = 0; + reset_error_handler (); retval = octave_value_list (); @@ -805,7 +803,7 @@ while (1) { - std::string input_buf = interactive_input (prompt_string, false, true); + std::string input_buf = interactive_input (prompt_string, true); if (input_buf == "yes") return true;