# HG changeset patch # User jwe # Date 757634666 0 # Node ID bfda7a46e83758e929d1ec9022150dc71a3b3c6a # Parent 1ef675458060a58ee16b7ad1cfa51bc3c8617498 [project @ 1994-01-03 22:04:26 by jwe] diff -r 1ef675458060 -r bfda7a46e837 src/symtab.cc --- a/src/symtab.cc Mon Jan 03 21:50:22 1994 +0000 +++ b/src/symtab.cc Mon Jan 03 22:04:26 1994 +0000 @@ -181,10 +181,7 @@ int symbol_def::save (ostream& os, int mark_as_global) { - if (definition) - return definition->save (os, mark_as_global); - else - return 0; + return definition->save (os, mark_as_global); } int @@ -531,28 +528,23 @@ int symbol_record::save (ostream& os, int mark_as_global = 0) { - int status = 0; + int status = -1; // This is a kludge, but hey, it doesn't make sense to save them // anyway, does it? Even if it did, we would just have trouble trying // to read NaN and Inf on lots of systems anyway... +// +// Should we also save the help string? Maybe someday. if (is_read_only ()) - { - warning ("save: sorry, can't save read-only variable `%s'", nm); - status = -1; - } + warning ("save: sorry, can't save read-only variable `%s'", nm); else if (is_function ()) - { - warning ("save: sorry, can't save function `%s'", nm); - status = -1; - } + warning ("save: sorry, can't save function `%s'", nm); + else if (! is_defined ()) + warning ("save: sorry, can't save undefined variable `%s'", nm); else { -// Should we also save the help string? Maybe someday. - os << "# name: " << nm << "\n"; - status = definition->save (os, mark_as_global); }