Mercurial > hg > octave-lyh
diff src/error.cc @ 3811:855bf76e1fe1
[project @ 2001-04-18 03:44:30 by jwe]
author | jwe |
---|---|
date | Wed, 18 Apr 2001 03:44:31 +0000 |
parents | 0ac9388e7e1f |
children | c554ad71bafc |
line wrap: on
line diff
--- a/src/error.cc +++ b/src/error.cc @@ -68,8 +68,8 @@ // the `unwind_protect' statement. bool buffer_error_messages = false; -// The message buffer -std::ostrstream *error_message_buffer = 0; +// The message buffer. +static std::ostrstream *error_message_buffer = 0; // Warning messages are never buffered. // XXX FIXME XXX -- we should provide another way to turn them off... @@ -535,7 +535,7 @@ char *error_text = error_message_buffer->str (); - bind_builtin_constant ("__error_text__", error_text, true); + bind_builtin_variable ("__error_text__", error_text, true); delete [] error_text; @@ -544,16 +544,17 @@ error_message_buffer = 0; } else - bind_builtin_constant ("__error_text__", "", true); + bind_builtin_variable ("__error_text__", "", true); } void clear_global_error_variable (void *) { delete error_message_buffer; + error_message_buffer = 0; - bind_builtin_constant ("__error_text__", "", true); + bind_builtin_variable ("__error_text__", "", true); } static int