From: Jeff Trawick Date: Sun, 18 Jun 2000 13:43:38 +0000 (+0000) Subject: Use the new command-handler initializer macros in mod_actions; X-Git-Tag: APACHE_2_0_ALPHA_5~305 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9a67eaf5f23711aeee17e3281f553c1e5626cd8;p=apache Use the new command-handler initializer macros in mod_actions; clean up the resulting warnings. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85610 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_actions.c b/modules/mappers/mod_actions.c index dd5c32e02c..4bf7d76b8d 100644 --- a/modules/mappers/mod_actions.c +++ b/modules/mappers/mod_actions.c @@ -90,7 +90,7 @@ typedef struct { ap_table_t *action_types; /* Added with Action... */ - char *scripted[METHODS]; /* Added with Script... */ + const char *scripted[METHODS]; /* Added with Script... */ } action_dir_config; module action_module; @@ -124,16 +124,18 @@ static void *merge_action_dir_configs(ap_pool_t *p, void *basev, void *addv) return new; } -static const char *add_action(cmd_parms *cmd, action_dir_config * m, char *type, - char *script) +static const char *add_action(cmd_parms *cmd, void *m_v, + const char *type, const char *script) { + action_dir_config *m = (action_dir_config *)m_v; ap_table_setn(m->action_types, type, script); return NULL; } -static const char *set_script(cmd_parms *cmd, action_dir_config * m, - char *method, char *script) +static const char *set_script(cmd_parms *cmd, void *m_v, + const char *method, const char *script) { + action_dir_config *m = (action_dir_config *)m_v; int methnum; methnum = ap_method_number_of(method); @@ -149,10 +151,10 @@ static const char *set_script(cmd_parms *cmd, action_dir_config * m, static const command_rec action_cmds[] = { - {"Action", add_action, NULL, OR_FILEINFO, TAKE2, - "a media type followed by a script name"}, - {"Script", set_script, NULL, ACCESS_CONF | RSRC_CONF, TAKE2, - "a method followed by a script name"}, + AP_INIT_TAKE2("Action", add_action, NULL, OR_FILEINFO, + "a media type followed by a script name"), + AP_INIT_TAKE2("Script", set_script, NULL, ACCESS_CONF | RSRC_CONF, + "a method followed by a script name"), {NULL} };