Here's a list of changes I had to make to non-machine-dependent source
files of dmake:


The only "real" change was made to function.c. This was necessary
because SAS/C didn't provide UNIX-style functions with which stdout is
redirected to file in function.c. As the UNIX implementation with
dup() and close() is more or less a hack (in my opinion), I didn't see
any point in writing my own dup(). In the Amiga port the redirection
is done by changing the AmigaDOS filehandle of stdout. This is more or
less a hack, too. :-)


The rest of the non-machine-dependent files in amiga-directory contain
only cosmetic changes to stop the compiler from complaining. Here's a
list of diffs, which I hope is self-explanatory:

*** dmake.c	Tue Apr 07 07:45:06 1992
--- amiga/dmake.c	Thu Feb 10 20:51:27 1994
***************
*** 113,120 ****
  static char *sccid = "Copyright (c) 1990,1991 by Dennis Vadura";
  static char _warn  = TRUE;		/* warnings on by default */
  
! static	void	_do_VPATH();
! static	void	_do_ReadEnvironment();
  #if !defined(__GNUC__)
  static  void    _do_f_flag ANSI((char, char *, char **));
  #else
--- 113,122 ----
  static char *sccid = "Copyright (c) 1990,1991 by Dennis Vadura";
  static char _warn  = TRUE;		/* warnings on by default */
  
! static	void	_do_VPATH ANSI((void));
! static	void	_do_ReadEnvironment ANSI((void));
! static  void    _set_inc_depth ANSI((void));
! static  void    errargs ANSI((char *, va_list));
  #if !defined(__GNUC__)
  static  void    _do_f_flag ANSI((char, char *, char **));
  #else
***************
*** 228,234 ****
  	    case 'e': Get_env    = 'e';   break;
  	    case 'E': Get_env    = 'E';   break;
  
! 	    case 'V': Version();  Quit(NIL(CELL));  break;
  	    case 'A': Def_macro("AUGMAKE", "y", M_EXPANDED); break;
  	    case 'B': Def_macro(".NOTABS", "y", M_EXPANDED); break;
  	    case 'i': Def_macro(".IGNORE", "y", M_EXPANDED); break;
--- 230,236 ----
  	    case 'e': Get_env    = 'e';   break;
  	    case 'E': Get_env    = 'E';   break;
  
! 	    case 'V': Version();  Quit();  break;
  	    case 'A': Def_macro("AUGMAKE", "y", M_EXPANDED); break;
  	    case 'B': Def_macro(".NOTABS", "y", M_EXPANDED); break;
  	    case 'i': Def_macro(".IGNORE", "y", M_EXPANDED); break;
***************
*** 651,657 ****
  
        vfprintf( stderr, fmt, args );
        putc( '\n', stderr );
!       if( errflg && !Continue ) Quit( NIL(CELL) );
     }
  }
  
--- 653,659 ----
  
        vfprintf( stderr, fmt, args );
        putc( '\n', stderr );
!       if( errflg && !Continue ) Quit();
     }
  }
  
***************
*** 712,721 ****
  */
  #if __STDC__ == 1 && !defined(__GNUC__)
  void
! Error(char *fmt, ...)
  #else
  #if defined(_MPW)
! Error(char *fmt, va_alist)
  va_dcl
  #else
  int
--- 714,723 ----
  */
  #if __STDC__ == 1 && !defined(__GNUC__)
  void
! Warning(char *fmt, ...)
  #else
  #if defined(_MPW)
! Warning(char *fmt, va_alist)
  va_dcl
  #else
  int
***************
*** 799,805 ****
     puts("    -X   - ignore #! lines at start of makefile");
     }
  
!    Quit(NIL(CELL));
  }
  
  
--- 801,807 ----
     puts("    -X   - ignore #! lines at start of makefile");
     }
  
!    Quit();
  }
  
  
*** getinp.c	Tue Apr 07 07:47:46 1992
--- amiga/getinp.c	Thu Feb 10 20:39:26 1994
***************
*** 311,317 ****
        strcat( space, brk   );
     }
     else {
!       space[0] = 0xff;            /* a char we know will not show up      */
        space[1] = 0;
     }
  
--- 311,317 ----
        strcat( space, brk   );
     }
     else {
!       space[0] = (char)0xff;	/* a char we know will not show up      */
        space[1] = 0;
     }
  
*** infer.c	Fri Jan 24 05:27:20 1992
--- amiga/infer.c	Thu Feb 10 20:31:15 1994
***************
*** 52,58 ****
  static void 	  _free_dfas   ANSI((DFALINKPTR));
  static int	  _count_dots  ANSI((char *));
  static char *	  _build_name  ANSI((char *, char *, char *));
! static void	  _free_icells ANSI(());
  static ICELLPTR   _union_iset  ANSI((ICELLPTR, ICELLPTR));
  static ICELLPTR   _add_iset    ANSI((ICELLPTR,ICELLPTR,CELLPTR,DFALINKPTR,
  				     CELLPTR,int,int,char *,char *, int));
--- 52,58 ----
  static void 	  _free_dfas   ANSI((DFALINKPTR));
  static int	  _count_dots  ANSI((char *));
  static char *	  _build_name  ANSI((char *, char *, char *));
! static void	  _free_icells ANSI((void));
  static ICELLPTR   _union_iset  ANSI((ICELLPTR, ICELLPTR));
  static ICELLPTR   _add_iset    ANSI((ICELLPTR,ICELLPTR,CELLPTR,DFALINKPTR,
  				     CELLPTR,int,int,char *,char *, int));
*** make.c	Tue Apr 07 07:43:24 1992
--- amiga/make.c	Thu Feb 10 20:35:31 1994
***************
*** 54,64 ****
  
  static	void	_drop_mac ANSI((HASHPTR));
  static	void	_set_recipe ANSI((char*, int));
! static	void	_set_tmd ANSI(());
  static	void	_append_file ANSI((STRINGPTR, FILE*, char*, int));
  static  LINKPTR _dup_prq ANSI((LINKPTR));
  static  char*   _prefix ANSI((char *, char *));
  static  char*   _pool_lookup ANSI((char *));
  
  #define RP_GPPROLOG	0
  #define RP_RECIPE	1
--- 54,65 ----
  
  static	void	_drop_mac ANSI((HASHPTR));
  static	void	_set_recipe ANSI((char*, int));
! static	void	_set_tmd ANSI((void));
  static	void	_append_file ANSI((STRINGPTR, FILE*, char*, int));
  static  LINKPTR _dup_prq ANSI((LINKPTR));
  static  char*   _prefix ANSI((char *, char *));
  static  char*   _pool_lookup ANSI((char *));
+ static  int     _explode_graph ANSI((CELLPTR, LINKPTR, CELLPTR));
  
  #define RP_GPPROLOG	0
  #define RP_RECIPE	1
***************
*** 524,530 ****
  
  
  
! int
  _explode_graph( cp, parent, setdirroot )/*
  ==========================================
     Check to see if we have made the node already.  If so then don't do
--- 525,531 ----
  
  
  
! static int
  _explode_graph( cp, parent, setdirroot )/*
  ==========================================
     Check to see if we have made the node already.  If so then don't do
*** sysintf.c	Tue Apr 07 07:46:18 1992
--- amiga/sysintf.c	Sun Feb 13 14:39:08 1994
***************
*** 298,305 ****
  # define make_env()
  # define free_env()
  #else
!    void make_env();
!    void free_env();
  #endif
  
     make_env();
--- 298,305 ----
  # define make_env()
  # define free_env()
  #else
!    void make_env ANSI((void));
!    void free_env ANSI((void));
  #endif
  
     make_env();
***************
*** 325,334 ****
--- 325,338 ----
  Catch_signals(fn)
  void (*fn)();
  {
+ #ifdef SIGINT
     if( signal(SIGINT, SIG_IGN) != SIG_IGN )
        signal( SIGINT, fn );
+ #endif
+ #ifdef SIGQUIT
     if( signal(SIGQUIT, SIG_IGN) != SIG_IGN )
        signal( SIGQUIT, fn );
+ #endif
  }
  
  
***************
*** 339,348 ****
--- 343,356 ----
  PUBLIC void
  Clear_signals()
  {
+ #ifdef SIGINT
     if( signal(SIGINT, SIG_IGN) != SIG_IGN )
        signal( SIGINT, SIG_DFL );
+ #endif
+ #if SIGQUIT
     if( signal(SIGQUIT, SIG_IGN) != SIG_IGN )
        signal( SIGQUIT, SIG_DFL );
+ #endif
  }
  
  
