diff options
author | Jeff Trawick <trawick@apache.org> | 2000-08-07 00:38:23 +0200 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2000-08-07 00:38:23 +0200 |
commit | c30e232c7c0d7238b6e9e6648beb92e7a5bc886f (patch) | |
tree | d98e45f4213952fc02e074dd5d25b1e0f96e5a9d /modules/metadata/mod_expires.c | |
parent | Remove some values that aren't needed anymore. These were used at one time (diff) | |
download | apache2-c30e232c7c0d7238b6e9e6648beb92e7a5bc886f.tar.xz apache2-c30e232c7c0d7238b6e9e6648beb92e7a5bc886f.zip |
Use AP_INIT_* macros for command_rec [] in a few more modules.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86014 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/metadata/mod_expires.c')
-rw-r--r-- | modules/metadata/mod_expires.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/modules/metadata/mod_expires.c b/modules/metadata/mod_expires.c index 5b7342555a..a8bc4a3ca9 100644 --- a/modules/metadata/mod_expires.c +++ b/modules/metadata/mod_expires.c @@ -229,8 +229,10 @@ static void *create_dir_expires_config(apr_pool_t *p, char *dummy) return (void *) new; } -static const char *set_expiresactive(cmd_parms *cmd, expires_dir_config * dir_config, int arg) +static const char *set_expiresactive(cmd_parms *cmd, void *in_dir_config, int arg) { + expires_dir_config *dir_config = in_dir_config; + /* if we're here at all it's because someone explicitly * set the active flag */ @@ -347,8 +349,10 @@ static char *check_code(apr_pool_t *p, const char *code, char **real_code) return NULL; } -static const char *set_expiresbytype(cmd_parms *cmd, expires_dir_config * dir_config, char *mime, char *code) +static const char *set_expiresbytype(cmd_parms *cmd, void *in_dir_config, + const char *mime, const char *code) { + expires_dir_config *dir_config = in_dir_config; char *response, *real_code; if ((response = check_code(cmd->pool, code, &real_code)) == NULL) { @@ -359,8 +363,10 @@ static const char *set_expiresbytype(cmd_parms *cmd, expires_dir_config * dir_co "'ExpiresByType ", mime, " ", code, "': ", response, NULL); } -static const char *set_expiresdefault(cmd_parms *cmd, expires_dir_config * dir_config, char *code) +static const char *set_expiresdefault(cmd_parms *cmd, void *in_dir_config, + const char *code) { + expires_dir_config * dir_config = in_dir_config; char *response, *real_code; if ((response = check_code(cmd->pool, code, &real_code)) == NULL) { @@ -373,12 +379,12 @@ static const char *set_expiresdefault(cmd_parms *cmd, expires_dir_config * dir_c static const command_rec expires_cmds[] = { - {"ExpiresActive", set_expiresactive, NULL, DIR_CMD_PERMS, FLAG, - "Limited to 'on' or 'off'"}, - {"ExpiresBytype", set_expiresbytype, NULL, DIR_CMD_PERMS, TAKE2, - "a MIME type followed by an expiry date code"}, - {"ExpiresDefault", set_expiresdefault, NULL, DIR_CMD_PERMS, TAKE1, - "an expiry date code"}, + AP_INIT_FLAG("ExpiresActive", set_expiresactive, NULL, DIR_CMD_PERMS, + "Limited to 'on' or 'off'"), + AP_INIT_TAKE2("ExpiresBytype", set_expiresbytype, NULL, DIR_CMD_PERMS, + "a MIME type followed by an expiry date code"), + AP_INIT_TAKE1("ExpiresDefault", set_expiresdefault, NULL, DIR_CMD_PERMS, + "an expiry date code"), {NULL} }; |