changeset 3815:c554ad71bafc

[project @ 2001-04-19 19:50:52 by jwe]
author jwe
date Thu, 19 Apr 2001 19:50:54 +0000
parents fb01838d0f38
children 8cb594807664
files ChangeLog Makeconf.in src/ChangeLog src/error.cc src/error.h src/parse.y
diffstat 6 files changed, 43 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Apr 19 02:26:07 2001 +0000
+++ b/ChangeLog	Thu Apr 19 19:50:54 2001 +0000
@@ -1,3 +1,8 @@
+2001-04-19  David Livings <david.livings@asa.co.uk>
+
+	* Makeconf.in (mk-libdir-link): Omit check for $(octlibdir)/octave
+	existing as a directory.
+
 2001-02-28  Albert Chin-A-Young  <china@thewrittenword.com>
 
 	* configure.in: Check for getpwnam in libsun only after checking
--- a/Makeconf.in	Thu Apr 19 02:26:07 2001 +0000
+++ b/Makeconf.in	Thu Apr 19 19:50:54 2001 +0000
@@ -481,12 +481,8 @@
 if [ "$$src" = "octave" ] ; then \
   true ; \
 else \
-  if [ -d "$(libdir)/octave" ] ; then \
-    true ; \
-  else \
-    cd $(libdir) ; \
-    rm -f octave ; \
-    $(LN_S) $$src octave ; \
-  fi ; \
+  cd $(libdir) ; \
+  rm -f octave ; \
+  $(LN_S) $$src octave ; \
 fi
 endef
--- a/src/ChangeLog	Thu Apr 19 02:26:07 2001 +0000
+++ b/src/ChangeLog	Thu Apr 19 19:50:54 2001 +0000
@@ -1,3 +1,18 @@
+2001-04-19  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* parse.y (fold (tree_binary_expression *)):
+	Set discard_error_messages here instead of buffer_error_messages.
+	Don't add clear_global_error_variable to the unwind_protect stack.
+	(fold (tree_unary_expression *)): Likewise.
+	(finish_colon_expression): Likewise.
+	(finish_matrix): Likewise.
+
+	* error.cc (panic): Set discard_error_messages to false here.
+	(verror): Return immediately if discard_error_messages is true.
+
+	* error.cc (discard_error_messages): New global variable.
+	* error.h: Provide declaration.
+
 2001-04-18  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* lex.l: If unexpected character is EOF, report EOF error instead
--- a/src/error.cc	Thu Apr 19 02:26:07 2001 +0000
+++ b/src/error.cc	Thu Apr 19 19:50:54 2001 +0000
@@ -68,6 +68,9 @@
 // the `unwind_protect' statement.
 bool buffer_error_messages = false;
 
+// TRUE means error messages are turned off.
+bool discard_error_messages = false;
+
 // The message buffer.
 static std::ostrstream *error_message_buffer = 0;
 
@@ -99,6 +102,9 @@
 static void
 verror (const char *name, const char *fmt, va_list args)
 {
+  if (discard_error_messages)
+    return;
+
   if (! buffer_error_messages)
     flush_octave_stdout ();
 
@@ -358,6 +364,7 @@
   va_list args;
   va_start (args, fmt);
   buffer_error_messages = false;
+  discard_error_messages = false;
   verror ("panic", fmt, args);
   va_end (args);
   abort ();
--- a/src/error.h	Thu Apr 19 02:26:07 2001 +0000
+++ b/src/error.h	Thu Apr 19 19:50:54 2001 +0000
@@ -47,6 +47,9 @@
 // the `unwind_protect' statement.
 extern bool buffer_error_messages;
 
+// TRUE means error messages are turned off.
+extern bool discard_error_messages;
+
 #endif
 
 /*
--- a/src/parse.y	Thu Apr 19 02:26:07 2001 +0000
+++ b/src/parse.y	Thu Apr 19 19:50:54 2001 +0000
@@ -1654,10 +1654,8 @@
 
   unwind_protect_int (error_state);
 
-  unwind_protect_bool (buffer_error_messages);
-  buffer_error_messages = true;
-
-  unwind_protect::add (clear_global_error_variable, 0);
+  unwind_protect_bool (discard_error_messages);
+  discard_error_messages = true;
 
   tree_expression *op1 = e->lhs ();
   tree_expression *op2 = e->rhs ();
@@ -1704,10 +1702,8 @@
 
   unwind_protect_int (error_state);
 
-  unwind_protect_bool (buffer_error_messages);
-  buffer_error_messages = true;
-
-  unwind_protect::add (clear_global_error_variable, 0);
+  unwind_protect_bool (discard_error_messages);
+  discard_error_messages = true;
 
   tree_expression *op = e->operand ();
 
@@ -1755,10 +1751,8 @@
 
   unwind_protect_int (error_state);
 
-  unwind_protect_bool (buffer_error_messages);
-  buffer_error_messages = true;
-
-  unwind_protect::add (clear_global_error_variable, 0);
+  unwind_protect_bool (discard_error_messages);
+  discard_error_messages = true;
 
   tree_expression *base = e->base ();
   tree_expression *limit = e->limit ();
@@ -2633,10 +2627,8 @@
 
   unwind_protect_int (error_state);
 
-  unwind_protect_bool (buffer_error_messages);
-  buffer_error_messages = true;
-
-  unwind_protect::add (clear_global_error_variable, 0);
+  unwind_protect_bool (discard_error_messages);
+  discard_error_messages = true;
 
   if (m->all_elements_are_constant ())
     {
@@ -3528,7 +3520,9 @@
 	  // errors that occurred in the first part of this eval().
 
 	  buffer_error_messages = false;
+
 	  bind_global_error_variable ();
+
 	  unwind_protect::add (clear_global_error_variable, 0);
 
 	  eval_string (args(1), 0, parse_status, nargout);