AmigaOS support fixed.
authorjoergs <joergs@users.sourceforge.net>
Wed, 23 May 2001 00:13:58 +0000 (00:13 +0000)
committerjoergs <joergs@users.sourceforge.net>
Wed, 23 May 2001 00:13:58 +0000 (00:13 +0000)
amiga.c
amiga.h
jcc.c

diff --git a/amiga.c b/amiga.c
index cd22898..789fd08 100644 (file)
--- a/amiga.c
+++ b/amiga.c
@@ -1,7 +1,7 @@
-const char amiga_rcs[] = "$Id: amiga.c,v 1.1 2001/05/13 21:57:06 administrator Exp $";
+const char amiga_rcs[] = "$Id: amiga.c,v 1.1.1.1 2001/05/15 13:58:46 oes Exp $";
 /*********************************************************************
  *
 /*********************************************************************
  *
- * File        :  $Source: /home/administrator/cvs/ijb/jcc.c,v $
+ * File        :  $Source: /cvsroot/ijbswa/current/amiga.c,v $
  *
  * Purpose     :  Amiga-specific declarations.
  *
  *
  * Purpose     :  Amiga-specific declarations.
  *
@@ -27,7 +27,10 @@ const char amiga_rcs[] = "$Id: amiga.c,v 1.1 2001/05/13 21:57:06 administrator E
  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  * Revisions   :
  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  * Revisions   :
- *    $Log: jcc.c,v $
+ *    $Log: amiga.c,v $
+ *    Revision 1.1.1.1  2001/05/15 13:58:46  oes
+ *    Initial import of version 2.9.3 source tree
+ *
  *
  *********************************************************************/
 \f
  *
  *********************************************************************/
 \f
@@ -39,12 +42,12 @@ const char amiga_rcs[] = "$Id: amiga.c,v 1.1 2001/05/13 21:57:06 administrator E
 #include <stdio.h>
 #include <signal.h>
 
 #include <stdio.h>
 #include <signal.h>
 
-#include "amiga.h"
+#include "project.h"
 
 
-chonst char amiga_h_rcs[] = AMIGA_H_VERSION;
+const char amiga_h_rcs[] = AMIGA_H_VERSION;
 
 unsigned long __stack = 20*1024;
 
 unsigned long __stack = 20*1024;
-/* static char ver[] = "$VER: junkbuster " __AMIGAVERSION__ " (" __AMIGADATE__ ")"; */
+static char ver[] = "$VER: junkbuster " __AMIGAVERSION__ " (" __AMIGADATE__ ")";
 struct Task *main_task = NULL;
 int childs = 0;
 
 struct Task *main_task = NULL;
 int childs = 0;
 
diff --git a/amiga.h b/amiga.h
index 6f132d0..579d75d 100644 (file)
--- a/amiga.h
+++ b/amiga.h
@@ -1,10 +1,10 @@
 #ifdef AMIGA
 #ifndef _AMIGA_H
 #define _AMIGA_H
 #ifdef AMIGA
 #ifndef _AMIGA_H
 #define _AMIGA_H
-#define AMIGA_H_VERSION "$Id: amiga.h,v 1.1 2001/05/13 21:57:06 administrator Exp $"
+#define AMIGA_H_VERSION "$Id: amiga.h,v 1.1.1.1 2001/05/15 13:58:46 oes Exp $"
 /*********************************************************************
  *
 /*********************************************************************
  *
- * File        :  $Source: /home/administrator/cvs/ijb/amiga.h,v $
+ * File        :  $Source: /cvsroot/ijbswa/current/amiga.h,v $
  *
  * Purpose     :  Amiga-specific declarations.
  *
  *
  * Purpose     :  Amiga-specific declarations.
  *
  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  * Revisions   :
  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
  * Revisions   :
- *    $Log: jcc.h,v $
+ *    $Log: amiga.h,v $
+ *    Revision 1.1.1.1  2001/05/15 13:58:46  oes
+ *    Initial import of version 2.9.3 source tree
+ *
  *
  *********************************************************************/
 \f
  *
  *********************************************************************/
 \f
@@ -43,6 +46,7 @@
 #include <proto/socket.h>
 #undef __NOLIBBASE__
 
 #include <proto/socket.h>
 #undef __NOLIBBASE__
 
+#define __CONSTLIBBASEDECL__ const
 #include <proto/exec.h>
 #include <exec/tasks.h>
 #include <proto/dos.h>
 #include <proto/exec.h>
 #include <exec/tasks.h>
 #include <proto/dos.h>
diff --git a/jcc.c b/jcc.c
index 9b3b9ee..6b17d1f 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.4 2001/05/21 19:34:01 jongfoster Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.5 2001/05/22 18:46:04 oes Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -33,6 +33,50 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.4 2001/05/21 19:34:01 jongfoster Exp $";
  *
  * Revisions   :
  *    $Log: jcc.c,v $
  *
  * Revisions   :
  *    $Log: jcc.c,v $
+ *    Revision 1.5  2001/05/22 18:46:04  oes
+ *
+ *    - Enabled filtering banners by size rather than URL
+ *      by adding patterns that replace all standard banner
+ *      sizes with the "Junkbuster" gif to the re_filterfile
+ *
+ *    - Enabled filtering WebBugs by providing a pattern
+ *      which kills all 1x1 images
+ *
+ *    - Added support for PCRE_UNGREEDY behaviour to pcrs,
+ *      which is selected by the (nonstandard and therefore
+ *      capital) letter 'U' in the option string.
+ *      It causes the quantifiers to be ungreedy by default.
+ *      Appending a ? turns back to greedy (!).
+ *
+ *    - Added a new interceptor ijb-send-banner, which
+ *      sends back the "Junkbuster" gif. Without imagelist or
+ *      MSIE detection support, or if tinygif = 1, or the
+ *      URL isn't recognized as an imageurl, a lame HTML
+ *      explanation is sent instead.
+ *
+ *    - Added new feature, which permits blocking remote
+ *      script redirects and firing back a local redirect
+ *      to the browser.
+ *      The feature is conditionally compiled, i.e. it
+ *      can be disabled with --disable-fast-redirects,
+ *      plus it must be activated by a "fast-redirects"
+ *      line in the config file, has its own log level
+ *      and of course wants to be displayed by show-proxy-args
+ *      Note: Boy, all the #ifdefs in 1001 locations and
+ *      all the fumbling with configure.in and acconfig.h
+ *      were *way* more work than the feature itself :-(
+ *
+ *    - Because a generic redirect template was needed for
+ *      this, tinygif = 3 now uses the same.
+ *
+ *    - Moved GIFs, and other static HTTP response templates
+ *      to project.h
+ *
+ *    - Some minor fixes
+ *
+ *    - Removed some >400 CRs again (Jon, you really worked
+ *      a lot! ;-)
+ *
  *    Revision 1.4  2001/05/21 19:34:01  jongfoster
  *    Made failure to bind() a fatal error.
  *
  *    Revision 1.4  2001/05/21 19:34:01  jongfoster
  *    Made failure to bind() a fatal error.
  *
@@ -133,7 +177,12 @@ int urls_rejected = 0;     /* total nr of urls rejected */
 
 static void listen_loop(void);
 static void chat(struct client_state *csp);
 
 static void listen_loop(void);
 static void chat(struct client_state *csp);
+#ifdef AMIGA
+void serve(struct client_state *csp);
+#else /* ifndef AMIGA */
 static void serve(struct client_state *csp);
 static void serve(struct client_state *csp);
+#endif /* def AMIGA */
+
 #ifdef __BEOS__
 static int32 server_thread(void *data);
 #endif /* def __BEOS__ */
 #ifdef __BEOS__
 static int32 server_thread(void *data);
 #endif /* def __BEOS__ */
@@ -405,6 +454,10 @@ static void chat(struct client_state *csp)
                 sprintf(p, HTTP_REDIRECT_TEMPLATE, tinygifurl);
             write_socket(csp->cfd, p, strlen(p));
          }
                 sprintf(p, HTTP_REDIRECT_TEMPLATE, tinygifurl);
             write_socket(csp->cfd, p, strlen(p));
          }
+         else
+         {
+            write_socket(csp->cfd, JBGIF, sizeof(JBGIF)-1);
+         }
       }
       else
 #endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */
       }
       else
 #endif /* defined(DETECT_MSIE_IMAGES) || defined(USE_IMAGE_LIST) */
@@ -799,7 +852,11 @@ static void chat(struct client_state *csp)
  * Returns     :  N/A
  *
  *********************************************************************/
  * Returns     :  N/A
  *
  *********************************************************************/
+#ifdef AMIGA
+void serve(struct client_state *csp)
+#else /* ifndef AMIGA */
 static void serve(struct client_state *csp)
 static void serve(struct client_state *csp)
+#endif /* def AMIGA */
 {
    chat(csp);
    close_socket(csp->cfd);
 {
    chat(csp);
    close_socket(csp->cfd);
@@ -868,7 +925,9 @@ int main(int argc, const char *argv[])
 #endif
 {
    configfile =
 #endif
 {
    configfile =
-#ifndef _WIN32
+#ifdef AMIGA
+   "AmiTCP:db/junkbuster.config"
+#elif !defined(_WIN32)
    "config"
 #else
    "junkbstr.txt"
    "config"
 #else
    "junkbstr.txt"
@@ -892,6 +951,10 @@ int main(int argc, const char *argv[])
    }
 #endif /* !defined(_WIN32) || defined(_WIN_CONSOLE) */
 
    }
 #endif /* !defined(_WIN32) || defined(_WIN_CONSOLE) */
 
+#ifdef AMIGA
+   InitAmiga();
+#endif
+
    Argc = argc;
    Argv = argv;
 
    Argc = argc;
    Argv = argv;