forked from Imagelibrary/binutils-gdb
constify command prefix
This constifies the "prefix" argument to the various command-adding functions. 2014-07-24 Tom Tromey <tromey@redhat.com> * cli/cli-decode.c (print_help_for_command): Make "prefix" const. (add_prefix_cmd, add_abbrev_prefix_cmd, apropos_cmd, help_list) (help_cmd_list): Constify. (lookup_cmd): Update. * cli/cli-decode.h (struct cmd_list_element) <prefixname>: Now const. (help_cmd_list, apropos_cmd): Update. * cli/cli-script.c (show_user): Update. * cli/cli-setshow.c (cmd_show_list): Make "prefix" const. * cli/cli-setshow.h (cmd_show_list): Update. * command.h (add_prefix_cmd, add_abbrev_prefix_cmd, help_list) (cmd_show_list): Update. * guile/scm-cmd.c (cmdscm_destroyer): Update. * python/py-cmd.c (cmdpy_destroyer): Update.
This commit is contained in:
@@ -134,7 +134,7 @@ extern struct cmd_list_element *add_prefix_cmd (const char *, enum command_class
|
||||
cmd_cfunc_ftype *fun,
|
||||
char *,
|
||||
struct cmd_list_element **,
|
||||
char *, int,
|
||||
const char *, int,
|
||||
struct cmd_list_element **);
|
||||
|
||||
extern struct cmd_list_element *add_abbrev_prefix_cmd (const char *,
|
||||
@@ -142,7 +142,7 @@ extern struct cmd_list_element *add_abbrev_prefix_cmd (const char *,
|
||||
cmd_cfunc_ftype *fun,
|
||||
char *,
|
||||
struct cmd_list_element
|
||||
**, char *, int,
|
||||
**, const char *, int,
|
||||
struct cmd_list_element
|
||||
**);
|
||||
|
||||
@@ -224,7 +224,7 @@ extern VEC (char_ptr) *complete_on_enum (const char *const *enumlist,
|
||||
|
||||
/* Functions that implement commands about CLI commands. */
|
||||
|
||||
extern void help_list (struct cmd_list_element *, char *,
|
||||
extern void help_list (struct cmd_list_element *, const char *,
|
||||
enum command_class, struct ui_file *);
|
||||
|
||||
/* Method for show a set/show variable's VALUE on FILE. If this
|
||||
@@ -374,7 +374,7 @@ extern void
|
||||
|
||||
/* Do a "show" command for each thing on a command list. */
|
||||
|
||||
extern void cmd_show_list (struct cmd_list_element *, int, char *);
|
||||
extern void cmd_show_list (struct cmd_list_element *, int, const char *);
|
||||
|
||||
/* Used everywhere whenever at least one parameter is required and
|
||||
none is specified. */
|
||||
|
||||
Reference in New Issue
Block a user