dgaudet 97/07/26 18:43:39
Modified: src mod_access.c mod_actions.c mod_alias.c mod_auth.c mod_auth_db.c mod_auth_dbm.c mod_auth_msql.c mod_browser.c mod_cgi.c mod_dld.c mod_env.c mod_expires.c mod_headers.c mod_imap.c mod_include.c mod_info.c mod_log_config.c mod_mime.c mod_negotiation.c mod_status.c mod_userdir.c src/modules/proxy mod_proxy.c Log: Make modules use static liberally. This patch only adds static to a bunch of functions in modules, doesn't change anything else. Or at least it shouldn't change anything else. Revision Changes Path 1.20 +8 -8 apache/src/mod_access.c Index: mod_access.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_access.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- mod_access.c 1997/07/21 05:53:48 1.19 +++ mod_access.c 1997/07/27 01:43:21 1.20 @@ -81,7 +81,7 @@ module MODULE_VAR_EXPORT access_module; -void *create_access_dir_config (pool *p, char *dummy) +static void *create_access_dir_config (pool *p, char *dummy) { access_dir_conf *conf = (access_dir_conf *)pcalloc(p, sizeof(access_dir_conf)); @@ -94,7 +94,7 @@ return (void *)conf; } -const char *order (cmd_parms *cmd, void *dv, char *arg) +static const char *order (cmd_parms *cmd, void *dv, char *arg) { access_dir_conf *d = (access_dir_conf *)dv; int i, o; @@ -111,7 +111,7 @@ return NULL; } -const char *allow_cmd (cmd_parms *cmd, void *dv, char *from, char *where) +static const char *allow_cmd (cmd_parms *cmd, void *dv, char *from, char *where) { access_dir_conf *d = (access_dir_conf *)dv; allowdeny *a; @@ -127,7 +127,7 @@ static char its_an_allow; -command_rec access_cmds[] = { +static command_rec access_cmds[] = { { "order", order, NULL, OR_LIMIT, TAKE1, "'allow,deny', 'deny,allow', or 'mutual-failure'" }, { "allow", allow_cmd, &its_an_allow, OR_LIMIT, ITERATE2, @@ -137,7 +137,7 @@ {NULL} }; -int in_domain(const char *domain, const char *what) { +static int in_domain(const char *domain, const char *what) { int dl=strlen(domain); int wl=strlen(what); @@ -155,7 +155,7 @@ return 0; } -int in_ip(char *domain, char *what) { +static int in_ip(char *domain, char *what) { /* Check a similar screw case to the one checked above --- * "allow from 204.26.2" shouldn't let in people from 204.26.23 @@ -174,7 +174,7 @@ return (*host == '\0'); } -int find_allowdeny (request_rec *r, array_header *a, int method) +static int find_allowdeny (request_rec *r, array_header *a, int method) { allowdeny *ap = (allowdeny *)a->elts; int mmask = (1 << method); @@ -224,7 +224,7 @@ return 0; } -int check_dir_access (request_rec *r) +static int check_dir_access (request_rec *r) { int method = r->method_number; access_dir_conf *a = 1.14 +7 -7 apache/src/mod_actions.c Index: mod_actions.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_actions.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- mod_actions.c 1997/07/17 22:27:31 1.13 +++ mod_actions.c 1997/07/27 01:43:21 1.14 @@ -85,7 +85,7 @@ module action_module; -void *create_action_dir_config (pool *p, char *dummy) +static void *create_action_dir_config (pool *p, char *dummy) { action_dir_config *new = (action_dir_config *) palloc (p, sizeof(action_dir_config)); @@ -99,7 +99,7 @@ return new; } -void *merge_action_dir_configs (pool *p, void *basev, void *addv) +static void *merge_action_dir_configs (pool *p, void *basev, void *addv) { action_dir_config *base = (action_dir_config *)basev; action_dir_config *add = (action_dir_config *)addv; @@ -117,14 +117,14 @@ return new; } -const char *add_action(cmd_parms *cmd, action_dir_config *m, char *type, +static const char *add_action(cmd_parms *cmd, action_dir_config *m, char *type, char *script) { table_set (m->action_types, type, script); return NULL; } -const char *set_script (cmd_parms *cmd, action_dir_config *m, char *method, +static const char *set_script (cmd_parms *cmd, action_dir_config *m, char *method, char *script) { if (!strcmp(method, "GET")) @@ -141,7 +141,7 @@ return NULL; } -command_rec action_cmds[] = { +static 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, @@ -149,7 +149,7 @@ { NULL } }; -int action_handler (request_rec *r) +static int action_handler (request_rec *r) { action_dir_config *conf = (action_dir_config *)get_module_config(r->per_dir_config,&action_module); @@ -194,7 +194,7 @@ return OK; } -handler_rec action_handlers[] = { +static handler_rec action_handlers[] = { { "*/*", action_handler }, { NULL } }; 1.21 +16 -15 apache/src/mod_alias.c Index: mod_alias.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_alias.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- mod_alias.c 1997/07/24 04:38:09 1.20 +++ mod_alias.c 1997/07/27 01:43:22 1.21 @@ -80,7 +80,7 @@ module MODULE_VAR_EXPORT alias_module; -void *create_alias_config (pool *p, server_rec *s) +static void *create_alias_config (pool *p, server_rec *s) { alias_server_conf *a = (alias_server_conf *)pcalloc (p, sizeof(alias_server_conf)); @@ -90,14 +90,15 @@ return a; } -void *create_alias_dir_config (pool *p, char *d) +static void *create_alias_dir_config (pool *p, char *d) { alias_dir_conf *a = (alias_dir_conf *)pcalloc (p, sizeof(alias_dir_conf)); a->redirects = make_array (p, 2, sizeof(alias_entry)); return a; } -void *merge_alias_config (pool *p, void *basev, void *overridesv) + +static void *merge_alias_config (pool *p, void *basev, void *overridesv) { alias_server_conf *a = (alias_server_conf *)pcalloc (p, sizeof(alias_server_conf)); @@ -109,7 +110,7 @@ return a; } -void *merge_alias_dir_config (pool *p, void *basev, void *overridesv) +static void *merge_alias_dir_config (pool *p, void *basev, void *overridesv) { alias_dir_conf *a = (alias_dir_conf *)pcalloc (p, sizeof(alias_dir_conf)); @@ -119,7 +120,7 @@ return a; } -const char *add_alias_internal(cmd_parms *cmd, void *dummy, char *f, char *r, +static const char *add_alias_internal(cmd_parms *cmd, void *dummy, char *f, char *r, int use_regex) { server_rec *s = cmd->server; @@ -140,15 +141,15 @@ return NULL; } -const char *add_alias(cmd_parms *cmd, void *dummy, char *f, char *r) { +static const char *add_alias(cmd_parms *cmd, void *dummy, char *f, char *r) { return add_alias_internal(cmd, dummy, f, r, 0); } -const char *add_alias_regex(cmd_parms *cmd, void *dummy, char *f, char *r) { +static const char *add_alias_regex(cmd_parms *cmd, void *dummy, char *f, char *r) { return add_alias_internal(cmd, dummy, f, r, 1); } -const char *add_redirect_internal(cmd_parms *cmd, alias_dir_conf *dirconf, +static const char *add_redirect_internal(cmd_parms *cmd, alias_dir_conf *dirconf, char *arg1, char *arg2, char *arg3, int use_regex) { @@ -200,17 +201,17 @@ return NULL; } -const char *add_redirect(cmd_parms *cmd, alias_dir_conf *dirconf, char *arg1, +static const char *add_redirect(cmd_parms *cmd, alias_dir_conf *dirconf, char *arg1, char *arg2, char *arg3) { return add_redirect_internal(cmd, dirconf, arg1, arg2, arg3, 0); } -const char *add_redirect_regex(cmd_parms *cmd, alias_dir_conf *dirconf, +static const char *add_redirect_regex(cmd_parms *cmd, alias_dir_conf *dirconf, char *arg1, char *arg2, char *arg3) { return add_redirect_internal(cmd, dirconf, arg1, arg2, arg3, 1); } -command_rec alias_cmds[] = { +static command_rec alias_cmds[] = { { "Alias", add_alias, NULL, RSRC_CONF, TAKE2, "a fakename and a realname"}, { "ScriptAlias", add_alias, "cgi-script", RSRC_CONF, TAKE2, @@ -234,7 +235,7 @@ { NULL } }; -int alias_matches (char *uri, char *alias_fakename) +static int alias_matches (char *uri, char *alias_fakename) { char *end_fakename = alias_fakename + strlen (alias_fakename); char *aliasp = alias_fakename, *urip = uri; @@ -268,7 +269,7 @@ return urip - uri; } -char *try_alias_list (request_rec *r, array_header *aliases, int doesc, int *status) +static char *try_alias_list (request_rec *r, array_header *aliases, int doesc, int *status) { alias_entry *entries = (alias_entry *)aliases->elts; regmatch_t regm[10]; @@ -314,7 +315,7 @@ return NULL; } -int translate_alias_redir(request_rec *r) +static int translate_alias_redir(request_rec *r) { void *sconf = r->server->module_config; alias_server_conf *serverconf = @@ -349,7 +350,7 @@ return DECLINED; } -int fixup_redir(request_rec *r) +static int fixup_redir(request_rec *r) { void *dconf = r->per_dir_config; alias_dir_conf *dirconf = 1.22 +7 -7 apache/src/mod_auth.c Index: mod_auth.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_auth.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- mod_auth.c 1997/07/19 08:02:04 1.21 +++ mod_auth.c 1997/07/27 01:43:22 1.22 @@ -79,7 +79,7 @@ int auth_authoritative; } auth_config_rec; -void *create_auth_dir_config (pool *p, char *d) +static void *create_auth_dir_config (pool *p, char *d) { auth_config_rec *sec = (auth_config_rec *) pcalloc (p, sizeof(auth_config_rec)); @@ -89,7 +89,7 @@ return sec; } -const char *set_auth_slot (cmd_parms *cmd, void *offset, char *f, char *t) +static const char *set_auth_slot (cmd_parms *cmd, void *offset, char *f, char *t) { if (t && strcmp(t, "standard")) return pstrcat(cmd->pool, "Invalid auth file type: ", t, NULL); @@ -97,7 +97,7 @@ return set_string_slot(cmd, offset, f); } -command_rec auth_cmds[] = { +static command_rec auth_cmds[] = { { "AuthUserFile", set_auth_slot, (void*)XtOffsetOf(auth_config_rec,auth_pwfile), OR_AUTHCFG, TAKE12, "text file containing user IDs and passwords" }, @@ -113,7 +113,7 @@ module MODULE_VAR_EXPORT auth_module; -char *get_pw(request_rec *r, char *user, char *auth_pwfile) +static char *get_pw(request_rec *r, char *user, char *auth_pwfile) { FILE *f; char l[MAX_STRING_LEN]; @@ -137,7 +137,7 @@ return NULL; } -table *groups_for_user (pool *p, char *user, char *grpfile) { +static table *groups_for_user (pool *p, char *user, char *grpfile) { FILE *f; table *grps = make_table (p, 15); pool *sp; @@ -183,7 +183,7 @@ * basic authentication... */ -int authenticate_basic_user (request_rec *r) +static int authenticate_basic_user (request_rec *r) { auth_config_rec *sec = (auth_config_rec *)get_module_config (r->per_dir_config, &auth_module); @@ -217,7 +217,7 @@ /* Checking ID */ -int check_user_access (request_rec *r) { +static int check_user_access (request_rec *r) { auth_config_rec *sec = (auth_config_rec *)get_module_config (r->per_dir_config, &auth_module); char *user = r->connection->user; 1.17 +7 -7 apache/src/mod_auth_db.c Index: mod_auth_db.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_auth_db.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- mod_auth_db.c 1997/07/21 05:53:48 1.16 +++ mod_auth_db.c 1997/07/27 01:43:22 1.17 @@ -94,7 +94,7 @@ int auth_dbauthoritative; } db_auth_config_rec; -void *create_db_auth_dir_config (pool *p, char *d) +static void *create_db_auth_dir_config (pool *p, char *d) { db_auth_config_rec *sec = (db_auth_config_rec *)pcalloc (p, sizeof(db_auth_config_rec)); @@ -104,7 +104,7 @@ return sec; } -const char *set_db_slot (cmd_parms *cmd, void *offset, char *f, char *t) +static const char *set_db_slot (cmd_parms *cmd, void *offset, char *f, char *t) { if (!t || strcmp(t, "db")) return DECLINE_CMD; @@ -112,7 +112,7 @@ return set_string_slot(cmd, offset, f); } -command_rec db_auth_cmds[] = { +static command_rec db_auth_cmds[] = { { "AuthDBUserFile", set_string_slot, (void*)XtOffsetOf(db_auth_config_rec, auth_dbpwfile), OR_AUTHCFG, TAKE1, NULL }, @@ -134,7 +134,7 @@ module db_auth_module; -char *get_db_pw(request_rec *r, char *user, const char *auth_dbpwfile) { +static char *get_db_pw(request_rec *r, char *user, const char *auth_dbpwfile) { DB *f; DBT d, q; char *pw = NULL; @@ -168,7 +168,7 @@ * [EMAIL PROTECTED], 22Sep95 */ -char *get_db_grp(request_rec *r, char *user, const char *auth_dbgrpfile) { +static char *get_db_grp(request_rec *r, char *user, const char *auth_dbgrpfile) { char *grp_data = get_db_pw (r, user, auth_dbgrpfile); char *grp_colon; char *grp_colon2; @@ -182,7 +182,7 @@ return grp_data; } -int db_authenticate_basic_user (request_rec *r) +static int db_authenticate_basic_user (request_rec *r) { db_auth_config_rec *sec = (db_auth_config_rec *)get_module_config (r->per_dir_config, @@ -222,7 +222,7 @@ /* Checking ID */ -int db_check_auth(request_rec *r) { +static int db_check_auth(request_rec *r) { db_auth_config_rec *sec = (db_auth_config_rec *)get_module_config (r->per_dir_config, &db_auth_module); 1.20 +7 -7 apache/src/mod_auth_dbm.c Index: mod_auth_dbm.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_auth_dbm.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- mod_auth_dbm.c 1997/07/19 08:02:05 1.19 +++ mod_auth_dbm.c 1997/07/27 01:43:23 1.20 @@ -79,7 +79,7 @@ } dbm_auth_config_rec; -void *create_dbm_auth_dir_config (pool *p, char *d) +static void *create_dbm_auth_dir_config (pool *p, char *d) { dbm_auth_config_rec *sec = (dbm_auth_config_rec *)pcalloc (p, sizeof(dbm_auth_config_rec)); @@ -91,7 +91,7 @@ return sec; } -const char *set_dbm_slot (cmd_parms *cmd, void *offset, char *f, char *t) +static const char *set_dbm_slot (cmd_parms *cmd, void *offset, char *f, char *t) { if (!t || strcmp(t, "dbm")) return DECLINE_CMD; @@ -99,7 +99,7 @@ return set_string_slot(cmd, offset, f); } -command_rec dbm_auth_cmds[] = { +static command_rec dbm_auth_cmds[] = { { "AuthDBMUserFile", set_string_slot, (void*)XtOffsetOf(dbm_auth_config_rec, auth_dbmpwfile), OR_AUTHCFG, TAKE1, NULL }, @@ -120,7 +120,7 @@ module dbm_auth_module; -char *get_dbm_pw(request_rec *r, char *user, char *auth_dbmpwfile) { +static char *get_dbm_pw(request_rec *r, char *user, char *auth_dbmpwfile) { DBM *f; datum d, q; char *pw = NULL; @@ -161,7 +161,7 @@ * [EMAIL PROTECTED], 22Sep95 */ -char *get_dbm_grp(request_rec *r, char *user, char *auth_dbmgrpfile) { +static char *get_dbm_grp(request_rec *r, char *user, char *auth_dbmgrpfile) { char *grp_data = get_dbm_pw (r, user, auth_dbmgrpfile); char *grp_colon; char *grp_colon2; @@ -175,7 +175,7 @@ return grp_data; } -int dbm_authenticate_basic_user (request_rec *r) +static int dbm_authenticate_basic_user (request_rec *r) { dbm_auth_config_rec *sec = (dbm_auth_config_rec *)get_module_config (r->per_dir_config, @@ -215,7 +215,7 @@ /* Checking ID */ -int dbm_check_auth(request_rec *r) { +static int dbm_check_auth(request_rec *r) { dbm_auth_config_rec *sec = (dbm_auth_config_rec *)get_module_config (r->per_dir_config, &dbm_auth_module); 1.24 +11 -11 apache/src/mod_auth_msql.c Index: mod_auth_msql.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_auth_msql.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- mod_auth_msql.c 1997/07/19 08:02:06 1.23 +++ mod_auth_msql.c 1997/07/27 01:43:23 1.24 @@ -449,29 +449,29 @@ return sec; } -const char *set_passwd_flag (cmd_parms *cmd, msql_auth_config_rec *sec, int arg) { +static const char *set_passwd_flag (cmd_parms *cmd, msql_auth_config_rec *sec, int arg) { sec->auth_msql_nopasswd=arg; return NULL; } -const char *set_authoritative_flag (cmd_parms *cmd, msql_auth_config_rec *sec, int arg) { +static const char *set_authoritative_flag (cmd_parms *cmd, msql_auth_config_rec *sec, int arg) { sec->auth_msql_authoritative=arg; return NULL; } -const char *set_crypted_password_flag (cmd_parms *cmd, msql_auth_config_rec *sec , int arg) { +static const char *set_crypted_password_flag (cmd_parms *cmd, msql_auth_config_rec *sec , int arg) { sec->auth_msql_encrypted = arg; return NULL; } -const char *msql_set_string_slot (cmd_parms *cmd, char *struct_ptr, char *arg) { +static const char *msql_set_string_slot (cmd_parms *cmd, char *struct_ptr, char *arg) { int offset = (int)cmd->info; *(char **)(struct_ptr + offset) = pstrdup (cmd->pool, arg); return NULL; } -command_rec msql_auth_cmds[] = { +static command_rec msql_auth_cmds[] = { { "Auth_MSQLhost", msql_set_string_slot, (void*)XtOffsetOf(msql_auth_config_rec, auth_msql_host), OR_AUTHCFG, TAKE1, "Host on which the mSQL database engine resides (defaults to localhost)" }, @@ -550,7 +550,7 @@ * SQL query. See the mSQL FAQ for more information :-) on * this very popular subject in the msql-mailing list. */ -char *msql_escape(char *out, char *in, char *msql_errstr) { +static char *msql_escape(char *out, char *in, char *msql_errstr) { register int i=0,j=0; @@ -580,7 +580,7 @@ * into r. Assume that user is a string and stored * as such in the mSQL database */ -char *do_msql_query(request_rec *r, char *query, msql_auth_config_rec *sec, int once , char *msql_errstr) { +static char *do_msql_query(request_rec *r, char *query, msql_auth_config_rec *sec, int once , char *msql_errstr) { static int sock=-1; int hit; @@ -691,7 +691,7 @@ return result; } -char *get_msql_pw(request_rec *r, char *user, msql_auth_config_rec *sec ,char *msql_errstr) { +static char *get_msql_pw(request_rec *r, char *user, msql_auth_config_rec *sec ,char *msql_errstr) { char query[MAX_QUERY_LEN]; char esc_user[MAX_FIELD_LEN]; @@ -726,7 +726,7 @@ return do_msql_query(r,query,sec,ONLY_ONCE,msql_errstr); } -char *get_msql_grp(request_rec *r, char *group,char *user, msql_auth_config_rec *sec, char *msql_errstr) { +static char *get_msql_grp(request_rec *r, char *group,char *user, msql_auth_config_rec *sec, char *msql_errstr) { char query[MAX_QUERY_LEN]; char esc_user[MAX_FIELD_LEN]; @@ -772,7 +772,7 @@ } -int msql_authenticate_basic_user (request_rec *r) +static int msql_authenticate_basic_user (request_rec *r) { msql_auth_config_rec *sec = (msql_auth_config_rec *)get_module_config (r->per_dir_config, @@ -867,7 +867,7 @@ /* Checking ID */ -int msql_check_auth (request_rec *r) { +static int msql_check_auth (request_rec *r) { int user_result=DECLINED,group_result=DECLINED; msql_auth_config_rec *sec = 1.15 +4 -4 apache/src/mod_browser.c Index: mod_browser.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_browser.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- mod_browser.c 1997/07/24 04:38:10 1.14 +++ mod_browser.c 1997/07/27 01:43:23 1.15 @@ -72,7 +72,7 @@ module MODULE_VAR_EXPORT browser_module; -void *create_browser_config (pool *p, server_rec *dummy) +static void *create_browser_config (pool *p, server_rec *dummy) { browser_server_config_rec *new = (browser_server_config_rec *) palloc (p, sizeof(browser_server_config_rec)); @@ -81,7 +81,7 @@ return (void *)new; } -void *merge_browser_config (pool *p, void *basev, void *overridesv) +static void *merge_browser_config (pool *p, void *basev, void *overridesv) { browser_server_config_rec *a = pcalloc(p, sizeof(browser_server_config_rec)); @@ -91,7 +91,7 @@ return a; } -const char *add_browser(cmd_parms *cmd, void *dummy, char *name, +static const char *add_browser(cmd_parms *cmd, void *dummy, char *name, const char *feature) { browser_server_config_rec *sconf = @@ -131,7 +131,7 @@ return NULL; } -command_rec browser_module_cmds[] = { +static command_rec browser_module_cmds[] = { { "BrowserMatch", add_browser, (void*)0, RSRC_CONF, ITERATE2, "A browser regex and a list of variables." }, { "BrowserMatchNoCase", add_browser, (void*)REG_ICASE, 1.51 +9 -9 apache/src/mod_cgi.c Index: mod_cgi.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_cgi.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- mod_cgi.c 1997/07/24 04:23:59 1.50 +++ mod_cgi.c 1997/07/27 01:43:24 1.51 @@ -81,7 +81,7 @@ * leaves a note for us. */ -int is_scriptaliased (request_rec *r) +static int is_scriptaliased (request_rec *r) { char *t = table_get (r->notes, "alias-forced-type"); return t && (!strcmp (t, "cgi-script")); @@ -98,7 +98,7 @@ int bufbytes; } cgi_server_conf; -void *create_cgi_config (pool *p, server_rec *s) +static void *create_cgi_config (pool *p, server_rec *s) { cgi_server_conf *c = (cgi_server_conf *)pcalloc (p, sizeof(cgi_server_conf)); @@ -110,7 +110,7 @@ return c; } -void *merge_cgi_config (pool *p, void *basev, void *overridesv) +static void *merge_cgi_config (pool *p, void *basev, void *overridesv) { cgi_server_conf *base = (cgi_server_conf *)basev, *overrides = (cgi_server_conf *)overridesv; @@ -118,7 +118,7 @@ return overrides->logname ? overrides : base; } -const char *set_scriptlog (cmd_parms *cmd, void *dummy, char *arg) { +static const char *set_scriptlog (cmd_parms *cmd, void *dummy, char *arg) { server_rec *s = cmd->server; cgi_server_conf *conf = (cgi_server_conf *)get_module_config(s->module_config, &cgi_module); @@ -127,7 +127,7 @@ return NULL; } -const char *set_scriptlog_length (cmd_parms *cmd, void *dummy, char *arg) { +static const char *set_scriptlog_length (cmd_parms *cmd, void *dummy, char *arg) { server_rec *s = cmd->server; cgi_server_conf *conf = (cgi_server_conf *)get_module_config(s->module_config, &cgi_module); @@ -136,7 +136,7 @@ return NULL; } -const char *set_scriptlog_buffer (cmd_parms *cmd, void *dummy, char *arg) { +static const char *set_scriptlog_buffer (cmd_parms *cmd, void *dummy, char *arg) { server_rec *s = cmd->server; cgi_server_conf *conf = (cgi_server_conf *)get_module_config(s->module_config, &cgi_module); @@ -145,7 +145,7 @@ return NULL; } -command_rec cgi_cmds[] = { +static command_rec cgi_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, @@ -339,7 +339,7 @@ #endif } -int cgi_handler (request_rec *r) +static int cgi_handler (request_rec *r) { int retval, nph, dbpos = 0; char *argv0, *dbuf = NULL; @@ -539,7 +539,7 @@ return OK; /* NOT r->status, even if it has changed. */ } -handler_rec cgi_handlers[] = { +static handler_rec cgi_handlers[] = { { CGI_MAGIC_TYPE, cgi_handler }, { "cgi-script", cgi_handler }, { NULL } 1.9 +6 -6 apache/src/mod_dld.c Index: mod_dld.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_dld.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mod_dld.c 1997/07/17 22:27:35 1.8 +++ mod_dld.c 1997/07/27 01:43:24 1.9 @@ -69,7 +69,7 @@ static int been_there_done_that = 0; /* Loaded the modules yet? */ static int have_symbol_table = 0; -char *insure_dld_sane() +static char *insure_dld_sane() { int errcode; char *bin_name; @@ -87,7 +87,7 @@ return NULL; } -char *link_file (pool *p, char *filename) +static char *link_file (pool *p, char *filename) { int errcode; @@ -99,7 +99,7 @@ return NULL; } -char *load_module (cmd_parms *cmd, void *dummy, char *modname, char *filename) +static char *load_module (cmd_parms *cmd, void *dummy, char *modname, char *filename) { char *errname; module *modp; @@ -130,7 +130,7 @@ return NULL; } -char *load_file (cmd_parms *cmd, void *dummy, char *filename) +static char *load_file (cmd_parms *cmd, void *dummy, char *filename) { char *errname; @@ -141,7 +141,7 @@ return NULL; } -void check_loaded_modules (server_rec *dummy, pool *p) +static void check_loaded_modules (server_rec *dummy, pool *p) { if (been_there_done_that) return; @@ -163,7 +163,7 @@ been_there_done_that = 1; } -command_rec dld_cmds[] = { +static command_rec dld_cmds[] = { { "LoadModule", load_module, NULL, RSRC_CONF, TAKE2, "a module name, and the name of a file to load it from"}, { "LoadFile", load_file, NULL, RSRC_CONF, ITERATE, 1.13 +7 -7 apache/src/mod_env.c Index: mod_env.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_env.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- mod_env.c 1997/07/17 22:27:35 1.12 +++ mod_env.c 1997/07/27 01:43:24 1.13 @@ -104,7 +104,7 @@ module MODULE_VAR_EXPORT env_module; -void *create_env_server_config (pool *p, server_rec *dummy) +static void *create_env_server_config (pool *p, server_rec *dummy) { env_server_config_rec *new = (env_server_config_rec *) palloc (p, sizeof(env_server_config_rec)); @@ -114,7 +114,7 @@ return (void *) new; } -void *merge_env_server_configs (pool *p, void *basev, void *addv) +static void *merge_env_server_configs (pool *p, void *basev, void *addv) { env_server_config_rec *base = (env_server_config_rec *)basev; env_server_config_rec *add = (env_server_config_rec *)addv; @@ -159,7 +159,7 @@ return new; } -const char *add_env_module_vars_passed (cmd_parms *cmd, char *struct_ptr, +static const char *add_env_module_vars_passed (cmd_parms *cmd, char *struct_ptr, const char *arg) { env_server_config_rec *sconf = @@ -179,7 +179,7 @@ return NULL; } -const char *add_env_module_vars_set (cmd_parms *cmd, char *struct_ptr, +static const char *add_env_module_vars_set (cmd_parms *cmd, char *struct_ptr, const char *arg) { env_server_config_rec *sconf = @@ -205,7 +205,7 @@ return NULL; } -const char *add_env_module_vars_unset (cmd_parms *cmd, char *struct_ptr, +static const char *add_env_module_vars_unset (cmd_parms *cmd, char *struct_ptr, char *arg) { env_server_config_rec *sconf = @@ -216,7 +216,7 @@ return NULL; } -command_rec env_module_cmds[] = { +static command_rec env_module_cmds[] = { { "PassEnv", add_env_module_vars_passed, NULL, RSRC_CONF, RAW_ARGS, "a list of environment variables to pass to CGI." }, { "SetEnv", add_env_module_vars_set, NULL, @@ -226,7 +226,7 @@ { NULL }, }; -int fixup_env_module(request_rec *r) +static int fixup_env_module(request_rec *r) { table *e = r->subprocess_env; server_rec *s = r->server; 1.13 +8 -8 apache/src/mod_expires.c Index: mod_expires.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_expires.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- mod_expires.c 1997/07/21 05:53:49 1.12 +++ mod_expires.c 1997/07/27 01:43:25 1.13 @@ -208,7 +208,7 @@ module MODULE_VAR_EXPORT expires_module; -void *create_dir_expires_config (pool *p, char *dummy) +static void *create_dir_expires_config (pool *p, char *dummy) { expires_dir_config *new = (expires_dir_config *) pcalloc (p, sizeof(expires_dir_config)); @@ -218,7 +218,7 @@ return (void *)new; } -const char *set_expiresactive (cmd_parms *cmd, expires_dir_config *dir_config, int arg) +static const char *set_expiresactive (cmd_parms *cmd, expires_dir_config *dir_config, int arg) { /* if we're here at all it's because someone explicitly * set the active flag @@ -234,7 +234,7 @@ * string. If we return NULL then real_code contains code converted * to the cnnnn format. */ -char *check_code( pool *p, const char *code, char **real_code ) +static char *check_code( pool *p, const char *code, char **real_code ) { char *word; char base = 'X'; @@ -327,7 +327,7 @@ return NULL; } -const char *set_expiresbytype(cmd_parms *cmd, expires_dir_config *dir_config, char *mime, char *code) +static const char *set_expiresbytype(cmd_parms *cmd, expires_dir_config *dir_config, char *mime, char *code) { char *response, *real_code; @@ -339,7 +339,7 @@ "'ExpiresByType ", mime, " ", code, "': ", response, NULL ); } -const char *set_expiresdefault (cmd_parms *cmd, expires_dir_config *dir_config, char *code) +static const char *set_expiresdefault (cmd_parms *cmd, expires_dir_config *dir_config, char *code) { char *response, *real_code; @@ -351,7 +351,7 @@ "'ExpiresDefault ", code, "': ", response, NULL ); } -command_rec expires_cmds[] = { +static 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, @@ -361,7 +361,7 @@ { NULL } }; -void *merge_expires_dir_configs (pool *p, void *basev, void *addv) +static void *merge_expires_dir_configs (pool *p, void *basev, void *addv) { expires_dir_config *new= (expires_dir_config*)pcalloc (p, sizeof(expires_dir_config)); expires_dir_config *base = (expires_dir_config *)basev; @@ -382,7 +382,7 @@ return new; } -int add_expires(request_rec *r) +static int add_expires(request_rec *r) { expires_dir_config *conf; char *code; 1.7 +7 -7 apache/src/mod_headers.c Index: mod_headers.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_headers.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- mod_headers.c 1997/07/17 22:27:36 1.6 +++ mod_headers.c 1997/07/27 01:43:25 1.7 @@ -122,7 +122,7 @@ module MODULE_VAR_EXPORT headers_module; -void *create_headers_config (pool *p, server_rec *s) +static void *create_headers_config (pool *p, server_rec *s) { headers_conf *a = (headers_conf *)pcalloc (p, sizeof(headers_conf)); @@ -131,12 +131,12 @@ return a; } -void *create_headers_dir_config (pool *p, char *d) +static void *create_headers_dir_config (pool *p, char *d) { return (headers_conf*)create_headers_config(p, NULL); } -void *merge_headers_config (pool *p, void *basev, void *overridesv) +static void *merge_headers_config (pool *p, void *basev, void *overridesv) { headers_conf *a = (headers_conf *)pcalloc (p, sizeof(headers_conf)); @@ -149,7 +149,7 @@ } -const char *header_cmd(cmd_parms *cmd, headers_conf *dirconf, char *action, char *hdr, char *value) +static const char *header_cmd(cmd_parms *cmd, headers_conf *dirconf, char *action, char *hdr, char *value) { header_entry *new; server_rec *s = cmd->server; @@ -188,13 +188,13 @@ return NULL; } -command_rec headers_cmds[] = { +static command_rec headers_cmds[] = { { "Header", header_cmd, NULL, OR_FILEINFO, TAKE23, "an action, header and value"}, { NULL } }; -void do_headers_fixup(request_rec *r, array_header *headers) +static void do_headers_fixup(request_rec *r, array_header *headers) { int i; @@ -218,7 +218,7 @@ } -int fixup_headers(request_rec *r) +static int fixup_headers(request_rec *r) { void *sconf = r->server->module_config; headers_conf *serverconf = 1.26 +20 -20 apache/src/mod_imap.c Index: mod_imap.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_imap.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- mod_imap.c 1997/07/19 09:48:04 1.25 +++ mod_imap.c 1997/07/27 01:43:25 1.26 @@ -118,7 +118,7 @@ char *imap_base; } imap_conf_rec; -void *create_imap_dir_config (pool *p, char *dummy) { +static void *create_imap_dir_config (pool *p, char *dummy) { imap_conf_rec *icr = (imap_conf_rec *)palloc(p, sizeof(imap_conf_rec)); @@ -129,7 +129,7 @@ return icr; } -void *merge_imap_dir_configs (pool *p, void *basev, void *addv) +static void *merge_imap_dir_configs (pool *p, void *basev, void *addv) { imap_conf_rec *new=(imap_conf_rec *)pcalloc (p, sizeof(imap_conf_rec)); imap_conf_rec *base = (imap_conf_rec *)basev; @@ -143,7 +143,7 @@ } -command_rec imap_cmds[] = { +static command_rec imap_cmds[] = { { "ImapMenu", set_string_slot, (void*)XtOffsetOf(imap_conf_rec, imap_menu), OR_INDEXES, TAKE1, "the type of menu generated: none, formatted, semiformatted, unformatted"}, @@ -156,7 +156,7 @@ { NULL } }; -int pointinrect(double point[2], double coords[MAXVERTS][2]) +static int pointinrect(double point[2], double coords[MAXVERTS][2]) { double max[2], min[2]; if (coords[0][X] > coords[1][X]) { @@ -179,7 +179,7 @@ (point[Y] >= min[1] && point[Y] <= max[1])); } -int pointincircle(double point[2], double coords[MAXVERTS][2]) +static int pointincircle(double point[2], double coords[MAXVERTS][2]) { double radius1, radius2; @@ -192,7 +192,7 @@ return (radius2 <= radius1); } -int pointinpoly(double point[2], double pgon[MAXVERTS][2]) +static int pointinpoly(double point[2], double pgon[MAXVERTS][2]) { int i, numverts, inside_flag, xflag0; int crossings; @@ -266,7 +266,7 @@ } -int is_closer(double point[2], double coords[MAXVERTS][2], double *closest) +static int is_closer(double point[2], double coords[MAXVERTS][2], double *closest) { double dist_squared =((point[X] - coords[0][X]) * (point[X] - coords[0][X])) + ((point[Y] - coords[0][Y]) * (point[Y] - coords[0][Y])); @@ -284,7 +284,7 @@ } -double get_x_coord(char *args) +static double get_x_coord(char *args) { char *endptr; /* we want it non-null */ double x_coord = -1; /* -1 is returned if no coordinate is given */ @@ -303,7 +303,7 @@ return(-1); /* else if no conversion was made, or if no args was given */ } -double get_y_coord(char *args) +static double get_y_coord(char *args) { char *endptr; /* we want it non-null */ char *start_of_y = NULL; @@ -331,7 +331,7 @@ } -int read_quoted(char *string, char *quoted_part) +static int read_quoted(char *string, char *quoted_part) { char *starting_pos = string; @@ -357,7 +357,7 @@ /* * url needs to point to a string with at least SMALLBUF memory allocated */ -void imap_url(request_rec *r, char *base, char *value, char *url) +static void imap_url(request_rec *r, char *base, char *value, char *url) { /* translates a value into a URL. */ int slen, clen; @@ -494,7 +494,7 @@ return; } -int imap_reply(request_rec *r, char *redirect) +static int imap_reply(request_rec *r, char *redirect) { if ( ! strcasecmp(redirect, "error") ) { return SERVER_ERROR; /* they actually requested an error! */ @@ -509,7 +509,7 @@ return SERVER_ERROR; } -void menu_header(request_rec *r, char *menu) +static void menu_header(request_rec *r, char *menu) { r->content_type = "text/html"; send_http_header(r); @@ -525,7 +525,7 @@ return; } -void menu_blank(request_rec *r, char *menu) +static void menu_blank(request_rec *r, char *menu) { if (! strcasecmp(menu, "formatted") ) { rputs("\n", r); @@ -539,7 +539,7 @@ return; } -void menu_comment(request_rec *r, char *menu, char *comment) +static void menu_comment(request_rec *r, char *menu, char *comment) { if (! strcasecmp(menu, "formatted") ) { rputs("\n", r); /* print just a newline if 'formatted' */ @@ -553,7 +553,7 @@ return; /* comments are ignored in the 'formatted' form */ } -void menu_default(request_rec *r, char *menu, char *href, char *text) +static void menu_default(request_rec *r, char *menu, char *href, char *text) { if ( ! strcasecmp(href, "error") || ! strcasecmp(href, "nocontent") ) { return; /* don't print such lines, these aren'te really href's */ @@ -572,7 +572,7 @@ return; } -void menu_directive(request_rec *r, char *menu, char *href, char *text) +static void menu_directive(request_rec *r, char *menu, char *href, char *text) { if ( ! strcasecmp(href, "error") || ! strcasecmp(href, "nocontent") ) { return; /* don't print such lines, as this isn't really an href */ @@ -591,13 +591,13 @@ return; } -void menu_footer(request_rec *r) +static void menu_footer(request_rec *r) { rputs("\n\n</body>\n</html>\n", r); /* finish the menu */ kill_timeout(r); } -int imap_handler(request_rec *r) +static int imap_handler(request_rec *r) { char input[LARGEBUF] = {'\0'}; /* size of input can not be lowered without changing hard-coded @@ -811,7 +811,7 @@ } -handler_rec imap_handlers[] = { +static handler_rec imap_handlers[] = { { IMAP_MAGIC_TYPE, imap_handler }, { "imap-file", imap_handler }, { NULL } 1.44 +32 -36 apache/src/mod_include.c Index: mod_include.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_include.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- mod_include.c 1997/07/24 04:13:11 1.43 +++ mod_include.c 1997/07/27 01:43:26 1.44 @@ -95,14 +95,10 @@ #define SIZEFMT_BYTES 0 #define SIZEFMT_KMG 1 -static void decodehtml(char *s); -static char *get_tag(pool *p, FILE *in, char *tag, int tag_len, int dodecode); -static int get_directive(FILE *in, char *d, pool *p); - /* ------------------------ Environment function -------------------------- */ -void add_include_vars(request_rec *r, char *timefmt) +static void add_include_vars(request_rec *r, char *timefmt) { #ifndef WIN32 struct passwd *pw; @@ -192,7 +188,7 @@ c = (char)i; \ } -int find_string(FILE *in, char *str, request_rec *r, int printing) { +static int find_string(FILE *in, char *str, request_rec *r, int printing) { int x, l = strlen(str), p; char outbuf[OUTBUFSIZE]; int outind = 0; @@ -427,7 +423,7 @@ /* * Do variable substitution on strings */ -void parse_string(request_rec *r, char *in, char *out, int length, +static void parse_string(request_rec *r, char *in, char *out, int length, int leave_name) { char ch; @@ -510,7 +506,7 @@ /* --------------------------- Action handlers ---------------------------- */ -int include_cgi(char *s, request_rec *r) +static int include_cgi(char *s, request_rec *r) { request_rec *rr = sub_req_lookup_uri (s, r); @@ -549,7 +545,7 @@ return 0; } -int handle_include(FILE *in, request_rec *r, char *error, int noexec) { +static int handle_include(FILE *in, request_rec *r, char *error, int noexec) { char tag[MAX_STRING_LEN]; char parsed_string[MAX_STRING_LEN]; char *tag_val; @@ -617,7 +613,7 @@ char *s; } include_cmd_arg; -int include_cmd_child (void *arg) +static int include_cmd_child (void *arg) { request_rec *r = ((include_cmd_arg *)arg)->r; char *s = ((include_cmd_arg *)arg)->s; @@ -688,7 +684,7 @@ #endif /* WIN32 */ } -int include_cmd(char *s, request_rec *r) { +static int include_cmd(char *s, request_rec *r) { include_cmd_arg arg; FILE *f; @@ -706,7 +702,7 @@ } -int handle_exec(FILE *in, request_rec *r, char *error) +static int handle_exec(FILE *in, request_rec *r, char *error) { char tag[MAX_STRING_LEN]; char *tag_val; @@ -746,7 +742,7 @@ } -int handle_echo (FILE *in, request_rec *r, char *error) { +static int handle_echo (FILE *in, request_rec *r, char *error) { char tag[MAX_STRING_LEN]; char *tag_val; @@ -768,8 +764,9 @@ } } } + #ifdef USE_PERL_SSI -int handle_perl (FILE *in, request_rec *r, char *error) { +static int handle_perl (FILE *in, request_rec *r, char *error) { char tag[MAX_STRING_LEN]; char *tag_val; SV *sub = Nullsv; @@ -799,7 +796,7 @@ /* error and tf must point to a string with room for at * least MAX_STRING_LEN characters */ -int handle_config(FILE *in, request_rec *r, char *error, char *tf, +static int handle_config(FILE *in, request_rec *r, char *error, char *tf, int *sizefmt) { char tag[MAX_STRING_LEN]; char *tag_val; @@ -841,8 +838,7 @@ } - -int find_file(request_rec *r, char *directive, char *tag, +static int find_file(request_rec *r, char *directive, char *tag, char *tag_val, struct stat *finfo, char *error) { char *dir = "./"; @@ -885,7 +881,7 @@ } -int handle_fsize(FILE *in, request_rec *r, char *error, int sizefmt) +static int handle_fsize(FILE *in, request_rec *r, char *error, int sizefmt) { char tag[MAX_STRING_LEN]; char *tag_val; @@ -924,7 +920,7 @@ } } -int handle_flastmod(FILE *in, request_rec *r, char *error, char *tf) +static int handle_flastmod(FILE *in, request_rec *r, char *error, char *tf) { char tag[MAX_STRING_LEN]; char *tag_val; @@ -944,7 +940,7 @@ } } -int re_check(request_rec *r, char *string, char *rexp) +static int re_check(request_rec *r, char *string, char *rexp) { regex_t *compiled; int regex_error; @@ -969,7 +965,7 @@ char value[MAX_STRING_LEN]; }; -char *get_ptoken(request_rec *r, char *string, struct token *token) { +static char *get_ptoken(request_rec *r, char *string, struct token *token) { char ch; int next = 0; int qs = 0; @@ -1106,7 +1102,7 @@ * cases. And, without rewriting this completely, the easiest way * is to just branch to the return code which cleans it up. */ -int parse_expr(request_rec *r, char *expr, char *error) +static int parse_expr(request_rec *r, char *expr, char *error) { struct parse_node { struct parse_node *left, *right, *parent; @@ -1630,7 +1626,7 @@ return (retval); } -int handle_if(FILE *in, request_rec *r, char *error, +static int handle_if(FILE *in, request_rec *r, char *error, int *conditional_status, int *printing) { char tag[MAX_STRING_LEN]; @@ -1660,7 +1656,7 @@ } } -int handle_elif(FILE *in, request_rec *r, char *error, +static int handle_elif(FILE *in, request_rec *r, char *error, int *conditional_status, int *printing) { char tag[MAX_STRING_LEN]; @@ -1697,7 +1693,7 @@ } } -int handle_else(FILE *in, request_rec *r, char *error, +static int handle_else(FILE *in, request_rec *r, char *error, int *conditional_status, int *printing) { char tag[MAX_STRING_LEN]; @@ -1720,7 +1716,7 @@ } } -int handle_endif(FILE *in, request_rec *r, char *error, +static int handle_endif(FILE *in, request_rec *r, char *error, int *conditional_status, int *printing) { char tag[MAX_STRING_LEN]; @@ -1741,7 +1737,7 @@ } } -int handle_set(FILE *in, request_rec *r, char *error) +static int handle_set(FILE *in, request_rec *r, char *error) { char tag[MAX_STRING_LEN]; char parsed_string[MAX_STRING_LEN]; @@ -1769,7 +1765,7 @@ } } -int handle_printenv(FILE *in, request_rec *r, char *error) +static int handle_printenv(FILE *in, request_rec *r, char *error) { char tag[MAX_STRING_LEN]; char *tag_val; @@ -1795,7 +1791,7 @@ /* This is a stub which parses a file descriptor. */ -void send_parsed_content(FILE *f, request_rec *r) +static void send_parsed_content(FILE *f, request_rec *r) { char directive[MAX_STRING_LEN], error[MAX_STRING_LEN]; char timefmt[MAX_STRING_LEN]; @@ -1916,14 +1912,14 @@ #define DEFAULT_XBITHACK xbithack_off #endif -void *create_includes_dir_config (pool *p, char *dummy) +static void *create_includes_dir_config (pool *p, char *dummy) { enum xbithack *result = (enum xbithack*)palloc(p, sizeof (enum xbithack)); *result = DEFAULT_XBITHACK; return result; } -const char *set_xbithack (cmd_parms *cmd, void *xbp, char *arg) +static const char *set_xbithack (cmd_parms *cmd, void *xbp, char *arg) { enum xbithack *state = (enum xbithack *)xbp; @@ -1938,7 +1934,7 @@ return NULL; } -int send_parsed_file(request_rec *r) +static int send_parsed_file(request_rec *r) { FILE *f; enum xbithack *state = @@ -1998,13 +1994,13 @@ return OK; } -int send_shtml_file (request_rec *r) +static int send_shtml_file (request_rec *r) { r->content_type = "text/html"; return send_parsed_file(r); } -int xbithack_handler (request_rec *r) +static int xbithack_handler (request_rec *r) { #if defined(__EMX__) || defined(WIN32) /* OS/2 dosen't currently support the xbithack. This is being worked on. */ @@ -2024,12 +2020,12 @@ #endif } -command_rec includes_cmds[] = { +static command_rec includes_cmds[] = { { "XBitHack", set_xbithack, NULL, OR_OPTIONS, TAKE1, "Off, On, or Full" }, { NULL } }; -handler_rec includes_handlers[] = { +static handler_rec includes_handlers[] = { { INCLUDES_MAGIC_TYPE, send_shtml_file }, { INCLUDES_MAGIC_TYPE3, send_shtml_file }, { "server-parsed", send_parsed_file }, 1.23 +10 -10 apache/src/mod_info.c Index: mod_info.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_info.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- mod_info.c 1997/07/21 05:53:49 1.22 +++ mod_info.c 1997/07/27 01:43:26 1.23 @@ -100,7 +100,7 @@ module MODULE_VAR_EXPORT info_module; extern module *top_module; -void *create_info_config(pool *p, server_rec *s) +static void *create_info_config(pool *p, server_rec *s) { mod_info_server_conf *conf = (mod_info_server_conf *) pcalloc(p, sizeof(mod_info_server_conf)); @@ -109,7 +109,7 @@ return conf; } -void *merge_info_config(pool *p, void *basev, void *overridesv) +static void *merge_info_config(pool *p, void *basev, void *overridesv) { mod_info_server_conf *new = (mod_info_server_conf *) pcalloc(p, sizeof(mod_info_server_conf)); @@ -120,7 +120,7 @@ return new; } -char *mod_info_html_cmd_string(char *string) { +static char *mod_info_html_cmd_string(char *string) { char *s,*t; static char ret[256]; /* What is the max size of a command? */ char *end_ret; @@ -148,7 +148,7 @@ return(ret); } -mod_info_config_lines *mod_info_load_config(pool *p, char *filename, request_rec *r) { +static mod_info_config_lines *mod_info_load_config(pool *p, char *filename, request_rec *r) { char s[MAX_STRING_LEN]; FILE *fp; mod_info_config_lines *new, *ret=NULL, *prev=NULL; @@ -192,7 +192,7 @@ return(ret); } -void mod_info_module_cmds(request_rec *r, mod_info_config_lines *cfg, command_rec *cmds,char *label) { +static void mod_info_module_cmds(request_rec *r, mod_info_config_lines *cfg, command_rec *cmds,char *label) { command_rec *cmd=cmds; mod_info_config_lines *li=cfg,*li_st=NULL,*li_se=NULL,*block_start=NULL; int lab=0, nest=0; @@ -292,7 +292,7 @@ } } -char *find_more_info(server_rec *serv, const char *module_name) +static char *find_more_info(server_rec *serv, const char *module_name) { int i; mod_info_server_conf *conf = (mod_info_server_conf *) @@ -309,7 +309,7 @@ return 0; } -int display_info(request_rec *r) { +static int display_info(request_rec *r) { module *modp = NULL; char buf[512], *cfname; char *more_info; @@ -476,7 +476,7 @@ return 0; } -const char *add_module_info(cmd_parms *cmd, void *dummy, char *name, char *info) +static const char *add_module_info(cmd_parms *cmd, void *dummy, char *name, char *info) { server_rec *s = cmd->server; mod_info_server_conf *conf = (mod_info_server_conf *) @@ -488,13 +488,13 @@ return NULL; } -command_rec info_cmds[] = { +static command_rec info_cmds[] = { { "AddModuleInfo", add_module_info, NULL, RSRC_CONF, TAKE2, "a module name and additional information on that module"}, { NULL } }; -handler_rec info_handlers[] = { +static handler_rec info_handlers[] = { { "server-info", display_info }, { NULL } }; 1.33 +38 -38 apache/src/mod_log_config.c Index: mod_log_config.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_log_config.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- mod_log_config.c 1997/07/17 22:27:38 1.32 +++ mod_log_config.c 1997/07/27 01:43:27 1.33 @@ -222,7 +222,7 @@ array_header *conditions; } log_format_item; -char *format_integer(pool *p, int i) +static char *format_integer(pool *p, int i) { char dummy[40]; ap_snprintf (dummy, sizeof(dummy), "%d", i); @@ -235,15 +235,15 @@ else return format_integer (p, i); } -char *constant_item (request_rec *dummy, char *stuff) { return stuff; } +static char *constant_item (request_rec *dummy, char *stuff) { return stuff; } -char *log_remote_host (request_rec *r, char *a) +static char *log_remote_host (request_rec *r, char *a) { return (char *)get_remote_host(r->connection, r->per_dir_config, REMOTE_NAME); } -char *log_remote_logname(request_rec *r, char *a) +static char *log_remote_logname(request_rec *r, char *a) {return (char *)get_remote_logname(r);} -char *log_remote_user (request_rec *r, char *a) { +static char *log_remote_user (request_rec *r, char *a) { char *rvalue = r->connection->user; if (rvalue == NULL) { @@ -254,17 +254,17 @@ return rvalue; } -char *log_request_line (request_rec *r, char *a) +static char *log_request_line (request_rec *r, char *a) { return r->the_request; } -char *log_request_file (request_rec *r, char *a) +static char *log_request_file (request_rec *r, char *a) { return r->filename; } -char *log_request_uri (request_rec *r, char *a) +static char *log_request_uri (request_rec *r, char *a) { return r->uri; } -char *log_status (request_rec *r, char *a) +static char *log_status (request_rec *r, char *a) { return pfmt(r->pool, r->status); } -char *log_bytes_sent (request_rec *r, char *a) +static char *log_bytes_sent (request_rec *r, char *a) { if (!r->sent_bodyct) return "-"; else @@ -277,10 +277,10 @@ } } -char *log_header_in (request_rec *r, char *a) +static char *log_header_in (request_rec *r, char *a) { return table_get (r->headers_in, a); } -char *log_header_out (request_rec *r, char *a) +static char *log_header_out (request_rec *r, char *a) { char *cp = table_get (r->headers_out, a); if (!strcasecmp(a, "Content-type") && r->content_type) @@ -289,12 +289,12 @@ return table_get (r->err_headers_out, a); } -char *log_note (request_rec *r, char *a) +static char *log_note (request_rec *r, char *a) { return table_get (r->notes, a); } -char *log_env_var (request_rec *r, char *a) +static char *log_env_var (request_rec *r, char *a) { return table_get (r->subprocess_env, a); } -char *log_request_time (request_rec *r, char *a) +static char *log_request_time (request_rec *r, char *a) { int timz; struct tm *t; @@ -317,25 +317,25 @@ return pstrdup (r->pool, tstr); } -char *log_request_duration (request_rec *r, char *a) { +static char *log_request_duration (request_rec *r, char *a) { char duration[22]; /* Long enough for 2^64 */ ap_snprintf(duration, sizeof(duration), "%ld", time(NULL) - r->request_time); return pstrdup(r->pool, duration); } -char *log_virtual_host (request_rec *r, char *a) { +static char *log_virtual_host (request_rec *r, char *a) { return pstrdup(r->pool, r->server->server_hostname); } -char *log_server_port (request_rec *r, char *a) { +static char *log_server_port (request_rec *r, char *a) { char portnum[22]; ap_snprintf(portnum, sizeof(portnum), "%u", r->server->port); return pstrdup(r->pool, portnum); } -char *log_child_pid (request_rec *r, char *a) { +static char *log_child_pid (request_rec *r, char *a) { char pidnum[22]; ap_snprintf(pidnum, sizeof(pidnum), "%ld", (long)getpid()); return pstrdup(r->pool, pidnum); @@ -345,7 +345,7 @@ * Parsing the log format string */ -struct log_item_list { +static struct log_item_list { char ch; item_key_func func; int want_orig_default; @@ -370,7 +370,7 @@ { '\0' } }; -struct log_item_list *find_log_func (char k) +static struct log_item_list *find_log_func (char k) { int i; @@ -381,7 +381,7 @@ return NULL; } -char *log_format_substring (pool *p, const char *start, const char *end) +static char *log_format_substring (pool *p, const char *start, const char *end) { char *res = palloc (p, end - start + 1); strncpy (res, start, end - start); @@ -389,7 +389,7 @@ return res; } -char *parse_log_misc_string (pool *p, log_format_item *it, const char **sa) +static char *parse_log_misc_string (pool *p, log_format_item *it, const char **sa) { const char *s = *sa; @@ -403,7 +403,7 @@ return NULL; } -char *parse_log_item (pool *p, log_format_item *it, const char **sa) +static char *parse_log_item (pool *p, log_format_item *it, const char **sa) { const char *s = *sa; if (*s != '%') return parse_log_misc_string (p, it, sa); @@ -470,7 +470,7 @@ return "Ran off end of LogFormat parsing args to some directive"; } -array_header *parse_log_string (pool *p, const char *s, const char **err) +static array_header *parse_log_string (pool *p, const char *s, const char **err) { array_header *a = make_array (p, 30, sizeof (log_format_item)); char *res; @@ -492,7 +492,7 @@ * Actually logging. */ -char *process_item(request_rec *r, request_rec *orig, log_format_item *item) +static char *process_item(request_rec *r, request_rec *orig, log_format_item *item) { char *cp; @@ -522,7 +522,7 @@ return cp ? cp : "-"; } -int config_log_transaction(request_rec *r, config_log_state *cls, +static int config_log_transaction(request_rec *r, config_log_state *cls, array_header *default_format) { array_header *strsa; log_format_item *items; @@ -561,7 +561,7 @@ return OK; } -int multi_log_transaction(request_rec *r) +static int multi_log_transaction(request_rec *r) { multi_log_state *mls = get_module_config (r->server->module_config, &config_log_module); @@ -593,7 +593,7 @@ * Module glue... */ -void *make_config_log_state (pool *p, server_rec *s) +static void *make_config_log_state (pool *p, server_rec *s) { multi_log_state *mls = (multi_log_state *)palloc(p, sizeof (multi_log_state)); @@ -611,7 +611,7 @@ * to the log of logs specified for the non-vhost configuration */ -void *merge_config_log_state (pool *p, void *basev, void *addv) +static void *merge_config_log_state (pool *p, void *basev, void *addv) { multi_log_state *base = (multi_log_state *)basev; multi_log_state *add = (multi_log_state *)addv; @@ -623,7 +623,7 @@ return add; } -const char *log_format (cmd_parms *cmd, void *dummy, char *arg) +static const char *log_format (cmd_parms *cmd, void *dummy, char *arg) { const char *err_string = NULL; multi_log_state *mls = get_module_config (cmd->server->module_config, @@ -633,7 +633,7 @@ return err_string; } -const char *add_custom_log(cmd_parms *cmd, void *dummy, char *fn, char *fmt) +static const char *add_custom_log(cmd_parms *cmd, void *dummy, char *fn, char *fmt) { const char *err_string = NULL; multi_log_state *mls = get_module_config (cmd->server->module_config, @@ -651,17 +651,17 @@ return err_string; } -const char *set_transfer_log(cmd_parms *cmd, void *dummy, char *fn) +static const char *set_transfer_log(cmd_parms *cmd, void *dummy, char *fn) { return add_custom_log(cmd, dummy, fn, NULL); } -const char *set_cookie_log(cmd_parms *cmd, void *dummy, char *fn) +static const char *set_cookie_log(cmd_parms *cmd, void *dummy, char *fn) { return add_custom_log(cmd, dummy, fn, "%{Cookie}n \"%r\" %t"); } -command_rec config_log_cmds[] = { +static command_rec config_log_cmds[] = { { "CustomLog", add_custom_log, NULL, RSRC_CONF, TAKE2, "a file name and a custom log format string" }, { "TransferLog", set_transfer_log, NULL, RSRC_CONF, TAKE1, @@ -699,7 +699,7 @@ return(child_pid); } -config_log_state *open_config_log (server_rec *s, pool *p, +static config_log_state *open_config_log (server_rec *s, pool *p, config_log_state *cls, array_header *default_format) { if (cls->log_fd > 0) return cls; /* virtual config shared w/main server */ @@ -729,7 +729,7 @@ return cls; } -config_log_state *open_multi_logs (server_rec *s, pool *p) +static config_log_state *open_multi_logs (server_rec *s, pool *p) { int i; multi_log_state *mls = get_module_config(s->module_config, @@ -760,7 +760,7 @@ return NULL; } -void init_config_log (server_rec *s, pool *p) +static void init_config_log (server_rec *s, pool *p) { /* First, do "physical" server, which gets default log fd and format * for the virtual servers, if they don't override... 1.21 +11 -11 apache/src/mod_mime.c Index: mod_mime.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_mime.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- mod_mime.c 1997/07/19 20:16:14 1.20 +++ mod_mime.c 1997/07/27 01:43:27 1.21 @@ -75,7 +75,7 @@ module MODULE_VAR_EXPORT mime_module; -void *create_mime_dir_config (pool *p, char *dummy) +static void *create_mime_dir_config (pool *p, char *dummy) { mime_dir_config *new = (mime_dir_config *) palloc (p, sizeof(mime_dir_config)); @@ -91,7 +91,7 @@ return new; } -void *merge_mime_dir_configs (pool *p, void *basev, void *addv) +static void *merge_mime_dir_configs (pool *p, void *basev, void *addv) { mime_dir_config *base = (mime_dir_config *)basev; mime_dir_config *add = (mime_dir_config *)addv; @@ -113,14 +113,14 @@ return new; } -const char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext) +static const char *add_type(cmd_parms *cmd, mime_dir_config *m, char *ct, char *ext) { if (*ext == '.') ++ext; table_set (m->forced_types, ext, ct); return NULL; } -const char *add_encoding(cmd_parms *cmd, mime_dir_config *m, char *enc, +static const char *add_encoding(cmd_parms *cmd, mime_dir_config *m, char *enc, char *ext) { if (*ext == '.') ++ext; @@ -128,7 +128,7 @@ return NULL; } -const char *add_language(cmd_parms *cmd, mime_dir_config *m, char *lang, +static const char *add_language(cmd_parms *cmd, mime_dir_config *m, char *lang, char *ext) { if (*ext == '.') ++ext; @@ -136,7 +136,7 @@ return NULL; } -const char *add_handler(cmd_parms *cmd, mime_dir_config *m, char *hdlr, +static const char *add_handler(cmd_parms *cmd, mime_dir_config *m, char *hdlr, char *ext) { if (*ext == '.') ++ext; @@ -148,14 +148,14 @@ * the name of its config file, so... */ -const char *set_types_config (cmd_parms *cmd, void *dummy, char *arg) +static const char *set_types_config (cmd_parms *cmd, void *dummy, char *arg) { set_module_config (cmd->server->module_config, &mime_module, pstrdup (cmd->pool, arg)); return NULL; } -command_rec mime_cmds[] = { +static command_rec mime_cmds[] = { { "AddType", add_type, NULL, OR_FILEINFO, ITERATE2, "a mime type followed by one or more file extensions" }, { "AddEncoding", add_encoding, NULL, OR_FILEINFO, ITERATE2, @@ -182,7 +182,7 @@ static table *hash_buckets[MIME_HASHSIZE]; -void init_mime (server_rec *s, pool *p) +static void init_mime (server_rec *s, pool *p) { FILE *f; char l[MAX_STRING_LEN]; @@ -218,8 +218,8 @@ fclose(f); } -/* note that the proxy module uses this */ -int find_ct(request_rec *r) +/* note that the proxy module uses this via mime_find_ct */ +static int find_ct(request_rec *r) { const char *fn = strrchr(r->filename, '/'); mime_dir_config *conf = 1.52 +39 -39 apache/src/mod_negotiation.c Index: mod_negotiation.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_negotiation.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- mod_negotiation.c 1997/07/21 05:53:50 1.51 +++ mod_negotiation.c 1997/07/27 01:43:27 1.52 @@ -83,7 +83,7 @@ module MODULE_VAR_EXPORT negotiation_module; -char *merge_string_array (pool *p, array_header *arr, char *sep) +static char *merge_string_array (pool *p, array_header *arr, char *sep) { int i; char *t = ""; @@ -94,7 +94,7 @@ return t; } -void *create_neg_dir_config (pool *p, char *dummy) +static void *create_neg_dir_config (pool *p, char *dummy) { neg_dir_config *new = (neg_dir_config *) palloc (p, sizeof (neg_dir_config)); @@ -103,7 +103,7 @@ return new; } -void *merge_neg_dir_configs (pool *p, void *basev, void *addv) +static void *merge_neg_dir_configs (pool *p, void *basev, void *addv) { neg_dir_config *base = (neg_dir_config *)basev; neg_dir_config *add = (neg_dir_config *)addv; @@ -116,7 +116,7 @@ return new; } -const char *set_language_priority (cmd_parms *cmd, void *n, char *lang) +static const char *set_language_priority (cmd_parms *cmd, void *n, char *lang) { array_header *arr = ((neg_dir_config *) n)->language_priority; char **langp = (char **) push_array (arr); @@ -125,7 +125,7 @@ return NULL; } -const char *cache_negotiated_docs (cmd_parms *cmd, void *dummy, char *dummy2) +static const char *cache_negotiated_docs (cmd_parms *cmd, void *dummy, char *dummy2) { void *server_conf = cmd->server->module_config; @@ -133,12 +133,12 @@ return NULL; } -int do_cache_negotiated_docs (server_rec *s) +static int do_cache_negotiated_docs (server_rec *s) { return (get_module_config (s->module_config, &negotiation_module) != NULL); } -command_rec negotiation_cmds[] = { +static command_rec negotiation_cmds[] = { { "CacheNegotiatedDocs", cache_negotiated_docs, NULL, RSRC_CONF, NO_ARGS, "no arguments (either present or absent)" }, { "LanguagePriority", set_language_priority, NULL, OR_FILEINFO, ITERATE, @@ -236,7 +236,7 @@ * Cleaning out the fields... */ -void clean_var_rec (var_rec *mime_info) +static void clean_var_rec (var_rec *mime_info) { mime_info->sub_req = NULL; mime_info->type_name = ""; @@ -265,7 +265,7 @@ * accept_info read out of its content-type, one way or another. */ -void set_mime_fields (var_rec *var, accept_rec *mime_info) +static void set_mime_fields (var_rec *var, accept_rec *mime_info) { var->type_name = mime_info->type_name; var->type_quality = mime_info->quality; @@ -289,7 +289,7 @@ * enter the values we recognize into the argument accept_rec */ -char *get_entry (pool *p, accept_rec *result, char *accept_line) +static char *get_entry (pool *p, accept_rec *result, char *accept_line) { result->quality = 1.0f; result->max_bytes = 0.0f; @@ -390,7 +390,7 @@ * and charset is only valid in Accept. */ -array_header *do_header_line (pool *p, char *accept_line) +static array_header *do_header_line (pool *p, char *accept_line) { array_header *accept_recs = make_array (p, 40, sizeof (accept_rec)); @@ -408,7 +408,7 @@ * return an array containing the languages of this variant */ -array_header *do_languages_line (pool *p, char **lang_line) +static array_header *do_languages_line (pool *p, char **lang_line) { array_header *lang_recs = make_array (p, 2, sizeof (char *)); @@ -430,7 +430,7 @@ * Handling header lines from clients... */ -negotiation_state *parse_accept_headers (request_rec *r) +static negotiation_state *parse_accept_headers (request_rec *r) { negotiation_state *new = (negotiation_state *)pcalloc (r->pool, sizeof (negotiation_state)); @@ -501,7 +501,7 @@ * e.g., POST). */ -void maybe_add_default_encodings(negotiation_state *neg, int prefer_scripts) +static void maybe_add_default_encodings(negotiation_state *neg, int prefer_scripts) { accept_rec *new_accept = (accept_rec *)push_array (neg->accepts); @@ -532,7 +532,7 @@ enum header_state { header_eof, header_seen, header_sep }; -enum header_state get_header_line (char *buffer, int len, FILE *map) +static enum header_state get_header_line (char *buffer, int len, FILE *map) { char *buf_end = buffer + len; char *cp; @@ -598,7 +598,7 @@ /* Stripping out RFC822 comments */ -void strip_paren_comments (char *hdr) +static void strip_paren_comments (char *hdr) { /* Hmmm... is this correct? In Roy's latest draft, (comments) can nest! */ @@ -619,7 +619,7 @@ /* Getting to a header body from the header */ -char *lcase_header_name_return_body (char *header, request_rec *r) +static char *lcase_header_name_return_body (char *header, request_rec *r) { char *cp = header; @@ -715,7 +715,7 @@ * Same, except we use a filtered directory listing as the map... */ -int read_types_multi (negotiation_state *neg) +static int read_types_multi (negotiation_state *neg) { request_rec *r = neg->r; @@ -835,7 +835,7 @@ * be 1 for star/star, 2 for type/star and 3 for type/subtype. */ -int mime_match (accept_rec *accept_r, var_rec *avail) +static int mime_match (accept_rec *accept_r, var_rec *avail) { char *accept_type = accept_r->type_name; char *avail_type = avail->type_name; @@ -891,7 +891,7 @@ * where the standard does not specify a unique course of action). */ -int level_cmp (var_rec *var1, var_rec *var2) +static int level_cmp (var_rec *var1, var_rec *var2) { /* Levels are only comparable between matching media types */ @@ -935,7 +935,7 @@ * to set lang_index. */ -int find_lang_index (array_header *accept_langs, char *lang) +static int find_lang_index (array_header *accept_langs, char *lang) { accept_rec *accs; int i; @@ -957,7 +957,7 @@ * between several languages. */ -int find_default_index (neg_dir_config *conf, char *lang) +static int find_default_index (neg_dir_config *conf, char *lang) { array_header *arr; int nelts; @@ -993,7 +993,7 @@ * we don't use this fiddle. */ -void set_default_lang_quality(negotiation_state *neg) +static void set_default_lang_quality(negotiation_state *neg) { var_rec *avail_recs = (var_rec *)neg->avail_vars->elts; int j; @@ -1042,7 +1042,7 @@ * in the negotiation if the language qualities tie. */ -void set_language_quality(negotiation_state *neg, var_rec *variant) +static void set_language_quality(negotiation_state *neg, var_rec *variant) { int i; int naccept = neg->accept_langs->nelts; @@ -1187,7 +1187,7 @@ * machinery. At some point, that ought to be fixed. */ -float find_content_length(negotiation_state *neg, var_rec *variant) +static float find_content_length(negotiation_state *neg, var_rec *variant) { struct stat statb; @@ -1208,7 +1208,7 @@ * determining the best matching variant. */ -void set_accept_quality(negotiation_state *neg, var_rec *variant) +static void set_accept_quality(negotiation_state *neg, var_rec *variant) { int i; accept_rec *accept_recs = (accept_rec *)neg->accepts->elts; @@ -1277,7 +1277,7 @@ * assume value of '1'. */ -void set_charset_quality(negotiation_state *neg, var_rec *variant) +static void set_charset_quality(negotiation_state *neg, var_rec *variant) { int i; accept_rec *accept_recs = (accept_rec *)neg->accept_charsets->elts; @@ -1331,13 +1331,13 @@ * use 7bit, 8bin or binary in their var files?? */ -int is_identity_encoding (char *enc) +static int is_identity_encoding (char *enc) { return (!enc || !enc[0] || !strcmp (enc, "7bit") || !strcmp (enc, "8bit") || !strcmp (enc, "binary")); } -void set_encoding_quality(negotiation_state *neg, var_rec *variant) +static void set_encoding_quality(negotiation_state *neg, var_rec *variant) { int i; accept_rec *accept_recs = (accept_rec *)neg->accept_encodings->elts; @@ -1408,7 +1408,7 @@ /* Firstly, the negotiation 'network algorithm' from Holtman. */ -int is_variant_better_na(negotiation_state *neg, var_rec *variant, var_rec *best, float *p_bestq) +static int is_variant_better_na(negotiation_state *neg, var_rec *variant, var_rec *best, float *p_bestq) { float bestq = *p_bestq, q; @@ -1460,7 +1460,7 @@ * (just about). */ -int is_variant_better(negotiation_state *neg, var_rec *variant, var_rec *best, float *p_bestq) +static int is_variant_better(negotiation_state *neg, var_rec *variant, var_rec *best, float *p_bestq) { float bestq = *p_bestq, q; int levcmp; @@ -1569,7 +1569,7 @@ return 1; } -int best_match(negotiation_state *neg, var_rec **pbest) +static int best_match(negotiation_state *neg, var_rec **pbest) { int j; var_rec *best = NULL; @@ -1660,7 +1660,7 @@ * configurable in the map file. */ -void set_neg_headers(request_rec *r, negotiation_state *neg, int na_result) +static void set_neg_headers(request_rec *r, negotiation_state *neg, int na_result) { int j; var_rec *avail_recs = (var_rec *)neg->avail_vars->elts; @@ -1758,7 +1758,7 @@ * 300 or 406 status body. */ -char *make_variant_list (request_rec *r, negotiation_state *neg) +static char *make_variant_list (request_rec *r, negotiation_state *neg) { int i; char *t; @@ -1790,7 +1790,7 @@ return t; } -void store_variant_list (request_rec *r, negotiation_state *neg) +static void store_variant_list (request_rec *r, negotiation_state *neg) { if (r->main == NULL) { table_set (r->notes, "variant-list", make_variant_list (r, neg)); @@ -1805,7 +1805,7 @@ * Otherwise, add the appropriate headers to the current response. */ -int setup_choice_response(request_rec *r, negotiation_state *neg, var_rec *variant) +static int setup_choice_response(request_rec *r, negotiation_state *neg, var_rec *variant) { request_rec *sub_req; char *sub_vary; @@ -1852,7 +1852,7 @@ * Executive... */ -int handle_map_file (request_rec *r) +static int handle_map_file (request_rec *r) { negotiation_state *neg = parse_accept_headers (r); var_rec *best; @@ -1911,7 +1911,7 @@ return OK; } -int handle_multi (request_rec *r) +static int handle_multi (request_rec *r) { negotiation_state *neg; var_rec *best, *avail_recs; @@ -2026,7 +2026,7 @@ return OK; } -handler_rec negotiation_handlers[] = { +static handler_rec negotiation_handlers[] = { { MAP_FILE_MAGIC_TYPE, handle_map_file }, { "type-map", handle_map_file }, { NULL } 1.56 +5 -5 apache/src/mod_status.c Index: mod_status.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_status.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- mod_status.c 1997/07/27 01:21:40 1.55 +++ mod_status.c 1997/07/27 01:43:28 1.56 @@ -111,7 +111,7 @@ /* Format the number of bytes nicely */ -void format_byte_out(request_rec *r,unsigned long bytes) +static void format_byte_out(request_rec *r,unsigned long bytes) { if (bytes < (5 * KBYTE)) rprintf(r,"%d B",(int)bytes); @@ -123,7 +123,7 @@ rprintf(r,"%.1f GB",(float)bytes/GBYTE); } -void format_kbyte_out(request_rec *r,unsigned long kbytes) +static void format_kbyte_out(request_rec *r,unsigned long kbytes) { if (kbytes < KBYTE) rprintf(r,"%d kB",(int)kbytes); @@ -133,7 +133,7 @@ rprintf(r,"%.1f GB",(float)kbytes/MBYTE); } -void show_time(request_rec *r,time_t tsecs) +static void show_time(request_rec *r,time_t tsecs) { long days,hrs,mins,secs; char buf[100]; @@ -173,7 +173,7 @@ char *hdr_out_str; }; -int status_handler (request_rec *r) +static int status_handler (request_rec *r) { struct stat_opt options[] = /* see #defines above */ { @@ -636,7 +636,7 @@ return 0; } -handler_rec status_handlers[] = +static handler_rec status_handlers[] = { { STATUS_MAGIC_TYPE, status_handler }, { "server-status", status_handler }, 1.19 +4 -4 apache/src/mod_userdir.c Index: mod_userdir.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_userdir.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- mod_userdir.c 1997/07/17 22:27:42 1.18 +++ mod_userdir.c 1997/07/27 01:43:28 1.19 @@ -103,7 +103,7 @@ * explicit) disablement, and the replacement string for all others. */ -void *create_userdir_config (pool *p, server_rec *s) { +static void *create_userdir_config (pool *p, server_rec *s) { userdir_config *newcfg = (userdir_config *) pcalloc (p, sizeof(userdir_config)); @@ -118,7 +118,7 @@ #define O_ENABLE 1 #define O_DISABLE 2 -const char *set_user_dir (cmd_parms *cmd, void *dummy, char *arg) +static const char *set_user_dir (cmd_parms *cmd, void *dummy, char *arg) { userdir_config *s_cfg = (userdir_config *) get_module_config @@ -179,13 +179,13 @@ return NULL; } -command_rec userdir_cmds[] = { +static command_rec userdir_cmds[] = { { "UserDir", set_user_dir, NULL, RSRC_CONF, RAW_ARGS, "the public subdirectory in users' home directories, or 'disabled', or 'disabled username username...', or 'enabled username username...'" }, { NULL } }; -int translate_userdir (request_rec *r) +static int translate_userdir (request_rec *r) { void *server_conf = r->server->module_config; const userdir_config *s_cfg = 1.19 +2 -2 apache/src/modules/proxy/mod_proxy.c Index: mod_proxy.c =================================================================== RCS file: /export/home/cvs/apache/src/modules/proxy/mod_proxy.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- mod_proxy.c 1997/07/21 05:54:03 1.18 +++ mod_proxy.c 1997/07/27 01:43:38 1.19 @@ -180,7 +180,7 @@ else return OK; /* otherwise; we've done the best we can */ } -void +static void proxy_init(server_rec *r, pool *p) { proxy_garbage_init(r, p); @@ -194,7 +194,7 @@ /* domain in this case. I think it is better to redirect to a FQDN, since */ /* these will later be found in the bookmarks files. */ /* The "ProxyDomain" directive determines what domain will be appended */ -int +static int proxy_needsdomain(request_rec *r, const char *url, const char *domain) { char *scheme = pstrdup (r->pool, url);