changeset 3804:4073be5aefa1

[project @ 2001-02-28 08:36:04 by jwe]
author jwe
date Wed, 28 Feb 2001 08:38:39 +0000
parents 63c75bc3db82
children 44386b0e53da
files src/ChangeLog src/input.cc src/input.h src/toplev.cc
diffstat 4 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Feb 28 08:24:43 2001 +0000
+++ b/src/ChangeLog	Wed Feb 28 08:38:39 2001 +0000
@@ -1,3 +1,8 @@
+2001-02-28  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* toplev.cc (main_loop): Set retval to non-zero value if error
+	occurs when not interactive.
+
 2001-02-26  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* parse.y (gobble_leading_white_space): Handle CRLF here too.
--- a/src/input.cc	Wed Feb 28 08:24:43 2001 +0000
+++ b/src/input.cc	Wed Feb 28 08:38:39 2001 +0000
@@ -124,7 +124,7 @@
 // The current line of input, from wherever.
 std::string current_input_line;
 
-// TRUE after a call to completion_matches().
+// TRUE after a call to completion_matches.
 bool octave_completion_matches_called = false;
 
 static void
--- a/src/input.h	Wed Feb 28 08:24:43 2001 +0000
+++ b/src/input.h	Wed Feb 28 08:38:39 2001 +0000
@@ -72,7 +72,7 @@
 // A line of input.
 extern std::string current_input_line;
 
-// TRUE after a call to completion_matches().
+// TRUE after a call to completion_matches.
 extern bool octave_completion_matches_called;
 
 extern std::string gnu_readline (const std::string& s, bool force_readline = false);
--- a/src/toplev.cc	Wed Feb 28 08:24:43 2001 +0000
+++ b/src/toplev.cc	Wed Feb 28 08:38:39 2001 +0000
@@ -148,7 +148,11 @@
 	  if (error_state)
 	    {
 	      if (! (interactive || forced_interactive))
-		break;
+		{
+		  // We should exit with a non-zero status.
+		  retval = 1;
+		  break;
+		}
 	    }
 	  else
 	    {