2 * Simulator of microcontrollers (cmd.src/show.cc)
4 * Copyright (C) 1999,99 Drotos Daniel, Talker Bt.
6 * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu
10 /* This file is part of microcontroller simulator: ucsim.
12 UCSIM is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 UCSIM is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with UCSIM; see the file COPYING. If not, write to the Free
24 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
43 * Command: show copying
44 *----------------------------------------------------------------------------
48 //cl_show_copying_cmd::do_work(class cl_sim *sim,
49 // class cl_cmdline *cmdline, class cl_console *con)
50 COMMAND_DO_WORK(cl_show_copying_cmd)
52 con->dd_printf("%s\n", copying);
58 * Command: show warranty
59 *----------------------------------------------------------------------------
63 //cl_show_warranty_cmd::do_work(class cl_sim *sim,
64 // class cl_cmdline *cmdline, class cl_console *con)
65 COMMAND_DO_WORK(cl_show_warranty_cmd)
67 con->dd_printf("%s\n", warranty);
73 * Command: show option
74 *----------------------------------------------------------------------------
76 COMMAND_DO_WORK_APP(cl_show_option_cmd)
78 class cl_cmd_arg *parm= cmdline->param(0);
83 else if (cmdline->syntax_match(0/*app->get_uc()*/, STRING)) {
84 s= parm->value.string.string;
87 con->dd_printf("%s\n", short_help?short_help:"Error: wrong syntax\n");
90 for (i= 0; i < app->options->count; i++)
92 class cl_option *o= (class cl_option *)(/*uc*/app->options->at(i));
94 !strcmp(s, o->get_name()))
96 con->dd_printf("%d. %s: ", i, object_name(o));
98 con->dd_printf(" - %s\n", o->help);
99 union option_value *val= o->get_value();
100 con->dd_printf(" Value: \"");
103 TYPE_UBYTE *d= (TYPE_UBYTE*)val;
104 for (uj= 0; uj < sizeof(*val); uj++)
105 con->print_char_octal(d[uj]);
106 con->dd_printf("\"\n Creator: \"%s\"\n %d Users:\n",
107 object_name(o->get_creator()),
109 con->dd_printf(" Hidden: %s\n", (o->hidden)?"True":"False");
110 for (j= 0; j < o->users->count; j++)
112 class cl_optref *r= (class cl_optref *)(o->users->at(j));
113 con->dd_printf(" %2d. owner(s)=\"%s\"\n", j,
114 object_name(r->get_owner()));
117 i < app->options->count-1)
118 con->dd_printf("\n");
126 /* End of cmd.src/show.cc */