Fri Mar 24 12:10:38 2000 glen mccready <gkm@pobox.com>
* command.c, command.h (help_all): Add functionality to display a complete listing of available commands.
This commit is contained in:
parent
aa15f6f7b0
commit
49a5a3a3e3
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Mar 24 12:10:38 2000 glen mccready <gkm@pobox.com>
|
||||||
|
|
||||||
|
* command.c, command.h (help_all): Add functionality to display
|
||||||
|
a complete listing of available commands.
|
||||||
|
|
||||||
2000-04-20 Scott Bambrough <scottb@netwinder.org>
|
2000-04-20 Scott Bambrough <scottb@netwinder.org>
|
||||||
|
|
||||||
* arm-linux-nat.c (PIDGET, TIDGET): New.
|
* arm-linux-nat.c (PIDGET, TIDGET): New.
|
||||||
|
|
|
@ -510,6 +510,12 @@ help_cmd (command, stream)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strcmp (command, "all") == 0)
|
||||||
|
{
|
||||||
|
help_all (stream);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
c = lookup_cmd (&command, cmdlist, "", 0, 0);
|
c = lookup_cmd (&command, cmdlist, "", 0, 0);
|
||||||
|
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
|
@ -602,6 +608,27 @@ Command name abbreviations are allowed if unambiguous.\n",
|
||||||
cmdtype1, cmdtype2);
|
cmdtype1, cmdtype2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
help_all (stream)
|
||||||
|
struct ui_file *stream;
|
||||||
|
{
|
||||||
|
struct cmd_list_element *c;
|
||||||
|
extern struct cmd_list_element *cmdlist;
|
||||||
|
|
||||||
|
for (c = cmdlist; c; c = c->next)
|
||||||
|
{
|
||||||
|
if (c->abbrev_flag)
|
||||||
|
continue;
|
||||||
|
/* If this is a prefix command, print it's subcommands */
|
||||||
|
if (c->prefixlist)
|
||||||
|
help_cmd_list (*c->prefixlist, all_commands, c->prefixname, 0, stream);
|
||||||
|
|
||||||
|
/* If this is a class name, print all of the commands in the class */
|
||||||
|
else if (c->function.cfunc == NULL)
|
||||||
|
help_cmd_list (cmdlist, c->class, "", 0, stream);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Print only the first line of STR on STREAM. */
|
/* Print only the first line of STR on STREAM. */
|
||||||
static void
|
static void
|
||||||
print_doc_line (stream, str)
|
print_doc_line (stream, str)
|
||||||
|
|
|
@ -284,6 +284,8 @@ extern void help_list (struct cmd_list_element *, char *,
|
||||||
extern void help_cmd_list (struct cmd_list_element *, enum command_class,
|
extern void help_cmd_list (struct cmd_list_element *, enum command_class,
|
||||||
char *, int, struct ui_file *);
|
char *, int, struct ui_file *);
|
||||||
|
|
||||||
|
extern void help_all (struct ui_file *);
|
||||||
|
|
||||||
extern struct cmd_list_element *
|
extern struct cmd_list_element *
|
||||||
add_set_cmd PARAMS ((char *, enum command_class, var_types, char *, char *,
|
add_set_cmd PARAMS ((char *, enum command_class, var_types, char *, char *,
|
||||||
struct cmd_list_element **));
|
struct cmd_list_element **));
|
||||||
|
|
Loading…
Reference in New Issue