diff src/symtab.cc @ 276:4cf3c7df0e3d

[project @ 1994-01-07 02:05:57 by jwe]
author jwe
date Fri, 07 Jan 1994 02:05:57 +0000
parents 221a5fa8bf01
children ee3da0884aaa
line wrap: on
line diff
--- a/src/symtab.cc
+++ b/src/symtab.cc
@@ -1,7 +1,7 @@
 // Symbol table classes.                              -*- C++ -*-
 /*
 
-Copyright (C) 1992, 1993 John W. Eaton
+Copyright (C) 1992, 1993, 1994 John W. Eaton
 
 This file is part of Octave.
 
@@ -179,9 +179,9 @@
 }
 
 int
-symbol_def::save (ostream& os, int mark_as_global)
+symbol_def::save (ostream& os, int mark_as_global, int precision)
 {
-  return definition->save (os, mark_as_global);
+  return definition->save (os, mark_as_global, precision);
 }
 
 int
@@ -526,7 +526,8 @@
 }
 
 int
-symbol_record::save (ostream& os, int mark_as_global = 0)
+symbol_record::save (ostream& os, int mark_as_global = 0,
+		     int precision = 17)
 {
   int status = -1;
 
@@ -543,7 +544,7 @@
   else if (is_defined ())
     {
       os << "# name: " << nm << "\n";
-      status = definition->save (os, mark_as_global);
+      status = definition->save (os, mark_as_global, precision);
     }
 
   return status;
@@ -961,7 +962,8 @@
 }
 
 int
-symbol_table::save (ostream& os, int mark_as_global = 0)
+symbol_table::save (ostream& os, int mark_as_global = 0,
+		    int precision = 17)
 {
   int status = 0;
   int count;
@@ -971,7 +973,7 @@
     {
       while (*ptr != (char *) NULL)
 	{
-	  if (save (os, *ptr, mark_as_global))
+	  if (save (os, *ptr, mark_as_global, precision))
 	    status++;
 	  delete [] *ptr++;
 	}
@@ -981,12 +983,13 @@
 }
 
 int
-symbol_table::save (ostream& os, const char *name, int mark_as_global = 0)
+symbol_table::save (ostream& os, const char *name,
+		    int mark_as_global = 0, int precision = 17)
 {
   int status = 0;
   symbol_record *sr = lookup (name, 0, 0);
   if (sr != (symbol_record *) NULL)
-    status = sr->save (os, mark_as_global);
+    status = sr->save (os, mark_as_global, precision);
   return status;
 }