Silence compiler warning I introduced with my last commit.
[privoxy.git] / loadcfg.c
index 04ead0a..ede63d2 100644 (file)
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -1,4 +1,4 @@
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.52 2006/09/06 10:43:32 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.56 2006/12/17 17:04:51 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
@@ -35,6 +35,29 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.52 2006/09/06 10:43:32 fabiankeil
  *
  * Revisions   :
  *    $Log: loadcfg.c,v $
+ *    Revision 1.56  2006/12/17 17:04:51  fabiankeil
+ *    Move the <br> in the generated HTML for the config
+ *    options from the beginning of the string to its end.
+ *    Keeps the white space in balance.
+ *
+ *    Revision 1.55  2006/11/28 15:31:52  fabiankeil
+ *    Fix memory leak in case of config file reloads.
+ *
+ *    Revision 1.54  2006/10/21 16:04:22  fabiankeil
+ *    Modified kludge for win32 to make ming32 menu
+ *    "Options/Edit Filters" (sort of) work again.
+ *    Same limitations as for the action files apply.
+ *    Fixes BR 1567373.
+ *
+ *    Revision 1.53  2006/09/06 18:45:03  fabiankeil
+ *    Incorporate modified version of Roland Rosenfeld's patch to
+ *    optionally access the user-manual via Privoxy. Closes patch 679075.
+ *
+ *    Formatting changed to Privoxy style, added call to
+ *    cgi_error_no_template if the requested file doesn't
+ *    exist and modified check whether or not Privoxy itself
+ *    should serve the manual. Should work cross-platform now.
+ *
  *    Revision 1.52  2006/09/06 10:43:32  fabiankeil
  *    Added config option enable-remote-http-toggle
  *    to specify if Privoxy should recognize special
@@ -458,6 +481,7 @@ static struct file_list *current_configfile = NULL;
 #define hash_permit_access             3587953268ul /* "permit-access" */
 #define hash_proxy_info_url            3903079059ul /* "proxy-info-url" */
 #define hash_single_threaded           4250084780ul /* "single-threaded" */
+#define hash_split_large_cgi_forms      671658948ul /* "split-large-cgi-forms" */
 #define hash_suppress_blocklists       1948693308ul /* "suppress-blocklists" */
 #define hash_toggle                        447966ul /* "toggle" */
 #define hash_trust_info_url             430331967ul /* "trust-info-url" */
@@ -537,6 +561,8 @@ void unload_configfile (void * data)
    {
       freez(config->actions_file_short[i]);
       freez(config->actions_file[i]);
+      freez(config->re_filterfile_short[i]);
+      freez(config->re_filterfile[i]);
    }
 
    freez(config->admin_address);
@@ -656,6 +682,7 @@ struct configuration_spec * load_config(void)
    config->proxy_args                = strdup("");
    config->forwarded_connect_retries = 0;
    config->feature_flags            &= ~RUNTIME_FEATURE_CGI_TOGGLE;
+   config->feature_flags            &= ~RUNTIME_FEATURE_SPLIT_LARGE_FORMS;
 
    if ((configfp = fopen(configfile, "r")) == NULL)
    {
@@ -1283,6 +1310,20 @@ struct configuration_spec * load_config(void)
             config->multi_threaded = 0;
             continue;
 
+/* *************************************************************************
+ * split-large-cgi-forms
+ * *************************************************************************/
+         case hash_split_large_cgi_forms :
+            if ((*arg != '\0') && (0 != atoi(arg)))
+            {
+               config->feature_flags |= RUNTIME_FEATURE_SPLIT_LARGE_FORMS;
+            }
+            else
+            {
+               config->feature_flags &= ~RUNTIME_FEATURE_SPLIT_LARGE_FORMS;
+            }
+            continue;
+
 /* *************************************************************************
  * toggle (0|1)
  * *************************************************************************/
@@ -1553,7 +1594,7 @@ struct configuration_spec * load_config(void)
 
    g_default_actions_file  = config->actions_file[1]; /* FIXME Hope this is default.action */
    g_user_actions_file = config->actions_file[2]; /* FIXME Hope this is user.action */
-   g_re_filterfile    = config->re_filterfile;
+   g_re_filterfile    = config->re_filterfile[0]; /* FIXME Hope this is default.filter */
 
 #ifdef FEATURE_TRUST
    g_trustfile        = config->trustfile;
@@ -1640,7 +1681,7 @@ static void savearg(char *command, char *argument, struct configuration_spec * c
     * Add config option name embedded in
     * link to it's section in the user-manual
     */
-   buf = strdup("\n<br><a href=\"");
+   buf = strdup("\n<a href=\"");
    if (!strncmpic(config->usermanual, "file://", 7) ||
        !strncmpic(config->usermanual, "http", 4))
    {
@@ -1688,6 +1729,7 @@ static void savearg(char *command, char *argument, struct configuration_spec * c
       }
    }
 
+   string_append(&buf, "<br>");
    string_join(&config->proxy_args, buf);
 }