use COMMAND_HELPER for command helper functions

Define the numerous helpers that inherit command handler parameters
using the COMMAND_HELPER macro.
This commit is contained in:
Zachary T Welch
2009-11-10 03:12:21 -08:00
parent cfc4d5c6b7
commit 63a26b421b
6 changed files with 21 additions and 19 deletions

View File

@@ -81,8 +81,16 @@ int server_loop(command_context_t *command_context);
int server_register_commands(command_context_t *context);
int server_port_command(struct command_context_s *cmd_ctx,
char *cmd, char **args, int argc, unsigned short *port);
/**
* Defines an extended command handler function declaration to enable
* access to (and manipulation of) the server port number.
* Call server_port like a normal COMMAND_HANDLER with an extra @a out parameter
* to receive the specified port number.
*/
#define SERVER_PORT_COMMAND() \
COMMAND_HELPER(server_port_command, unsigned short *out)
SERVER_PORT_COMMAND();
extern int server_use_pipes;