diff src/variables.cc @ 3248:68259f410026

[project @ 1999-07-13 03:34:54 by jwe]
author jwe
date Tue, 13 Jul 1999 03:40:17 +0000
parents d54ef0aa6e82
children 4d33b1e56bff
line wrap: on
line diff
--- a/src/variables.cc	Sat Jun 19 06:51:15 1999 +0000
+++ b/src/variables.cc	Tue Jul 13 03:40:17 1999 +0000
@@ -801,27 +801,18 @@
   return retval;
 }
 
-// XXX FIXME XXX -- this should take a list of regular expressions
-// naming the variables to look for.
-
 static octave_value_list
 do_who (int argc, const string_vector& argv)
 {
   octave_value_list retval;
 
   bool show_builtins = false;
-  bool show_functions = (curr_sym_tab == top_level_sym_tab);
-  bool show_variables = true;
+  bool show_functions = false;
+  bool show_variables = false;
   bool show_verbose = false;
 
   string my_name = argv[0];
 
-  if (argc > 1)
-    {
-      show_functions = false;
-      show_variables = false;
-    }
-
   int i;
   for (i = 1; i < argc; i++)
     {
@@ -846,6 +837,15 @@
 	break;
     }
 
+  // If no options were specified to select the type of symbol to
+  // display, then set defaults.
+
+  if (! (show_builtins || show_functions || show_variables))
+    {
+      show_functions = (curr_sym_tab == top_level_sym_tab);
+      show_variables = true;
+    }
+
   int npats = argc - i;
   string_vector pats (npats);
   for (int j = 0; j < npats; j++)