X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=loadcfg.c;h=59a38904ad6082c6c907d0c3c4cf06c63f581fdc;hb=9225ed38e47bd81797cd24d417bdd8df1d6f19df;hp=6509746298b9772739e8dc7c0e3ccf321d9eb681;hpb=667cbfed6af943f445f0bd158e6177ebd948a023;p=privoxy.git
diff --git a/loadcfg.c b/loadcfg.c
index 65097462..59a38904 100644
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -1,4 +1,4 @@
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.74 2008/03/26 18:07:07 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.77 2008/05/26 16:13:22 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
@@ -35,6 +35,17 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.74 2008/03/26 18:07:07 fabiankeil
*
* Revisions :
* $Log: loadcfg.c,v $
+ * Revision 1.77 2008/05/26 16:13:22 fabiankeil
+ * Reuse directive_hash and don't hash the same directive twice.
+ *
+ * Revision 1.76 2008/05/10 09:03:16 fabiankeil
+ * - Merge three string_append() calls.
+ * - Remove useless assertion.
+ *
+ * Revision 1.75 2008/03/30 14:52:05 fabiankeil
+ * Rename load_actions_file() and load_re_filterfile()
+ * as they load multiple files "now".
+ *
* Revision 1.74 2008/03/26 18:07:07 fabiankeil
* Add hostname directive. Closes PR#1918189.
*
@@ -1031,10 +1042,10 @@ struct configuration_spec * load_config(void)
continue;
/* *************************************************************************
- * hash_enforce_blocks 0|1
+ * enforce-blocks 0|1
* *************************************************************************/
-#ifdef FEATURE_FORCE_LOAD
case hash_enforce_blocks:
+#ifdef FEATURE_FORCE_LOAD
if ((*arg != '\0') && (0 != atoi(arg)))
{
config->feature_flags |= RUNTIME_FEATURE_ENFORCE_BLOCKS;
@@ -1043,8 +1054,11 @@ struct configuration_spec * load_config(void)
{
config->feature_flags &= ~RUNTIME_FEATURE_ENFORCE_BLOCKS;
}
- continue;
+#else
+ log_error(LOG_LEVEL_ERROR, "Ignoring directive 'enforce-blocks'. "
+ "FEATURE_FORCE_LOAD is disabled, blocks will always be enforced.");
#endif /* def FEATURE_FORCE_LOAD */
+ continue;
/* *************************************************************************
* filterfile file-name
@@ -1646,7 +1660,7 @@ struct configuration_spec * load_config(void)
* to LOG_LEVEL_FATAL.
*/
log_error(LOG_LEVEL_ERROR, "Ignoring unrecognized directive '%s' (%luul) in line %lu "
- "in configuration file (%s).", buf, hash_string(cmd), linenum, configfile);
+ "in configuration file (%s).", buf, directive_hash, linenum, configfile);
string_append(&config->proxy_args,
" Warning: ignored unrecognized directive above.
");
continue;
@@ -1841,7 +1855,6 @@ static void savearg(char *command, char *argument, struct configuration_spec * c
char * s;
assert(command);
- assert(*command);
assert(argument);
/*
@@ -1856,9 +1869,7 @@ static void savearg(char *command, char *argument, struct configuration_spec * c
}
else
{
- string_append(&buf, "http://");
- string_append(&buf, CGI_SITE_2_HOST);
- string_append(&buf, "/user-manual/");
+ string_append(&buf, "http://" CGI_SITE_2_HOST "/user-manual/");
}
string_append(&buf, CONFIG_HELP_PREFIX);
string_join (&buf, string_toupper(command));