]> granicus.if.org Git - apache/commitdiff
Use the new command-handler initializer macros in a few more modules,
authorJeff Trawick <trawick@apache.org>
Sun, 18 Jun 2000 04:06:43 +0000 (04:06 +0000)
committerJeff Trawick <trawick@apache.org>
Sun, 18 Jun 2000 04:06:43 +0000 (04:06 +0000)
cleaning up the resulting warnings.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85607 13f79535-47bb-0310-9956-ffa450edef68

modules/echo/mod_echo.c
modules/filters/mod_include.c
modules/generators/mod_cgid.c
modules/metadata/mod_setenvif.c

index 752a0dd1e50d08f321ff0abbad0c87a79e436647..14582a6df40f6a8d56e7e2d1164ff36e3c75926b 100644 (file)
@@ -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)
index 0a20417c26a6eb5733dfdaaedd3c0a0906d755ef..195145f67531d998b4a2b72bcef37117a8f3b685 100644 (file)
@@ -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}
 };
 
index faf6bb7732617a21a177e6894248f95d17634e84..7f373b7ef35c597ec593b53e7c0d6ba9e224ee3a 100644 (file)
@@ -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} 
 }; 
 
index dec50c9e6d99e78cabb59322bd15b9c03bdd2bff..829e7d3b1c1774f0b9a5b10340cbab3576097160 100644 (file)
@@ -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 },
 };