From 1df3ac22a584579c66453e938809929e8e20e160 Mon Sep 17 00:00:00 2001 From: oes Date: Thu, 17 May 2001 23:01:01 +0000 Subject: [PATCH] - Cleaned CRLF's from the sources and related files --- jbsockets.c | 13 ++++--- loadcfg.c | 97 +++++++++++++++++++++++++++-------------------------- loadcfg.h | 9 +++-- loaders.c | 17 ++++++---- project.h | 25 ++++++++------ showargs.c | 57 ++++++++++++++++--------------- ssplit.c | 9 +++-- 7 files changed, 124 insertions(+), 103 deletions(-) diff --git a/jbsockets.c b/jbsockets.c index c5f73c9c..ee4f5839 100644 --- a/jbsockets.c +++ b/jbsockets.c @@ -1,7 +1,7 @@ -const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.1 2001/05/13 21:57:06 administrator Exp $"; +const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.1.1.1 2001/05/15 13:58:54 oes Exp $"; /********************************************************************* * - * File : $Source: /home/administrator/cvs/ijb/jbsockets.c,v $ + * File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $ * * Purpose : Contains wrappers for system-specific sockets code, * so that the rest of JunkBuster can be more @@ -35,6 +35,9 @@ const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.1 2001/05/13 21:57:06 adminis * * Revisions : * $Log: jbsockets.c,v $ + * Revision 1.1.1.1 2001/05/15 13:58:54 oes + * Initial import of version 2.9.3 source tree + * * *********************************************************************/ @@ -154,7 +157,7 @@ int connect_to(char *host, int portnum, struct client_state *csp) } #endif /* def TCP_NODELAY */ -#if !defined(_WIN32) && !defined(__BEOS__) && !defined(AMIGA) +#if !defined(_WIN32) && !defined(__BEOS__) && !defined(AMIGA) if ((flags = fcntl(fd, F_GETFL, 0)) != -1) { flags |= O_NDELAY; @@ -293,8 +296,8 @@ void close_socket(int fd) { #if defined(_WIN32) || defined(__BEOS__) closesocket(fd); -#elif defined(AMIGA) - CloseSocket(fd); +#elif defined(AMIGA) + CloseSocket(fd); #else close(fd); #endif 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; diff --git a/loadcfg.h b/loadcfg.h index e567b7e0..941fa41a 100644 --- a/loadcfg.h +++ b/loadcfg.h @@ -1,9 +1,9 @@ #ifndef _LOADCFG_H #define _LOADCFG_H -#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.1 2001/05/13 21:57:06 administrator Exp $" +#define LOADCFG_H_VERSION "$Id: loadcfg.h,v 1.1.1.1 2001/05/15 13:58:58 oes Exp $" /********************************************************************* * - * File : $Source: /home/administrator/cvs/ijb/loadcfg.h,v $ + * File : $Source: /cvsroot/ijbswa/current/loadcfg.h,v $ * * Purpose : Loads settings from the configuration file into * global variables. This file contains both the @@ -37,6 +37,9 @@ * * Revisions : * $Log: loadcfg.h,v $ + * Revision 1.1.1.1 2001/05/15 13:58:58 oes + * Initial import of version 2.9.3 source tree + * * *********************************************************************/ @@ -63,7 +66,7 @@ extern int multi_threaded; #if defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) extern int tinygif; -extern const char *tinygifurl; +extern const char *tinygifurl; #endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */ extern const char *logfile; diff --git a/loaders.c b/loaders.c index 71ff3fa0..f3ea5a13 100644 --- a/loaders.c +++ b/loaders.c @@ -1,7 +1,7 @@ -const char loaders_rcs[] = "$Id: loaders.c,v 1.1 2001/05/13 21:57:06 administrator Exp $"; +const char loaders_rcs[] = "$Id: loaders.c,v 1.1.1.1 2001/05/15 13:58:59 oes Exp $"; /********************************************************************* * - * File : $Source: /home/administrator/cvs/ijb/loaders.c,v $ + * File : $Source: /cvsroot/ijbswa/current/loaders.c,v $ * * Purpose : Functions to load and unload the various * configuration files. Also contains code to manage @@ -35,6 +35,9 @@ const char loaders_rcs[] = "$Id: loaders.c,v 1.1 2001/05/13 21:57:06 administrat * * Revisions : * $Log: loaders.c,v $ + * Revision 1.1.1.1 2001/05/15 13:58:59 oes + * Initial import of version 2.9.3 source tree + * * *********************************************************************/ @@ -603,11 +606,11 @@ static int check_file_changed(const struct file_list * current, char * p = html_encode(filename); if (p) { - fs->proxy_args = strsav(fs->proxy_args, "

The file `"); - fs->proxy_args = strsav(fs->proxy_args, p); - fs->proxy_args = strsav(fs->proxy_args, - "' contains the following patterns

\n"); - freez(p); + fs->proxy_args = strsav(fs->proxy_args, "

The file `"); + fs->proxy_args = strsav(fs->proxy_args, p); + fs->proxy_args = strsav(fs->proxy_args, + "' contains the following patterns

\n"); + freez(p); } fs->proxy_args = strsav(fs->proxy_args, "
");
    }
diff --git a/project.h b/project.h
index 5f4324ae..49415826 100644
--- a/project.h
+++ b/project.h
@@ -1,9 +1,9 @@
 #ifndef _PROJECT_H
 #define _PROJECT_H
-#define PROJECT_H_VERSION "$Id: project.h,v 1.1 2001/05/13 21:57:07 administrator Exp $"
+#define PROJECT_H_VERSION "$Id: project.h,v 1.1.1.1 2001/05/15 13:59:03 oes Exp $"
 /*********************************************************************
  *
- * File        :  $Source: /home/administrator/cvs/ijb/project.h,v $
+ * File        :  $Source: /cvsroot/ijbswa/current/project.h,v $
  *
  * Purpose     :  Defines data structures which are widely used in the
  *                project.  Does not define any variables or functions
@@ -36,6 +36,9 @@
  *
  * Revisions   :
  *    $Log: project.h,v $
+ *    Revision 1.1.1.1  2001/05/15 13:59:03  oes
+ *    Initial import of version 2.9.3 source tree
+ *
  *
  *********************************************************************/
 
@@ -420,15 +423,15 @@ struct access_control_list
 #define BANNER    "Internet JUNKBUSTER"
 
 #ifdef FORCE_LOAD
-/*
- * FIXME: Unfortunately, IE lowercases the domain name.  JunkBuster does
- * a case-sensitive compare.  JunkBuster should be modified to do a
- * case-insensitive compatison.  As a temporary workaround, I've lowercased
- * the FORCE_PREFIX.
- *
- * #define FORCE_PREFIX "IJB-FORCE-LOAD-"
- */
-#define FORCE_PREFIX "ijb-force-load-"
+/*
+ * FIXME: Unfortunately, IE lowercases the domain name.  JunkBuster does
+ * a case-sensitive compare.  JunkBuster should be modified to do a
+ * case-insensitive compatison.  As a temporary workaround, I've lowercased
+ * the FORCE_PREFIX.
+ *
+ * #define FORCE_PREFIX "IJB-FORCE-LOAD-"
+ */
+#define FORCE_PREFIX "ijb-force-load-"
 #endif /* def FORCE_LOAD */
 
 #define HOME_PAGE_URL  "http://ijbswa.sourceforge.net/"
diff --git a/showargs.c b/showargs.c
index 0a7cc2c8..98d90446 100644
--- a/showargs.c
+++ b/showargs.c
@@ -1,7 +1,7 @@
-const char showargs_rcs[] = "$Id: showargs.c,v 1.1 2001/05/13 21:57:07 administrator Exp $";
+const char showargs_rcs[] = "$Id: showargs.c,v 1.1.1.1 2001/05/15 13:59:03 oes Exp $";
 /*********************************************************************
  *
- * File        :  $Source: /home/administrator/cvs/ijb/showargs.c,v $
+ * File        :  $Source: /cvsroot/ijbswa/current/showargs.c,v $
  *
  * Purpose     :  Contains various utility routines needed to 
  *                generate the show-proxy-args page.
@@ -33,6 +33,9 @@ const char showargs_rcs[] = "$Id: showargs.c,v 1.1 2001/05/13 21:57:07 administr
  *
  * Revisions   :
  *    $Log: showargs.c,v $
+ *    Revision 1.1.1.1  2001/05/15 13:59:03  oes
+ *    Initial import of version 2.9.3 source tree
+ *
  *
  *********************************************************************/
 
@@ -212,7 +215,7 @@ void init_proxy_args(int argc, const char *argv[])
       "\n"
       "

You are using the " BANNER " TM

\n" "Version: " VERSION "\n" - "
Home page: " HOME_PAGE_URL "\n" + "
Home page: " HOME_PAGE_URL "\n" "

\n" ); @@ -352,30 +355,30 @@ void end_proxy_args(void) #else /* ifndef REGEX */ b = strsav(b, "

  • #undef REGEX - No support for regular expressions in the path specs.
  • \n"); #endif /* ndef REGEX */ - -#ifdef PCRE - b = strsav(b, "
  • #define PCRE - Use PCRE rather than old GNU regex library.
  • \n"); -#else /* ifndef PCRE */ - b = strsav(b, "
  • #undef PCRE - Use old GNU regex library rather than PCRE.
  • \n"); -#endif /* ndef PCRE */ + +#ifdef PCRE + b = strsav(b, "
  • #define PCRE - Use PCRE rather than old GNU regex library.
  • \n"); +#else /* ifndef PCRE */ + b = strsav(b, "
  • #undef PCRE - Use old GNU regex library rather than PCRE.
  • \n"); +#endif /* ndef PCRE */ #ifdef PCRS b = strsav(b, "
  • #define PCRS - Enables arbitrary content modification regexps.
  • \n"); #else /* ifndef PCRS */ b = strsav(b, "
  • #undef PCRS - Disables arbitrary content modification regexps.
  • \n"); #endif /* ndef PCRS */ - -#ifdef TOGGLE - b = strsav(b, "
  • #define TOGGLE - Allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.
  • \n"); -#else /* ifndef TOGGLE */ - b = strsav(b, "
  • #undef TOGGLE - Do not allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.
  • \n"); -#endif /* ndef TOGGLE */ - -#ifdef FORCE_LOAD - b = strsav(b, "
  • #define FORCE_LOAD - Enables bypassing filtering for a single page using the prefix \"" FORCE_PREFIX "\".
  • \n"); -#else /* ifndef FORCE_LOAD */ - b = strsav(b, "
  • #undef FORCE_LOAD - Disables bypassing filtering for a single page.
  • \n"); -#endif /* ndef FORCE_LOAD */ + +#ifdef TOGGLE + b = strsav(b, "
  • #define TOGGLE - Allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.
  • \n"); +#else /* ifndef TOGGLE */ + b = strsav(b, "
  • #undef TOGGLE - Do not allow JunkBuster to be \"disabled\" so it is just a normal non-blocking non-anonymizing proxy.
  • \n"); +#endif /* ndef TOGGLE */ + +#ifdef FORCE_LOAD + b = strsav(b, "
  • #define FORCE_LOAD - Enables bypassing filtering for a single page using the prefix \"" FORCE_PREFIX "\".
  • \n"); +#else /* ifndef FORCE_LOAD */ + b = strsav(b, "
  • #undef FORCE_LOAD - Disables bypassing filtering for a single page.
  • \n"); +#endif /* ndef FORCE_LOAD */ #ifdef DENY_GZIP b = strsav(b, "
  • #define DENY_GZIP - Prevents requests from being compressed - required for PCRS.
  • \n"); @@ -424,18 +427,18 @@ void end_proxy_args(void) #else /* ifndef ACL_FILES */ b = strsav(b, "
  • #undef ACL_FILES - Disables the use of ACL files to control access to the proxy by IP address.
  • \n"); #endif /* ndef ACL_FILES */ - + #ifdef TRUST_FILES b = strsav(b, "
  • #define TRUST_FILES - Enables the use of trust files.
  • \n"); #else /* ifndef TRUST_FILES */ b = strsav(b, "
  • #undef TRUST_FILES - Disables the use of trust files.
  • \n"); #endif /* ndef TRUST_FILES */ -#ifdef JAR_FILES - b = strsav(b, "
  • #define JAR_FILES - Enables the use of jar files to capture cookies.
  • \n"); -#else /* ifndef JAR_FILES */ - b = strsav(b, "
  • #undef JAR_FILES - Disables the use of jar files to capture cookies.
  • \n"); -#endif /* ndef JAR_FILES */ +#ifdef JAR_FILES + b = strsav(b, "
  • #define JAR_FILES - Enables the use of jar files to capture cookies.
  • \n"); +#else /* ifndef JAR_FILES */ + b = strsav(b, "
  • #undef JAR_FILES - Disables the use of jar files to capture cookies.
  • \n"); +#endif /* ndef JAR_FILES */ b = strsav(b, "\n
    \n"); diff --git a/ssplit.c b/ssplit.c index 81246fdf..6dcde3aa 100644 --- a/ssplit.c +++ b/ssplit.c @@ -1,7 +1,7 @@ -const char ssplit_rcs[] = "$Id: ssplit.c,v 1.1 2001/05/13 21:57:07 administrator Exp $"; +const char ssplit_rcs[] = "$Id: ssplit.c,v 1.1.1.1 2001/05/15 13:59:04 oes Exp $"; /********************************************************************* * - * File : $Source: /home/administrator/cvs/ijb/ssplit.c,v $ + * File : $Source: /cvsroot/ijbswa/current/ssplit.c,v $ * * Purpose : A function to split a string at specified deliminters. * @@ -32,6 +32,9 @@ const char ssplit_rcs[] = "$Id: ssplit.c,v 1.1 2001/05/13 21:57:07 administrator * * Revisions : * $Log: ssplit.c,v $ + * Revision 1.1.1.1 2001/05/15 13:59:04 oes + * Initial import of version 2.9.3 source tree + * * *********************************************************************/ @@ -39,7 +42,7 @@ const char ssplit_rcs[] = "$Id: ssplit.c,v 1.1 2001/05/13 21:57:07 administrator #include "config.h" #include -#include +#include #ifdef _WIN32 #include -- 2.39.2