add command_handler_t type

This patch adds new typedefs for command handler callback functions.
Users of this type signature were updated to use these new types.
It uses the new __COMMAND_HANDLER macro to prevent duplication.
This commit is contained in:
Zachary T Welch
2009-11-10 19:00:01 -08:00
parent 3f9fd4e2a6
commit ddb6138ed4
2 changed files with 6 additions and 7 deletions

View File

@@ -225,9 +225,7 @@ static void command_add_child(struct command_s **head, struct command_s *c)
}
command_t* register_command(command_context_t *context,
command_t *parent, char *name,
int (*handler)(struct command_context_s *context,
char* name, char** args, int argc),
command_t *parent, char *name, command_handler_t handler,
enum command_mode mode, char *help)
{
if (!context || !name)