# HG changeset patch # User jwe # Date 987709854 0 # Node ID c554ad71bafc8bac6828be768a86f9ed46740ee0 # Parent fb01838d0f380ed03fdc7db338c863bc9870aed9 [project @ 2001-04-19 19:50:52 by jwe] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-04-19 David Livings + + * Makeconf.in (mk-libdir-link): Omit check for $(octlibdir)/octave + existing as a directory. + 2001-02-28 Albert Chin-A-Young * configure.in: Check for getpwnam in libsun only after checking diff --git a/Makeconf.in b/Makeconf.in --- a/Makeconf.in +++ b/Makeconf.in @@ -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 diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,18 @@ +2001-04-19 John W. Eaton + + * 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 * lex.l: If unexpected character is EOF, report EOF error instead diff --git a/src/error.cc b/src/error.cc --- a/src/error.cc +++ b/src/error.cc @@ -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 (); diff --git a/src/error.h b/src/error.h --- a/src/error.h +++ b/src/error.h @@ -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 /* diff --git a/src/parse.y b/src/parse.y --- a/src/parse.y +++ b/src/parse.y @@ -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);