diff -2rcN unzip-5.00/Makefile unzip/Makefile *** unzip-5.00/Makefile Mon Aug 24 12:35:18 1992 --- unzip/Makefile Sun Sep 6 12:50:35 1992 *************** *** 110,114 **** SYSTEMS4 = minix mips msc_dos next osf1 p_iris pyramid rs6000 rtaix SYSTEMS5 = sco sco_dos sco_x286 sequent sgi stellar sun sysv sysv6300 ! SYSTEMS6 = tahoe ultrix vax wombat xos SYS_UTIL1 = zi_dos zi_gcc zi_indigo zipinfo fu_gcc funzip --- 110,114 ---- SYSTEMS4 = minix mips msc_dos next osf1 p_iris pyramid rs6000 rtaix SYSTEMS5 = sco sco_dos sco_x286 sequent sgi stellar sun sysv sysv6300 ! SYSTEMS6 = tahoe ultrix vax wombat xos amiga_gcc SYS_UTIL1 = zi_dos zi_gcc zi_indigo zipinfo fu_gcc funzip *************** *** 489,492 **** --- 489,496 ---- @echo ' Ha ha! Just kidding.' @echo + + # amiga_gcc: Amiga with Markus Wild gcc and dmake + amiga_gcc: + dmake -f makefile.amiga unzips diff -2rcN unzip-5.00/Makefile.amiga unzip/Makefile.amiga *** unzip-5.00/Makefile.amiga --- unzip/Makefile.amiga Sun Sep 6 14:00:09 1992 *************** *** 0 **** --- 1,63 ---- + # Makefile for UnZip, ZipInfo & FUnZip + + RM = rm + LN = cp + + LD = gcc + CF = -O2 -resident -DUNIX -DBSD + LF = -O2 -resident -DUNIX -DBSD -o unzip + LF2 = + + # ZipInfo flags + ZC = -DZIPINFO + ZL = -O2 -resident -DUNIX -DBSD -o zipinfo + ZL2 = + + # FUnZip flags + FC = # not used + FL = -O2 -resident -DUNIX -DBSD -o funzip + FL2 = + + # object files + OBJS1 = unzip$O $(CRYPTO) envargs$O explode$O extract$O file_io$O inflate$O + OBJS2 = mapname$O match$O misc$O unreduce$O unshrink$O + OBJS = $(OBJS1) $(OBJS2) + OBJZ = zipinfo$O envargs$O match$O misc_$O + OBJF = funzip$O $(CRYPTO) inflate$O + UNZIPS = unzip$E zipinfo$E funzip$E # zipinfo, funzip not fully supported + # # yet (next release) + + .c$O : + $(CC) -c $(CF) $*.c + + unzips: $(UNZIPS) + + unzip$E: $(OBJS) + $(LD) $(LF) $(OBJS) $(LF2) + + envargs$O: envargs.c unzip.h + explode$O: explode.c unzip.h + extract$O: extract.c unzip.h + file_io$O: file_io.c unzip.h + funzip$O: funzip.c unzip.h + inflate$O: inflate.c unzip.h + mapname$O: mapname.c unzip.h + match$O: match.c unzip.h + misc$O: misc.c unzip.h + unreduce$O: unreduce.c unzip.h + unshrink$O: unshrink.c unzip.h + unzip$O: unzip.c unzip.h + + zipinfo$O: zipinfo.c unzip.h + $(CC) -c $(CF) zipinfo.c + + misc_$O: misc.c unzip.h + $(LN) misc.c misc_.c + $(CC) -c $(CF) $(ZC) misc_.c + $(RM) misc_.c + + zipinfo$E: $(OBJZ) + $(LD) $(ZL) $(OBJZ) $(ZL2) + + funzip$E: $(OBJF) + $(LD) $(FL) $(OBJF) $(FL2) Binary files unzip-5.00/\ and unzip/\ differ diff -2rcN unzip-5.00/extract.c unzip/extract.c *** unzip-5.00/extract.c Mon Aug 24 12:35:08 1992 --- unzip/extract.c Fri Sep 4 12:07:03 1992 *************** *** 334,338 **** "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", filename); ! FFLUSH /* for Amiga and Mac MPW */ fgets(answerbuf, 9, stdin); switch (*answerbuf) { --- 334,338 ---- "replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", filename); ! FFLUSH /* for NOT_GCC_AMIGA and Mac MPW */ fgets(answerbuf, 9, stdin); switch (*answerbuf) { *************** *** 345,349 **** do { fprintf(stderr, "new name: "); ! FFLUSH /* for AMIGA and Mac MPW */ fgets(filename, FILNAMSIZ, stdin); /* usually get \n here: better check for it */ --- 345,349 ---- do { fprintf(stderr, "new name: "); ! FFLUSH /* for NOT_GCC_AMIGA and Mac MPW */ fgets(filename, FILNAMSIZ, stdin); /* usually get \n here: better check for it */ *************** *** 509,513 **** "\n%s: stored in VMS format. Extract anyway? (y/n) ", filename); ! FFLUSH /* for Amiga and Mac MPW */ fgets(answerbuf, 9, stdin); if ((*answerbuf != 'y') && (*answerbuf != 'Y')) --- 509,513 ---- "\n%s: stored in VMS format. Extract anyway? (y/n) ", filename); ! FFLUSH /* for NOT_GCC_AMIGA and Mac MPW */ fgets(answerbuf, 9, stdin); if ((*answerbuf != 'y') && (*answerbuf != 'Y')) *************** *** 625,633 **** } else { if (cflag) { /* output to stdout (copy of it) */ ! #if (defined(MACOS) || defined(AMIGA)) outfd = 1; ! #else /* !(MACOS || AMIGA) */ ! outfd = dup(1); /* GRR: change this to #define for Mac/Amiga */ ! #endif /* ?(MACOS || AMIGA) */ #ifdef DOS_OS2 if (!aflag) --- 625,633 ---- } else { if (cflag) { /* output to stdout (copy of it) */ ! #if (defined(MACOS) || defined(NOT_GCC_AMIGA)) outfd = 1; ! #else /* !(MACOS || NOT_GCC_AMIGA) */ ! outfd = dup(1); /* GRR: change this to #define for Mac/NOT_GCC_AMIGA */ ! #endif /* ?(MACOS || NOT_GCC_AMIGA) */ #ifdef DOS_OS2 if (!aflag) diff -2rcN unzip-5.00/file_io.c unzip/file_io.c *** unzip-5.00/file_io.c Mon Aug 24 12:35:14 1992 --- unzip/file_io.c Fri Sep 4 12:07:22 1992 *************** *** 196,200 **** #endif ! #if (defined(UNIX) && !defined(AMIGA)) { int mask; --- 196,200 ---- #endif ! #if (defined(UNIX) && !defined(NOT_GCC_AMIGA)) { int mask; *************** *** 214,220 **** umask(mask); /* VMS, Unix */ } ! #else /* !UNIX || AMIGA */ /* file permissions set after file closed */ #ifndef MACOS ! outfd = creat(filename, S_IWRITE | S_IREAD); /* DOS, OS2, Mac, Amiga */ #else /* MACOS */ { --- 214,220 ---- umask(mask); /* VMS, Unix */ } ! #else /* !UNIX || NOT_GCC_AMIGA */ /* file permissions set after file closed */ #ifndef MACOS ! outfd = creat(filename, S_IWRITE | S_IREAD); /* DOS, OS2, Mac, NOT_GCC_AMIGA */ #else /* MACOS */ { *************** *** 282,286 **** } #endif /* ?MACOS */ ! #endif /* ?(UNIX && !AMIGA) */ if (outfd < 1) { --- 282,286 ---- } #endif /* ?MACOS */ ! #endif /* ?(UNIX && !NOT_GCC_AMIGA) */ if (outfd < 1) { *************** *** 461,465 **** "\n%s: write error (disk full?). Continue? (y/n/^C) ", filename); ! FFLUSH /* for Amiga and Mac MPW */ #ifdef MSWIN disk_full = 2; --- 461,465 ---- "\n%s: write error (disk full?). Continue? (y/n/^C) ", filename); ! FFLUSH /* for NOT_GCC_AMIGA and Mac MPW */ #ifdef MSWIN disk_full = 2; *************** *** 821,829 **** time_t modtime; /* new modification time */ } tp; ! #ifdef AMIGA ! # define YRBASE 1978 /* in AmigaDos, counting begins 01-Jan-1978 */ struct DateStamp myadate; /* extern char *_TZ; no longer used? */ ! #else /* !AMIGA */ # define YRBASE 1970 #ifdef BSD --- 821,829 ---- time_t modtime; /* new modification time */ } tp; ! #ifdef NOT_GCC_AMIGA ! # define YRBASE 1978 /* in NOT_GCC_AMIGADos, counting begins 01-Jan-1978 */ struct DateStamp myadate; /* extern char *_TZ; no longer used? */ ! #else /* !NOT_GCC_AMIGA */ # define YRBASE 1970 #ifdef BSD *************** *** 834,852 **** extern long timezone; #endif /* ?BSD */ ! #endif /* ?AMIGA */ /* ! * Close the file *before* setting its time under Unix and AmigaDos. */ ! #ifdef AMIGA if (cflag) /* can't set time on stdout */ return; close(outfd); ! #else /* !AMIGA */ close(outfd); if (cflag) /* can't set time on stdout */ return; ! #endif /* ?AMIGA */ /* --- 834,852 ---- extern long timezone; #endif /* ?BSD */ ! #endif /* ?NOT_GCC_AMIGA */ /* ! * Close the file *before* setting its time under Unix and NOT_GCC_AMIGADos. */ ! #ifdef NOT_GCC_AMIGA if (cflag) /* can't set time on stdout */ return; close(outfd); ! #else /* !NOT_GCC_AMIGA */ close(outfd); if (cflag) /* can't set time on stdout */ return; ! #endif /* ?NOT_GCC_AMIGA */ /* *************** *** 886,891 **** ++days; /* OK through 2199 */ ! #ifdef AMIGA ! /* _TZ = getenv("TZ"); does Amiga not have TZ and tzset() after all? */ myadate.ds_Days = days+dy-2; /* off by one? */ myadate.ds_Minute = hh*60+mm; --- 886,891 ---- ++days; /* OK through 2199 */ ! #ifdef NOT_GCC_AMIGA ! /* _TZ = getenv("TZ"); does NOT_GCC_AMIGA not have TZ and tzset() after all? */ myadate.ds_Days = days+dy-2; /* off by one? */ myadate.ds_Minute = hh*60+mm; *************** *** 895,899 **** fprintf(stderr, "error: can't set the time for %s\n", filename); ! #else /* !AMIGA */ /* convert date & time to seconds relative to 00:00:00, 01/01/YRBASE */ m_time = ((days + dy) * 86400) + (hh * 3600) + (mm * 60) + ss; --- 895,899 ---- fprintf(stderr, "error: can't set the time for %s\n", filename); ! #else /* !NOT_GCC_AMIGA */ /* convert date & time to seconds relative to 00:00:00, 01/01/YRBASE */ m_time = ((days + dy) * 86400) + (hh * 3600) + (mm * 60) + ss; *************** *** 924,928 **** if (utime(filename, &tp)) fprintf(stderr, "error: can't set the time for %s\n", filename); ! #endif /* ?AMIGA */ } --- 924,928 ---- if (utime(filename, &tp)) fprintf(stderr, "error: can't set the time for %s\n", filename); ! #endif /* ?NOT_GCC_AMIGA */ } diff -2rcN unzip-5.00/funzip.c unzip/funzip.c *** unzip-5.00/funzip.c Mon Aug 24 12:35:38 1992 --- unzip/funzip.c Sun Sep 6 14:14:12 1992 *************** *** 40,47 **** #ifdef __STDC__ # define FOPR "rb" ! # define FOPW "w+b" #else # define FOPR "r" ! # define FOPW "w+" #endif --- 40,47 ---- #ifdef __STDC__ # define FOPR "rb" ! # define FOPW "wb" #else # define FOPR "r" ! # define FOPW "w" #endif diff -2rcN unzip-5.00/unzip.c unzip/unzip.c *** unzip-5.00/unzip.c Mon Aug 24 12:35:42 1992 --- unzip/unzip.c Fri Sep 4 12:09:07 1992 *************** *** 1482,1486 **** break; ! default: /* AMIGA_, UNIX_, (ATARI_), OS2_HPFS_, */ break; /* MAC_, (Z_SYSTEM_): no conversion */ } --- 1482,1486 ---- break; ! default: /* NOT_GCC_AMIGA_, UNIX_, (ATARI_), OS2_HPFS_, */ break; /* MAC_, (Z_SYSTEM_): no conversion */ } diff -2rcN unzip-5.00/unzip.h unzip/unzip.h *** unzip-5.00/unzip.h Mon Aug 24 12:35:02 1992 --- unzip/unzip.h Fri Sep 4 12:09:23 1992 *************** *** 164,170 **** #ifdef UNIX ! # ifdef AMIGA # include ! # else /* !AMIGA */ # ifndef NO_PARAM_H #if 0 /* [GRR: this is an alternate fix for SCO's redefinition bug] */ --- 164,170 ---- #ifdef UNIX ! # ifdef NOT_GCC_AMIGA # include ! # else /* !NOT_GCC_AMIGA */ # ifndef NO_PARAM_H #if 0 /* [GRR: this is an alternate fix for SCO's redefinition bug] */ *************** *** 175,179 **** # include /* conflict with , some systems? */ # endif /* !NO_PARAM_H */ ! # endif /* ?AMIGA */ # ifndef BSIZE --- 175,179 ---- # include /* conflict with , some systems? */ # endif /* !NO_PARAM_H */ ! # endif /* ?NOT_GCC_AMIGA */ # ifndef BSIZE *************** *** 186,192 **** # ifndef BSD ! # if (!defined(AMIGA) && !defined(MINIX)) # define NO_MKDIR /* for mapname() */ ! # endif /* !AMIGA && !MINIX */ # include struct tm *gmtime(), *localtime(); --- 186,192 ---- # ifndef BSD ! # if (!defined(NOT_GCC_AMIGA) && !defined(MINIX)) # define NO_MKDIR /* for mapname() */ ! # endif /* !NOT_GCC_AMIGA && !MINIX */ # include struct tm *gmtime(), *localtime(); *************** *** 496,500 **** #define DOS_OS2_FAT_ 0 /* version_made_by codes (central dir) */ ! #define AMIGA_ 1 #define VMS_ 2 /* make sure these are not defined on */ #define UNIX_ 3 /* the respective systems!! (like, for */ --- 496,500 ---- #define DOS_OS2_FAT_ 0 /* version_made_by codes (central dir) */ ! #define NOT_GCC_AMIGA_ 1 #define VMS_ 2 /* make sure these are not defined on */ #define UNIX_ 3 /* the respective systems!! (like, for */ *************** *** 897,903 **** void envargs __((int *, char ***, char *)); /* envargs.c */ ! #ifdef AMIGA int utime __((char *file, time_t timep[])); /* utime.c */ ! #endif /* AMIGA */ #ifdef ZMEM /* these MUST be ifdef'd because of conflicts with the std def */ --- 897,903 ---- void envargs __((int *, char ***, char *)); /* envargs.c */ ! #ifdef NOT_GCC_AMIGA int utime __((char *file, time_t timep[])); /* utime.c */ ! #endif /* NOT_GCC_AMIGA */ #ifdef ZMEM /* these MUST be ifdef'd because of conflicts with the std def */