Mercurial > hg > octave-lojdl
changeset 9250:80c299c84796
don't print undefined symbols in who
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Mon, 25 May 2009 07:35:19 +0200 |
parents | 470af0f93ca9 |
children | f8b8ab529913 |
files | src/ChangeLog src/variables.cc |
diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-05-25 Jaroslav Hajek <highegg@gmail.com> + + * variables.cc (do_who): Only output symbols with a defined value. + 2009-05-22 Michael Goffioul <michael.goffioul@gmail.com> * toplev.h (main_loop): Tag with OCTINTERP_API.
--- a/src/variables.cc +++ b/src/variables.cc @@ -1505,10 +1505,13 @@ for (std::list<symbol_table::symbol_record>::const_iterator p = tmp.begin (); p != tmp.end (); p++) { - if (verbose) - symbol_stats.append (*p); - else - symbol_names.push_back (p->name ()); + if (p->is_defined ()) + { + if (verbose) + symbol_stats.append (*p); + else + symbol_names.push_back (p->name ()); + } } } }