2005-02-20 Andrew Cagney <cagney@gnu.org>

* cli/cli-decode.c (add_setshow_optional_filename_cmd): New
	function.
	* cli/cli-setshow.c (deprecated_show_value_hack)
	(do_setshow_command): Handle var_optional_filename.
	* command.h (enum var_types): Add var_optional_filename.
	(add_setshow_optional_filename_cmd): Declare.
	* infcmd.c (notice_args_read): Use.
This commit is contained in:
Andrew Cagney
2005-02-21 03:25:56 +00:00
parent ac4528d236
commit b4b4ac0b71
5 changed files with 63 additions and 13 deletions

View File

@ -535,6 +535,25 @@ add_setshow_string_noescape_cmd (char *name, enum command_class class,
NULL, NULL);
}
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). */
void
add_setshow_optional_filename_cmd (char *name, enum command_class class,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
cmd_sfunc_ftype *set_func,
show_value_ftype *show_func,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list)
{
add_setshow_cmd_full (name, class, var_optional_filename, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
NULL, NULL);
}
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). CLASS is as in
add_cmd. VAR is address of the variable which will contain the