Made jumbjuster work on AmigaOS again.
authorjoergs <joergs@users.sourceforge.net>
Sun, 3 Mar 2002 09:18:03 +0000 (09:18 +0000)
committerjoergs <joergs@users.sourceforge.net>
Sun, 3 Mar 2002 09:18:03 +0000 (09:18 +0000)
AUTHORS
amiga.c
amiga.h
cgiedit.c
jcc.c
junkbuster.1
miscutil.c

diff --git a/AUTHORS b/AUTHORS
index 0fbe78a..748c0ce 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -17,7 +17,7 @@ Current Project Contributors (in alphabetical order):
  Hal Burgiss (docs)
  Haroon Rafique
  John Venvertloh
  Hal Burgiss (docs)
  Haroon Rafique
  John Venvertloh
- Jorg Strohmayer
+ Joerg Strohmayer
  Rodney Stromlund
  Sarantis Paskalis
  Shamim Mohamed
  Rodney Stromlund
  Sarantis Paskalis
  Shamim Mohamed
diff --git a/amiga.c b/amiga.c
index e522376..df1ad8c 100644 (file)
--- a/amiga.c
+++ b/amiga.c
@@ -1,4 +1,4 @@
-const char amiga_rcs[] = "$Id: amiga.c,v 1.3 2001/09/12 22:54:51 joergs Exp $";
+const char amiga_rcs[] = "$Id: amiga.c,v 1.4 2001/10/07 15:35:13 oes Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/amiga.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/amiga.c,v $
@@ -28,6 +28,9 @@ const char amiga_rcs[] = "$Id: amiga.c,v 1.3 2001/09/12 22:54:51 joergs Exp $";
  *
  * Revisions   :
  *    $Log: amiga.c,v $
  *
  * Revisions   :
  *    $Log: amiga.c,v $
+ *    Revision 1.4  2001/10/07 15:35:13  oes
+ *    Replaced 6 boolean members of csp with one bitmap (csp->flags)
+ *
  *    Revision 1.3  2001/09/12 22:54:51  joergs
  *    Stacksize of main thread increased.
  *
  *    Revision 1.3  2001/09/12 22:54:51  joergs
  *    Stacksize of main thread increased.
  *
@@ -90,12 +93,15 @@ __saveds ULONG server_thread(void)
    return 0;
 }
 
    return 0;
 }
 
+static BPTR olddir;
+
 void amiga_exit(void)
 {
    if(SocketBase)
    {
       CloseLibrary(SocketBase);
    }
 void amiga_exit(void)
 {
    if(SocketBase)
    {
       CloseLibrary(SocketBase);
    }
+   CurrentDir(olddir);
 }
 
 static struct SignalSemaphore memsem;
 }
 
 static struct SignalSemaphore memsem;
@@ -123,12 +129,13 @@ void InitAmiga(void)
    InitSemaphore(&memsem);
    memsemptr = &memsem;
 
    InitSemaphore(&memsem);
    memsemptr = &memsem;
 
+   olddir=CurrentDir(GetProgramDir());
    atexit(amiga_exit);
 }
 
 #ifdef __GNUC__
 #ifdef libnix
    atexit(amiga_exit);
 }
 
 #ifdef __GNUC__
 #ifdef libnix
-/* multitaskingsafe libnix replacements */
+/* multithreadingsafe libnix replacements */
 static void *memPool=NULL;
 
 void *malloc (size_t s)
 static void *memPool=NULL;
 
 void *malloc (size_t s)
@@ -237,7 +244,7 @@ ADD2EXIT(__memCleanUp,-50);
 #error No libnix and no ixemul!?
 #endif /* libnix */
 #else
 #error No libnix and no ixemul!?
 #endif /* libnix */
 #else
-#error Only GCC is supported, multitasking safe malloc/free required.
+#error Only GCC is supported, multithreading safe malloc/free required.
 #endif /* __GNUC__ */
 
 #endif /* def AMIGA */
 #endif /* __GNUC__ */
 
 #endif /* def AMIGA */
diff --git a/amiga.h b/amiga.h
index 2701923..d9e3a5b 100644 (file)
--- a/amiga.h
+++ b/amiga.h
@@ -1,7 +1,7 @@
 #ifdef AMIGA
 #ifndef AMIGA_H_INCLUDED
 #define AMIGA_H_INCLUDED
 #ifdef AMIGA
 #ifndef AMIGA_H_INCLUDED
 #define AMIGA_H_INCLUDED
-#define AMIGA_H_VERSION "$Id: amiga.h,v 1.5 2001/07/29 18:43:08 jongfoster Exp $"
+#define AMIGA_H_VERSION "$Id: amiga.h,v 1.6 2001/10/13 12:46:08 joergs Exp $"
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/amiga.h,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/amiga.h,v $
@@ -31,6 +31,9 @@
  *
  * Revisions   :
  *    $Log: amiga.h,v $
  *
  * Revisions   :
  *    $Log: amiga.h,v $
+ *    Revision 1.6  2001/10/13 12:46:08  joergs
+ *    Added #undef EINTR to avoid warnings
+ *
  *    Revision 1.5  2001/07/29 18:43:08  jongfoster
  *    Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to
  *    ANSI C rules.
  *    Revision 1.5  2001/07/29 18:43:08  jongfoster
  *    Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to
  *    ANSI C rules.
@@ -61,6 +64,7 @@
 #undef __NOLIBBASE__
 
 #define __CONSTLIBBASEDECL__ const
 #undef __NOLIBBASE__
 
 #define __CONSTLIBBASEDECL__ const
+#define DEVICES_TIMER_H
 #include <proto/exec.h>
 #include <exec/tasks.h>
 #include <proto/dos.h>
 #include <proto/exec.h>
 #include <exec/tasks.h>
 #include <proto/dos.h>
index ff653ca..54c44ec 100644 (file)
--- a/cgiedit.c
+++ b/cgiedit.c
@@ -1,4 +1,4 @@
-const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.10 2002/01/23 00:22:59 jongfoster Exp $";
+const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.11 2002/01/23 01:03:31 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgiedit.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgiedit.c,v $
@@ -42,6 +42,9 @@ const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.10 2002/01/23 00:22:59 jongfoster
  *
  * Revisions   :
  *    $Log: cgiedit.c,v $
  *
  * Revisions   :
  *    $Log: cgiedit.c,v $
+ *    Revision 1.11  2002/01/23 01:03:31  jongfoster
+ *    Fixing gcc [CygWin] compiler warnings
+ *
  *    Revision 1.10  2002/01/23 00:22:59  jongfoster
  *    Adding new function cgi_edit_actions_section_swap(), to reorder
  *    the actions file.
  *    Revision 1.10  2002/01/23 00:22:59  jongfoster
  *    Adding new function cgi_edit_actions_section_swap(), to reorder
  *    the actions file.
@@ -700,7 +703,11 @@ jb_err edit_write_file(struct editable_file * file)
    assert(file);
    assert(file->filename);
 
    assert(file);
    assert(file->filename);
 
+#ifdef AMIGA
+   if (NULL == (fp = fopen(file->filename, "w")))
+#else
    if (NULL == (fp = fopen(file->filename, "wt")))
    if (NULL == (fp = fopen(file->filename, "wt")))
+#endif /* def AMIGA */
    {
       return JB_ERR_FILE;
    }
    {
       return JB_ERR_FILE;
    }
@@ -1527,7 +1534,11 @@ jb_err edit_read_file(struct client_state *csp,
       }
    }
 
       }
    }
 
+#ifdef AMIGA
+   if (NULL == (fp = fopen(filename,"r")))
+#else
    if (NULL == (fp = fopen(filename,"rt")))
    if (NULL == (fp = fopen(filename,"rt")))
+#endif /* def AMIGA */
    {
       free(filename);
       return JB_ERR_FILE;
    {
       free(filename);
       return JB_ERR_FILE;
diff --git a/jcc.c b/jcc.c
index 46c6db4..3ec4219 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.62 2002/02/20 23:17:23 jongfoster Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.63 2002/03/02 04:14:50 david__schmidt Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -33,6 +33,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.62 2002/02/20 23:17:23 jongfoster Exp $";
  *
  * Revisions   :
  *    $Log: jcc.c,v $
  *
  * Revisions   :
  *    $Log: jcc.c,v $
+ *    Revision 1.63  2002/03/02 04:14:50  david__schmidt
+ *    Clean up a little CRLF unpleasantness that suddenly appeared
+ *
  *    Revision 1.62  2002/02/20 23:17:23  jongfoster
  *    Detecting some out-of memory conditions and exiting with a log message.
  *
  *    Revision 1.62  2002/02/20 23:17:23  jongfoster
  *    Detecting some out-of memory conditions and exiting with a log message.
  *
@@ -522,7 +525,7 @@ static const char VANILLA_WAFER[] =
    "(copyright_or_otherwise)_applying_to_any_cookie._";
 
 
    "(copyright_or_otherwise)_applying_to_any_cookie._";
 
 
-#if !defined(_WIN32) && !defined(__OS2__)
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(AMIGA)
 /*********************************************************************
  *
  * Function    :  SIG_handler 
 /*********************************************************************
  *
  * Function    :  SIG_handler 
@@ -1485,9 +1488,7 @@ int main(int argc, const char *argv[])
    int argc_pos = 1;
 
    configfile =
    int argc_pos = 1;
 
    configfile =
-#ifdef AMIGA
-   "AmiTCP:db/junkbuster/config"
-#elif !defined(_WIN32)
+#if !defined(_WIN32)
    "config"
 #else
    "config.txt"
    "config"
 #else
    "config.txt"
@@ -1564,7 +1565,7 @@ int main(int argc, const char *argv[])
 #endif
 
 
 #endif
 
 
-#if !defined(_WIN32) && !defined(__OS2__)
+#if !defined(_WIN32) && !defined(__OS2__) && !defined(AMIGA)
 {
    int sig;
    struct sigaction action;
 {
    int sig;
    struct sigaction action;
index aadd3b3..e2f7bc6 100644 (file)
@@ -21,9 +21,7 @@ Proxy
 .P\r
 If the configuration file is not specified on the command line,\r
 \fBJunkbuster\fP will look for a file named \fIconfig\fP in the \r
 .P\r
 If the configuration file is not specified on the command line,\r
 \fBJunkbuster\fP will look for a file named \fIconfig\fP in the \r
-current directory (except on Amiga where it will look for \r
-\fIAmiTCP:db/junkbuster/config\fP and Win32 where it will try \r
-\fIconfig.txt\fP).\r
+current directory (except on Win32 where it will try \fIconfig.txt\fP).\r
 \r
 \r
 .SH DESCRIPTION\r
 \r
 \r
 .SH DESCRIPTION\r
@@ -76,7 +74,7 @@ All \fBJunkbuster\fP configuration is done via the various configuration
 files. The default configuration files are: \fIconfig\fP, \r
 \fIijb.action\fP, and \fIre_filterfile\fP. These are well commented. \r
 On Unix and Unix-like systems, these are located in \fI/etc/junkbuster/\fP \r
 files. The default configuration files are: \fIconfig\fP, \r
 \fIijb.action\fP, and \fIre_filterfile\fP. These are well commented. \r
 On Unix and Unix-like systems, these are located in \fI/etc/junkbuster/\fP \r
-by default. On Windows and OS/2, these files are in the same directory \r
+by default. On Windows, OS/2 and AmigaOS, these files are in the same directory \r
 as the \fBJunkbuster\fP executable. \r
 .P\r
 The name and number of configuration files has changed from previous versions,\r
 as the \fBJunkbuster\fP executable. \r
 .P\r
 The name and number of configuration files has changed from previous versions,\r
@@ -263,7 +261,7 @@ http://linuxalpha.ch/packages/
 .br\r
  Haroon Rafique\r
 .br\r
 .br\r
  Haroon Rafique\r
 .br\r
- Jorg Strohmayer\r
+ Joerg Strohmayer\r
 .br\r
  Shamim Mohamed\r
 .br\r
 .br\r
  Shamim Mohamed\r
 .br\r
index a971866..3a08714 100644 (file)
@@ -1,4 +1,4 @@
-const char miscutil_rcs[] = "$Id: miscutil.c,v 1.26 2001/12/30 14:07:32 steudten Exp $";
+const char miscutil_rcs[] = "$Id: miscutil.c,v 1.27 2002/01/21 00:52:32 jongfoster Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/miscutil.c,v $
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/miscutil.c,v $
@@ -36,6 +36,9 @@ const char miscutil_rcs[] = "$Id: miscutil.c,v 1.26 2001/12/30 14:07:32 steudten
  *
  * Revisions   :
  *    $Log: miscutil.c,v $
  *
  * Revisions   :
  *    $Log: miscutil.c,v $
+ *    Revision 1.27  2002/01/21 00:52:32  jongfoster
+ *    Adding string_join()
+ *
  *    Revision 1.26  2001/12/30 14:07:32  steudten
  *    - Add signal handling (unix)
  *    - Add SIGHUP handler (unix)
  *    Revision 1.26  2001/12/30 14:07:32  steudten
  *    - Add signal handling (unix)
  *    - Add SIGHUP handler (unix)
@@ -832,7 +835,21 @@ char * make_path(const char * dir, const char * file)
 
    if(dir)
    {
 
    if(dir)
    {
-      strncpy(path,dir,512);
+      if(dir[0] == '.')
+      {
+         if(dir[1] == '/')
+         {
+            strncpy(path,dir+2,512);
+         }
+         else
+         {
+            strncpy(path,dir+1,512);
+         }
+      }
+      else
+      {
+         strncpy(path,dir,512);
+      }
       path[511]=0;
    } else {
       path[0]=0;
       path[511]=0;
    } else {
       path[0]=0;