Re: RFA: add_setshow_cmd_full

Andrew Cagney
2002-06-26T02:35:21Z

[fernando asked me to pick up a bit of this]

> 2002-06-25 Tom Tromey <tromey@redhat.com>
>
> * cli/cli-decode.c (add_setshow_cmd_full): New function.
> (add_setshow_cmd): Use it.
> * command.h (add_setshow_cmd_full): Declare.

Please be careful to configure GDB with
--enable-gdb-build-warnings=,-Werror so that it is compiled with the
-Werror flag.

Anyway, this is wrong ...

> +extern struct cmd_list_element *add_setshow_cmd_full (char *name,
> +
enum command_class class,

But this is approved ....

> +void
> +add_setshow_cmd_full (char *name,
> + enum command_class class,
> + var_types var_type, void *var,
> + char *set_doc, char *show_doc,
> + cmd_sfunc_ftype *set_func, cmd_sfunc_ftype *show_func,
> + struct cmd_list_element **set_list,
> + struct cmd_list_element **show_list,
> + struct cmd_list_element **set_result,
> + struct cmd_list_element **show_result)

Don't forget to remove they stray declaration:

> +extern struct cmd_list_element *add_setshow_cmd (char *name,
> + enum command_class class,
> + var_types var_type, void *var,
> + char *set_doc, char *show_doc,

from the change.

Andrew