*** /tmp/,RCSt1a06989	Mon Aug  1 14:27:21 1988
--- Makefile	Mon Aug  1 14:27:42 1988
***************
*** 21,36 ****
  #PROG = .ttp
  PROG =
  
! # TWSLIB is only needed on Unix systems. Likewise for TWHEAD.
! #TWSLIB =
! #TWHEAD =
! TWSLIB = libtws.a
! TWHEAD = tws.h
  
  # For MWC 3.0 on the Atari ST, use:
  #CFLAGS = -VCOMPAC -VPEEP
! CFLAGS = -O
  
  OBJS = arc.o arcadd.o arccode.o arccvt.o arcdata.o arcdel.o arcdos.o \
  arcext.o arcio.o arclst.o arclzw.o arcmatch.o arcpack.o arcrun.o \
  arcsq.o arcsqs.o arcsvc.o arctst.o arcunp.o arcusq.o arcmisc.o
--- 21,45 ----
  #PROG = .ttp
  PROG =
  
! # SYSTEM defines your operating system:
! # MSDOS for IBM PCs or other MSDOS machines
! # GEMDOS for Atari ST (Predefined by MWC, so you don't need to define it.)
! # BSD for Berkeley Unix
! # SYSV for AT&T System V Unix
! # (MTS for Michigan Terminal System, which requires a different makefile)
! # (MTS also requires one of USEGFINFO or USECATSCAN for directory search)
! SYSTEM = -DBSD=1
  
  # For MWC 3.0 on the Atari ST, use:
  #CFLAGS = -VCOMPAC -VPEEP
! CFLAGS = -O $(SYSTEM)
  
+ # GNU's gcc is very nice, if you've got it. Otherwise just cc.
+ CC = cc
+ 
+ # tmclock is only needed on Unix systems...
+ TMCLOCK = tmclock.o
+ 
  OBJS = arc.o arcadd.o arccode.o arccvt.o arcdata.o arcdel.o arcdos.o \
  arcext.o arcio.o arclst.o arclzw.o arcmatch.o arcpack.o arcrun.o \
  arcsq.o arcsqs.o arcsvc.o arctst.o arcunp.o arcusq.o arcmisc.o
***************
*** 37,50 ****
  
  MOBJ = marc.o arcdata.o arcdos.o arcio.o arcmatch.o arcmisc.o
  
! arc$(PROG):	$(OBJS) $(TWSLIB)
! 	$(CC) -o arc$(PROG) $(OBJS) $(TWSLIB)
  
! marc$(PROG):	$(MOBJ) $(TWSLIB)
! 	$(CC) -o marc$(PROG) $(MOBJ) $(TWSLIB)
  
  clean:
! 	-rm *.o arc$(PROG) marc$(PROG) $(TWSLIB)
  
  arc.o:	$(SRCDIR)arc.c	$(HEADER)
  	$(CC) $(CFLAGS) -c $(SRCDIR)arc.c
--- 46,59 ----
  
  MOBJ = marc.o arcdata.o arcdos.o arcio.o arcmatch.o arcmisc.o
  
! arc$(PROG):	$(OBJS) $(TMCLOCK)
! 	$(CC) -o arc$(PROG) $(OBJS) $(TMCLOCK)
  
! marc$(PROG):	$(MOBJ) $(TMCLOCK)
! 	$(CC) -o marc$(PROG) $(MOBJ) $(TMCLOCK)
  
  clean:
! 	-rm *.o arc$(PROG) marc$(PROG)
  
  arc.o:	$(SRCDIR)arc.c	$(HEADER)
  	$(CC) $(CFLAGS) -c $(SRCDIR)arc.c
***************
*** 93,97 ****
  arcusq.o:	$(SRCDIR)arcusq.c	$(HEADER)
  	$(CC) $(CFLAGS) -c $(SRCDIR)arcusq.c
  
! libtws.a:
! 	make -f Make.tws libtws.a
--- 102,106 ----
  arcusq.o:	$(SRCDIR)arcusq.c	$(HEADER)
  	$(CC) $(CFLAGS) -c $(SRCDIR)arcusq.c
  
! tmclock.o:	$(SRCDIR)tmclock.c
! 	$(CC) $(CFLAGS) -c $(SRCDIR)tmclock.c
*** /tmp/,RCSt1a07213	Mon Aug  1 14:41:30 1988
--- arc.h	Mon Aug  1 14:35:45 1988
***************
*** 1,21 ****
  /*
!  * $Header: arc.h,v 1.9 88/07/31 18:43:18 hyc Exp $
   */
  
! #undef	MSDOS
! #undef	GEMDOS		/* This amusing garbage is to get all my */
! #undef	DOS		/* define's past some compilers, which */
! #undef	BSD		/* apparently define some of these themselves */
! #undef	SYSV
  #undef	UNIX
- #undef	MTS
  
- #define	MSDOS	0		/* MSDOS machine */
- #define	GEMDOS	0		/* Atari, GEMDOS */
- #define	BSD	1		/* BSD4.2 or 4.3 */
- #define	SYSV	0		/* Also uses BSD */
- #define	MTS	0		/* MTS or 370(?) */
- 
  /*
   * Assumptions:
   * char = 8 bits
--- 1,10 ----
  /*
!  * $Header: arc.h,v 1.10 88/08/01 14:28:29 hyc Exp $
   */
  
! #undef	DOS	/* Just in case... */
  #undef	UNIX
  
  /*
   * Assumptions:
   * char = 8 bits
***************
*** 45,52 ****
  #endif
  
  #if	MTS
- #define	USEGFINFO	0	/* define this to use GFINFO for directory */
- #define	USECATSCAN	1	/* scanning, else use CATSCAN/FILEINFO... */
  #define	CUTOFF	sepchr[0]
  #endif
  
--- 34,39 ----
*** /tmp/,RCSt1a07263	Mon Aug  1 14:46:27 1988
--- marc.c	Mon Aug  1 14:20:13 1988
***************
*** 1,5 ****
  /*
!  * $Header: marc.c,v 1.4 88/07/31 19:49:35 hyc Exp $
   */
  
  /*  MARC - Archive merge utility
--- 1,5 ----
  /*
!  * $Header: marc.c,v 1.5 88/08/01 14:19:19 hyc Exp $
   */
  
  /*  MARC - Archive merge utility
***************
*** 105,111 ****
  			arctemp[n] = CUTOFF;
  	}
  #if	UNIX
! 	else	strcpy(arctemp, "/tmp/";
  #endif
  #if	!MSDOS
  	{
--- 105,111 ----
  			arctemp[n] = CUTOFF;
  	}
  #if	UNIX
! 	else	strcpy(arctemp, "/tmp/");
  #endif
  #if	!MSDOS
  	{
*** /tmp/,RCSt1a07425	Mon Aug  1 15:09:17 1988
--- arcdos.c	Mon Aug  1 15:08:18 1988
***************
*** 1,5 ****
  /*
!  * $Header: arcdos.c,v 1.6 88/07/31 18:48:09 hyc Exp $
   */
  
  /*
--- 1,5 ----
  /*
!  * $Header: arcdos.c,v 1.8 88/08/01 15:07:15 hyc Exp $
   */
  
  /*
***************
*** 30,44 ****
  #if	UNIX
  #include <sys/types.h>
  #include <sys/stat.h>
! #include <sys/time.h>
! #include "tws.h"
! #endif
  
! #if	SYSV
! #include <sys/times.h>
! struct timeval {
! 	long tv_sec;
! 	long tv_usec;
  };
  #endif
  
--- 30,40 ----
  #if	UNIX
  #include <sys/types.h>
  #include <sys/stat.h>
! #include <time.h>
  
! struct timeval {	/* man page said <sys/types.h>, but it */
! 	long tv_sec;	/* really seems to be in <sys/time.h>, */
! 	long tv_usec;	/* but why bother... */
  };
  #endif
  
***************
*** 168,186 ****
  	Fclose(fd);
  #endif
  #if	UNIX
! 	struct tws      tms;
  	struct timeval  tvp[2];
  	int	utimes();
! 	twscopy(&tms, dtwstime());
! 	tms.tw_sec = (time & 31) * 2;
! 	tms.tw_min = (time >> 5) & 63;
! 	tms.tw_hour = (time >> 11);
! 	tms.tw_mday = date & 31;
! 	tms.tw_mon = ((date >> 5) & 15) - 1;
! 	tms.tw_year = (date >> 9) + 80;
! 	tms.tw_clock = 0L;
! 	tms.tw_flags = TW_NULL;
! 	tvp[0].tv_sec = twclock(&tms);
  	tvp[1].tv_sec = tvp[0].tv_sec;
  	tvp[0].tv_usec = tvp[1].tv_usec = 0;
  	utimes(f, tvp);
--- 164,179 ----
  	Fclose(fd);
  #endif
  #if	UNIX
! 	struct tm	tm;
  	struct timeval  tvp[2];
  	int	utimes();
! 	tm.tm_sec = (time & 31) * 2;
! 	tm.tm_min = (time >> 5) & 63;
! 	tm.tm_hour = (time >> 11);
! 	tm.tm_mday = date & 31;
! 	tm.tm_mon = ((date >> 5) & 15) - 1;
! 	tm.tm_year = (date >> 9) + 80;
! 	tvp[0].tv_sec = tmclock(&tm);
  	tvp[1].tv_sec = tvp[0].tv_sec;
  	tvp[0].tv_usec = tvp[1].tv_usec = 0;
  	utimes(f, tvp);
