constify command docs

This makes the command "doc" parameter const.

2014-07-24  Tom Tromey  <tromey@redhat.com>

	* cli/cli-decode.c (add_cmd, add_prefix_cmd)
	(add_abbrev_prefix_cmd, add_set_or_show_cmd, add_info)
	(add_info_alias, add_com): Make "doc" const.
	(print_doc_line): Make "str" const.
	(delete_cmd): Update.
	* cli/cli-decode.h (struct cmd_list_element) <doc>: Now const.
	(print_doc_line): Update.
	* cli/cli-script.c (document_command): Update.
	* command.h (add_cmd, add_prefix_cmd, add_abbrev_prefix_cmd)
	(add_com, add_info, add_info_alias): Update.
	* guile/scm-cmd.c (cmdscm_destroyer): Update.
	* python/py-cmd.c (cmdpy_destroyer): Update.
This commit is contained in:
Tom Tromey 2014-07-21 20:55:16 -06:00
parent 64e61d290e
commit 1947513d92
8 changed files with 45 additions and 26 deletions

View file

@ -128,7 +128,7 @@ struct cmd_list_element
First line is brief documentation; remaining lines form, with it,
the full documentation. First line should end with a period.
Entire string should also end with a period, not a newline. */
char *doc;
const char *doc;
/* For set/show commands. A method for printing the output to the
specified stream. */
@ -229,7 +229,7 @@ extern void not_just_help_class_command (char *arg, int from_tty);
/* Exported to cli/cli-setshow.c */
extern void print_doc_line (struct ui_file *, char *);
extern void print_doc_line (struct ui_file *, const char *);
extern const char * const auto_boolean_enums[];