changeset 3811:855bf76e1fe1

[project @ 2001-04-18 03:44:30 by jwe]
author jwe
date Wed, 18 Apr 2001 03:44:31 +0000
parents f19f00339363
children 23994b10c8b7
files src/ChangeLog src/error.cc src/error.h src/symtab.cc
diffstat 4 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Thu Mar 29 21:03:02 2001 +0000
+++ b/src/ChangeLog	Wed Apr 18 03:44:31 2001 +0000
@@ -1,3 +1,11 @@
+2001-04-17  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* symtab.cc (define_builtin_const): Don't call replace_all_defs
+	here.
+
+	* error.cc (error_message_buffer): Now static.
+	* error.h (error_message_buffer): Delete extern declaration.
+
 2001-03-29  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* DLD-FUNCTIONS/besselj.cc (besselh): Use K arg.
--- a/src/error.cc	Thu Mar 29 21:03:02 2001 +0000
+++ b/src/error.cc	Wed Apr 18 03:44:31 2001 +0000
@@ -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
--- a/src/error.h	Thu Mar 29 21:03:02 2001 +0000
+++ b/src/error.h	Wed Apr 18 03:44:31 2001 +0000
@@ -47,9 +47,6 @@
 // the `unwind_protect' statement.
 extern bool buffer_error_messages;
 
-// The message buffer
-extern std::ostrstream *error_message_buffer;
-
 #endif
 
 /*
--- a/src/symtab.cc	Thu Mar 29 21:03:02 2001 +0000
+++ b/src/symtab.cc	Wed Apr 18 03:44:31 2001 +0000
@@ -239,7 +239,7 @@
 
   if (! read_only_error ("redefine"))
     {
-      replace_all_defs (new symbol_def (v, symbol_record::BUILTIN_CONSTANT));
+      definition->define (v, symbol_record::BUILTIN_CONSTANT);
 
       retval = true;
     }