X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=loadcfg.c;h=d58e96165415d42fdb5e3a1ce93a9fc64a08e1ff;hp=f29d665482c565b5cc25a3369aa6df7cb6a29acb;hb=1df3ac22a584579c66453e938809929e8e20e160;hpb=c75584ebcc79f939fb4ec9c8f842cef6692640c7 diff --git a/loadcfg.c b/loadcfg.c index f29d6654..d58e9616 100644 --- a/loadcfg.c +++ b/loadcfg.c @@ -1,7 +1,7 @@ -const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.1 2001/05/13 21:57:06 administrator Exp $"; +const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.1.1.1 2001/05/15 13:58:58 oes Exp $"; /********************************************************************* * - * File : $Source: /home/administrator/cvs/ijb/loadcfg.c,v $ + * File : $Source: /cvsroot/ijbswa/current/loadcfg.c,v $ * * Purpose : Loads settings from the configuration file into * global variables. This file contains both the @@ -35,6 +35,9 @@ const char loadcfg_rcs[] = "$Id: loadcfg.c,v 1.1 2001/05/13 21:57:06 administrat * * Revisions : * $Log: loadcfg.c,v $ + * Revision 1.1.1.1 2001/05/15 13:58:58 oes + * Initial import of version 2.9.3 source tree + * * *********************************************************************/ @@ -119,7 +122,7 @@ int multi_threaded = 1; #if defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) int tinygif = 0; -const char *tinygifurl = NULL; +const char *tinygifurl = NULL; #endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */ const char *logfile = NULL; @@ -309,7 +312,7 @@ void load_config( int signum ) multi_threaded = 1; #if defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) - tinygif = 0; + tinygif = 0; freez((char *)tinygifurl); #endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */ @@ -443,7 +446,7 @@ void load_config( int signum ) switch( hash_string( cmd ) ) { #ifdef TRUST_FILES - case hash_trustfile : + case hash_trustfile : freez((char *)trustfile); trustfile = strdup(arg); continue; @@ -458,37 +461,37 @@ void load_config( int signum ) continue; #if defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) - case hash_tinygif : + case hash_tinygif : freez((char *)tinygifurl); tinygif = atoi(arg); - if(3 == tinygif) - { - p = arg; - while((*p >= '0') && (*p <= '9')) - { - p++; - } - while((*p == ' ') || (*p == '\t')) - { - p++; - } - if (*p) - { - q = malloc(strlen(p) + 5); - if (q) - { - strcpy(q, p); - strcat(q, "\r\n\r\n"); - tinygifurl = q; - } - } - } - if ((tinygif != 1) && - (tinygif != 2) && - ((tinygif != 3) || (tinygifurl==NULL)) ) - { - log_error(LOG_LEVEL_ERROR, "tinygif setting invalid."); - } + if(3 == tinygif) + { + p = arg; + while((*p >= '0') && (*p <= '9')) + { + p++; + } + while((*p == ' ') || (*p == '\t')) + { + p++; + } + if (*p) + { + q = malloc(strlen(p) + 5); + if (q) + { + strcpy(q, p); + strcat(q, "\r\n\r\n"); + tinygifurl = q; + } + } + } + if ((tinygif != 1) && + (tinygif != 2) && + ((tinygif != 3) || (tinygifurl==NULL)) ) + { + log_error(LOG_LEVEL_ERROR, "tinygif setting invalid."); + } continue; #endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */ @@ -512,54 +515,54 @@ void load_config( int signum ) enlist(xtra_list, arg); continue; - case hash_cookiefile : + case hash_cookiefile : freez((char *)cookiefile); cookiefile = strdup(arg); continue; - case hash_logfile : + case hash_logfile : freez((char *)logfile); logfile = strdup(arg); continue; - case hash_blockfile : + case hash_blockfile : freez((char *)blockfile); blockfile = strdup(arg); continue; #ifdef USE_IMAGE_LIST - case hash_imagefile : + case hash_imagefile : freez((char *)imagefile); imagefile = strdup(arg); continue; #endif /* def USE_IMAGE_LIST */ #ifdef JAR_FILES - case hash_jarfile : + case hash_jarfile : freez((char *)jarfile); jarfile = strdup(arg); continue; #endif /* def JAR_FILES */ - case hash_listen_address : + case hash_listen_address : freez((char *)haddr); haddr = strdup(arg); continue; - case hash_forwardfile : + case hash_forwardfile : freez((char *)forwardfile); forwardfile = strdup(arg); continue; #ifdef ACL_FILES - case hash_aclfile : + case hash_aclfile : freez((char *)aclfile); aclfile = strdup(arg); continue; #endif /* def ACL_FILES */ #ifdef KILLPOPUPS - case hash_popupfile : + case hash_popupfile : freez((char *)popupfile); popupfile = strdup(arg); continue; @@ -570,7 +573,7 @@ void load_config( int signum ) #endif /* def KILLPOPUPS */ #ifdef PCRS - case hash_re_filterfile : + case hash_re_filterfile : freez((char *)re_filterfile); re_filterfile = strdup(arg); continue; @@ -582,7 +585,7 @@ void load_config( int signum ) continue; #endif /* def PCRS */ - case hash_user_agent : + case hash_user_agent : freez((char *)uagent); uagent = strdup(arg); continue; @@ -592,12 +595,12 @@ void load_config( int signum ) * or the misspelling used in the HTTP spec. */ case hash_referrer : - case hash_referer : + case hash_referer : freez((char *)referrer); referrer = strdup(arg); continue; - case hash_from : + case hash_from : freez((char *)from); from = strdup(arg); continue;