You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/06/18 06:06:44 UTC
cvs commit: apache-2.0/src/modules/standard mod_cgid.c mod_echo.c mod_include.c mod_setenvif.c
trawick 00/06/17 21:06:44
Modified: src/modules/standard mod_cgid.c mod_echo.c mod_include.c
mod_setenvif.c
Log:
Use the new command-handler initializer macros in a few more modules,
cleaning up the resulting warnings.
Revision Changes Path
1.22 +14 -13 apache-2.0/src/modules/standard/mod_cgid.c
Index: mod_cgid.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgid.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- mod_cgid.c 2000/06/12 23:02:59 1.21
+++ mod_cgid.c 2000/06/18 04:06:43 1.22
@@ -126,7 +126,7 @@
typedef struct {
const char *sockname;
- char *logname;
+ const char *logname;
long logbytes;
int bufbytes;
BUFF *bin;
@@ -629,7 +629,7 @@
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 @@
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 @@
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 @@
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 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}
};
1.23 +6 -5 apache-2.0/src/modules/standard/mod_echo.c
Index: mod_echo.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_echo.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- mod_echo.c 2000/05/27 22:40:36 1.22
+++ mod_echo.c 2000/06/18 04:06:43 1.23
@@ -78,7 +78,7 @@
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 @@
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)
1.42 +3 -2 apache-2.0/src/modules/standard/mod_include.c
Index: mod_include.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- mod_include.c 2000/06/17 16:29:52 1.41
+++ mod_include.c 2000/06/18 04:06:43 1.42
@@ -2362,7 +2362,7 @@
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 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}
};
1.14 +8 -8 apache-2.0/src/modules/standard/mod_setenvif.c
Index: mod_setenvif.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_setenvif.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mod_setenvif.c 2000/06/06 20:41:45 1.13
+++ mod_setenvif.c 2000/06/18 04:06:43 1.14
@@ -340,14 +340,14 @@
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 },
};