static void apropos_cmd_helper (struct ui_file *, struct cmd_list_element *,
struct re_pattern_buffer *, char *);
+static void help_all (struct ui_file *stream);
+
void apropos_command (char *, int);
void _initialize_command PARAMS ((void));
return;
}
+ if (strcmp (command, "all") == 0)
+ {
+ help_all (stream);
+ return;
+ }
+
c = lookup_cmd (&command, cmdlist, "", 0, 0);
if (c == 0)
cmdtype1, cmdtype2);
}
+static void
+help_all (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. */
static void
print_doc_line (stream, str)
int quote;
stb = ui_out_stream_new (uiout);
- old_chain = make_cleanup ((make_cleanup_func) ui_out_stream_delete, stb);
+ old_chain = make_cleanup_ui_out_stream_delete (stb);
#endif /* UI_OUT */
/* Print doc minus "show" at start. */