diff options
author | Martin Hunt <hunt@redhat.com> | 2002-07-03 17:35:21 +0000 |
---|---|---|
committer | Martin Hunt <hunt@redhat.com> | 2002-07-03 17:35:21 +0000 |
commit | f436dd25ca221a4536350cc2ef3a3783c03dd52d (patch) | |
tree | c2a30b755d003e22681545c3274ceadd685cb79f /gdb/top.c | |
parent | 4cfe20842d3acb054c3ade521a1bf66b05b82cb9 (diff) | |
download | gdb-f436dd25ca221a4536350cc2ef3a3783c03dd52d.zip gdb-f436dd25ca221a4536350cc2ef3a3783c03dd52d.tar.gz gdb-f436dd25ca221a4536350cc2ef3a3783c03dd52d.tar.bz2 |
2002-07-03 Martin M. Hunt <hunt@redhat.com>
* top.c (execute_command): Use cmd_func() and cmd_func_p().
* cli/cli-decode.c (cmd_func_p): New function.
(cmd_func): New function.
* command.h: Add cmd_func() and cmd_func_p().
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -703,12 +703,12 @@ execute_command (char *p, int from_tty) execute_user_command (c, arg); else if (c->type == set_cmd || c->type == show_cmd) do_setshow_command (arg, from_tty & caution, c); - else if (c->func == NULL) + else if (!cmd_func_p (c)) error ("That is not a command, just a help topic."); else if (call_command_hook) call_command_hook (c, arg, from_tty & caution); else - (*c->func) (c, arg, from_tty & caution); + cmd_func (c, arg, from_tty & caution); /* If this command has been post-hooked, run the hook last. */ execute_cmd_post_hook (c); |