From 94819d2ab0ec423c2380991c8bdf64efd72be942 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 10 Jan 2019 15:23:39 +0900 Subject: [PATCH] Imported Upstream version 610c25 --- History.610 | 14 + acorn/GMakefile | 1124 ++++++++++++++++++++++++++++++++++++++++++++------- acorn/riscos.c | 134 +++--- acorn/riscos.h | 79 ++-- aes_wg/brg_endian.h | 10 +- api.c | 15 +- extract.c | 40 +- if_ppmd.c | 80 ++-- if_ppmd.h | 22 +- process.c | 2 +- unzip.c | 4 +- unzpriv.h | 2 +- unzvers.h | 6 +- zip-comment.txt | 2 +- 14 files changed, 1234 insertions(+), 300 deletions(-) diff --git a/History.610 b/History.610 index 1a72624..c41830f 100644 --- a/History.610 +++ b/History.610 @@ -672,6 +672,10 @@ Features added (or removed): should work ("make" target: "haiku"). (unzip.c, unzpriv.h, unix/Makefile, unix.c) [pulkomandy, SMS] +6.1c25 (12 Dec 2018): + - No news. + + Bugs fixed: @@ -2035,3 +2039,13 @@ Bugs fixed: reports were put out (-h, -hh, --license, -sc, -so). (unzip.c) [SMS] - Minor changes (comments, diagnostics format, variable password) in the object library example program. (libiz/izunzip_example.c) [SMS] + +6.1c25 (20 Dec 2018): + - Completed segregation of the PPMd code. (extract.c, if_ppmd.c, + if_ppmd.h) [SMS] + - In a "generic" Unix build, ICONV_MAPPING could be set incorrectly. + (unix/configure) [SMS] + - Slight reduction in compiler complaints. (api.c, process.c) [SMS] + - Better support for GCC on RISC OS. (unzpriv.h, acorn/GMakefile, + acorn/riscos.c, acorn/riscos.h, aes_wg/brg_endian.h) [SMS] + diff --git a/acorn/GMakefile b/acorn/GMakefile index bae8a7d..2511b1c 100644 --- a/acorn/GMakefile +++ b/acorn/GMakefile @@ -1,39 +1,919 @@ -# Makefile for UnZip, UnZipSFX, ZipInfo and fUnZip (6.0 or later) -# using GCC 4 (or later). -# You may look at for an -# up-to-date GCC port. - -CC = gcc -BIND = $(CC) -AS = $(CC) -c +#----------------------------------------------------------------------- +# acorn/GMakefile -- RISC OS, GCC Revised: 2018-12-20 +# For UnZip, fUnZip, UnZipSFX, and ZipInfo +# +# Copyright (c) 2004-2018 Info-ZIP. All rights reserved. +# +# See the accompanying file LICENSE, version 2009-Jan-2 or later (the +# contents of which are also included in zip.h) for terms of use. If, +# for some reason, all these files are missing, the Info-ZIP license may +# also be found at: ftp://ftp.info-zip.org/pub/infozip/license.html +#----------------------------------------------------------------------- + +#----------------------------------------------------------------------- +# +# INSTRUCTIONS +# +# unzip -/c:h unzip61/zip Extract the files from the UnZip +# source kit, with the required +# name transformations. +# +# make -f acorn/GMakefile Make UnZip programs with +# typical optional features. +# make -f acorn/GMakefile help Advice on building, and +# control of optional features. +# +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# "make" macros for users: +# +# C compiler options +# ------------------ +# CFLAGS Default: optimization, warnings. +# CF_NOOPT Default: some required items, and any user-specified +# LOCAL_UNZIP value. +# CF_MACH Default: machine/architecture-related. +# +# Link options +# ------------ +# LF1, LF2 Link options, early and late. +# +# +# Optional feature control +# ------------------------ +# NO_AES_WG Disable AES_WG encryption. +# AES_WG_SFX Enable AES_WG encryption in SFX. +# +# NO_IZ_BZIP2 Disable bzip2 compression. +# BZIP2_SFX Enable bzip2 compression in SFX. +# +# ICONV_MAPPING Enable ISO/OEM (iconv, -I/-O) conversion. +# +# NO_LZMA Disable LZMA compression. +# LZMA_SFX Enable LZMA compression in SFX. +# +# NO_PPMD Disable PPMd compression. +# PPMD_SFX Enable PPMd compression in SFX. +# +# NO_TRAD Disable Traditional zip encryption. +# TRAD_SFX Enable Traditional zip encryption in SFX. +# +#----------------------------------------------------------------------- +# +# Notes +# +# This "make" file resembles unix/Makefile, but does not use a +# "configure" script. Instead, relying on GNU "make" conditionals, +# "make" macros control optional features directly. +# +#----------------------------------------------------------------------- + +# Product file directory default is "@". +PROD = @ + +#----------------------------------------------------------------------- +# Tools +#----------------------------------------------------------------------- +AR = ar cq +CC = gcc +LD = $(CC) +AS = $(CC) -c SQUEEZE = squeeze -v -E ?= - -# flags -# CFLAGS flags for C compile -# LFLAGS1 flags after output file spec, before obj file list -# LFLAGS2 flags after obj file list (libraries, etc) -# -CFLAGS = -mlibscl -O2 -mthrowback -DNO_STRNICMP -Wall -I. -LFLAGS1 = -mlibscl -LFLAGS2 = - -# object file lists -OBJS1 = unzip.o crc32.o $(CRCA_O) crypt.o envargs.o explode.o -OBJS2 = extract.o fileio.o globals.o inflate.o list.o match.o -OBJS3 = process.o ttyio.o ubz2err.o unreduce.o unshrink.o zipinfo.o -OBJS = $(OBJS1) $(OBJS2) $(OBJS3) riscos.o swiven.o acorn.o -LOBJS = $(OBJS) -OBJSDLL = $(OBJS:.o=.pic.o) api.pic.o -OBJX = unzipsfx.o crc32_.o $(CRCA_O) crypt_.o extract_.o fileio_.o \ - globals_.o inflate_.o match_.o process_.o ttyio_.o ubz2err_.o \ - riscos_.o swiven.o acorn_.o -LOBJX = $(OBJX) -OBJF = funzip.o crc32.o $(CRCA_O) cryptf.o globalsf.o inflatef.o ttyiof.o \ - swiven.o -UNZIP_H = unzip.h unzpriv.h globals.h acorn/riscos.h - -all: unzip funzip unzipsfx + +#----------------------------------------------------------------------- +# Object library names, options. +# LIB_xxx = base name. AR_xxx = path to ".a" file. +#----------------------------------------------------------------------- + +# Object library: AES_WG encryption +LIB_AES_WG = aes_wg +AR_AES_WG = $(PROD)/lib$(LIB_AES_WG).a + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Object library: BZIP2 compression +LIB_BZIP2 = bz2 +AR_BZIP2 = $(PROD)/lib$(LIB_BZIP2).a + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Object library: LZMA compression +LIB_LZMA = iz_lzma +AR_LZMA = $(PROD)/lib$(LIB_LZMA).a + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Object library: PPMd compression +LIB_PPMD = iz_ppmd +AR_PPMD = $(PROD)/lib$(LIB_PPMD).a + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# object library: Callable UnZip +LIB_UNZIP = izunzip +AR_UNZIP = $(PROD)/lib$(LIB_UNZIP).a +LIB_OPT_UNZIP = -L$(PROD) -l$(LIB_UNZIP) + +#----------------------------------------------------------------------- +# Optional feature macro processing. +#----------------------------------------------------------------------- + +# AES_WG encryption. + +ifeq "$(NO_AES_WG)" "" +AR_AES_WG_ = $(AR_AES_WG) # Lib dependency +LIB_OPT_AES_WG = -l$(LIB_AES_WG) # Link options + ifeq "$(AES_WG_SFX)" "" +CFEAT_AES_WG = -DCRYPT_AES_WG # CC opts (norm) + else +CFEAT_AES_WG = -DCRYPT_AES_WG -DCRYPT_AES_WG_SFX # CC opts (sfx) + endif +endif + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# BZIP2 compression. + +ifeq "$(NO_IZ_BZIP2)" "" +AR_BZIP2_ = $(AR_BZIP2) # Lib dependency +LIB_OPT_BZIP2 = -l$(LIB_BZIP2) # Link options +CFEAT_BZIP2 = -Ibzip2 -DBZIP2_SUPPORT # CC opts (all) +CF_BZ = -Wall -Winline -O2 $(CF_MACH) -DBZ_NO_STDIO -DBZIP2_SUPPORT + ifeq "$(BZIP2_SFX)" "" +CF_BZ_SFX = $(CF_BZ) -DSFX # CC opts (norm) + else +CF_BZ_SFX = $(CF_BZ) -DSFX -DBZIP2_SFX # CC opts (sfx) + endif +endif + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# ICONV name mapping. + +ifneq "$(ICONV_MAPPING)" "" +CFEAT_ICONV_MAPPING = -DICONV_MAPPING # CC opts (all) +LF1_ICONV_MAPPING = -liconv # Link options +endif + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# LZMA compression. + +ifeq "$(NO_LZMA)" "" +AR_LZMA_ = $(AR_LZMA) # Lib dependency +LIB_OPT_LZMA = -l$(LIB_LZMA) # Link options + ifeq "$(LZMA_SFX)" "" +CFEAT_LZMA = -DLZMA_SUPPORT # CC opts (norm) + else +CFEAT_LZMA = -DLZMA_SUPPORT -DLZMA_SFX # CC opts (sfx) + endif +endif + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# PPMd compression. + +ifeq "$(NO_PPMD)" "" +AR_PPMD_ = $(AR_PPMD) # Lib dependency +LIB_OPT_PPMD = -l$(LIB_PPMD) # Link options + ifeq "$(PPMD_SFX)" "" +CFEAT_PPMD = -DPPMD_SUPPORT # CC opts (norm) + else +CFEAT_PPMD = -DPPMD_SUPPORT -DPPMD_SFX # CC opts (sfx) + endif +endif + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Traditional zip encryption. + +ifeq "$(NO_TRAD)" "" + ifneq "$(TRAD_SFX)" "" +CFEAT_TRAD = -DCRYPT_TRAD_SFX # CC opts (sfx) + endif +else +CFEAT_TRAD = -DNO_CRYPT_TRAD # CC opts (norm) +endif + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Combined compiler options. + +CFEAT = -DNO_USER_PROGRESS \ + $(CFEAT_AES_WG) $(CFEAT_BZIP2) \ + $(CFEAT_ICONV_MAPPING) $(CFEAT_LZMA) $(CFEAT_PPMD) \ + $(CFEAT_TRAD) + +#----------------------------------------------------------------------- +# C compiler options. +#----------------------------------------------------------------------- + +# Machine/architecture compiler options. + +CF_MACH = -mlibscl -mthrowback + +# General compiler options. + +CF_NOOPT = -I. $(CF_MACH) $(LOCAL_UNZIP) # Not related to optimization. +CFLAGS = -O2 -Wall + +CF = $(CFLAGS) $(CF_NOOPT) $(CFEAT) # C compiler flags. + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Linker and linker options (early and late). + +LF1 = -mlibscl $(LF1_ICONV_MAPPING) +LF2 = + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Optional object library link options. + +LIB_OPTS = -L$(PROD) $(LIB_OPT_AES_WG) $(LIB_OPT_BZIP2) \ + $(LIB_OPT_LZMA) $(LIB_OPT_PPMD) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Executable program name extension. (None.) +PGMEXT = + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Popular "make" targets. ### ("test" would be nice.) +MISC_TARGETS = clean dashv help + +#----------------------------------------------------------------------- +# Build configuration: Executable programs +#----------------------------------------------------------------------- + +PGM_FUZ = funzip$(PGMEXT) +PGM_SFX = unzipsfx$(PGMEXT) +PGM_UNZIP = unzip$(PGMEXT) +PGM_UNZXMPL = izunzip_example$(PGMEXT) +PGM_ZGREP = zipgrep +PGM_ZINFO = zipinfo$(PGMEXT) + +PPGM_FUZ = $(PROD)/$(PGM_FUZ) +PPGM_SFX = $(PROD)/$(PGM_SFX) +PPGM_UNZIP = $(PROD)/$(PGM_UNZIP) +PPGM_UNZXMPL = $(PROD)/$(PGM_UNZXMPL) + +UNZIP_PPGMS = $(PPGM_FUZ) \ + $(PPGM_SFX) \ + $(PPGM_UNZIP) + +#----------------------------------------------------------------------- + +# Binaries build list (executables and/or object library). +# - Default: main program and utilities. See below. +BINS = MU + +#----------------------------------------------------------------------- + +# Default target. + +all: prod_dir $(BINS) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Binaries build list (BINS) options: +L: $(AR_UNZIP) $(PPGM_UNZXMPL) +LM: $(AR_UNZIP) $(PPGM_UNZXMPL) $(PPGM_UNZIP) +LMU: $(AR_UNZIP) $(PPGM_UNZXMPL) $(UNZIP_PPGMS) +LU: $(AR_UNZIP) $(PPGM_UNZXMPL) $(PPGM_FUZ) $(PPGM_SFX) +M: $(PPGM_UNZIP) +MU: $(UNZIP_PPGMS) +U: $(PPGM_FUZ) $(PPGM_SFX) + +#----------------------------------------------------------------------- + +# Create product directory. (Required before any use of $(PROD).) +prod_dir: + %cdir $(PROD) + +#----------------------------------------------------------------------- +# Source file lists. +#----------------------------------------------------------------------- + +# OS-dependent source files. + +OSDEP_H = acorn/riscos.h + +# OS-dependent object files. + +# UnZip. +OSDEP_OCU = $(PROD)/acorn.o \ + $(PROD)/riscos.o \ + $(PROD)/swiven.o +# fUnZip. +OSDEP_OCF = $(PROD)/swiven.o + +# UnZip object library, DLL/RENTRANT-sensitive. +OSDEP_OCLR = $(PROD)/acorn_l.o \ + $(PROD)/riscos_l.o + +# UnZip object library, DLL/RENTRANT-insensitive. +OSDEP_OCLN = $(PROD)/swiven.o + +# UnZipSFX. +OSDEP_OCS = $(PROD)/acorn_s.o \ + $(PROD)/riscos_s.o \ + $(PROD)/swiven.o + +#----------------------------------------------------------------------- +# Build configuration: header files +#----------------------------------------------------------------------- + +# OSDEP_H is system-dependent. + +# C header files: unzip +H_UNZIP = unzip.h \ + unzpriv.h \ + globals.h \ + $(OSDEP_H) + +H_UNZIPL = api.h $(H_UNZIP) + +# C header files: AES_WG encryption +H_AES_WG = aes_wg/aes.h \ + aes_wg/aesopt.h \ + aes_wg/fileenc.h \ + aes_wg/hmac.h \ + aes_wg/prng.h \ + aes_wg/pwd2key.h \ + aes_wg/sha1.h + +# C header files: LZMA compression +H_LZMA = lzma/LzFind.h \ + lzma/LzHash.h \ + lzma/LzmaDec.h \ + lzma/SzTypes.h \ + lzma/SzVersion.h + +# C header files: PPMd compression +H_PPMD = ppmd/Ppmd.h \ + ppmd/Ppmd8.h \ + ppmd/SzTypes.h \ + ppmd/SzVersion.h + +#----------------------------------------------------------------------- +# Build configuration: object files +#----------------------------------------------------------------------- + +# object files: unzip +O_UNZIP = $(PROD)/unzip.o \ + $(PROD)/crc32.o \ + $(PROD)/crypt.o \ + $(PROD)/envargs.o \ + $(PROD)/explode.o \ + $(PROD)/extract.o \ + $(PROD)/fileio.o \ + $(PROD)/globals.o \ + $(PROD)/iconv_map.o \ + $(PROD)/if_lzma.o \ + $(PROD)/if_ppmd.o \ + $(PROD)/inflate.o \ + $(PROD)/list.o \ + $(PROD)/match.o \ + $(PROD)/process.o \ + $(PROD)/ttyio.o \ + $(PROD)/ubz2err.o \ + $(PROD)/unreduce.o \ + $(PROD)/unshrink.o \ + $(PROD)/zipinfo.o \ + $(OSDEP_OCU) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# object files: UnZip object library. Modules sensitive to DLL/REENTRANT. +O_UNZIPLR = $(PROD)/api_l.o \ + $(PROD)/apihelp_l.o \ + $(PROD)/crypt_l.o \ + $(PROD)/explode_l.o \ + $(PROD)/extract_l.o \ + $(PROD)/fileio_l.o \ + $(PROD)/globals_l.o \ + $(PROD)/iconv_map_l.o \ + $(PROD)/if_lzma_l.o \ + $(PROD)/if_ppmd_l.o \ + $(PROD)/inflate_l.o \ + $(PROD)/list_l.o \ + $(PROD)/process_l.o \ + $(PROD)/ttyio_l.o \ + $(PROD)/ubz2err_l.o \ + $(PROD)/unshrink_l.o \ + $(PROD)/unzip_l.o \ + $(PROD)/zipinfo_l.o \ + $(OSDEP_OCLR) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# object files: UnZip object library. Modules insensitive to DLL/REENTRANT. +O_UNZIPLN = $(PROD)/crc32.o \ + $(PROD)/envargs.o \ + $(PROD)/match.o \ + $(PROD)/unreduce.o \ + $(OSDEP_OCLN) + +# object files: UnZip DLL +O_DLL = $(O_UNZIP) \ + $(PROD)/api.o \ + $(PROD)/apihelp.o + +O_UNZXMPL = $(PROD)/izunzip_example.o + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# object files: unzipsfx +O_SFX = $(PROD)/unzipsfx.o \ + $(PROD)/crc32.o \ + $(PROD)/crypt_s.o \ + $(PROD)/extract_s.o \ + $(PROD)/fileio_s.o \ + $(PROD)/globals_s.o \ + $(PROD)/iconv_map_s.o \ + $(PROD)/if_lzma_s.o \ + $(PROD)/if_ppmd_s.o \ + $(PROD)/inflate_s.o \ + $(PROD)/match.o \ + $(PROD)/process_s.o \ + $(PROD)/ttyio.o \ + $(PROD)/ubz2err_s.o \ + $(OSDEP_OCS) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# object files: funzip +O_FUZ = $(PROD)/funzip.o \ + $(PROD)/crc32_f.o \ + $(PROD)/crypt_f.o \ + $(PROD)/globals_f.o \ + $(PROD)/inflate_f.o \ + $(PROD)/ttyio_f.o \ + $(OSDEP_OCF) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# object files: AES_WG encryption +O_AES_WG = $(PROD)/aescrypt.o \ + $(PROD)/aeskey.o \ + $(PROD)/aestab.o \ + $(PROD)/fileenc.o \ + $(PROD)/hmac.o \ + $(PROD)/prng.o \ + $(PROD)/pwd2key.o \ + $(PROD)/sha1.o + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# object files: LZMA compression +O_LZMA = $(PROD)/LzFind.o \ + $(PROD)/LzmaDec.o + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# object files: PPMd compression +O_PPMD = $(PROD)/Ppmd8.o \ + $(PROD)/Ppmd8Dec.o + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# object files: BZIP2 compression +O_BZIP2 = $(PROD)/blocksort.o \ + $(PROD)/bzlib.o \ + $(PROD)/compress.o \ + $(PROD)/crctable.o \ + $(PROD)/decompress.o \ + $(PROD)/huffman.o \ + $(PROD)/randtable.o + +#----------------------------------------------------------------------- +# Build rules: File suffixes +# - Disable all built-in rules. +# - Only explicit 1:1 rules are used. +#----------------------------------------------------------------------- +.SUFFIXES: + +#----------------------------------------------------------------------- +# Build rules: C compile (.c -> .o) +# - Explicit 1:1 rules are used. +#----------------------------------------------------------------------- + +# C Compile rules: UnZip + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# A) Core UnZip C files + +$(PROD)/unzip.o: unzip.c $(H_UNZIP) consts.h crypt.h \ + if_lzma.h if_ppmd.h unzvers.h + $(CC) -c $(CF) -o $@ unzip.c + +$(PROD)/crc32.o: crc32.c $(H_UNZIP) crc32.h zip.h + $(CC) -c $(CF) -o $@ crc32.c + +$(PROD)/crypt.o: crypt.c $(H_UNZIP) crc32.h crypt.h ttyio.h zip.h + $(CC) -c $(CF) -o $@ crypt.c + +$(PROD)/envargs.o: envargs.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ envargs.c + +$(PROD)/explode.o: explode.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ explode.c + +$(PROD)/extract.o: extract.c $(H_UNZIP) crc32.h crypt.h \ + if_lzma.h if_ppmd.h + $(CC) -c $(CF) -o $@ extract.c + +$(PROD)/fileio.o: fileio.c $(H_UNZIP) crc32.h crypt.h ebcdic.h ttyio.h + $(CC) -c $(CF) -o $@ fileio.c + +$(PROD)/globals.o: globals.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ globals.c + +$(PROD)/iconv_map.o: iconv_map.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ iconv_map.c + +$(PROD)/if_lzma.o: if_lzma.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ if_lzma.c + +$(PROD)/if_ppmd.o: if_ppmd.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ if_ppmd.c + +$(PROD)/inflate.o: inflate.c $(H_UNZIP) inflate.h + $(CC) -c $(CF) -o $@ inflate.c + +$(PROD)/list.o: list.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ list.c + +$(PROD)/match.o: match.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ match.c + +$(PROD)/process.o: process.c $(H_UNZIP) crc32.h if_lzma.h if_ppmd.h + $(CC) -c $(CF) -o $@ process.c + +$(PROD)/ttyio.o: ttyio.c $(H_UNZIP) crypt.h ttyio.h zip.h + $(CC) -c $(CF) -o $@ ttyio.c + +$(PROD)/ubz2err.o: ubz2err.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ ubz2err.c + +$(PROD)/unreduce.o: unreduce.c $(H_UNZIP) expand.c + $(CC) -c $(CF) -o $@ unreduce.c + +$(PROD)/unshrink.o: unshrink.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ unshrink.c + +$(PROD)/zipinfo.o: zipinfo.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ zipinfo.c + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# B) System-specific C files + +$(PROD)/acorn.o: acorn/acorn.c $(UNZIP_H) + $(CC) $(CF) -c -o $@ acorn/acorn.c + +$(PROD)/riscos.o: acorn/riscos.c $(UNZIP_H) + $(CC) $(CF) -c -o $@ acorn/riscos.c + +$(PROD)/swiven.o: acorn/swiven.c + $(CC) $(CF) -c -o $@ acorn/swiven.c + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# A') Callable UnZip C files + +$(PROD)/api_l.o: api.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ api.c + +$(PROD)/apihelp_l.o: apihelp.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ apihelp.c + +$(PROD)/crypt_l.o: crypt.c $(H_UNZIPL) crc32.h crypt.h ttyio.h zip.h + $(CC) -c $(CF) -DDLL -o $@ crypt.c + +$(PROD)/explode_l.o: explode.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ explode.c + +$(PROD)/extract_l.o: extract.c $(H_UNZIPL) crc32.h crypt.h \ + if_lzma.h if_ppmd.h + $(CC) -c $(CF) -DDLL -o $@ extract.c + +$(PROD)/fileio_l.o: fileio.c $(H_UNZIPL) crc32.h crypt.h ebcdic.h ttyio.h + $(CC) -c $(CF) -DDLL -o $@ fileio.c + +$(PROD)/globals_l.o: globals.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ globals.c + +$(PROD)/iconv_map_l.o: iconv_map.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ iconv_map.c + +$(PROD)/if_lzma_l.o: if_lzma.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ if_lzma.c + +$(PROD)/if_ppmd_l.o: if_ppmd.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ if_ppmd.c + +$(PROD)/inflate_l.o: inflate.c $(H_UNZIPL) inflate.h + $(CC) -c $(CF) -DDLL -o $@ inflate.c + +$(PROD)/list_l.o: list.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ list.c + +$(PROD)/process_l.o: process.c $(H_UNZIPL) crc32.h if_lzma.h if_ppmd.h + $(CC) -c $(CF) -DDLL -o $@ process.c + +$(PROD)/ttyio_l.o: ttyio.c $(H_UNZIPL) crypt.h ttyio.h zip.h + $(CC) -c $(CF) -DDLL -o $@ ttyio.c + +$(PROD)/ubz2err_l.o: ubz2err.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ ubz2err.c + +$(PROD)/unreduce_l.o: unreduce.c $(H_UNZIPL) expand.c + $(CC) -c $(CF) -DDLL -o $@ unreduce.c + +$(PROD)/unshrink_l.o: unshrink.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ unshrink.c + +$(PROD)/unzip_l.o: unzip.c $(H_UNZIPL) consts.h crypt.h \ + if_lzma.h if_ppmd.h unzvers.h + $(CC) -c $(CF) -DDLL -o $@ unzip.c + +$(PROD)/zipinfo_l.o: zipinfo.c $(H_UNZIPL) + $(CC) -c $(CF) -DDLL -o $@ zipinfo.c + +$(PROD)/unix_l.o: unix/unix.c $(H_UNZIPL) unix/macosx.h + $(CC) -c $(CF) -DDLL -o $@ unix/unix.c + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# B') System-specific C files + +$(PROD)/acorn_l.o: acorn/acorn.c $(UNZIP_H) + $(CC) $(CF) -c -DDLL -o $@ acorn/acorn.c + +$(PROD)/riscos_l.o: acorn/riscos.c $(UNZIP_H) + $(CC) $(CF) -c -DDLL -o $@ acorn/riscos.c + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# C Compile rules: UnZip object library, example program. + +$(PROD)/api.o: api.c $(H_UNZIP) + $(CC) -c $(CF) -DDLL -o $@ api.c + +$(PROD)/apihelp.o: apihelp.c $(H_UNZIP) + $(CC) -c $(CF) -DDLL -o $@ apihelp.c + +$(PROD)/izunzip_example.o: libiz/izunzip_example.c $(H_UNZIP) + $(CC) -c $(CF) -o $@ libiz/izunzip_example.c + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# C Compile rules: UnZipSFX + +# A) Core UnZipSFX C files + +$(PROD)/unzipsfx.o: unzip.c $(H_UNZIP) consts.h crypt.h \ + if_lzma.h if_ppmd.h unzvers.h + $(CC) -c $(CF) -DSFX -o $@ unzip.c + +$(PROD)/crypt_s.o: crypt.c $(H_UNZIP) zip.h crypt.h crc32.h ttyio.h + $(CC) -c $(CF) -DSFX -o $@ crypt.c + +$(PROD)/extract_s.o: extract.c $(H_UNZIP) crc32.h crypt.h \ + if_lzma.h if_ppmd.h + $(CC) -c $(CF) -DSFX -o $@ extract.c + +$(PROD)/fileio_s.o: fileio.c $(H_UNZIP) crc32.h crypt.h ttyio.h ebcdic.h + $(CC) -c $(CF) -DSFX -o $@ fileio.c + +$(PROD)/globals_s.o: globals.c $(H_UNZIP) + $(CC) -c $(CF) -DSFX -o $@ globals.c + +$(PROD)/iconv_map_s.o: iconv_map.c $(H_UNZIP) + $(CC) -c $(CF) -DSFX -o $@ iconv_map.c + +$(PROD)/if_lzma_s.o: if_lzma.c $(H_UNZIP) + $(CC) -c $(CF) -DSFX -o $@ if_lzma.c + +$(PROD)/if_ppmd_s.o: if_ppmd.c $(H_UNZIP) + $(CC) -c $(CF) -DSFX -o $@ if_ppmd.c + +$(PROD)/inflate_s.o: inflate.c $(H_UNZIP) inflate.h + $(CC) -c $(CF) -DSFX -o $@ inflate.c + +$(PROD)/match_s.o: match.c $(H_UNZIP) + $(CC) -c $(CF) -DSFX -o $@ match.c + +$(PROD)/process_s.o: process.c $(H_UNZIP) crc32.h if_lzma.h if_ppmd.h + $(CC) -c $(CF) -DSFX -o $@ process.c + +$(PROD)/ttyio_s.o: ttyio.c $(H_UNZIP) zip.h crypt.h ttyio.h + $(CC) -c $(CF) -DSFX -o $@ ttyio.c + +$(PROD)/ubz2err_s.o: ubz2err.c $(H_UNZIP) + $(CC) -c $(CF) -DSFX -o $@ ubz2err.c + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# B) System-specific C files. + +$(PROD)/acorn_s.o: acorn/acorn.c $(UNZIP_H) + $(CC) $(CF) -c -DSFX -DSFX_EXDIR -o $@ acorn/acorn.c + +$(PROD)/riscos_s.o: acorn/riscos.c $(UNZIP_H) + $(CC) $(CF) -c -DSFX -DSFX_EXDIR -o $@ acorn/riscos.c + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# C Compile rules: fUnZip + +$(PROD)/funzip.o: funzip.c $(H_UNZIP) crc32.h crypt.h ttyio.h + $(CC) -c $(CF) -DFUNZIP -o $@ funzip.c + +$(PROD)/crc32_f.o: crc32.c $(H_UNZIP) crc32.h zip.h + $(CC) -c $(CF) -DFUNZIP -o $@ crc32.c + +$(PROD)/crypt_f.o: crypt.c $(H_UNZIP) zip.h crypt.h crc32.h ttyio.h + $(CC) -c $(CF) -DFUNZIP -o $@ crypt.c + +$(PROD)/globals_f.o: globals.c $(H_UNZIP) + $(CC) -c $(CF) -DFUNZIP -o $@ globals.c + +$(PROD)/inflate_f.o: inflate.c $(H_UNZIP) inflate.h + $(CC) -c $(CF) -DFUNZIP -o $@ inflate.c + +$(PROD)/match_f.o: match.c $(H_UNZIP) + $(CC) -c $(CF) -DFUNZIP -o $@ match.c + +$(PROD)/ttyio_f.o: ttyio.c $(H_UNZIP) zip.h crypt.h ttyio.h + $(CC) -c $(CF) -DFUNZIP -o $@ ttyio.c + +# B) fUnZip C files for specific ports + +#----------------------------------------------------------------------- + +# C Compile rules: AES_WG encryption + +$(PROD)/aescrypt.o: aes_wg/aescrypt.c $(H_AES) + $(CC) -c $(CF) -o $@ wrap/aescrypt.c + +$(PROD)/aeskey.o: aes_wg/aeskey.c $(H_AES) + $(CC) -c $(CF) -o $@ wrap/aeskey.c + +$(PROD)/aestab.o: aes_wg/aestab.c $(H_AES) + $(CC) -c $(CF) -o $@ wrap/aestab.c + +$(PROD)/fileenc.o: aes_wg/fileenc.c $(H_AES) + $(CC) -c $(CF) -o $@ wrap/fileenc.c + +$(PROD)/hmac.o: aes_wg/hmac.c $(H_AES) + $(CC) -c $(CF) -o $@ wrap/hmac.c + +$(PROD)/prng.o: aes_wg/prng.c $(H_AES) + $(CC) -c $(CF) -o $@ wrap/prng.c + +$(PROD)/pwd2key.o: aes_wg/pwd2key.c $(H_AES) + $(CC) -c $(CF) -o $@ wrap/pwd2key.c + +$(PROD)/sha1.o: aes_wg/sha1.c $(H_AES) + $(CC) -c $(CF) -o $@ wrap/sha1.c + +#----------------------------------------------------------------------- + +# C Compile rules: BZIP2 compression + +$(PROD)/blocksort.o : bzip2/blocksort.c + $(CC) -c $(CF_BZ) -o $@ bzip2/blocksort.c + +$(PROD)/bzlib.o : bzip2/bzlib.c + $(CC) -c $(CF_BZ) -o $@ bzip2/bzlib.c + +$(PROD)/compress.o : bzip2/compress.c + $(CC) -c $(CF_BZ) -o $@ bzip2/compress.c + +$(PROD)/crctable.o : bzip2/crctable.c + $(CC) -c $(CF_BZ) -o $@ bzip2/crctable.c + +$(PROD)/decompress.o : bzip2/decompress.c + $(CC) -c $(CF_BZ) -o $@ bzip2/decompress.c + +$(PROD)/huffman.o : bzip2/huffman.c + $(CC) -c $(CF_BZ) -o $@ bzip2/huffman.c + +$(PROD)/randtable.o : bzip2/randtable.c + $(CC) -c $(CF_BZ) -o $@ bzip2/randtable.c + +#----------------------------------------------------------------------- + +# C Compile rules: LZMA compression + +$(PROD)/LzFind.o: lzma/LzFind.c $(H_LZMA) + $(CC) -c $(CF) -o $@ wrap/LzFind.c + +$(PROD)/LzmaDec.o: lzma/LzmaDec.c $(H_LZMA) + $(CC) -c $(CF) -o $@ wrap/LzmaDec.c + +#----------------------------------------------------------------------- + +# C Compile rules: PPMd compression + +$(PROD)/Ppmd8.o: ppmd/Ppmd8.c $(H_PPMD) + $(CC) -c $(CF) -o $@ wrap/Ppmd8.c + +$(PROD)/Ppmd8Dec.o: ppmd/Ppmd8Dec.c $(H_PPMD) + $(CC) -c $(CF) -o $@ wrap/Ppmd8Dec.c + +#----------------------------------------------------------------------- +# Build rules: Object libraries (.o -> .a) +#----------------------------------------------------------------------- + +# Object library rule: AES_WG + +$(AR_AES_WG): $(O_AES_WG) + @%echo 'Building/updating AES_WG object library...' + -$(RM) $@ + $(AR) $@ $(O_AES_WG) + -$(RANLIB) $@ + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Object library rule: BZIP2 + +$(AR_BZIP2): $(O_BZIP2) + @%echo 'Building/updating BZIP2 object library...' + -$(RM) $@ + $(AR) $@ $(O_BZIP2) + -$(RANLIB) $@ + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Object library rule: LZMA + +$(AR_LZMA): $(O_LZMA) + @%echo 'Building/updating LZMA object library...' + -$(RM) $@ + $(AR) $@ $(O_LZMA) + -$(RANLIB) $@ + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Object library rule: PPMd + +$(AR_PPMD): $(O_PPMD) + @%echo 'Building/updating PPMd object library...' + -$(RM) $@ + $(AR) $@ $(O_PPMD) + -$(RANLIB) $@ + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Object library rule: Callable UnZip + +$(AR_UNZIP): $(O_UNZIPLR) $(O_UNZIPLN) $(O_AES_WG) $(O_LZMA) $(O_PPMD) + @%echo 'Building/updating Callable UnZip object library...' + -$(RM) $@ + $(AR) $@ $(O_UNZIPLR) $(O_UNZIPLN) \ + $(O_AES_WG) $(O_LZMA) $(O_PPMD) + -$(RANLIB) $@ + +#----------------------------------------------------------------------- +# Build rules: Link programs (.o -> executables) +#----------------------------------------------------------------------- + +# Link rule: funzip + +$(PPGM_FUZ): $(O_FUZ) + $(LD) -o $@ $(LF1) $(O_FUZ) $(LF2) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Link rule: unzip + +$(PPGM_UNZIP): $(O_UNZIP) $(AR_AES_WG_) $(AR_BZIP2_) \ + $(AR_LZMA_) $(AR_PPMD_) + $(LD) -o $@ $(LF1) $(O_UNZIP) $(LIB_OPTS) $(LF2) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Link rule: unzipsfx + +$(PPGM_SFX): $(O_SFX) $(AR_AES_WG_) $(AR_BZIP2_) \ + $(AR_LZMA_) $(AR_PPMD_) + $(LD) -o $@ $(LF1) $(O_SFX) $(LIB_OPTS) $(LF2) + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +# Link rule: izunzip_example + +$(PPGM_UNZXMPL): $(O_UNZXMPL) $(AR_UNZIP) $(AR_BZIP2_) + $(LD) -o $@ $(LF1) $(O_UNZXMPL) \ + $(LIB_OPT_UNZIP) $(LIB_OPT_BZIP2) $(LF2) + +#----------------------------------------------------------------------- install: unzip funzip unzipsfx $(SQUEEZE) unzip %.unzip @@ -41,114 +921,70 @@ install: unzip funzip unzipsfx $(SQUEEZE) unzipsfx unzipsfx copy %.unzip %.zipinfo ~CVF -# suffix rules -.SUFFIXES: -.SUFFIXES: _.o .o .c -.c_.o: - $(CC) -c $(CFLAGS) -DUTIL -o $@ $< - -.c.o: - $(CC) -c $(CFLAGS) $< - -# rules for common stuff -crc32.o: crc32.c $(UNZIP_H) zip.h crc32.h -crypt.o: crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h -envargs.o: envargs.c $(UNZIP_H) -explode.o: explode.c $(UNZIP_H) -extract.o: extract.c $(UNZIP_H) crc32.h crypt.h -fileio.o: fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h -funzip.o: funzip.c $(UNZIP_H) crc32.h crypt.h ttyio.h -globals.o: globals.c $(UNZIP_H) -inflate.o: inflate.c inflate.h $(UNZIP_H) -list.o: list.c $(UNZIP_H) -match.o: match.c $(UNZIP_H) -process.o: process.c $(UNZIP_H) crc32.h -ttyio.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h -ubz2err.o: ubz2err.c $(UNZIP_H) -unreduce.o: unreduce.c $(UNZIP_H) -unshrink.o: unshrink.c $(UNZIP_H) -unzip.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h -zipinfo.o: zipinfo.c $(UNZIP_H) - -# unzipsfx compilation section -unzipsfx.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h - $(CC) -c $(CFLAGS) -DSFX -o $@ unzip.c - -crc32_.o: crc32.c $(UNZIP_H) zip.h crc32.h - $(CC) -c $(CFLAGS) -DSFX -o $@ crc32.c - -crypt_.o: crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h - $(CC) -c $(CFLAGS) -DSFX -o $@ crypt.c - -extract_.o: extract.c $(UNZIP_H) crc32.h crypt.h - $(CC) -c $(CFLAGS) -DSFX -o $@ extract.c - -fileio_.o: fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h - $(CC) -c $(CFLAGS) -DSFX -o $@ fileio.c - -globals_.o: globals.c $(UNZIP_H) - $(CC) -c $(CFLAGS) -DSFX -o $@ globals.c - -inflate_.o: inflate.c inflate.h $(UNZIP_H) crypt.h - $(CC) -c $(CFLAGS) -DSFX -o $@ inflate.c - -match_.o: match.c $(UNZIP_H) - $(CC) -c $(CFLAGS) -DSFX -o $@ match.c - -process_.o: process.c $(UNZIP_H) crc32.h - $(CC) -c $(CFLAGS) -DSFX -o $@ process.c - -ttyio_.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h - $(CC) -c $(CFLAGS) -DSFX -o $@ ttyio.c - -ubz2err_.o: ubz2err.c $(UNZIP_H) - $(CC) -c $(CFLAGS) -DSFX -o $@ ubz2err.c - - -# funzip compilation section -cryptf.o: crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h - $(CC) -c $(CFLAGS) -DFUNZIP -o $@ crypt.c - -globalsf.o: globals.c $(UNZIP_H) - $(CC) -c $(CFLAGS) -DFUNZIP -o $@ globals.c - -inflatef.o: inflate.c inflate.h $(UNZIP_H) crypt.h - $(CC) -c $(CFLAGS) -DFUNZIP -o $@ inflate.c - -ttyiof.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h - $(CC) -c $(CFLAGS) -DFUNZIP -o $@ ttyio.c - - -acorn.o: acorn/acorn.c $(UNZIP_H) - $(CC) $(CFLAGS) -c acorn/acorn.c -acorn_.o: acorn/acorn.c $(UNZIP_H) - $(CC) $(CFLAGS) -c -DSFX -DSFX_EXDIR -o acorn_.o acorn/acorn.c -acornf.o: acorn/acorn.c $(UNZIP_H) - $(CC) $(CFLAGS) -c -DFUNZIP -o acornf.o acorn/acorn.c - -riscos.o: acorn/riscos.c $(UNZIP_H) - $(CC) $(CFLAGS) -c acorn/riscos.c -riscos_.o: acorn/riscos.c $(UNZIP_H) - $(CC) $(CFLAGS) -c -DSFX -DSFX_EXDIR -o riscos_.o acorn/riscos.c -riscosf.o: acorn/riscos.c $(UNZIP_H) - $(CC) $(CFLAGS) -c -DFUNZIP -o riscosf.o acorn/riscos.c - -swiven.o: acorn/swiven.c - $(CC) $(CFLAGS) -c acorn/swiven.c - -unzip: $(OBJS) - $(BIND) -o unzip$(E) $(LFLAGS1) $(OBJS) $(LFLAGS2) -funzip: $(OBJF) - $(BIND) -o funzip$(E) $(LFLAGS1) $(OBJF) $(LFLAGS2) -unzipsfx: $(OBJX) - $(BIND) -o unzipsfx$(E) $(LFLAGS1) $(OBJX) $(LFLAGS2) - -clean: - remove unzip - remove funzip - remove zipinfo - remove unzipsfx - create o.!fake! 0 - wipe o.* ~cf +#----------------------------------------------------------------------- + +# Target: clean +# Remove programs, object libraries, object files. +clean: prod_dir + -remove $(PROD).$(PGM_FUZ) + -remove $(PROD).$(PGM_SFX) + -remove $(PROD).$(PGM_UNZIP) + -wipe $(PROD).*/a ~cf + -cdir $(PROD).o + -create $(PROD).o.!fake! 0 + -wipe $(PROD).o.* ~cf + +#----------------------------------------------------------------------- + +dashv: + $(PROD).$(PGM_UNZIP) -v + +#----------------------------------------------------------------------- + +help: + @%echo "" + @%echo "Additional "make" targets include:" + @%echo "" + @%echo " $(MISC_TARGETS)" + @%echo "" + @%echo '"make" macros to control various optional features:' + @%echo ' "NO_AES_WG=1" Disable AES_WG encryption.' + @%echo ' "AES_WG_SFX=1" Ensable AES_WG encryption in SFX.' + @%echo ' "BINS=[L][M][U] Binaries build list:' + @%echo ' L: object library (libizunzip.a)' + @%echo ' M: main program (UnZip)' + @%echo ' U: utility programs (fUnZip, UnZipSFX)' + @%echo ' Default: MU.' + @%echo ' "IZ_BZIP2=bz2dir" Use bzip2 compression from dir "bz2dir".' + @%echo ' "NO_IZ_BZIP2=1" Disable bzip2 compression.' + @%echo ' "BZIP2_SFX=1" Ensable bzip2 compression in SFX.' + @%echo ' "LOCAL_UNZIP=opts" Add C compiler options, "opts".' + @%echo ' "NO_LZMA=1" Disable LZMA compression.' + @%echo ' "LZMA_SFX=1" Enable LZMA compression in SFX.' + @%echo ' "NO_PPMD=1" Disable PPMd compression.' + @%echo ' "PPMD_SFX=1" Enable PPMd compression in SFX.' + @%echo ' "PROD=subdir" Build product files in "subdir", not "@".' + @%echo '' + @%echo 'Examples:' + @%echo ' Make UnZip programs without LZMA or PPMd compression.' + @%echo ' make -f acorn/GMakefile NO_LZMA=1 NO_PPMD=1' + @%echo '' + @%echo 'Use the "clean" target to delete any product files before' + @%echo 'building with different options. (Or, specify an empty' + @%echo 'PROD directory.)' + @%echo '' + @%echo 'After UnZip has been built, use the "dashv" target to get' + @%echo 'an "unzip -v" report from the created executable.' + @%echo '' + @%echo 'See the files INSTALL, unzip.txt, and acorn.GMakefile for more' + @%echo 'information.' + @%echo '' + +### +### @%echo ' "NO_ICONV=1" Disable ISO/OEM (iconv) conversion.' +### @%echo ' "IZ_ZLIB=zdir" Use zlib from dir "zdir" for Deflate.' +### @%echo ' "LIST=1" Generate C compiler and linker listing.' +### +#----------------------------------------------------------------------- # end of Makefile diff --git a/acorn/riscos.c b/acorn/riscos.c index e3fdde9..2655d66 100644 --- a/acorn/riscos.c +++ b/acorn/riscos.c @@ -1,5 +1,5 @@ /* - Copyright (c) 1990-2016 Info-ZIP. All rights reserved. + Copyright (c) 1990-2018 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2009-Jan-02 or later (the contents of which are also included in unzip.h) for terms of use. @@ -37,53 +37,57 @@ int stat(char *filename,struct stat *res) if (type==0) return -1; - res->st_dev=0; - res->st_ino=0; - res->st_nlink=0; - res->st_uid=1; - res->st_gid=1; - res->st_rdev=0; - res->st_blksize=1024; - - res->st_mode = ((attr & 0001) << 8) | ((attr & 0002) << 6) | - ((attr & 0020) >> 2) | ((attr & 0040) >> 4); - - switch (type) { - case 1: /* File */ - res->st_mode |= S_IFREG; - break; - case 2: /* Directory */ - res->st_mode |= S_IFDIR | 0700; - break; - case 3: /* Image file */ - if (uO.scanimage) - res->st_mode |= S_IFDIR | 0700; - else - res->st_mode |= S_IFREG; - break; - } - - if ((((unsigned int) load) >> 20) == 0xfff) { /* date stamped file */ - register unsigned int t1, t2, tc; - - t1 = (unsigned int) (exec); - t2 = (unsigned int) (load & 0xff); - - tc = 0x6e996a00U; - if (t1 < tc) - t2--; - t1 -= tc; - t2 -= 0x33; /* 00:00:00 Jan. 1 1970 = 0x336e996a00 */ - - t1 = (t1 / 100) + (t2 * 42949673U); /* 0x100000000 / 100 = 42949672.96 */ - t1 -= (t2 / 25); /* compensate for .04 error */ - - res->st_atime = res->st_mtime = res->st_ctime = t1; + { + GETGLOBALS(); /* Needed for uO with DLL/REENTRANT. */ + + res->st_dev=0; + res->st_ino=0; + res->st_nlink=0; + res->st_uid=1; + res->st_gid=1; + res->st_rdev=0; + res->st_blksize=1024; + + res->st_mode = ((attr & 0001) << 8) | ((attr & 0002) << 6) | + ((attr & 0020) >> 2) | ((attr & 0040) >> 4); + + switch (type) { + case 1: /* File */ + res->st_mode |= S_IFREG; + break; + case 2: /* Directory */ + res->st_mode |= S_IFDIR | 0700; + break; + case 3: /* Image file */ + if (uO.scanimage) + res->st_mode |= S_IFDIR | 0700; + else + res->st_mode |= S_IFREG; + break; + } + + if ((((unsigned int) load) >> 20) == 0xfff) { /* date stamped file */ + register unsigned int t1, t2, tc; + + t1 = (unsigned int) (exec); + t2 = (unsigned int) (load & 0xff); + + tc = 0x6e996a00U; + if (t1 < tc) + t2--; + t1 -= tc; + t2 -= 0x33; /* 00:00:00 Jan. 1 1970 = 0x336e996a00 */ + + t1 = (t1 / 100) + (t2 * 42949673U); /* 0x100000000 / 100 = 42949672.96 */ + t1 -= (t2 / 25); /* compensate for .04 error */ + + res->st_atime = res->st_mtime = res->st_ctime = t1; + } + else + res->st_atime = res->st_mtime = res->st_ctime = 0; + + return 0; } - else - res->st_atime = res->st_mtime = res->st_ctime = 0; - - return 0; } #ifndef SFX @@ -104,16 +108,20 @@ DIR *opendir(char *dirname) return NULL; } - strcpy(thisdir->dirname,dirname); - if (thisdir->dirname[strlen(thisdir->dirname)-1]=='.') - thisdir->dirname[strlen(thisdir->dirname)-1]=0; - - if (SWI_OS_File_5(thisdir->dirname,&type,NULL,NULL,NULL,&attr)!=NULL || - type<=1 || (type==3 && !uO.scanimage)) { - free(thisdir->dirname); - free(thisdir); - return NULL; + GETGLOBALS(); /* Needed for uO with DLL/REENTRANT. */ + + strcpy(thisdir->dirname,dirname); + if (thisdir->dirname[strlen(thisdir->dirname)-1]=='.') + thisdir->dirname[strlen(thisdir->dirname)-1]=0; + + if (SWI_OS_File_5(thisdir->dirname,&type,NULL,NULL,NULL,&attr)!=NULL || + type<=1 || (type==3 && !uO.scanimage)) + { + free(thisdir->dirname); + free(thisdir); + return NULL; + } } thisdir->buf=malloc(DIR_BUFSIZE); @@ -210,11 +218,17 @@ int rmdir(char *d) free(s); return -1; } - if (objtype<2 || (!uO.scanimage && objtype==3)) { -/* this is a file or it doesn't exist */ - free(s); - return -1; + + { + GETGLOBALS(); /* Needed for uO with DLL/REENTRANT. */ + + if (objtype<2 || (!uO.scanimage && objtype==3)) { + /* this is a file or it doesn't exist */ + free(s); + return -1; + } } + if (SWI_OS_File_6(s)!=NULL) { free(s); return -1; diff --git a/acorn/riscos.h b/acorn/riscos.h index 7569b2f..85a66e9 100644 --- a/acorn/riscos.h +++ b/acorn/riscos.h @@ -1,5 +1,5 @@ /* - Copyright (c) 1990-2016 Info-ZIP. All rights reserved. + Copyright (c) 1990-2018 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2009-Jan-02 or later (the contents of which are also included in unzip.h) for terms of use. @@ -8,18 +8,46 @@ */ /* riscos.h */ -#ifndef __riscos_h -#define __riscos_h +#ifndef __RISCOS_H +# define __RISCOS_H -#include +# include -#ifndef __swiven_h +# ifndef __swiven_h # include "swiven.h" -#endif +# endif + +# define MAXPATHLEN 1024 +# define MAXFILENAMELEN MAXPATHLEN /* RISC OS 4 has 1024 limit. 1024 is also the same as FNMAX in zip.h */ +# define DIR_BUFSIZE MAXPATHLEN /* Ensure we can read at least one full-length RISC OS 4 filename */ + +/* ISO/OEM (iconv) character conversion. */ + +# ifdef ICONV_MAPPING + +# ifndef MAX_CP_NAME +# define MAX_CP_NAME 25 /* Should be in a header file? */ +# endif + +# ifdef SETLOCALE +# undef SETLOCALE +# endif +# define SETLOCALE(category, locale) setlocale(category, locale) + +# include + +# ifdef _ISO_INTERN +# undef _ISO_INTERN +# endif +# define _ISO_INTERN( string) charset_to_intern( string, G.iso_cp) + +/* Possible "const" type qualifier for arg 2 of iconv(). */ +# ifndef ICONV_ARG2 +# define ICONV_ARG2 +# endif /* ndef ICONV_ARG2 */ + +# endif /* def ICONV_MAPPING */ -#define MAXPATHLEN 1024 -#define MAXFILENAMELEN MAXPATHLEN /* RISC OS 4 has 1024 limit. 1024 is also the same as FNMAX in zip.h */ -#define DIR_BUFSIZE MAXPATHLEN /* Ensure we can read at least one full-length RISC OS 4 filename */ struct stat { unsigned int st_dev; @@ -65,24 +93,24 @@ typedef struct { } extra_block; -#define S_IFMT 0770000 +# define S_IFMT 0770000 -#define S_IFDIR 0040000 -#define S_IFREG 0100000 /* 0200000 in UnixLib !?!?!?!? */ +# define S_IFDIR 0040000 +# define S_IFREG 0100000 /* 0200000 in UnixLib !?!?!?!? */ -#ifndef S_IEXEC +# ifndef S_IEXEC # define S_IEXEC 0000100 # define S_IWRITE 0000200 # define S_IREAD 0000400 -#endif +# endif -#ifndef NO_UNZIPH_STUFF +# ifndef NO_UNZIPH_STUFF # include # if (!defined(HAVE_STRNICMP) & !defined(NO_STRNICMP)) -# define NO_STRNICMP +# define NO_STRNICMP # endif # ifndef DATE_FORMAT -# define DATE_FORMAT DF_DMY +# define DATE_FORMAT DF_DMY # endif # define lenEOL 1 # define PutNativeEOL *q++ = native(LF); @@ -93,19 +121,21 @@ typedef struct { should find a better way, now just work as if stdin never redirected */ # define USE_EF_UT_TIME # if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) -# define TIMESTAMP +# define TIMESTAMP # endif # define localtime riscos_localtime # define gmtime riscos_gmtime -#endif /* !NO_UNZIPH_STUFF */ -#define SET_DIR_ATTRIB +# endif /* !NO_UNZIPH_STUFF */ +# define SET_DIR_ATTRIB -#define NO_EXCEPT_SIGNALS +# define NO_EXCEPT_SIGNALS -#define _raw_getc() SWI_OS_ReadC() +# define _raw_getc() SWI_OS_ReadC() extern char *exts2swap; /* Extensions to swap */ +#ifndef __GCC__ + int stat(char *filename,struct stat *res); DIR *opendir(char *dirname); struct dirent *readdir(DIR *d); @@ -113,6 +143,9 @@ void closedir(DIR *d); int unlink(char *f); int rmdir(char *d); int chmod(char *file, int mode); + +#endif /* ndef __GCC__ */ + void setfiletype(char *fname,int ftype); void getRISCOSexts(char *envstr); int checkext(char *suff); @@ -122,4 +155,4 @@ void set_prefix(void); struct tm *riscos_localtime(const time_t *timer); struct tm *riscos_gmtime(const time_t *timer); -#endif /* !__riscos_h */ +#endif /* ndef __RISCOS_H */ diff --git a/aes_wg/brg_endian.h b/aes_wg/brg_endian.h index b7f43d0..465e055 100644 --- a/aes_wg/brg_endian.h +++ b/aes_wg/brg_endian.h @@ -43,16 +43,22 @@ * 2013-04-12 SMS for Info-ZIP. * SunOS 4.x lacks , so skip it on SPARC. * #if defined( __sun ) + * + * 2018-12-20 SMS for Info-ZIP. + * Added __riscos with __GNUC__ to the section. + * ********************************************************************** */ #if defined( __sun ) && !defined( __sparc ) # include -#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ ) +#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || \ + defined( __NetBSD__ ) # include #elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \ defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ ) # include -#elif defined( __linux__ ) +#elif defined( __linux__ ) || \ + defined( __GNUC__ ) && (defined( __riscos )) /********************************************************************** * 2011-06-16 SMS for Info-ZIP. * __GNUC__ does _not_ ensure , so we disable the following diff --git a/api.c b/api.c index 3ad524d..5ce95df 100644 --- a/api.c +++ b/api.c @@ -1,5 +1,5 @@ /* - Copyright (c) 1990-2017 Info-ZIP. All rights reserved. + Copyright (c) 1990-2018 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2009-Jan-02 or later (the contents of which are also included in unzip.h) for terms of use. @@ -199,12 +199,10 @@ unsigned UZ_EXP UzpVersion2( OFT( UzpVer2 *)version) char *UzpFeatures() { char *feats; - char tempstring[ 100]; /* Temporary string storage. */ char featurelist[ 1000]; /* Feature string storage. */ /* All features start and end with a semi-colon for easy parsing. */ strcpy( featurelist, ";"); - tempstring[ 0] = '\0'; /* Avoid "unused" warning. */ # ifdef ACORN_FTYPE_NFS strcat( featurelist, "apple_nfrsrc;"); @@ -400,9 +398,14 @@ char *UzpFeatures() # endif # ifdef USE_ZLIB - strcat( featurelist, "zlib;"); - sprintf( tempstring, "zlib_version:%s,%s;", ZLIB_VERSION, zlibVersion()); - strcat( featurelist, tempstring); + { + char tempstring[ 100]; /* Temporary string storage. */ + + strcat( featurelist, "zlib;"); + sprintf( tempstring, "zlib_version:%s,%s;", + ZLIB_VERSION, zlibVersion()); + strcat( featurelist, tempstring); + } # endif # ifdef VMSCLI diff --git a/extract.c b/extract.c index 41eacd9..4c20570 100644 --- a/extract.c +++ b/extract.c @@ -1,5 +1,5 @@ /* - Copyright (c) 1990-2017 Info-ZIP. All rights reserved. + Copyright (c) 1990-2018 Info-ZIP. All rights reserved. See the accompanying file LICENSE, version 2009-Jan-02 or later (the contents of which are also included in unzip.h) for terms of use. @@ -6823,7 +6823,6 @@ uzlzma_cleanup_exit: #ifdef PPMD_SUPPORT -# include "ppmd/Ppmd8.h" /* PPMd8 constants, function prototypes. */ # include "if_ppmd.h" /* Function prototypes for if_ppmd.c. */ /*******************************/ @@ -6831,7 +6830,7 @@ uzlzma_cleanup_exit: /*******************************/ /* 7-Zip-compatible I/O Read function. */ -static Byte ppmd_read_byte( void *szios_p) +static unsigned char ppmd_read_byte( void *szios_p) { int b; @@ -6875,17 +6874,18 @@ static int UZppmd(__G) unsigned memSize; unsigned restor; + /* General 7-Zip and PPMd8 constants. */ + unsigned iz_ppmd8_max_order; + unsigned iz_ppmd8_min_order; + int sz_error_data_ppmd; + /* Local values from the (global) PPMd structure. * Watch for type deviation from "ppmd/SzTypes.h". */ - void *g_ppmd_alloc_ppmd_p; int *g_ppmd_szios_extra_p; int *g_ppmd_szios_res_p; - void *g_ppmd8_p; - int sz_error_data_ppmd; /* Allocate and initialize the 7-Zip PPMd sructure (once). */ - if (G.struct_ppmd_p == NULL) { G.struct_ppmd_p = alloc_ppmd(); /* Alloc the main PPMd struct. */ @@ -6894,17 +6894,19 @@ static int UZppmd(__G) return PK_MEM3; } - /* Initialize 7-Zip PPMd structures. */ + /* Initialize 7-Zip PPMd I/O and memory, and PPMd8 structures. */ g_ppmd8_prep( __G__ ppmd_read_byte); } - /* Locate the PPMd8 structure and 7-Zip I/O structure members. */ - g_ppmd8_p = g_ppmd8_pf( __G); + /* Locate some 7-Zip I/O structure members. */ g_ppmd_szios_extra_p = g_ppmd_szios_extra_pf( __G); g_ppmd_szios_res_p = g_ppmd_szios_res_pf( __G); - /* Local copy of SZ_ERROR_DATA. */ - sz_error_data_ppmd = sz_error_data_ppmd_f(); + /* Get local copies of some 7-Zip and PPMd8 constants: + * PPMD8_MAX_ORDER, PPMD8_MIN_ORDER, SZ_ERROR_DATA. + */ + ppmd8_consts( &iz_ppmd8_max_order, &iz_ppmd8_min_order, + &sz_error_data_ppmd); sts = 0; /* Extract PPMd properties. */ @@ -6937,17 +6939,15 @@ static int UZppmd(__G) /* Convert archive MB value into raw byte value. */ memSize <<= 20; - if ((order < PPMD8_MIN_ORDER) || (order > PPMD8_MAX_ORDER)) + if ((order < iz_ppmd8_min_order) || (order > iz_ppmd8_max_order)) return PK_ERR; if (!g_ppmd8_alloc( __G__ memSize)) return PK_MEM3; - g_ppmd_alloc_ppmd_p = g_ppmd_alloc_ppmd_pf( __G); - g_ppmd8_stream( __G); - sts = Ppmd8_RangeDec_Init( g_ppmd8_p); + sts = g_ppmd8_range_dec_init( __G); if (!sts) return PK_ERR; else if (*g_ppmd_szios_extra_p) @@ -6957,7 +6957,7 @@ static int UZppmd(__G) { int sym; - Ppmd8_Init( g_ppmd8_p, order, restor); + g_ppmd8_init( __G__ order, restor); #if defined(DLL) && !defined(NO_SLIDE_REDIR) if (G.redirect_slide) { @@ -6976,7 +6976,8 @@ static int UZppmd(__G) /* Decode input to fill the output buffer. */ for (avail_out = wsize; avail_out > 0; avail_out--) { - sym = Ppmd8_DecodeSymbol( g_ppmd8_p); + sym = g_ppmd8_decode_symbol( __G); + if (*g_ppmd_szios_extra_p || sym < 0) break; *(next_out++) = sym; @@ -7015,8 +7016,9 @@ static int UZppmd(__G) uzppmd_cleanup_exit: /* Free PPMd internal (p->Base) storage. */ - Ppmd8_Free( g_ppmd8_p, g_ppmd_alloc_ppmd_p); + g_ppmd8_free( __G); return sts; } /* UZppmd(). */ + #endif /* def PPMD_SUPPORT */ diff --git a/if_ppmd.c b/if_ppmd.c index 1fcf75d..85e0df6 100644 --- a/if_ppmd.c +++ b/if_ppmd.c @@ -15,16 +15,18 @@ * SzAlloc_ppmd() * SzFree_ppmd() * alloc_ppmd() + * g_ppmd_szios_extra_pf() + * g_ppmd_szios_res_pf() * g_ppmd8_alloc() + * g_ppmd8_decode_symbol() * g_ppmd8_free() * g_ppmd8_pf() * g_ppmd8_prep() * g_ppmd8_range_dec_finished_ok() + * g_ppmd8_range_dec_init() * g_ppmd8_stream() - * g_ppmd_alloc_ppmd_pf() - * g_ppmd_szios_extra_pf() - * g_ppmd_szios_res_pf() * nextbyte_eof_ppmd() + * ppmd8_consts() * sz_error_data_ppmd_f() * version_ppmd() * @@ -106,6 +108,22 @@ zvoid *alloc_ppmd() } +/* Return pointer to global structure I/O member, Bool. + */ +zvoid *g_ppmd_szios_extra_pf( __GPRO) +{ + return (&G_PPMD_P->szios.extra); +} + + +/* Return pointer to global structure I/O member, SRes. + */ +zvoid *g_ppmd_szios_res_pf( __GPRO) +{ + return (&G_PPMD_P->szios.res); +} + + /* Allocate PPMd8 storage. */ int g_ppmd8_alloc( __GPRO__ int size) @@ -114,6 +132,14 @@ int g_ppmd8_alloc( __GPRO__ int size) } +/* Return Ppmd8_DecodeSymbol() value. + */ +Bool g_ppmd8_decode_symbol( __GPRO) +{ + return Ppmd8_DecodeSymbol( &(G_PPMD_P->ppmd8)); +} + + /* Free any PPMd8 storage. (Assume that G_PPMD_P is non-NULL.) */ zvoid g_ppmd8_free( __GPRO) @@ -128,6 +154,14 @@ zvoid g_ppmd8_free( __GPRO) } +/* Ppmd8_Init(). + */ +void g_ppmd8_init( __GPRO__ unsigned order, unsigned restor) +{ + Ppmd8_Init( &(G_PPMD_P->ppmd8), order, restor); +} + + /* Return pointer to global structure member, CPpmd8. */ zvoid *g_ppmd8_pf( __GPRO) @@ -155,6 +189,14 @@ zvoid g_ppmd8_prep( __GPRO__ Byte p_r_b( zvoid *)) } +/* Return Ppmd8_RangeDec_Init() value. + */ +Bool g_ppmd8_range_dec_init( __GPRO) +{ + return Ppmd8_RangeDec_Init( &(G_PPMD_P->ppmd8)); +} + + /* Return Ppmd8_RangeDec_IsFinishedOK() value. */ int g_ppmd8_range_dec_finished_ok( __GPRO) @@ -171,36 +213,22 @@ zvoid g_ppmd8_stream( __GPRO) } -/* Return pointer to global structure member, ISzAlloc. - */ -zvoid *g_ppmd_alloc_ppmd_pf( __GPRO) -{ - return (&(G_PPMD_P->g_Alloc_ppmd)); -} - - -/* Return pointer to global structure I/O member, Bool. - */ -zvoid *g_ppmd_szios_extra_pf( __GPRO) -{ - return (&G_PPMD_P->szios.extra); -} - - -/* Return pointer to global structure I/O member, SRes. +/* Set PPMd I/O structure members to indicate EOF. */ -zvoid *g_ppmd_szios_res_pf( __GPRO) +zvoid nextbyte_eof_ppmd( CByteInToLook *szios_p) { - return (&G_PPMD_P->szios.res); + szios_p->extra = True; + szios_p->res = SZ_ERROR_INPUT_EOF; } -/* Set PPMd I/O structure members to indicate EOF. +/* Return some 7-Zip and PPMd8 constants. */ -zvoid nextbyte_eof_ppmd( CByteInToLook *szios_p) +zvoid ppmd8_consts( unsigned *max, unsigned *min, int *sz_err_dat) { - szios_p->extra = True; - szios_p->res = SZ_ERROR_INPUT_EOF; + *max = PPMD8_MAX_ORDER; + *min = PPMD8_MIN_ORDER; + *sz_err_dat = SZ_ERROR_DATA; } diff --git a/if_ppmd.h b/if_ppmd.h index b8d9ac1..9b26859 100644 --- a/if_ppmd.h +++ b/if_ppmd.h @@ -17,28 +17,26 @@ zvoid *alloc_ppmd(); +zvoid g_alloc_ppmd_set( __GPRO); + zvoid *g_ppmd_alloc_ppmd_pf( __GPRO); +zvoid g_ppmd_io( __GPRO__ zvoid *); zvoid *g_ppmd_szios_extra_pf( __GPRO); zvoid *g_ppmd_szios_res_pf( __GPRO); int g_ppmd8_alloc( __GPRO__ int); +zvoid *g_ppmd8_construct( __GPRO); +int g_ppmd8_decode_symbol( __GPRO); zvoid g_ppmd8_free( __GPRO); +zvoid g_ppmd8_init( __GPRO__ unsigned order, unsigned restor); zvoid *g_ppmd8_pf( __GPRO); - -zvoid g_alloc_ppmd_set( __GPRO); - - -zvoid g_ppmd8_prep( __GPRO__ zvoid *); - -zvoid g_ppmd_io( __GPRO__ zvoid *); -zvoid *g_ppmd8_construct( __GPRO); -zvoid *g_ppmd8_stream( __GPRO); - -int sz_error_data_ppmd_f(); +zvoid g_ppmd8_prep( __GPRO__ unsigned char (zvoid *)); int g_ppmd8_range_dec_finished_ok( __GPRO); +int g_ppmd8_range_dec_init( __GPRO); +zvoid *g_ppmd8_stream( __GPRO); zvoid nextbyte_eof_ppmd( zvoid *); - +zvoid ppmd8_consts( unsigned *max, unsigned *min, int *sz_err_dat); char *version_ppmd(); #endif /* ndef __IF_PPMD_H */ diff --git a/process.c b/process.c index 6d5364e..2ef0c65 100644 --- a/process.c +++ b/process.c @@ -1851,6 +1851,7 @@ int process_zipfiles(__G) /* return PK-type error code */ int NumMissFiles; int NumWarnFiles; int NumWinFiles; + int want_blank = 0; # ifndef VMS # ifdef ZSUFX2 char *zipfn_sufx_p; @@ -1860,7 +1861,6 @@ int process_zipfiles(__G) /* return PK-type error code */ int error = 0; int error_in_archive = 0; - int want_blank = 0; /*--------------------------------------------------------------------------- Start by allocating buffers and (re)constructing the various PK signature diff --git a/unzip.c b/unzip.c index aecdc68..09ef6e7 100644 --- a/unzip.c +++ b/unzip.c @@ -3836,11 +3836,11 @@ void show_version_info(__G) " Maintainer: Steven M. Schweda")); Info(slide, 0, ((char *)slide, LoadFarString(UnzipVersionLine))); -# ifdef BETA_MSG +# ifdef BETA_MSG Info( slide, 0, ((char *)slide, LoadFarString( BetaVersion), "", "")); Info( slide, 0, ((char *)slide, "%s", "\n")); -# endif +# endif version(__G); # endif /* ndef SFX */ diff --git a/unzpriv.h b/unzpriv.h index f2cc486..687500a 100644 --- a/unzpriv.h +++ b/unzpriv.h @@ -1916,7 +1916,7 @@ struct file_list { # include # endif /* ndef VMS */ # if defined(VMS) || defined(SIGUSR1) -# if !defined(MACOS) && !defined(WINDLL) +# if !defined(MACOS) && !defined( RISCOS) && !defined(WINDLL) # define ENABLE_USER_PROGRESS # endif /* !defined(MACOS) && !defined(WINDLL) */ # endif /* defined(VMS) || defined(SIGUSR1) */ diff --git a/unzvers.h b/unzvers.h index 242b8b9..46c38c1 100644 --- a/unzvers.h +++ b/unzvers.h @@ -31,8 +31,8 @@ /**************************************************/ # ifdef BETA -# define UZ_BETALEVEL "c24-BETA" -# define UZ_VERSION_DATE "2018-12-06" /* Internal beta version. */ +# define UZ_BETALEVEL "c25-BETA" +# define UZ_VERSION_DATE "2018-12-20" /* Internal beta version. */ # else # define UZ_BETALEVEL "" # define UZ_VERSION_DATE "2018-XX-XX" /* Official release version. */ @@ -46,7 +46,7 @@ # define UZ_PATCHLEVEL 0 -# define UZ_VER_STRING "6.1c24" /* Sync with Version numbers! */ +# define UZ_VER_STRING "6.1c25" /* Sync with Version numbers! */ # ifndef IZ_COMPANY_NAME # define IZ_COMPANY_NAME "Info-ZIP" diff --git a/zip-comment.txt b/zip-comment.txt index c4d9825..4f3663f 100644 --- a/zip-comment.txt +++ b/zip-comment.txt @@ -1,5 +1,5 @@ -Info-Zip UnZip -- Source kit. Version 6.1c24 (pre-BETA) 2018-12-06. +Info-Zip UnZip -- Source kit. Version 6.1c25 (pre-BETA) 2018-12-20. Kit contents copyright (c) 1990-2018 Info-ZIP. All rights reserved. License terms in: LICENSE -- 2.7.4