comparison src/variables.cc @ 584:4057f845c1ee

[project @ 1994-08-07 04:40:03 by jwe]
author jwe
date Sun, 07 Aug 1994 04:40:03 +0000
parents bc813f5eb025
children 6f948c6251a9
comparison
equal deleted inserted replaced
583:10574a8435d4 584:4057f845c1ee
37 #include <strstream.h> 37 #include <strstream.h>
38 38
39 #include "octave-hist.h" 39 #include "octave-hist.h"
40 #include "unwind-prot.h" 40 #include "unwind-prot.h"
41 #include "user-prefs.h" 41 #include "user-prefs.h"
42 #include "tree-base.h"
43 #include "tree-expr.h"
42 #include "tree-const.h" 44 #include "tree-const.h"
43 #include "variables.h" 45 #include "variables.h"
44 #include "statdefs.h" 46 #include "statdefs.h"
45 #include "defaults.h" 47 #include "defaults.h"
46 #include "version.h" 48 #include "version.h"
54 #include "pager.h" 56 #include "pager.h"
55 #include "utils.h" 57 #include "utils.h"
56 #include "defun.h" 58 #include "defun.h"
57 #include "input.h" 59 #include "input.h"
58 #include "parse.h" 60 #include "parse.h"
59 #include "tree.h"
60 #include "help.h" 61 #include "help.h"
61 #include "lex.h" 62 #include "lex.h"
62 63
63 extern "C" 64 extern "C"
64 { 65 {
1737 DELETE_ARGV; 1738 DELETE_ARGV;
1738 1739
1739 return retval; 1740 return retval;
1740 } 1741 }
1741 1742
1743 // XXX FIXME XXX -- this should take a list of regular expressions
1744 // naming the variables to look for.
1745
1742 static Octave_object 1746 static Octave_object
1743 do_who (int argc, char **argv, int nargout) 1747 do_who (int argc, char **argv, int nargout)
1744 { 1748 {
1745 Octave_object retval; 1749 Octave_object retval;
1746 1750
1747 int show_builtins = 0; 1751 int show_builtins = 0;
1748 int show_functions = (curr_sym_tab == top_level_sym_tab); 1752 int show_functions = (curr_sym_tab == top_level_sym_tab);
1749 int show_variables = 1; 1753 int show_variables = 1;
1750 int show_verbose = 0; 1754 int show_verbose = 0;
1755
1756 char *my_name = argv[0];
1751 1757
1752 if (argc > 1) 1758 if (argc > 1)
1753 { 1759 {
1754 show_functions = 0; 1760 show_functions = 0;
1755 show_variables = 0; 1761 show_variables = 0;
1775 show_verbose++; 1781 show_verbose++;
1776 else if (strcmp (*argv, "-variables") == 0 1782 else if (strcmp (*argv, "-variables") == 0
1777 || strcmp (*argv, "-v") == 0) 1783 || strcmp (*argv, "-v") == 0)
1778 show_variables++; 1784 show_variables++;
1779 else 1785 else
1780 warning ("who: unrecognized option `%s'", *argv); 1786 warning ("%s: unrecognized option `%s'", my_name, *argv);
1781 } 1787 }
1782 1788
1783 // If the user specified -l and nothing else, show variables. If 1789 // If the user specified -l and nothing else, show variables. If
1784 // evaluating this at the top level, also show functions. 1790 // evaluating this at the top level, also show functions.
1785 1791