changeset 7459:d3fe4d466bc2

don't inhibit drawnow in debug mode
author John W. Eaton <jwe@octave.org>
date Fri, 08 Feb 2008 03:13:39 -0500
parents 1032e24f199f
children cb8d75cedc93
files src/ChangeLog src/input.cc
diffstat 2 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2008-02-08  John W. Eaton  <jwe@octave.org>
+
+	* 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  <jwe@octave.org>
 
 	* ov-range.h (octave_range::sort): New functions.
--- 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;