From: Jeff Trawick Date: Sun, 18 Jun 2000 04:06:43 +0000 (+0000) Subject: Use the new command-handler initializer macros in a few more modules, X-Git-Tag: APACHE_2_0_ALPHA_5~308 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ccdc88978f606ee0ff6d10583480641ec5a8d8f1;p=apache Use the new command-handler initializer macros in a few more modules, cleaning up the resulting warnings. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85607 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/echo/mod_echo.c b/modules/echo/mod_echo.c index 752a0dd1e5..14582a6df4 100644 --- a/modules/echo/mod_echo.c +++ b/modules/echo/mod_echo.c @@ -78,7 +78,7 @@ static void *create_echo_server_config(ap_pool_t *p,server_rec *s) return pConfig; } -static const char *echo_on(cmd_parms *cmd, void *dummy, char *arg) +static const char *echo_on(cmd_parms *cmd, void *dummy, const char *arg) { EchoConfig *pConfig=ap_get_module_config(cmd->server->module_config, &echo_module); @@ -110,10 +110,11 @@ static int process_echo_connection(conn_rec *c) return OK; } -static const command_rec echo_cmds[] = { -{ "ProtocolEcho", echo_on, NULL, RSRC_CONF, RAW_ARGS, - "Run an echo server on this host" }, -{ NULL } +static const command_rec echo_cmds[] = +{ + AP_INIT_RAW_ARGS("ProtocolEcho", echo_on, NULL, RSRC_CONF, + "Run an echo server on this host"), + { NULL } }; static void register_hooks(void) diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 0a20417c26..195145f675 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -2362,7 +2362,7 @@ static void *create_includes_dir_config(ap_pool_t *p, char *dummy) return result; } -static const char *set_xbithack(cmd_parms *cmd, void *xbp, char *arg) +static const char *set_xbithack(cmd_parms *cmd, void *xbp, const char *arg) { enum xbithack *state = (enum xbithack *) xbp; @@ -2504,7 +2504,8 @@ static int xbithack_handler(request_rec *r) static const command_rec includes_cmds[] = { - {"XBitHack", set_xbithack, NULL, OR_OPTIONS, TAKE1, "Off, On, or Full"}, + AP_INIT_TAKE1("XBitHack", set_xbithack, NULL, OR_OPTIONS, + "Off, On, or Full"), {NULL} }; diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index faf6bb7732..7f373b7ef3 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -126,7 +126,7 @@ static int is_scriptaliased(request_rec *r) typedef struct { const char *sockname; - char *logname; + const char *logname; long logbytes; int bufbytes; BUFF *bin; @@ -629,7 +629,7 @@ static void *merge_cgid_config(ap_pool_t *p, void *basev, void *overridesv) return overrides->logname ? overrides : base; } -static const char *set_scriptlog(cmd_parms *cmd, void *dummy, char *arg) +static const char *set_scriptlog(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = @@ -639,7 +639,7 @@ static const char *set_scriptlog(cmd_parms *cmd, void *dummy, char *arg) return NULL; } -static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, char *arg) +static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = @@ -649,7 +649,7 @@ static const char *set_scriptlog_length(cmd_parms *cmd, void *dummy, char *arg) return NULL; } -static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, char *arg) +static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = @@ -659,7 +659,7 @@ static const char *set_scriptlog_buffer(cmd_parms *cmd, void *dummy, char *arg) return NULL; } -static const char *set_script_socket(cmd_parms *cmd, void *dummy, char *arg) +static const char *set_script_socket(cmd_parms *cmd, void *dummy, const char *arg) { server_rec *s = cmd->server; cgid_server_conf *conf = @@ -671,14 +671,15 @@ static const char *set_script_socket(cmd_parms *cmd, void *dummy, char *arg) static const command_rec cgid_cmds[] = { - {"ScriptLog", set_scriptlog, NULL, RSRC_CONF, TAKE1, - "the name of a log for script debugging info"}, - {"ScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF, TAKE1, - "the maximum length (in bytes) of the script debug log"}, - {"ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF, TAKE1, - "the maximum size (in bytes) to record of a POST request"}, - {"Scriptsock", set_script_socket, NULL, RSRC_CONF, TAKE1, - "the name of the socket to use for communication with the cgi daemon."}, + AP_INIT_TAKE1("ScriptLog", set_scriptlog, NULL, RSRC_CONF, + "the name of a log for script debugging info"), + AP_INIT_TAKE1("ScriptLogLength", set_scriptlog_length, NULL, RSRC_CONF, + "the maximum length (in bytes) of the script debug log"), + AP_INIT_TAKE1("ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF, + "the maximum size (in bytes) to record of a POST request"), + AP_INIT_TAKE1("Scriptsock", set_script_socket, NULL, RSRC_CONF, + "the name of the socket to use for communication with " + "the cgi daemon."), {NULL} }; diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c index dec50c9e6d..829e7d3b1c 100644 --- a/modules/metadata/mod_setenvif.c +++ b/modules/metadata/mod_setenvif.c @@ -340,14 +340,14 @@ static const char *add_browser(cmd_parms *cmd, void *mconfig, const char *args) static const command_rec setenvif_module_cmds[] = { - { "SetEnvIf", add_setenvif, NULL, - OR_FILEINFO, RAW_ARGS, "A header-name, regex and a list of variables." }, - { "SetEnvIfNoCase", add_setenvif, ICASE_MAGIC, - OR_FILEINFO, RAW_ARGS, "a header-name, regex and a list of variables." }, - { "BrowserMatch", add_browser, NULL, - OR_FILEINFO, RAW_ARGS, "A browser regex and a list of variables." }, - { "BrowserMatchNoCase", add_browser, ICASE_MAGIC, - OR_FILEINFO, RAW_ARGS, "A browser regex and a list of variables." }, + AP_INIT_RAW_ARGS("SetEnvIf", add_setenvif, NULL, + OR_FILEINFO, "A header-name, regex and a list of variables."), + AP_INIT_RAW_ARGS("SetEnvIfNoCase", add_setenvif, ICASE_MAGIC, + OR_FILEINFO, "a header-name, regex and a list of variables."), + AP_INIT_RAW_ARGS("BrowserMatch", add_browser, NULL, + OR_FILEINFO, "A browser regex and a list of variables."), + AP_INIT_RAW_ARGS("BrowserMatchNoCase", add_browser, ICASE_MAGIC, + OR_FILEINFO, "A browser regex and a list of variables."), { NULL }, };