Accept and highlight: Stopping to watch the client socket. There's already another...
[privoxy.git] / loadcfg.c
index 49cb2f5..5de202c 100644 (file)
--- a/loadcfg.c
+++ b/loadcfg.c
@@ -1,4 +1,4 @@
-const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.121 2011/07/30 15:05:23 fabiankeil Exp $";
+const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.124 2012/03/04 11:51:25 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/loadcfg.c,v $
@@ -72,6 +72,7 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.121 2011/07/30 15:05:23 fabiankei
 
 #endif
 
+#include "project.h"
 #include "loadcfg.h"
 #include "list.h"
 #include "jcc.h"
@@ -87,17 +88,6 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.121 2011/07/30 15:05:23 fabiankei
 
 const char loadcfg_h_rcs[] = LOADCFG_H_VERSION;
 
-/*
- * Fix a problem with Solaris.  There should be no effect on other
- * platforms.
- * Solaris's isspace() is a macro which uses it's argument directly
- * as an array index.  Therefore we need to make sure that high-bit
- * characters generate +ve values, and ideally we also want to make
- * the argument match the declared parameter type of "int".
- */
-#define ijb_isupper(__X) isupper((int)(unsigned char)(__X))
-#define ijb_tolower(__X) tolower((int)(unsigned char)(__X))
-
 #ifdef FEATURE_TOGGLE
 /* Privoxy is enabled by default. */
 int global_toggle_state = 1;
@@ -476,9 +466,9 @@ struct configuration_spec * load_config(void)
       /* Make sure the command field is lower case */
       for (p = cmd; *p; p++)
       {
-         if (ijb_isupper(*p))
+         if (privoxy_isupper(*p))
          {
-            *p = (char)ijb_tolower(*p);
+            *p = (char)privoxy_tolower(*p);
          }
       }
 
@@ -554,7 +544,7 @@ struct configuration_spec * load_config(void)
  * *************************************************************************/
          case hash_confdir :
             freez(config->confdir);
-            config->confdir = make_path( NULL, arg);
+            config->confdir = make_path(NULL, arg);
             break;
 
 /* *************************************************************************
@@ -1454,12 +1444,12 @@ struct configuration_spec * load_config(void)
             break;
 
 /* *************************************************************************/
-      } /* end switch( hash_string(cmd) ) */
+      } /* end switch(hash_string(cmd)) */
 
       /* Save the argument for the show-status page. */
       savearg(cmd, arg, config);
       freez(buf);
-   } /* end while ( read_config_line(...) ) */
+   } /* end while (read_config_line(...)) */
 
    fclose(configfp);
 
@@ -1542,9 +1532,9 @@ struct configuration_spec * load_config(void)
    }
 #endif /* def FEATURE_TRUST */
 
-   if ( NULL == config->haddr[0] )
+   if (NULL == config->haddr[0])
    {
-      config->haddr[0] = strdup( HADDR_DEFAULT );
+      config->haddr[0] = strdup(HADDR_DEFAULT);
       if (NULL == config->haddr[0])
       {
          log_error(LOG_LEVEL_FATAL, "Out of memory while copying default listening address");
@@ -1718,7 +1708,7 @@ static void savearg(char *command, char *argument, struct configuration_spec * c
       return;
    }
 
-   if ( (NULL != argument) && ('\0' != *argument) )
+   if ((NULL != argument) && ('\0' != *argument))
    {
       s = html_encode(argument);
       if (NULL == s)