diff src/load-save.cc @ 2371:dd29ab8af9e7

[project @ 1996-10-12 00:09:55 by jwe]
author jwe
date Sat, 12 Oct 1996 00:09:57 +0000
parents 0f441b4fefdb
children a628e881be66
line wrap: on
line diff
--- a/src/load-save.cc	Fri Oct 11 23:55:30 1996 +0000
+++ b/src/load-save.cc	Sat Oct 12 00:09:57 1996 +0000
@@ -49,10 +49,12 @@
 #include "oct-obj.h"
 #include "pager.h"
 #include "pt-exp.h"
+#include "pt-fvc.h"
 #include "symtab.h"
 #include "sysdep.h"
 #include "unwind-prot.h"
 #include "utils.h"
+#include "variables.h"
 
 // The default output format.  May be one of "binary", "text", or
 // "mat-binary".
@@ -85,7 +87,7 @@
 // Assumes TC is defined.
 
 static void
-install_loaded_variable (int force, char *name, const octave_value& tc,
+install_loaded_variable (int force, char *name, const octave_value& val,
 			 int global, char *doc)
 {
   // Is there already a symbol by this name?  If so, what is it?
@@ -203,8 +205,7 @@
 
   if (sr)
     {
-      octave_value *tmp_tc = new octave_value (tc);
-      sr->define (tmp_tc);
+      sr->define (val);
       if (doc)
 	sr->document (doc);
       return;
@@ -1364,7 +1365,8 @@
 			      << "type               rows   cols   name\n"
 			      << "====               ====   ====   ====\n";
 
-			  output_buf.form ("%-16s", tc.type_as_string ());
+			  string type = tc.type_name ();
+			  output_buf.form ("%-16s", type.c_str ());
 			  output_buf.form ("%7d", tc.rows ());
 			  output_buf.form ("%7d", tc.columns ());
 			  output_buf << "   ";
@@ -2083,7 +2085,8 @@
   string name = sr->name ();
   string help = sr->help ();
   int global = sr->is_linked_to_global ();
-  octave_value tc = *((octave_value *) sr->def ());
+  tree_fvc *tmp = sr->def ();
+  octave_value tc = tmp->eval (0);
 
   if (tc.is_undefined ())
     return;