├── .gitignore ├── BUGS ├── COPYING.OLD ├── Contents ├── History.600 ├── INSTALL ├── LICENSE ├── README ├── ToDo ├── WHERE ├── acorn ├── Contents ├── GMakefile ├── ReadMe ├── RunMe1st ├── acorn.c ├── makefile ├── riscos.c ├── riscos.h ├── srcrename ├── swiven.h └── swiven.s ├── amiga ├── Contents ├── amiga.c ├── amiga.h ├── crc_68.a ├── filedate.c ├── flate.a ├── makefile.azt ├── makesfx.c ├── smakefile ├── stat.c └── z-stat.h ├── aosvs ├── Contents ├── README ├── aosvs.c ├── aosvs.h └── make_unz.cli ├── api.c ├── apihelp.c ├── atari ├── Contents ├── Makefile ├── Makefile.old ├── README.old ├── atari.c └── make_unz.mup ├── atheos ├── Contents ├── Makefile ├── README ├── athcfg.h ├── atheos.c └── atheos.h ├── beos ├── Contents ├── Makefile ├── README ├── beocfg.h ├── beos.c ├── beos.h ├── beosmain.cpp ├── unzip.rsc └── unzipsfx.rsc ├── bzip2 ├── 00README.IZ ├── Makebz2.iz ├── buildbz2.com ├── descrbz2.mms ├── makbz2iz.msc └── makbz2iz.wat ├── cmsmvs ├── INSTALL.CMS ├── README.CMS ├── README.MVS ├── WHATSNEW.CMS ├── ccunzip.exec ├── mc.exec ├── mvs.mki ├── unzip.exec ├── unzip.makefile ├── unzmvsc.job ├── unzvmc.exec ├── vmmvs.c ├── vmmvs.h ├── vmstat.h └── zipinfo.exec ├── consts.h ├── crc32.c ├── crc32.h ├── crc_i386.S ├── crypt.c ├── crypt.h ├── ebcdic.h ├── envargs.c ├── explode.c ├── extract.c ├── file_id.diz ├── fileio.c ├── flexos ├── Contents ├── README ├── flexos.c ├── flxcfg.h ├── hc.pro └── makefile ├── funzip.c ├── funzip.txt ├── gbloffs.c ├── globals.c ├── globals.h ├── human68k ├── Contents ├── Makefile ├── crc_68.s ├── flate.s └── human68k.c ├── inflate.c ├── inflate.h ├── list.c ├── macos ├── Contents ├── HISTORY.TXT ├── README.TXT ├── UnZp.h ├── UnZpLib.h ├── UnZpPrj.xml ├── UnZpSFX.h ├── UnZpSx.h └── source │ ├── charmap.h │ ├── getenv.c │ ├── helpers.c │ ├── helpers.h │ ├── macbin3.c │ ├── macbin3.h │ ├── maccfg.h │ ├── macdir.c │ ├── macdir.h │ ├── macos.c │ ├── macscreen.c │ ├── macstat.c │ ├── macstat.h │ ├── macstuff.h │ ├── mactime.c │ ├── mactime.h │ ├── macunzip.c │ ├── pathname.c │ ├── pathname.h │ ├── sxunzip.c │ └── unzip_rc.hqx ├── man ├── Contents ├── funzip.1 ├── unzip.1 ├── unzipsfx.1 ├── zipgrep.1 └── zipinfo.1 ├── match.c ├── msdos ├── Contents ├── README ├── crc_i86.asm ├── doscfg.h ├── makefile.bc ├── makefile.dj1 ├── makefile.dj2 ├── makefile.emx ├── makefile.msc ├── makefile.tc ├── makefile.wat ├── msc51opt.dif └── msdos.c ├── netware ├── Contents ├── README ├── makefile.wat ├── netware.c ├── nlm_EOL.pat ├── nlmcfg.h ├── unzip.build └── unzip.link ├── new-cmdparser └── unz6-newcmdparser-diffs.txt ├── os2 ├── Contents ├── makefile.os2 ├── os2.c ├── os2acl.c ├── os2acl.h ├── os2cfg.h ├── os2data.h ├── rexxapi.c ├── rexxapi.def ├── rexxhelp.c ├── rexxtest.cmd ├── stub.def ├── unzip.def ├── zgrepapi.cmd ├── zip2exe.cmd └── zipgrep.cmd ├── process.c ├── proginfo ├── 3rdparty.bug ├── CONTRIBS ├── Contents ├── ZipPorts ├── defer.in ├── extrafld.txt ├── fileinfo.cms ├── nt.sd ├── perform.dos ├── timezone.txt └── ziplimit.txt ├── qdos ├── Contents ├── IZREADME.SMS ├── Makefile ├── callstub.c ├── config.S ├── crc68.s ├── izqdos.h ├── makesfx.c └── qdos.c ├── tandem ├── Contents ├── HISTORY ├── README ├── commacs ├── doit ├── macros ├── make ├── makesfx ├── tandem.c ├── tandem.h ├── tannsk.h └── tanunz.c ├── testmake.zip ├── theos ├── Contents ├── _fprintf.c ├── _isatty.c ├── _setargv.c ├── _sprintf.c ├── _stat.c ├── charconv.h ├── makefile ├── oldstat.h ├── stat.h ├── theos.c └── thscfg.h ├── timezone.c ├── timezone.h ├── tops20 ├── Contents ├── make.mic ├── rename.mic └── tops20.c ├── ttyio.c ├── ttyio.h ├── ubz2err.c ├── unix ├── Contents ├── Makefile ├── Packaging │ ├── README │ ├── pkginfo.in │ ├── postinstall │ ├── preinstall.in │ └── prototype ├── configure ├── unix.c ├── unxcfg.h └── zipgrep ├── unreduce.c ├── unshrink.c ├── unzip.c ├── unzip.h ├── unzip.txt ├── unzipsfx.txt ├── unzipstb.c ├── unzpriv.h ├── unzvers.h ├── vms ├── Contents ├── INSTALL.VMS ├── NOTES.TXT ├── README ├── UNZIP_MSG.MSG ├── build_unzip.com ├── bzlib.h ├── cmdline.c ├── collect_deps.com ├── cvthelp.tpu ├── descrip.mms ├── descrip_deps.mms ├── descrip_mkdeps.mms ├── descrip_src.mms ├── find_bzip2_lib.com ├── hlp_lib_next.com ├── infback9.h ├── makesfx.com ├── mod_dep.com ├── unixio_gcc.h ├── unixlib_gcc.h ├── unz_cli.cld ├── unzip.opt ├── unzip_cli.help ├── unzip_def.rnh ├── unzipsfx.hlp ├── unzipsfx.opt ├── vms.c ├── vms.h ├── vmscfg.h ├── vmsdefs.h └── zlib.h ├── win32-experimental └── unz60d10_w32wide-Unicode_patch.txt ├── win32 ├── Contents ├── Makefile ├── Makefile.bc ├── Makefile.dj ├── Makefile.emx ├── Makefile.gcc ├── Makefile.lcc ├── Makefile.wat ├── crc_i386.asm ├── crc_i386.c ├── crc_lcc.asm ├── nt.c ├── nt.h ├── rsxntwin.h ├── vc6 │ ├── bz2lib.dsp │ ├── funzip.dsp │ ├── unzip.dsp │ ├── unzip.dsw │ ├── unzipbz2.dsp │ └── unzipsfx.dsp ├── vc8 │ ├── bz2lib.vcproj │ ├── funzip.vcproj │ ├── unzip.sln │ ├── unzip.vcproj │ ├── unzipbz2.vcproj │ └── unzipsfx.vcproj ├── w32cfg.h ├── win32.c ├── win32i64.c └── winapp.rc ├── wince ├── Contents ├── README ├── ilmask.bmp ├── imglist.2bp ├── imglist.bmp ├── inc │ ├── conio.h │ ├── errno.h │ ├── locale.h │ ├── signal.h │ └── stdio.h ├── intrface.cpp ├── intrface.h ├── punzip.h ├── punzip.htp ├── punzip.ic2 ├── punzip.ico ├── punzip.rc ├── punzip.rcv ├── resource.h ├── toolbar.2bp ├── toolbar.bmp ├── vc5 │ └── punzip.dsp ├── vc6 │ └── punzip.dsp ├── vcEMbed3 │ ├── punzip.vcp │ ├── unzipcmd.vcp │ └── unzipwce.vcw ├── wcecfg.h ├── wcemain.c ├── wince.cpp ├── wince.h ├── winmain.cpp ├── winmain.h ├── zipfile.ic2 └── zipfile.ico ├── windll ├── Contents ├── csharp │ ├── App.ico │ ├── AssemblyInfo.cs │ ├── CSharpInfoZip_UnZipSample.csproj │ ├── Form1.cs │ ├── Form1.resx │ ├── ReadMeCS.txt │ ├── UnZipDLLPrintMessageEventArgs.cs │ ├── UnZipDLLServiceMessageEventArgs.cs │ ├── Unzip.cs │ ├── ZipFileEntries.cs │ ├── ZipFileEntry.cs │ ├── frmShowContents.cs │ └── frmShowContents.resx ├── decs.h ├── guisfx │ ├── dialog.h │ ├── sfxw.ico │ ├── sfxwiz.c │ ├── sfxwiz.dlg │ ├── sfxwiz.rc │ ├── sfxwiz16.mak │ └── unzsfx16.def ├── structs.h ├── unziplib.def ├── uzexampl.c ├── uzexampl.h ├── vb │ ├── VBReadMe.txt │ ├── vbunzip.bas │ ├── vbunzip.frm │ └── vbunzip.vbp ├── vc5 │ ├── dll │ │ └── unz32dll.dsp │ ├── exampl │ │ └── c_dll_ex.dsp │ ├── lib │ │ └── unz32lib.dsp │ ├── sfx │ │ ├── SFXWiz32.dsp │ │ ├── SFXWiz32.dsw │ │ └── unzsfx32.dsp │ └── unzip32.dsw ├── vc6 │ ├── dll │ │ └── unz32dll.dsp │ ├── exampl │ │ └── c_dll_ex.dsp │ ├── lib │ │ └── unz32lib.dsp │ ├── sfx │ │ ├── SFXWiz32.dsp │ │ ├── SFXWiz32.dsw │ │ └── unzsfx32.dsp │ └── unzip32.dsw ├── vc8 │ ├── dll │ │ └── unz32dll.vcproj │ ├── exampl │ │ └── c_dll_ex.vcproj │ ├── lib │ │ └── unz32lib.vcproj │ ├── sfx │ │ ├── SFXWiz32.sln │ │ ├── SFXWiz32.vcproj │ │ └── unzsfx32.vcproj │ └── unzip32.sln ├── windll.c ├── windll.h ├── windll.rc ├── windll.txt ├── windll16.def ├── windll32.def ├── windll_lc.def └── windllgcc.def ├── zip.h ├── zipgrep.txt ├── zipinfo.c └── zipinfo.txt /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | /Makefile 3 | /funzip 4 | /unzip 5 | /unzipsfx 6 | .DS_Store 7 | -------------------------------------------------------------------------------- /acorn/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "acorn" subdirectory for UnZip 5.4 and later: 2 | 3 | acorn.c.acorn Acorn-specific resources 4 | acorn.c.riscos mainly file-handling routines for FileCore-based filesystems 5 | acorn.Contents this file 6 | acorn.GMakeFile Makefile for gcc 7 | acorn.h.riscos 8 | acorn.h.swiven 9 | acorn.makefile Makefile script for default Acorn C compiler 10 | acorn.README notes about Acorn-specific features 11 | acorn.RunMe1st Obey file to move files into suitable place for compilation 12 | on RISC OS machines 13 | acorn.s.swiven SWI veneers 14 | acorn.srcrename small executable that converts files from Unix style to 15 | RISC OS style, used by RunMe1st 16 | 17 | Notes: 18 | 19 | Use the "RunMe1st" file (it is an Obey file) to convert all the files from 20 | "filename/[chs]" to "[chs].filename" (so that UnZip could be easily compiled 21 | under RISC OS). It will also set the correct makefile. 22 | 23 | To compile just set the CSD to the main UnZip directory and run 'amu'. 24 | 25 | Currently only the Acorn C V5 compiler has been tested but probably also 26 | Acorn C V4 and the Acorn Assembler V2 will be able to compile UnZip. 27 | -------------------------------------------------------------------------------- /acorn/ReadMe: -------------------------------------------------------------------------------- 1 | Acorn-specific usage instructions 2 | --------------------------------- 3 | 4 | As zipfiles can come from a variety of sources apart from Acorn machines, 5 | consideration had to be given to the handling of dot-extensions, e.g. 6 | "DOSFILE.TXT", "unix-filename.tar.gz". These are extracted as "DOSFILE/TXT" 7 | and "unix-filename/tar/gz"; their names may or may not be truncated, 8 | depending on where the files are being created: what filing system and, for 9 | Filecore-based filing systems such as ADFS or an IDEFS or SCSIFS, which 10 | disk/partition format (names will not be truncated if you're using E+ or F+). 11 | 12 | Where truncation occurs, you must be REALLY careful about extracting files 13 | from archives. The files 14 | 15 | dummy_source.c and dummy_source.h 16 | 17 | will both be extracted as 18 | 19 | dummy_sour 20 | 21 | UnZip will prompt you for confirmation of the over-writing of these files, 22 | but you must be really careful unless you wish to lose files! Also, because 23 | UnZip is a unix-ported program, the filenames are CASE SENSITIVE. 24 | 25 | *unzip new/zip newfile 26 | 27 | will extract 'newfile', but not 'NewFile', 'NEWFILE' or any other 28 | combinations. However, you can use the -C option to force operations to 29 | disregard the case of filenames. 30 | 31 | The Acorn UnZip port has an additional feature to cope with the extraction of 32 | files containing 'c' code. As you may be aware, Acorn Desktop C requires all 33 | files called "foo.c" to be renamed to "c.foo", ie "foo" in a directory called 34 | "c". 35 | 36 | There are two ways of using this feature. 37 | 38 | - The old way: use a colon-separated environment variable named "Unzip$Exts". 39 | 40 | Any extensions found in this variable will be extracted to directories 41 | named after the extension, with the extension stripped. For example: 42 | 43 | *Set Unzip$Exts "c:h:o:s" 44 | *unzip foo/zip 45 | 46 | - The new way: use the -/ option. For example: 47 | 48 | Any extensions found in the parameter for this option will be extracted to 49 | directories named after the extension, with the extension stripped. For 50 | example: 51 | 52 | *unzip -/c:h:o:s foo/zip 53 | 54 | If foo/zip contains a file named "foo.c", this file will be written as "foo" 55 | in directory "c". This can be used to include "c:h:o:s:txt" to pull all the 56 | text files out to a separate directory. 57 | 58 | UnZip fully supports SparkFS Extra Field. This means that zipfiles created 59 | with SparkFS or Zip (on RISC OS) will be correctly unzipped, including 60 | filetypes. 61 | 62 | UnZipSFX can be used to create self-extracting archives. To use it, just 63 | create a common zipfile using Zip (or SparkFS), then load the UnZipSFX 64 | executable into an editor (eg. Edit, Zap), go with the caret the end of the 65 | file (using CTRL-CursorDown) and drag the zipfile to the editor window (in 66 | other words, append the zipfile to the UnZipSFX executable). Now, saving the 67 | resulting file (with filetype Absolute (&FF8)), you have a self-extracting 68 | archive (ie. double-clicking on it will unzip the contents of the original 69 | zipfile to the currently selected directory). 70 | -------------------------------------------------------------------------------- /acorn/RunMe1st: -------------------------------------------------------------------------------- 1 | | This Obey file prepares the UnZip port for a Desktop C re-compile. 2 | | Run it and it will copy all the needed files into the correct 3 | | place. 4 | 5 | | Set the correct type of 'srcrename' so that the only requirement 6 | | for the user is to set 'RunMe1st' to Obey 7 | SetType .srcrename FF8 8 | 9 | | Run 'srcrename' on the main UnZip directory with recursion enabled 10 | /.srcrename -r -e c:h:s:o .^ 11 | 12 | | Create the 'o' directory 13 | CDir .^.o 14 | 15 | | Put the Makefile in its correct place and set the correct filetype 16 | SetType .makefile FE1 17 | Copy .makefile .^.makefile ~C ~V F 18 | -------------------------------------------------------------------------------- /acorn/srcrename: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/acorn/srcrename -------------------------------------------------------------------------------- /acorn/swiven.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* swiven.h */ 10 | 11 | #ifndef __swiven_h 12 | #define __swiven_h 13 | 14 | os_error *SWI_OS_FSControl_26(char *source, char *dest, int actionmask); 15 | /* copy */ 16 | 17 | os_error *SWI_OS_FSControl_27(char *filename, int actionmask); 18 | /* wipe */ 19 | 20 | os_error *SWI_OS_GBPB_9(char *dirname, void *buf, int *number, 21 | int *offset, int size, char *match); 22 | /* read dir */ 23 | 24 | os_error *SWI_OS_File_1(char *filename, unsigned int loadaddr, 25 | unsigned int execaddr, int attrib); 26 | /* write file attributes */ 27 | 28 | os_error *SWI_OS_File_5(char *filename, int *objtype, unsigned int *loadaddr, 29 | unsigned int *execaddr, int *length, int *attrib); 30 | /* read file info */ 31 | 32 | os_error *SWI_OS_File_6(char *filename); 33 | /* delete */ 34 | 35 | os_error *SWI_OS_File_7(char *filename, int loadaddr, int execaddr, int size); 36 | /* create an empty file */ 37 | 38 | os_error *SWI_OS_File_8(char *dirname); 39 | /* create a directory */ 40 | 41 | os_error *SWI_OS_File_18(char *filename, int filetype); 42 | /* set a file's type */ 43 | 44 | os_error *SWI_OS_CLI(char *cmd); 45 | /* execute a command */ 46 | 47 | int SWI_OS_ReadC(void); 48 | /* get a key from the keyboard buffer */ 49 | 50 | os_error *SWI_OS_ReadVarVal(char *var, char *buf, int len, int *bytesused); 51 | /* reads an OS varibale */ 52 | 53 | os_error *SWI_OS_FSControl_54(char *buffer, int dir, char *fsname, int *size); 54 | /* reads the path of a specified directory */ 55 | 56 | os_error *SWI_OS_FSControl_37(char *pathname, char *buffer, int *size); 57 | /* canonicalise path */ 58 | 59 | os_error *SWI_DDEUtils_Prefix(char *dir); 60 | /* sets the 'prefix' directory */ 61 | 62 | int SWI_Read_Timezone(void); 63 | /* returns the timezone offset (centiseconds) */ 64 | 65 | int SWI_MimeMap_Translate(const char *ext); 66 | /* given a filename extn, returns the filetype (or -1 if no match). 67 | * Uses the MimeMap module */ 68 | 69 | #endif /* !__swiven_h */ 70 | -------------------------------------------------------------------------------- /amiga/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "amiga" directory for UnZip 5.5 and later: 2 | 3 | Contents this file 4 | amiga.c Amiga-specific file I/O routines 5 | amiga.h Amiga-specific header file 6 | filedate.c SetFileDate clone for OS 1.3, and other low-level resources 7 | 8 | smakefile SAS/C makefile for UnZip, fUnZip, and UnZipSFX 9 | 10 | makefile.azt Aztec C makefile for UnZip, fUnZip, and UnZipSFX 11 | stat.c stat() emulation for Aztec, along with opendir()/readdir()/etc 12 | z-stat.h replacement stat.h header file for use with stat.c 13 | crc_68.a assembler version of crc32.c 14 | flate.a assembler version of inflate_codes() (define ASM_INFLATECODES) 15 | 16 | makesfx.c source for MakeSFX, without which UnZipSFX is not usable 17 | 18 | Notes: 19 | 20 | The crc_68.a source file is not currently used by the SAS/C makefile, 21 | nor is flate.a; as of UnZip 5.2 neither of these wants args in 22 | registers. 23 | 24 | The DICE makefile has been removed since no one is supporting that 25 | compiler anymore. 26 | 27 | As of UnZip 5.2, if you have AmigaDOS 2.1 or newer and have set your 28 | timezone in the Locale preferences editor, this will be an adequate 29 | substitute for setting TZ. If you do not set TZ to your current timezone, 30 | files will be restored with times corrsponding to "EST5EDT", U.S. Eastern 31 | time. See ../proginfo/timezone.txt for directions on how to set the 32 | TZ variable. 33 | -------------------------------------------------------------------------------- /aosvs/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "aosvs" subdirectory for UnZip 5.3 and later: 2 | 3 | Contents this file 4 | README compilation notes, history, etc. 5 | make_unz.cli command script to make UnZip only (not UnZipSFX or fUnZip) 6 | aosvs.c AOS/VS-specific support routines 7 | aosvs.h AOS/VS-specific typedefs and header stuff 8 | -------------------------------------------------------------------------------- /aosvs/aosvs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /*--------------------------------------------------------------------------- 10 | 11 | aosvs.h 12 | 13 | AOS/VS-specific header file for use with Info-ZIP's UnZip 5.2 and later. 14 | 15 | ---------------------------------------------------------------------------*/ 16 | 17 | 18 | /* stuff to set up for system calls (?FSTAT & ?SACL) and the extra field */ 19 | 20 | #include /* parameter definitions */ 21 | #include /* AOS/VS ?FSTAT packet defs */ 22 | #include /* AOS/VS ?CREATE packet defs */ 23 | #include /* AOS/VS system call interface */ 24 | 25 | #define ZEXTRA_HEADID "VS" 26 | #define ZEXTRA_SENTINEL "FCI" 27 | #define ZEXTRA_REV ((uch)10) /* change/use this in later revs */ 28 | 29 | 30 | /* functions defined in zvs_create.c */ 31 | 32 | extern int zvs_create(ZCONST char *fname, long cretim, long modtim, 33 | long acctim, char *pacl, int ftyp, int eltsize, 34 | int maxindlev); 35 | extern int zvs_credir(ZCONST char *dname, long cretim, long modtim, 36 | long acctim, char *pacl, int ftyp, long maxblocks, 37 | int hashfsize, int maxindlev); 38 | extern long dgdate(short mm, short dd, short yy); 39 | extern char *ux_to_vs_name(char *outname, ZCONST char *inname); 40 | 41 | 42 | /* could probably avoid the unions - all elements in each one are the same 43 | * size, and we're going to assume this */ 44 | 45 | typedef union zvsfstat_stru { 46 | P_FSTAT norm_fstat_packet; /* normal fstat packet */ 47 | P_FSTAT_DIR dir_fstat_packet; /* DIR/CPD fstat packet */ 48 | P_FSTAT_UNIT unit_fstat_packet; /* unit (device) fstat packet */ 49 | P_FSTAT_IPC ipc_fstat_packet; /* IPC file fstat packet */ 50 | } ZVSFSTAT_STRU; 51 | 52 | typedef union zvscreate_stru { 53 | P_CREATE norm_create_packet; /* normal create packet */ 54 | P_CREATE_DIR dir_create_packet; /* DIR/CPD create packet */ 55 | P_CREATE_IPC ipc_create_packet; /* IPC file create packet */ 56 | } ZVSCREATE_STRU; 57 | 58 | 59 | typedef struct zextrafld { 60 | char extra_header_id[2]; /* set to VS - in theory, an int */ 61 | char extra_data_size[2]; /* size of rest (little-endian) */ 62 | char extra_sentinel[4]; /* set to FCI w/ trailing null */ 63 | uch extra_rev; /* set to 10 for rev 1.0 */ 64 | ZVSFSTAT_STRU fstat_packet; /* the fstat packet */ 65 | char aclbuf[$MXACL]; /* the raw ACL */ 66 | } ZEXTRAFLD; 67 | -------------------------------------------------------------------------------- /aosvs/make_unz.cli: -------------------------------------------------------------------------------- 1 | push 2 | prompt pop 3 | searchlist :c_4.10 :c_4.10:lang_rt [!searchlist] 4 | cc/link/NOUNX/NOSEA SYSV/DEFINE TERMIO/DEFINE AOS_VS/DEFINE=1 PROTO/DEFINE S_IFLNK/DEFINE=0120000 TIME.H/INCLUDE .c 5 | pop 6 | -------------------------------------------------------------------------------- /atari/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "atari" sub-archive for UnZip 5.3 and later: 2 | 3 | Contents this file 4 | README.old old notes on compiling UnZip, from author of Atari port 5 | Makefile.old makefile for GNU C compiler and MiNT libraries 6 | Makefile newer, Unix-based makefile (lots of unnecessary baggage :-( ) 7 | make_unz.mup script file for invoking makefile(s)? 8 | atari.c Atari-specific routines 9 | 10 | The maintainers of the Atari port have fallen behind in their duties; the 11 | code *probably* compiles, but it has not been tested recently. Feel free 12 | to send zip-bugs e-mail about this sorry state of affairs. 13 | -------------------------------------------------------------------------------- /atari/README.old: -------------------------------------------------------------------------------- 1 | Here it is... the UnZip 5.1 port for the Atari ST/TT/Falcon! 2 | 3 | This took me longer than I expected thanks to a difference between the 4 | MiNT library and most UNIX libraries... symlinks are 0x16000 5 | instead of 0xa000... I'm told this isn't even defined in POSIX, so I 6 | can't really complain. At least we've got a filesystem that can use 7 | symlinks! 8 | 9 | This port requires GNU C and allows you to build an unzip/zipinfo/funzip 10 | that supports long filenames (on appropriate filesystems, thanks to the 11 | MiNT library), as well as symlinks. It also does "proper" (ie, DOS-style) 12 | translation of text-file end-of-line characters. The programs also build 13 | as shared-text binaries, so you can start unzipping several files at once 14 | in the background and only a small part of unzip will be duplicated in 15 | memory. 16 | 17 | I build unzip with the MiNT library, GNU C 2.5.8 (2.5.7 and lower have a 18 | rather sever problem in the optimiser that affects 68000 code only; it 19 | adds 68020-only instructions to the 68000 code). Oh, and I tested it 20 | extensively under MiNT's minix filesystem as well as the bogus DOS 21 | filesystem that "normal" Atari partitions have. 22 | 23 | The Makefile won't need any editing if you want to built unzip et al. on 24 | a minix filesystem; if you want to install it on a DOS filesystem, use 25 | "cp" instead of "ln" for zipinfo. [Or, to save disk space, make a script/ 26 | command-file which invokes "unzip -Z ...". --CN] This is such a good 27 | idea that I'm annoyed that Greg thought of it and I didn't... ;-) If 28 | you're using a shell worth your while, you can alias zipinfo to 29 | 'unzip -Z' and then forget all about this paragraph. 30 | 31 | If you want to compile this using Turbo C (aka Pure C in North America) 32 | you're on your own... That's ok, I'll make a nice binary version of 33 | unzip available as soon as the official 5.1 version is released (give or 34 | take a few days). 35 | 36 | Enjoy! Cave Newt should be given kudos for keeping this monster easy to 37 | port... ;-) [Hah! But thanks anyway. :-) --CN] 38 | 39 | PLEASE email me to tell me if you've uploaded the source or binary 40 | versions of Unzip 5.x to any BBS systems or commercial online systems so 41 | we can update the WHERE file! 42 | 43 | -Chris Herborth- 44 | -------------------------------------------------------------------------------- /atari/make_unz.mup: -------------------------------------------------------------------------------- 1 | #rm -f *.o *.ttp *.sym 2 | #make370 SHELL=/bin/mupfel.ttp CFLAGS=" -O -DATARI" unzips 3 | make370 SHELL=/bin/mupfel.ttp CFLAGS="-g -D__NO_INLINE__ -DATARI" E=.ttp unzip.ttp LF2= 4 | make370 SHELL=/bin/mupfel.ttp CFLAGS="-g -D__NO_INLINE__ -DATARI" E=.sym unzip.sym LF2="-B/bin/sym-" 5 | #make370 SHELL=/bin/mupfel.ttp CFLAGS="-O -DATARI" -n unzips > make_all.mup 6 | #fixstk 32K pgp.ttp 7 | prgflags 017 007 *.ttp 8 | 9 | -------------------------------------------------------------------------------- /atheos/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "atheos" sub-directory for UnZip 5.52 and later: 2 | 3 | Contents this file 4 | README notes from the author of the AtheOS port 5 | Makefile makefile for building UnZip 6 | athcfg.h AtheOS-specific configuration settings 7 | atheos.c AtheOS-specific routines (similar to the BeOS/Unix ones) 8 | atheos.h structures for the AtheOS extra field 9 | 10 | - Ruslan Nickolaev (nruslan@hotbox.ru) 11 | -------------------------------------------------------------------------------- /atheos/README: -------------------------------------------------------------------------------- 1 | UnZip 5.51 for AtheOS/Syllable 2 | 3 | This port is based on both BeOS and UNIX versions. 4 | As BeOS version it can extract specific file attributes. 5 | 6 | TODO 7 | ---- 8 | There is only one thing to be fixed: 9 | write_attr() should return count of bytes written. However that's a bug 10 | related with AFS only. 11 | 12 | Please report any bugs to Zip-Bugs@lists.wku.edu. 13 | If this bug related with AtheOS/Syllable only, you can mail me directly: 14 | nruslan@hotbox.ru. 15 | - Ruslan Nickolaev (nruslan@hotbox.ru) 16 | Sep 06/2004 17 | -------------------------------------------------------------------------------- /atheos/athcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2004 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /*--------------------------------------------------------------------------- 10 | AtheOS/Syllable specific configuration section: 11 | ---------------------------------------------------------------------------*/ 12 | 13 | #ifndef __athcfg_h 14 | #define __athcfg_h 15 | 16 | /* ensure that Unix-specific code portions are excluded */ 17 | #ifdef UNIX 18 | # undef UNIX 19 | #endif 20 | #include /* off_t, time_t, dev_t, ... */ 21 | #include 22 | #include 23 | #include /* O_BINARY for open() w/o CR/LF translation */ 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #define GOT_UTIMBUF 30 | #define DIRENT 31 | #if (!defined(HAVE_STRNICMP) & !defined(NO_STRNICMP)) 32 | # define NO_STRNICMP 33 | #endif 34 | #define INT_SPRINTF 35 | #define SYMLINKS 36 | 37 | #ifndef DATE_FORMAT 38 | # define DATE_FORMAT DF_MDY /* GRR: customize with locale.h somehow? */ 39 | #endif 40 | #define lenEOL 1 41 | #define PutNativeEOL *q++ = native(LF); 42 | #define SCREENSIZE(ttrows, ttcols) screensize(ttrows, ttcols) 43 | #define SCREENWIDTH 80 44 | #define SCREENLWRAP 1 45 | #if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)) 46 | # define USE_EF_UT_TIME 47 | #endif 48 | #define SET_SYMLINK_ATTRIBS 49 | #define SET_DIR_ATTRIB 50 | #if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) 51 | # define TIMESTAMP 52 | #endif 53 | #define RESTORE_UIDGID 54 | 55 | /* Static variables that we have to add to Uz_Globs: */ 56 | #define SYSTEM_SPECIFIC_GLOBALS \ 57 | int created_dir, renamed_fullpath;\ 58 | char *rootpath, *buildpath, *end;\ 59 | ZCONST char *wildname;\ 60 | char *dirname, matchname[FILNAMSIZ];\ 61 | int rootlen, have_dirname, dirnamelen, notfirstcall;\ 62 | zvoid *wild_dir; 63 | 64 | /* created_dir, and renamed_fullpath are used by both mapname() and */ 65 | /* checkdir(). */ 66 | /* rootlen, rootpath, buildpath and end are used by checkdir(). */ 67 | /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ 68 | /* and notfirstcall are used by do_wild(). */ 69 | 70 | #endif /* !__athcfg_h */ 71 | -------------------------------------------------------------------------------- /atheos/atheos.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2004 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* atheos.h -- A few handy things for the AtheOS port 10 | * 11 | * (c) 1997 Chris Herborth (chrish@qnx.com) - BeOS port 12 | * (c) 2004 Ruslan Nickolaev (nruslan@hotbox.ru) - AtheOS port 13 | * 14 | * This is covered under the usual Info-ZIP copyright 15 | */ 16 | 17 | #ifndef _ATHEOS_H_ 18 | #define _ATHEOS_H_ 19 | 20 | #define EB_BE_FL_BADBITS 0xfe /* bits currently undefined */ 21 | 22 | /* 23 | AtheOS 'At' extra-field layout: 24 | (same structure as the BeOS 'Be' e.f. layout, only signature and internal 25 | conventions of the file attribute data are different...) 26 | 27 | 'At' - signature 28 | ef_size - size of data in this EF (little-endian unsigned short) 29 | full_size - uncompressed data size (little-endian unsigned long) 30 | flag - flags (byte) 31 | flags & EB_BE_FL_UNCMPR = the data is not compressed 32 | flags & EB_BE_FL_BADBITS = the data is corrupted or we 33 | can't handle it properly 34 | data - compressed or uncompressed file attribute data 35 | 36 | If flag & EB_BE_FL_UNCMPR, the data is not compressed; this optimisation is 37 | necessary to prevent wasted space for files with small attributes. In this 38 | case, there should be (ef_size - EB_BEOS_HLEN) bytes of data, and full_size 39 | should equal (ef_size - EB_BEOS_HLEN). 40 | 41 | If the data is compressed, there will be (ef_size - EB_BEOS_HLEN) bytes of 42 | compressed data, and full_size bytes of uncompressed data. 43 | 44 | If a file has absolutely no attributes, there will not be a 'At' extra field. 45 | 46 | The uncompressed data is arranged like this: 47 | 48 | attr_name\0 - C string 49 | struct attr_info (fields in little-endian format) 50 | attr_data (length in attr_info.ai_size) 51 | */ 52 | 53 | #endif /* _ATHEOS_H_ */ 54 | -------------------------------------------------------------------------------- /beos/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "beos" sub-directory for UnZip 5.52 and later: 2 | 3 | Contents this file 4 | README notes from the author of the BeOS port 5 | Makefile makefile for building UnZip (sorry, no project files) 6 | beocfg.h BeOS-specific configuration settings 7 | beos.c BeOS-specific routines (similar to the Unix ones) 8 | beos.h structures for the BeOS extra field 9 | beosmain.cpp BeOS-specific C++ routines 10 | unzip.rsc BeOS resources for UnZip 11 | unzipsfx.rsc BeOS resources for UnZipSFX 12 | 13 | This port supports both Metrowerks CodeWarrior (PowerPC and x86) and GNU C. 14 | 15 | - Chris Herborth (chrish@qnx.com) 16 | -------------------------------------------------------------------------------- /beos/README: -------------------------------------------------------------------------------- 1 | UnZip 5.4 for BeOS 2 | 3 | NOTE: 4 | 5 | If you want to build UnZip 5.4 or later from the source, you'll need to 6 | have the "xres" tool installed (unless you remove the "xres" lines in the 7 | beos/Makefile). This will cease to be a problem when BeOS R4 ships this 8 | fall. Until then, you can get xres from 9 | ftp://ftp.be.com/pub/experimental/tools/xres-102.zip. 10 | 11 | HISTORY 12 | 13 | UnZip 5.30 was the first official release of Info-ZIP's UnZip to support 14 | the filesystem in BeOS. 15 | 16 | UnZip 5.31 added support for the new filesystem that appeared in the 17 | Advanced Access Preview (aka DR9) Release of BeOS. 18 | 19 | UnZip 5.32 added several important bug fixes. 20 | 21 | UnZip 5.4: 22 | 23 | - supports BeOS on x86 hardware (and cross-compiling, if a compiler is 24 | present) 25 | 26 | - ask the Registrar to assign a file type to files that don't have one 27 | 28 | - adds a new -J option on BeOS; this lets you extract the data for a file 29 | without restoring its file attributes (handy if you stumble on really 30 | old BeOS ZIP archives... from before BeOS Preview Release) 31 | 32 | - will restore attributes properly on symbolic links (you'll need 33 | zip 2.21 or later to create ZIP files that store attributes for 34 | symbolic links) 35 | 36 | *** WARNING *** 37 | You may find some extremely old BeOS zip archives that store their 38 | file attributes differently; these will be from DR8 and earlier (when 39 | BeOS copied the MacOS type/creator fields instead of using the current 40 | extremely flexible scheme). 41 | 42 | You can still unpack the _data_ in older zip files, but you won't be 43 | able to recover the file attributes in those archives. Use the -J option 44 | with these files or you'll get "compressed EA data missing" and "zipfile 45 | probably corrupt" errors, even though the data is intact! 46 | 47 | The new scheme makes handling BeOS file attributes much more robust, and 48 | allows for possible future expansion without another round of 49 | incompatibilities. 50 | 51 | That's life on the edge! 52 | *** WARNING *** 53 | 54 | The new filesystem allows for huge files (up to several terabytes!) with 55 | huge amounts of meta-data (up to several terabytes!). The existing ZIP 56 | format was designed when this much data on a personal computer was 57 | science fiction; as a result, it's quite possible that large amounts of file 58 | attributes (more than maybe 100+K bytes) could be truncated. Zip and UnZip 59 | try to deal with this in a fairly sensible way, working on the assumption 60 | that the data in the file is more important than the data in the file 61 | attributes. 62 | 63 | One way to run into this problem is to mount an HFS volume and zip 64 | some Mac files that have large resources attached to them. This 65 | happens more often than you'd expect; I've seen several 0-byte files that 66 | had over four megabytes of resources. Even more stupid, these resources 67 | were _data_ (sound for a game), and could have been easily stored as 68 | data... 69 | 70 | KNOWN BUGS 71 | 72 | None! Yahoo! 73 | 74 | Please report any bugs to Zip-Bugs@lists.wku.edu. 75 | 76 | - Chris Herborth (chrish@qnx.com) 77 | November 2/1998 78 | -------------------------------------------------------------------------------- /beos/beocfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2009 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2009-Jan-02 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /*--------------------------------------------------------------------------- 10 | BeOS specific configuration section: 11 | ---------------------------------------------------------------------------*/ 12 | 13 | #ifndef __beocfg_h 14 | #define __beocfg_h 15 | 16 | #include /* [cjh]: This is pretty much a generic */ 17 | #include /* POSIX 1003.1 system; see beos/ for */ 18 | #include /* extra code to deal with our extra file */ 19 | #include /* attributes. */ 20 | #include 21 | #include 22 | #define GOT_UTIMBUF 23 | #define DIRENT 24 | #include 25 | #ifndef DATE_FORMAT 26 | # define DATE_FORMAT DF_MDY /* GRR: customize with locale.h somehow? */ 27 | #endif 28 | #define lenEOL 1 29 | #define PutNativeEOL *q++ = native(LF); 30 | #define SCREENSIZE(ttrows, ttcols) screensize(ttrows, ttcols) 31 | #define SCREENWIDTH 80 32 | #if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)) 33 | # define USE_EF_UT_TIME 34 | #endif 35 | #define SET_SYMLINK_ATTRIBS 36 | #define SET_DIR_ATTRIB 37 | #if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) 38 | # define TIMESTAMP 39 | #endif 40 | #define RESTORE_UIDGID 41 | #define NO_STRNICMP /* not in the x86 headers at least */ 42 | #define INT_SPRINTF 43 | #define SYMLINKS 44 | #define MAIN main_stub /* now that we're using a wrapper... */ 45 | 46 | /* Static variables that we have to add to Uz_Globs: */ 47 | #define SYSTEM_SPECIFIC_GLOBALS \ 48 | int created_dir, renamed_fullpath;\ 49 | char *rootpath, *buildpath, *end;\ 50 | ZCONST char *wildname;\ 51 | char *dirname, matchname[FILNAMSIZ];\ 52 | int rootlen, have_dirname, dirnamelen, notfirstcall;\ 53 | zvoid *wild_dir; 54 | 55 | /* created_dir, and renamed_fullpath are used by both mapname() and */ 56 | /* checkdir(). */ 57 | /* rootlen, rootpath, buildpath and end are used by checkdir(). */ 58 | /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ 59 | /* and notfirstcall are used by do_wild(). */ 60 | 61 | #endif /* !__beocfg_h */ 62 | -------------------------------------------------------------------------------- /beos/beos.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2004 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* beos.h -- A few handy things for the BeOS port. */ 10 | /* (c) 1997 Chris Herborth (chrish@qnx.com) */ 11 | /* This is covered under the usual Info-ZIP copyright. */ 12 | 13 | /* "#define EF_BE_FL_UNCMPR 0x01" has been moved into unzpriv.h */ 14 | #define EB_BE_FL_BADBITS 0xfe /* bits currently undefined */ 15 | 16 | #define BEOS_ASSIGN_FILETYPE 1 /* call update_mime_info() */ 17 | 18 | /* 19 | DR9 'Be' extra-field layout: 20 | 21 | 'Be' - signature 22 | ef_size - size of data in this EF (little-endian unsigned short) 23 | full_size - uncompressed data size (little-endian unsigned long) 24 | flag - flags (byte) 25 | flags & EB_BE_FL_UNCMPR = the data is not compressed 26 | flags & EB_BE_FL_BADBITS = the data is corrupted or we 27 | can't handle it properly 28 | data - compressed or uncompressed file attribute data 29 | 30 | If flag & EB_BE_FL_UNCMPR, the data is not compressed; this optimisation is 31 | necessary to prevent wasted space for files with small attributes (which 32 | appears to be quite common on the Advanced Access DR9 release). In this 33 | case, there should be ( ef_size - EB_BEOS_HLEN ) bytes of data, and full_size 34 | should equal ( ef_size - EB_BEOS_HLEN ). 35 | 36 | If the data is compressed, there will be ( ef_size - EB_BEOS_HLEN ) bytes of 37 | compressed data, and full_size bytes of uncompressed data. 38 | 39 | If a file has absolutely no attributes, there will not be a 'Be' extra field. 40 | 41 | The uncompressed data is arranged like this: 42 | 43 | attr_name\0 - C string 44 | struct attr_info (fields in big-endian format) 45 | attr_data (length in attr_info.size) 46 | */ 47 | -------------------------------------------------------------------------------- /beos/beosmain.cpp: -------------------------------------------------------------------------------- 1 | // -*- C++ -*- 2 | /* 3 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 4 | 5 | See the accompanying file LICENSE, version 2000-Apr-09 or later 6 | (the contents of which are also included in unzip.h) for terms of use. 7 | If, for some reason, all these files are missing, the Info-ZIP license 8 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 9 | */ 10 | // 11 | // WARNING: This is C++, not C! GNU C is not supported here! 12 | // 13 | // beos_init.cpp 14 | // 15 | // BeOS-specific C++ routines for use with Info-ZIP's UnZip 5.30 or later. 16 | // 17 | // This is necessary because we need to have an app_server connection to be 18 | // able to ask the system to assign a MIME type to an un-typed file. Strange 19 | // but true (the update_mime_info() call needs to send/receive messages). 20 | // 21 | // If you're writing your own Zip application, you probably DO NOT want to 22 | // include this file! 23 | 24 | #include 25 | 26 | #ifdef SFX 27 | const static char *unzip_signature = "application/x-vnd.Info-ZIP.UnZipSFX"; 28 | #else 29 | const static char *unzip_signature = "application/x-vnd.Info-ZIP.UnZip"; 30 | #endif 31 | 32 | extern "C" int main_stub( int argc, char *argv[] ); 33 | 34 | int main( int argc, char **argv ) 35 | { 36 | BApplication app( unzip_signature ); 37 | 38 | int retval = main_stub( argc, argv ); 39 | 40 | app.PostMessage( B_QUIT_REQUESTED ); 41 | app.Run(); 42 | 43 | return retval; 44 | } 45 | -------------------------------------------------------------------------------- /beos/unzip.rsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/beos/unzip.rsc -------------------------------------------------------------------------------- /beos/unzipsfx.rsc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/beos/unzipsfx.rsc -------------------------------------------------------------------------------- /bzip2/00README.IZ: -------------------------------------------------------------------------------- 1 | This folder is the root folder for the externally supplied bzip2 source code. 2 | Additionally, this folder contains the following Info-ZIP-specific files: 3 | 4 | 00README.IZ this file 5 | Makebz2.iz "generic" make script for the base bzip2 lib used in UnZip 6 | makbz2iz.msc make script for the bzip2 support, win32 port, MS VC++ 7 | makbz2iz.wat make script for bzip2 support, msdos & win32, OpenWatcom C++ 8 | descrbz2.mms MMS/MMK make script for OpenVMS 9 | buildbz2.com OpenVMS DCL procedure to build the base bz2 lib used in UnZip 10 | -------------------------------------------------------------------------------- /bzip2/Makebz2.iz: -------------------------------------------------------------------------------- 1 | # Makefile for UnZip's bzip2 support library 2 | # Unix, and other ports using sufficiently unix-compatible 3 | # library naming conventions (e.g. misc. GCC ports) 4 | # 5 | # (c) 2006-2007 Info-ZIP 6 | # Last revision: Christian Spieler, 2007-Mar-31 7 | # 8 | # This Makefile is intended to be called from UnZip's main make procedure. 9 | 10 | SHELL=/bin/sh 11 | 12 | # To assist in cross-compiling 13 | CC=gcc 14 | AR=ar 15 | RANLIB=ranlib 16 | RM=rm -f 17 | LDFLAGS= 18 | O=.o 19 | 20 | CFLAGS=-Wall -Winline -O2 -g 21 | CCBZ2DEFS=-DBZ_NO_STDIO 22 | 23 | 24 | OBJS= blocksort$(O) \ 25 | huffman$(O) \ 26 | crctable$(O) \ 27 | randtable$(O) \ 28 | compress$(O) \ 29 | decompress$(O) \ 30 | bzlib$(O) 31 | 32 | # How to compile sources 33 | .c$(O): 34 | $(CC) $(CFLAGS) $(CCBZ2DEFS) -o $@ -c $< 35 | 36 | all: libbz2.a 37 | 38 | libbz2.a: $(OBJS) 39 | -@$(RM) libbz2.a 40 | $(AR) cq libbz2.a $(OBJS) 41 | -$(RANLIB) libbz2.a 42 | 43 | clean: 44 | $(RM) $(OBJS) libbz2.a 45 | 46 | $(OBJS): bzlib.h bzlib_private.h 47 | 48 | blocksort$(O): blocksort.c 49 | huffman$(O): huffman.c 50 | crctable$(O): crctable.c 51 | randtable$(O): randtable.c 52 | compress$(O): compress.c 53 | decompress$(O): decompress.c 54 | bzlib$(O): bzlib.c 55 | -------------------------------------------------------------------------------- /bzip2/makbz2iz.msc: -------------------------------------------------------------------------------- 1 | # Makefile for UnZip's bzip2 support library 2 | # Win32 port, using Microsoft Visual C++ 6.0 3 | # 4 | # (c) 2006-2007 Info-ZIP 5 | # Last revision: Christian Spieler, 2007-Apr-03 6 | # 7 | # This Makefile is intended to be called from UnZip's main make procedure. 8 | 9 | CC=cl 10 | AR=link -lib 11 | CFLSYS = -ML -O2 -nologo 12 | CFLAGS= -D_WIN32 -DBZ_NO_STDIO $(CFLSYS) 13 | !ifndef BZROOTDIR 14 | BZROOTDIR=. 15 | !endif 16 | BZROOT=$(BZROOTDIR)/ 17 | !ifndef BZOBDIR 18 | BZOBDIR=. 19 | !endif 20 | BZOB=$(BZOBDIR)/ 21 | O=.obj 22 | 23 | 24 | OBJS= $(BZOB)blocksort$(O) \ 25 | $(BZOB)huffman$(O) \ 26 | $(BZOB)crctable$(O) \ 27 | $(BZOB)randtable$(O) \ 28 | $(BZOB)compress$(O) \ 29 | $(BZOB)decompress$(O) \ 30 | $(BZOB)bzlib$(O) 31 | 32 | izlib: $(BZOBDIR) $(BZOB)bz2.lib 33 | 34 | $(BZOBDIR) : 35 | -mkdir $@ 36 | 37 | $(BZOB)bz2.lib: $(OBJS) 38 | $(AR) $(OBJS) -out:$(BZOB)bz2.lib 39 | 40 | clean: 41 | -del $(BZOBDIR)\*$(O) 42 | -del $(BZOBDIR)\bz2.lib 43 | 44 | .c$(O): 45 | $(CC) $(CFLAGS) -c -Fo$@ $< 46 | 47 | $(OBJS) : $(BZROOT)bzlib.h $(BZROOT)bzlib_private.h 48 | 49 | $(BZOB)blocksort$(O) : $(BZROOT)blocksort.c 50 | $(CC) $(CFLAGS) -c -Fo$@ $(BZROOT)blocksort.c 51 | $(BZOB)huffman$(O) : $(BZROOT)huffman.c 52 | $(CC) $(CFLAGS) -c -Fo$@ $(BZROOT)huffman.c 53 | $(BZOB)crctable$(O) : $(BZROOT)crctable.c 54 | $(CC) $(CFLAGS) -c -Fo$@ $(BZROOT)crctable.c 55 | $(BZOB)randtable$(O) : $(BZROOT)randtable.c 56 | $(CC) $(CFLAGS) -c -Fo$@ $(BZROOT)randtable.c 57 | $(BZOB)compress$(O) : $(BZROOT)compress.c 58 | $(CC) $(CFLAGS) -c -Fo$@ $(BZROOT)compress.c 59 | $(BZOB)decompress$(O) : $(BZROOT)decompress.c 60 | $(CC) $(CFLAGS) -c -Fo$@ $(BZROOT)decompress.c 61 | $(BZOB)bzlib$(O) : $(BZROOT)bzlib.c 62 | $(CC) $(CFLAGS) -c -Fo$@ $(BZROOT)bzlib.c 63 | -------------------------------------------------------------------------------- /bzip2/makbz2iz.wat: -------------------------------------------------------------------------------- 1 | # Makefile for UnZip's bzip2 support library 2 | # MSDOS & Win32 ports, using OpenWatcom C++ 3 | # 4 | # (c) 2006-2007 Info-ZIP 5 | # Last revision: Christian Spieler, 2007-Apr-03 6 | # 7 | # This Makefile is intended to be called from UnZip's main make procedure. 8 | 9 | CC=wcc386 10 | AR=lib386 11 | CFLSYS = -6r -zt -zq -wx -s -obhikl+rt -oe100 -zp8 -q 12 | CFLAGS= $(CFLSYS) -DBZ_NO_STDIO 13 | !ifndef BZROOTDIR 14 | BZROOTDIR=. 15 | !endif 16 | BZROOT=$(BZROOTDIR)\ 17 | !ifndef BZOBDIR 18 | BZOBDIR=. 19 | !endif 20 | BZOB=$(BZOBDIR)/ 21 | O=.obj 22 | 23 | 24 | OBJS= $(BZOB)blocksort$(O) & 25 | $(BZOB)huffman$(O) & 26 | $(BZOB)crctable$(O) & 27 | $(BZOB)randtable$(O) & 28 | $(BZOB)compress$(O) & 29 | $(BZOB)decompress$(O) & 30 | $(BZOB)bzlib$(O) 31 | 32 | izlib: $(BZOBDIR) $(BZOB)bz2.lib 33 | 34 | $(BZOBDIR) : 35 | -mkdir $@ 36 | 37 | $(BZOB)bz2.lib: $(OBJS) 38 | $(AR) -nologo $(OBJS) -out:$(BZOB)bz2.lib 39 | 40 | clean: .SYMBOLIC 41 | -del $(BZOBDIR)\*$(O) 42 | -del $(BZOBDIR)\bz2.lib 43 | 44 | .c$(O): 45 | $(CC) $(CFLAGS) -fo=$@ $< 46 | 47 | $(OBJS) : $(BZROOT)bzlib.h $(BZROOT)bzlib_private.h 48 | 49 | $(BZOB)blocksort$(O) : $(BZROOT)blocksort.c 50 | $(CC) $(CFLAGS) -Fo=$@ $(BZROOT)blocksort.c 51 | $(BZOB)huffman$(O) : $(BZROOT)huffman.c 52 | $(CC) $(CFLAGS) -Fo=$@ $(BZROOT)huffman.c 53 | $(BZOB)crctable$(O) : $(BZROOT)crctable.c 54 | $(CC) $(CFLAGS) -Fo=$@ $(BZROOT)crctable.c 55 | $(BZOB)randtable$(O) : $(BZROOT)randtable.c 56 | $(CC) $(CFLAGS) -Fo=$@ $(BZROOT)randtable.c 57 | $(BZOB)compress$(O) : $(BZROOT)compress.c 58 | $(CC) $(CFLAGS) -Fo=$@ $(BZROOT)compress.c 59 | $(BZOB)decompress$(O) : $(BZROOT)decompress.c 60 | $(CC) $(CFLAGS) -Fo=$@ $(BZROOT)decompress.c 61 | $(BZOB)bzlib$(O) : $(BZROOT)bzlib.c 62 | $(CC) $(CFLAGS) -Fo=$@ $(BZROOT)bzlib.c 63 | -------------------------------------------------------------------------------- /cmsmvs/WHATSNEW.CMS: -------------------------------------------------------------------------------- 1 | Important Changes made for ZIP 2.3b and UNZIP 5.33c executables: 2 | 3 | 1. WARNING: These executables have been compiled for the 4 | Language Environment (LE). You must now have access to the file 5 | SCEERUN LOADLIB in order to run ZIP and UNZIP on CMS. You no longer 6 | need access to EDCLINK LOADLIB. The provided ZIP and UNZIP EXECs 7 | have been changed to issue a new GLOBAL LOADLIB command. You may 8 | need to modify these EXECs for your installation. You may want to 9 | change any GLOBAL LOADLIB command you may have in your PROFILE EXEC. 10 | 11 | Versions could be made available for the older EDCLINK LOADLIB 12 | runtimes upon request. 13 | 14 | 2. ZIP files will now be variable length files rather than fixed 15 | length files. 16 | 17 | 3. Help information for ZIP and UNZIP has been changed to show 18 | "fm" rather than "path" on CMS with certain options. 19 | 20 | 4. README CMS has been entirely rewritten. It now contains all 21 | information for ZIP and UNZIP. 22 | 23 | ----------------------------------------------------------------------- 24 | Greg Hartwig, April 1998. 25 | e-mail: ghartwig@ix.netcom.com 26 | ghartwig@vnet.ibm.com 27 | 28 | -------------------------------------------------------------------------------- /cmsmvs/ccunzip.exec: -------------------------------------------------------------------------------- 1 | /* CCUNZIP EXEC Compile unzip 5.4 for VM/CMS */ 2 | /* Author: George Petrov, 11 Apr 1995 (VMCOMPIL EXEC) */ 3 | /* Modified for IBM C V3R1 by Ian E. Gorman, 2 Nov 1998 4 | Facilities for compiling and testing were provided by 5 | OmniMark Technologies Corporation, Ottawa, Canada 6 | */ 7 | Address Command 8 | Signal On Error 9 | 10 | /* Allow longnames, compile re-entrant code. 11 | global.c and vmmvs.c require EXTENDED features */ 12 | CCopts = 'LONGNAME RENT LANGLVL(EXTENDED) NOEXECOPS' 13 | 14 | /* UNZIP options -- VM_CMS, REENTRANT */ 15 | CCopts = CCopts 'DEFINE(VM_CMS,REENTRANT)' 16 | 17 | /* Link the load module to run in more or less than 16MB memory */ 18 | LINKopts = 'AMODE ANY RMODE ANY RLDSAVE' 19 | 20 | 21 | 'GLOBAL TXTLIB SCEELKED CMSLIB' 22 | 'GLOBAL LOADLIB SCEERUN' 23 | 24 | 25 | /* produce the TEXT (object) files */ 26 | linklist='' 27 | modname='UNZIP' 28 | Say 'Building' modname 'MODULE...' 29 | Call Compile 'UNZIP' 30 | Call Compile 'CRC32' 31 | Call Compile 'CRYPT' 32 | Call Compile 'ENVARGS' 33 | Call Compile 'EXPLODE' 34 | Call Compile 'EXTRACT' 35 | Call Compile 'FILEIO' 36 | Call Compile 'GLOBALS' 37 | Call Compile 'INFLATE' 38 | Call Compile 'PROCESS' 39 | Call Compile 'LIST' 40 | Call Compile 'MATCH' 41 | Call Compile 'TTYIO' 42 | Call Compile 'UNREDUCE' 43 | Call Compile 'UNSHRINK' 44 | Call Compile 'ZIPINFO' 45 | Call Compile 'VMMVS' 46 | 47 | Say 'Linking...' 48 | 'EXEC CMOD' linklist '(MODNAME' modname LINKopts 49 | Say modname 'built successfully.' 50 | 51 | 52 | /* Make ZIPINFO from UNZIP */ 53 | modname = 'ZIPINFO' 54 | 'COPYFILE UNZIP MODULE A ZIPINFO MODULE A (OLDDATE REPLACE' 55 | Say modname 'built successfully.' 56 | Say 'Done.' 57 | 58 | Exit rc 59 | 60 | 61 | 62 | error: 63 | Say 'Error' rc 'during compilation!' 64 | Say 'Error in line' sigl':' 65 | Say ' 'Sourceline(sigl) 66 | Exit rc 67 | 68 | 69 | 70 | Compile: Procedure Expose CCopts LINKopts linklist 71 | Parse arg filename filetype filemode . 72 | If filetype='' Then filetype='C' 73 | linklist = linklist filename 74 | 75 | Say 'Compiling' filename filetype filemode '...' 76 | 'EXEC CC' filename filetype filemode '('CCopts 77 | Return rc 78 | -------------------------------------------------------------------------------- /cmsmvs/mc.exec: -------------------------------------------------------------------------------- 1 | /* MAKECPIP EXEC Make program to build a C/370 module */ 2 | /* Author: George Petrov, 29 Sep 1994 */ 3 | 4 | arg fn . '(' cparms /* Filter name */ 5 | 'pipe (end ?) < 'fn' makefile', /* get all source files from */ 6 | '| frlab GLOBALS:'||, 7 | '| drop', 8 | '| strip', 9 | '| var globals' 10 | cparms = cparms globals 11 | say '' 12 | say 'Compile options : 'cparms 13 | say '' 14 | if pos('REB',cparms) > 0 then do 15 | parse var cparms cp1 'REB' . ' ' cp2 /* REBuild options specified ? */ 16 | cparms = cp1||cp2 17 | pipe1=, 18 | 'pipe (end ?) < 'fn' makefile', /* get all source files from */ 19 | '| nfind *'||, /* the makefile and compile */ 20 | '| frlab TEXT:'||, /* only the those who are */ 21 | '| r: tolab MODULE:'||, /* changed or never compiled */ 22 | '| drop', 23 | '| o: fanout', 24 | '| chop before str /(/', 25 | '| statew', 26 | '| c: fanout', /* compiled */ 27 | '| specs /Compiling / 1 w1-3 n / .../ n', 28 | '| cons' 29 | end 30 | else do 31 | pipe1=, 32 | 'pipe (end ?) < 'fn' makefile', /* get all source files from */ 33 | '| nfind *'||, /* the makefile and compile */ 34 | '| frlab TEXT:'||, /* only the those who are */ 35 | '| r: tolab MODULE:'||, /* changed or never compiled */ 36 | '| drop', 37 | '| o: fanout', 38 | '| specs w1 1 /C/ nw w3 nw write w1 1 /TEXT A/ nw', 39 | '| chop before str /(/', 40 | '| statew', 41 | '| change (57 66) / /0/', 42 | '| sort 1.8 d', /* sort the date and time */ 43 | '| uniq 1-17 singles', /* if the first is a source */ 44 | '| sort 1.8 d 64.2 d 57.2 d 60.2 d 66.8 d', /* sort the date */ 45 | '| uniq 1-8 first', /* if the first is a source */ 46 | '| locate 9.8 /C /', /* program then it has to be */ 47 | '| c: fanout', /* compiled */ 48 | '| specs /Compiling / 1 w1-3 n / .../ n', 49 | '| cons' 50 | end 51 | pipe2= '?', 52 | 'r:', 53 | '| drop', 54 | '| specs w1 1', /* save the module name in var */ 55 | '| var module', 56 | '?', 57 | 'o:', 58 | '| specs w1 1', 59 | '| join * / /', 60 | '| var texts', /* save all the text file names */ 61 | '?', /* for later include */ 62 | 'c:', 63 | '| specs /CC / 1 w1-3 n /(NOTERM 'cparms'/ nw', /* compile! */ 64 | '| err: cms | cons', 65 | '?', 66 | 'err:', 67 | '| nfind 0'||, 68 | '| var err', 69 | '| specs /----> Errors found! RC=/ 1 1-* n', 70 | '| cons' 71 | /* '| g: gate'*/ 72 | pipe1 pipe2 73 | say '' 74 | if symbol('err') = 'VAR' & err ^= 0 then do 75 | say 'Errors found in source files - link aborted! RC = 'err 76 | exit err 77 | end 78 | say 'Generating module 'module 79 | 'pipe cms cmod' fn texts' | > 'fn' LINK A' 80 | exit rc 81 | error: 82 | say 'Error in REXX detected!' 83 | Say 'Syntax error on line' Sigl':' Sourceline(Sigl) 84 | Say 'Error was:' Errortext(RC) 85 | return rc 86 | -------------------------------------------------------------------------------- /cmsmvs/unzip.exec: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* Front-end EXEC to set up linkage to the C runtime libraries */ 4 | /* before executing a MODULE generated from C code. */ 5 | /* */ 6 | /* Copy this file as an EXEC with a filename matching the C MODULE. */ 7 | /* */ 8 | /* Greg Hartwig (ghartwig@vnet.ibm.com) 7/31/97, 4/24/98. */ 9 | /* */ 10 | /***********************************************************************/ 11 | Address Command 12 | Parse Arg argstring 13 | Parse Source . . myname . 14 | 15 | /* Set output and input character translation so brackets show up */ 16 | 'SET OUTPUT AD' 'BA'x 17 | 'SET OUTPUT BD' 'BB'x 18 | 'SET INPUT BA AD' 19 | 'SET INPUT BB BD' 20 | 21 | Call CLIB 22 | If rc<>0 Then Do 23 | Say 'The required C runtime libraries don''t appear to be available.' 24 | Say myname 'can not run.' 25 | Exit 12 26 | End 27 | 28 | /* Run the command */ 29 | myname argstring 30 | Exit rc 31 | 32 | 33 | 34 | 35 | /* Contents of the CLIB EXEC, modified for RC checking. */ 36 | /* Removed TXTLIB setting. Only LOADLIB needed for execution. */ 37 | CLIB: 38 | /***************************************************/ 39 | /* SET UP LIBRARIES FOR LE for MVS & VM */ 40 | /***************************************************/ 41 | Address COMMAND 42 | 43 | loadlib ='EDCLINK' /* C/370 runtime */ 44 | loadlib ='SCEERUN' /* LE runtime */ 45 | 46 | 47 | theirs=queued() /* old stack contentsM068*/ 48 | 'QUERY LOADLIB ( LIFO' /* old setting M068*/ 49 | LoadlibList='' /* init list M068*/ 50 | rc=0 51 | Do while queued()^=theirs /* all lines from cmdM068*/ 52 | Parse upper pull 'LOADLIB' '=' Ltemp /* get one line M068*/ 53 | LoadlibList= Ltemp Loadliblist /* was stacked LIFO M068*/ 54 | End /*M068*/ 55 | If loadlibList='NONE' , 56 | Then Do 57 | 'GLOBAL LOADLIB' Loadlib /* enforce what we need */ 58 | End 59 | Else Do 60 | Do xx=1 to Words(loadlib) 61 | If Find(loadliblist,word(loadlib,xx)) = 0 , 62 | then loadliblist = loadliblist word(loadlib,xx) 63 | End 64 | 'GLOBAL LOADLIB' loadliblist /* enforce what we need */ 65 | End 66 | Return 67 | -------------------------------------------------------------------------------- /cmsmvs/unzip.makefile: -------------------------------------------------------------------------------- 1 | * This is a comment 2 | * this makefile compiles filter UNZIP 3 | 4 | GLOBALS: 5 | long def(VM_CMS) 6 | TEXT: 7 | unzip c 8 | crc32 c 9 | crypt c 10 | envargs c 11 | explode c 12 | extract c 13 | fileio c 14 | globals c 15 | inflate c 16 | list c 17 | match c 18 | process c 19 | ttyio c 20 | unreduce c 21 | unshrink c 22 | zipinfo c 23 | vmmvs c 24 | MODULE: 25 | unzip module 26 | -------------------------------------------------------------------------------- /cmsmvs/unzvmc.exec: -------------------------------------------------------------------------------- 1 | /* VMCOMPIL EXEC Unzip compile for VM/CMS */ 2 | /* Author : George Petrov, 11 Apr 1995 */ 3 | 4 | signal on error 5 | 6 | parms = '(long def(VM_CMS)' 7 | /* Add local options */ 8 | /* "TARGET(COMPAT)" is required for V2.2 compiler */ 9 | parms = parms 'TARGET(COMPAT) SOURCE' 10 | 11 | 12 | say 'Compiling UNZIP C...' 13 | 'cc unzip c 'parms 14 | say 'Compiling CRC32 C...' 15 | 'cc crc32 c 'parms 16 | say 'Compiling CRYPT C...' 17 | 'cc crypt c 'parms 18 | say 'Compiling ENVARGS C...' 19 | 'cc envargs c 'parms 20 | say 'Compiling EXPLODE C...' 21 | 'cc explode c 'parms 22 | say 'Compiling EXTRACT C...' 23 | 'cc extract c 'parms 24 | say 'Compiling FILEIO C...' 25 | 'cc fileio c 'parms 26 | say 'Compiling GLOBALS C...' 27 | 'cc globals c 'parms 28 | say 'Compiling INFLATE C...' 29 | 'cc inflate c 'parms 30 | say 'Compiling PROCESS C...' 31 | 'cc process c 'parms 32 | say 'Compiling LIST C...' 33 | 'cc list c 'parms 34 | say 'Compiling MATCH C...' 35 | 'cc match c 'parms 36 | say 'Compiling TTYIO C...' 37 | 'cc ttyio c 'parms 38 | say 'Compiling UNREDUCE C...' 39 | 'cc unreduce c 'parms 40 | say 'Compiling UNSHRINK C...' 41 | 'cc unshrink c 'parms 42 | say 'Compiling ZIPINFO C...' 43 | 'cc zipinfo c 'parms 44 | say 'Compiling VMMVS C...' 45 | 'cc vmmvs c 'parms 46 | 47 | say 'Linking all files...' 48 | 'cmod unzip unzip crc32 crypt envargs explode extract fileio globals', 49 | 'inflate list match process ttyio unreduce unshrink zipinfo vmmvs' 50 | say 'All Done!' 51 | say "To run enter : UNZIP parms" 52 | exit rc 53 | 54 | error: 55 | say 'Error during compilation!' 56 | exit rc 57 | -------------------------------------------------------------------------------- /cmsmvs/vmmvs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2008 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2007-Mar-04 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* vmmvs.h: include file for both VM/CMS and MVS ports of UnZip */ 10 | #ifndef __vmmvs_h /* prevent multiple inclusions */ 11 | #define __vmmvs_h 12 | 13 | #ifndef NULL 14 | # define NULL (zvoid *)0 15 | #endif 16 | 17 | #ifdef MVS 18 | # define _POSIX_SOURCE /* tell MVS we want full definitions */ 19 | # define NO_STRNICMP /* MVS has no strnicmp() */ 20 | # include 21 | /* MVS complains if a function has the same name as a csect. */ 22 | # if defined(__UNZIP_C) 23 | # pragma csect(STATIC,"unzip_s") 24 | # elif defined(__CRC32_C) 25 | # pragma csect(STATIC,"crc32_s") 26 | # elif defined(__ENVARGS_C) 27 | # pragma csect(STATIC,"envarg_s") 28 | # elif defined(__EXPLODE_C) 29 | # pragma csect(STATIC,"explod_s") 30 | # elif defined(__INFLATE_C) 31 | # pragma csect(STATIC,"inflat_s") 32 | # elif defined(__MATCH_C) 33 | # pragma csect(STATIC,"match_s") 34 | # elif defined(__UNREDUCE_C) 35 | # pragma csect(STATIC,"unredu_s") 36 | # elif defined(__UNSHRINK_C) 37 | # pragma csect(STATIC,"unshri_s") 38 | # elif defined(__ZIPINFO_C) 39 | # pragma csect(STATIC,"zipinf_s") 40 | # endif 41 | #endif /* MVS */ 42 | 43 | #include /* the usual non-BSD time functions */ 44 | #ifdef VM_CMS 45 | # include "vmstat.h" 46 | #endif 47 | #ifdef MVS 48 | # include 49 | #endif 50 | 51 | #define PASSWD_FROM_STDIN 52 | /* Kludge until we know how to open a non-echo tty channel */ 53 | 54 | #define EBCDIC 55 | /* In the context of Info-ZIP, a portable "text" mode file implies the use of 56 | an ASCII-compatible (ISO 8859-1, or other extended ASCII) code page. */ 57 | 58 | #ifdef MORE 59 | # undef MORE 60 | #endif 61 | 62 | /* Workarounds for missing RTL functionality */ 63 | #define isatty(t) 1 64 | 65 | #ifdef UNZIP /* definitions for UNZIP */ 66 | 67 | #define INBUFSIZ 8192 68 | 69 | #define USE_STRM_INPUT 70 | #define USE_FWRITE 71 | 72 | #define PATH_MAX 128 73 | 74 | #ifndef QUERY_TRNEWLN 75 | # define QUERY_TRNEWLN /* terminate interaction queries with '\n' */ 76 | #endif 77 | 78 | #ifndef DATE_FORMAT 79 | # define DATE_FORMAT DF_MDY 80 | #endif 81 | #define lenEOL 1 82 | /* The use of "ebcdic[LF]" is not reliable; VM/CMS C/370 uses the 83 | * EBCDIC specific "NL" ('NewLine') control character (and not the EBCDIC 84 | * equivalent of the ASCII "LF" ('LineFeed')) as line terminator! 85 | * To work around this problem, we explicitely emit the C compiler's native 86 | * '\n' line terminator. 87 | */ 88 | #if 0 89 | #define PutNativeEOL *q++ = native(LF); 90 | #else 91 | #define PutNativeEOL *q++ = '\n'; 92 | #endif 93 | 94 | #endif /* UNZIP */ 95 | 96 | #endif /* !__vmmvs_h */ 97 | -------------------------------------------------------------------------------- /cmsmvs/vmstat.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef __vmstat_h 10 | #define __vmstat_h 11 | 12 | /* stat.h definitions */ 13 | 14 | #ifndef _INO_T_DEFINED 15 | typedef unsigned short ino_t; /* i-node number (not used on DOS) */ 16 | #define _INO_T_DEFINED 17 | #endif 18 | 19 | #ifndef _DEV_T_DEFINED 20 | typedef short dev_t; /* device code */ 21 | #define _DEV_T_DEFINED 22 | #endif 23 | 24 | #ifndef _OFF_T_DEFINED 25 | typedef long off_t; /* file offset value */ 26 | #define _OFF_T_DEFINED 27 | #endif 28 | 29 | #ifndef _STAT_DEFINED 30 | struct stat { 31 | dev_t st_dev; 32 | ino_t st_ino; 33 | short st_mode; 34 | short st_nlink; 35 | int st_uid; 36 | int st_gid; 37 | off_t st_size; 38 | time_t st_atime; 39 | time_t st_mtime; 40 | time_t st_ctime; 41 | }; 42 | #define _STAT_DEFINED 43 | #endif 44 | 45 | int stat(const char *path, struct stat *buf); 46 | int fstat(int fd, struct stat *buf); 47 | 48 | #define S_IFMT 0xFFFF 49 | #define _FLDATA(m) (*(fldata_t *) &m) 50 | #define S_ISDIR(m) (_FLDATA(m).__dsorgPDSdir) 51 | #define S_ISREG(m) (_FLDATA(m).__dsorgPO | \ 52 | _FLDATA(m).__dsorgPDSmem | \ 53 | _FLDATA(m).__dsorgPS) 54 | #define S_ISBLK(m) (_FLDATA(m).__recfmBlk) 55 | #define S_ISMEM(m) (_FLDATA(m).__dsorgMem) 56 | 57 | #endif /* __vmstat_h */ 58 | -------------------------------------------------------------------------------- /cmsmvs/zipinfo.exec: -------------------------------------------------------------------------------- 1 | /***********************************************************************/ 2 | /* */ 3 | /* Front-end EXEC to set up linkage to the C runtime libraries */ 4 | /* before executing a MODULE generated from C code. */ 5 | /* */ 6 | /* Copy this file as an EXEC with a filename matching the C MODULE. */ 7 | /* */ 8 | /* Greg Hartwig (ghartwig@vnet.ibm.com) 7/31/97, 4/24/98. */ 9 | /* */ 10 | /***********************************************************************/ 11 | Address Command 12 | Parse Arg argstring 13 | Parse Source . . myname . 14 | 15 | /* Set output and input character translation so brackets show up */ 16 | 'SET OUTPUT AD' 'BA'x 17 | 'SET OUTPUT BD' 'BB'x 18 | 'SET INPUT BA AD' 19 | 'SET INPUT BB BD' 20 | 21 | Call CLIB 22 | If rc<>0 Then Do 23 | Say 'The required C runtime libraries don''t appear to be available.' 24 | Say myname 'can not run.' 25 | Exit 12 26 | End 27 | 28 | /* Run the command */ 29 | myname argstring 30 | Exit rc 31 | 32 | 33 | 34 | 35 | /* Contents of the CLIB EXEC, modified for RC checking. */ 36 | /* Removed TXTLIB setting. Only LOADLIB needed for execution. */ 37 | CLIB: 38 | /***************************************************/ 39 | /* SET UP LIBRARIES FOR LE for MVS & VM */ 40 | /***************************************************/ 41 | Address COMMAND 42 | 43 | loadlib ='EDCLINK' /* C/370 runtime */ 44 | loadlib ='SCEERUN' /* LE runtime */ 45 | 46 | 47 | theirs=queued() /* old stack contentsM068*/ 48 | 'QUERY LOADLIB ( LIFO' /* old setting M068*/ 49 | LoadlibList='' /* init list M068*/ 50 | rc=0 51 | Do while queued()^=theirs /* all lines from cmdM068*/ 52 | Parse upper pull 'LOADLIB' '=' Ltemp /* get one line M068*/ 53 | LoadlibList= Ltemp Loadliblist /* was stacked LIFO M068*/ 54 | End /*M068*/ 55 | If loadlibList='NONE' , 56 | Then Do 57 | 'GLOBAL LOADLIB' Loadlib /* enforce what we need */ 58 | End 59 | Else Do 60 | Do xx=1 to Words(loadlib) 61 | If Find(loadliblist,word(loadlib,xx)) = 0 , 62 | then loadliblist = loadliblist word(loadlib,xx) 63 | End 64 | 'GLOBAL LOADLIB' loadliblist /* enforce what we need */ 65 | End 66 | Return 67 | -------------------------------------------------------------------------------- /consts.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2001 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /*--------------------------------------------------------------------------- 10 | 11 | consts.h 12 | 13 | This file contains global, initialized variables that never change. It is 14 | included by unzip.c and windll/windll.c. 15 | 16 | ---------------------------------------------------------------------------*/ 17 | 18 | 19 | /* And'ing with mask_bits[n] masks the lower n bits */ 20 | ZCONST unsigned near mask_bits[17] = { 21 | 0x0000, 22 | 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 23 | 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff 24 | }; 25 | 26 | ZCONST char Far VersionDate[] = UZ_VERSION_DATE; /* now defined in unzvers.h */ 27 | 28 | #ifndef SFX 29 | ZCONST char Far EndSigMsg[] = 30 | "\nnote: didn't find end-of-central-dir signature at end of central dir.\n"; 31 | #endif 32 | 33 | ZCONST char Far CentSigMsg[] = 34 | "error: expected central file header signature not found (file #%lu).\n"; 35 | ZCONST char Far SeekMsg[] = 36 | "error [%s]: attempt to seek before beginning of zipfile\n%s"; 37 | ZCONST char Far FilenameNotMatched[] = "caution: filename not matched: %s\n"; 38 | ZCONST char Far ExclFilenameNotMatched[] = 39 | "caution: excluded filename not matched: %s\n"; 40 | 41 | #ifdef VMS 42 | ZCONST char Far ReportMsg[] = "\ 43 | (please check that you have transferred or created the zipfile in the\n\ 44 | appropriate BINARY mode--this includes ftp, Kermit, AND unzip'd zipfiles)\n"; 45 | #else 46 | ZCONST char Far ReportMsg[] = "\ 47 | (please check that you have transferred or created the zipfile in the\n\ 48 | appropriate BINARY mode and that you have compiled UnZip properly)\n"; 49 | #endif 50 | 51 | #ifndef SFX 52 | ZCONST char Far Zipnfo[] = "zipinfo"; 53 | ZCONST char Far CompiledWith[] = "Compiled with %s%s for %s%s%s%s.\n\n"; 54 | #endif 55 | -------------------------------------------------------------------------------- /crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2008 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* crc32.h -- compute the CRC-32 of a data stream 10 | * Copyright (C) 1995 Mark Adler 11 | * For conditions of distribution and use, see copyright notice in zlib.h 12 | */ 13 | 14 | #ifndef __crc32_h 15 | #define __crc32_h /* identifies this source module */ 16 | 17 | /* This header should be read AFTER zip.h resp. unzip.h 18 | * (the latter with UNZIP_INTERNAL defined...). 19 | */ 20 | 21 | #ifndef OF 22 | # define OF(a) a 23 | #endif 24 | #ifndef ZCONST 25 | # define ZCONST const 26 | #endif 27 | 28 | #ifdef DYNALLOC_CRCTAB 29 | void free_crc_table OF((void)); 30 | #endif 31 | #ifndef USE_ZLIB 32 | ZCONST ulg near *get_crc_table OF((void)); 33 | #endif 34 | #if (defined(USE_ZLIB) || defined(CRC_TABLE_ONLY)) 35 | # ifdef IZ_CRC_BE_OPTIMIZ 36 | # undef IZ_CRC_BE_OPTIMIZ 37 | # endif 38 | #else /* !(USE_ZLIB || CRC_TABLE_ONLY) */ 39 | ulg crc32 OF((ulg crc, ZCONST uch *buf, extent len)); 40 | #endif /* ?(USE_ZLIB || CRC_TABLE_ONLY) */ 41 | 42 | #ifndef CRC_32_TAB 43 | # define CRC_32_TAB crc_32_tab 44 | #endif 45 | 46 | #ifdef CRC32 47 | # undef CRC32 48 | #endif 49 | #ifdef IZ_CRC_BE_OPTIMIZ 50 | # define CRC32UPD(c, crctab) (crctab[((c) >> 24)] ^ ((c) << 8)) 51 | # define CRC32(c, b, crctab) (crctab[(((int)(c) >> 24) ^ (b))] ^ ((c) << 8)) 52 | # define REV_BE(w) (((w)>>24)+(((w)>>8)&0xff00)+ \ 53 | (((w)&0xff00)<<8)+(((w)&0xff)<<24)) 54 | #else 55 | # define CRC32UPD(c, crctab) (crctab[((int)(c)) & 0xff] ^ ((c) >> 8)) 56 | # define CRC32(c, b, crctab) (crctab[((int)(c) ^ (b)) & 0xff] ^ ((c) >> 8)) 57 | # define REV_BE(w) w 58 | #endif 59 | 60 | #endif /* !__crc32_h */ 61 | -------------------------------------------------------------------------------- /file_id.diz: -------------------------------------------------------------------------------- 1 | Info-ZIP's UnZip 6.0: generic C sources 2 | Complete C source code for Info-ZIP's 3 | PKUNZIP-compatible .zip extractor, for 4 | all supported compilers and platforms 5 | (Unix, OS/2, MS-DOS, NT, VMS, Amiga, 6 | Atari, Mac, Acorn, VM/CMS, etc.), plus 7 | lots of pretty decent documentation. 8 | This is FREE (but copyrighted) software. 9 | See LICENSE for details on distribution 10 | and reuse. 11 | -------------------------------------------------------------------------------- /flexos/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "flexos" subdirectory for UnZip 5.32 and later: 2 | 3 | Contents this file 4 | README notes about limitations and assumptions of the FlexOS port 5 | flexos.c OS-dependent UnZip routines for FlexOS 6 | flxcfg.h OS-dependent configuration, included by unzpriv.h 7 | hc.pro profile for MetaWare High C 8 | makefile makefile for MetaWare High C, PAMAKE 9 | -------------------------------------------------------------------------------- /flexos/README: -------------------------------------------------------------------------------- 1 | This should be considered an initial port - there will probably be some 2 | bugs and non-functioning features. 3 | 4 | The only functionality that has had any real testing is "unzip filename", 5 | anything else is basically untested. 6 | 7 | This has been cross-compiled from DOS using Metaware's High C compiler 8 | and the DOS version of pamake (v3.0). It should compile with the FlexOS 9 | hosted version of HighC, and the makefile could be converted to work 10 | with the native FlexOS make. 11 | 12 | The following considerations apply: 13 | 14 | )Compiled against and linked with portlib. 15 | )Used on FlexOS 286 v2.32 16 | )Volume labels are not supported - this is due to the way FlexOS decides 17 | if a drive has case-sensitive filenames based upon the contents of the 18 | volume label. 19 | )No special handling for case-sensitive media (see above). 20 | )Not using the PORTLIB wildarg routine (i.e., UnZip does its own globbing). 21 | )Based upon the MSDOS port. 22 | )Filenames are in FAT format. 23 | )The current version of getch is a cheat (simply using getchar()). I 24 | should interrogate stdin and if it's a FlexOS console use special code 25 | to turn off echo and just read one char. 26 | )Only the basic MSDOS FAT file attributes are saved/restored. There is 27 | currently no support for the FlexOS extended file attributes. 28 | )There is some code that should attempt to do the correct thing when a 29 | pathspec with a logical name definition is used (e.g., "system:path/to/it"); 30 | however it again has not been stress-tested. 31 | )There is no special handling for floppy drives, there probably should 32 | be. 33 | )The dateformat is compiled in as DMY (shoot me I'm British), I'm not 34 | sure if there is actually a way to get locale info. 35 | )The assembler speedups haven't yet been ported to ASM86 (should simply 36 | be a change of syntax) 37 | 38 | -- 39 | D.Fawcus 17 July 1997 40 | -------------------------------------------------------------------------------- /flexos/flxcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /*--------------------------------------------------------------------------- 10 | FlexOS specific configuration section: 11 | ---------------------------------------------------------------------------*/ 12 | 13 | #ifndef __flxcfg_h 14 | #define __flxcfg_h 15 | 16 | #define __16BIT__ 17 | #define MED_MEM 18 | #define EXE_EXTENSION ".286" 19 | 20 | #ifndef nearmalloc 21 | # define nearmalloc malloc 22 | # define nearfree free 23 | #endif 24 | 25 | #define CRTL_CP_IS_OEM 26 | 27 | #define near 28 | #define far 29 | 30 | #endif /* !__flxcfg_h */ 31 | -------------------------------------------------------------------------------- /flexos/hc.pro: -------------------------------------------------------------------------------- 1 | pragma Off(Floating_point); 2 | pragma On(286); 3 | pragma On(Literals_in_code); 4 | pragma On(Warn); 5 | pragma On(pointers_compatible); 6 | pragma On(Callee_pops_when_possible); 7 | 8 | pragma On(Auto_reg_alloc); 9 | pragma On(Const_in_Code); 10 | pragma On(Read_only_strings); 11 | pragma On(Optimize_for_space); 12 | 13 | pragma Off(Prototype_override_warnings); 14 | pragma Off(Quiet); 15 | pragma Off(Asm); 16 | pragma Off(flexview); 17 | 18 | #define PORTLIB 19 | #define FLEXOS 1 20 | -------------------------------------------------------------------------------- /human68k/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "human68k" sub-archive for UnZip 5.50 and later: 2 | 3 | Contents this file 4 | Makefile (shorter) Makefile for GNU C on X680x0/Human68k 5 | human68k.c Human68k-specific routines for UnZip 6 | crc_68.s assembler version of crc32.c 7 | flate.s assembler version of inflate_codes() (define ASM_INFLATECODES) 8 | -------------------------------------------------------------------------------- /inflate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* inflate.h for UnZip -- by Mark Adler 10 | version c14f, 23 November 1995 */ 11 | 12 | 13 | /* Copyright history: 14 | - Starting with UnZip 5.41 of 16-April-2000, this source file 15 | is covered by the Info-Zip LICENSE cited above. 16 | - Prior versions of this source file, found in UnZip source packages 17 | up to UnZip 5.40, were put in the public domain. 18 | The original copyright note by Mark Adler was: 19 | "You can do whatever you like with this source file, 20 | though I would prefer that if you modify it and 21 | redistribute it that you include comments to that effect 22 | with your name and the date. Thank you." 23 | 24 | History: 25 | vers date who what 26 | ---- --------- -------------- ------------------------------------ 27 | c14 12 Mar 93 M. Adler made inflate.c standalone with the 28 | introduction of inflate.h. 29 | c14d 28 Aug 93 G. Roelofs replaced flush/FlushOutput with new version 30 | c14e 29 Sep 93 G. Roelofs moved everything into unzip.h; added crypt.h 31 | c14f 23 Nov 95 G. Roelofs added UNZIP_INTERNAL to accommodate newly 32 | split unzip.h 33 | */ 34 | 35 | #define UNZIP_INTERNAL 36 | #include "unzip.h" /* provides slide[], typedefs and macros */ 37 | #ifdef FUNZIP 38 | # include "crypt.h" /* provides NEXTBYTE macro for crypt version of funzip */ 39 | #endif 40 | -------------------------------------------------------------------------------- /macos/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "macos" sub-archive for UnZip 5.42 and later: 2 | 3 | Contents this file 4 | README.TXT Dirk Haase's infos on updated Macintosh ports of Zip/UnZip 5 | HISTORY.TXT Dirk Haase's MacOS specific ChangeLog 6 | 7 | UnZp.h config header used to build standalone app with GUI 8 | UnZpLib.h config header used to build a static library 9 | UnZpSFX.h config header used to build the SFX stub 10 | UnZpSx.h config header for building a standalone app. with MW Sioux 11 | UnZpPrj.xml Metrowerks CodeWarrior pro5 project file (xml export file) 12 | 13 | source/ subdirectory containing all sources: 14 | a) UnZip specific code 15 | macbin3.c macbinary III code, used for extraction of ZipIt archives 16 | macbin3.h macbinary III header, macbinary docu + public prototyping 17 | macos.c Mac-specific filesystem code 18 | maccfg.h Mac-specific configuration and global declarations 19 | macdir.c Macintosh Posix-style directory emulation ("dirent") 20 | macdir.h header file for directory emulation 21 | macscreen.c screen functions to be used in standalone UnZip application 22 | macstat.c Macintosh stat() emulation 23 | macstat.h header file for stat() emulation 24 | macunzip.c Macintosh standalone version main function 25 | sxunzip.c main function for use with static library (SIOUX) 26 | unzip_rc.hqx UnZip resource file for standalone application (BinHex) 27 | 28 | b) general utilities shared between Zip and UnZip 29 | charmap.h character mapping tables ISO 8859-1 <--> MacRoman 30 | getenv.c simulation of unix compatible getenv() on MacOS 31 | helpers.c some helper functions 32 | helpers.h 33 | macstuff.h wrapper to pull in some "MoreFiles" filemanager stuff 34 | mactime.c replacement for broken Metrowerks RTL time functions 35 | mactime.h 36 | pathname.c functions for handling MacOS HFS path- /filenames 37 | pathname.h 38 | 39 | The new UnZpPrj.hqx project file should be "un-BinHex'ed" into UnZpPrj, 40 | which builds the following targets: 41 | Unzip (68k) -> standalone unzip for 68k 42 | Unzip (PPC) -> standalone unzip for PPC 43 | Unzip Lib (68k) -> static library 68k 44 | Unzip Lib (PPC) -> static library PPC 45 | Unzip Sioux (68k) -> MW Sioux standoalone App, good for debugging 46 | Unzip Sioux (PPC) -> MW Sioux standoalone App, good for debugging 47 | 48 | 49 | Before you start a build on your Macintosh: 50 | 51 | Extract "*.hqx" and "source:*.hqx" first! 52 | And PLEASE, read the MacOS specific documentation in README.TXT! 53 | 54 | 55 | The resource files and the compiler project files are in BinHex form because 56 | they contain Macintosh resource forks. The resource info cannot be 57 | maintained when handling (e.g. repacking) the master source collection on 58 | non-Macintosh systems. The BinHex form is the traditional way for 59 | transferring such files via non-Macintosh systems. 60 | It's also the safest since it uses only printable characters. The ".hqx" 61 | files must be converted with StuffitExpander or BinHex 4.0 (or equivalent) 62 | on a Macintosh system before using them. 63 | -------------------------------------------------------------------------------- /macos/UnZpPrj.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/macos/UnZpPrj.xml -------------------------------------------------------------------------------- /macos/source/helpers.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2001 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef HELPERS_H 10 | #define HELPERS_H 1 11 | 12 | /* Convert a C string to a Pascal string */ 13 | unsigned char *CToPCpy(unsigned char *pstr, char *cstr); 14 | 15 | /* Convert a Pascal string to a C string */ 16 | char *PToCCpy(unsigned char *pstr, char *cstr); 17 | 18 | char *sstrcpy(char *to,const char *from); 19 | char *sstrcat(char *to,const char *from); 20 | 21 | char *StrCalloc(unsigned short size); 22 | char *StrFree(char *strPtr); 23 | 24 | char *sBit2Str(unsigned short value); 25 | 26 | void print_extra_info(void); 27 | 28 | int ParseArguments(char *s, char ***arg); 29 | void PrintArguments(int argc, char **argv); 30 | 31 | Boolean IsZipFile(char *name); 32 | OSErr printerr(const char *msg, int cond, int err, int line, char *file, 33 | const char *msg2); 34 | int PrintUserHFSerr(int cond, int err, char *msg2); 35 | 36 | short CheckMountedVolumes(char *FullPath); 37 | void DoWarnUserDupVol(char *path); 38 | 39 | void PrintFileInfo(void); 40 | 41 | int stricmp(const char *p1, const char *p2); 42 | void leftStatusString(char *status); 43 | void rightStatusString(char *status); 44 | 45 | Boolean isZipFile(FSSpec *fileToOpen); 46 | 47 | unsigned long MacFileDate_to_UTime(unsigned long mactime); 48 | Boolean CheckForSwitch(char *Switch, int argc, char **argv); 49 | 50 | void MakeCompatibleString(char *MacOS_Str, 51 | const char SpcChar1, const char SpcChar2, 52 | const char SpcChar3, const char SpcChar4, 53 | short CurrTextEncodingBase); 54 | 55 | #define MAX_ARGS 25 56 | 57 | #endif /* HELPERS_H */ 58 | -------------------------------------------------------------------------------- /macos/source/macdir.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /***************************************************************** 10 | * 11 | * dirent.h 12 | * 13 | *****************************************************************/ 14 | 15 | #ifndef __DIRENT_H 16 | #define __DIRENT_H 17 | 18 | #include 19 | 20 | #ifndef EINVAL 21 | #define EINVAL 9 22 | #endif 23 | 24 | #ifndef EIO 25 | #define EIO 10 26 | #endif 27 | 28 | #ifndef ENOTDIR 29 | #define ENOTDIR 20 30 | #endif 31 | 32 | #ifndef ENOENT 33 | #define ENOENT 39 34 | #endif 35 | 36 | #ifndef NAME_MAX 37 | #define NAME_MAX 1024 38 | #endif 39 | 40 | struct dirent { 41 | unsigned long d_fileno; 42 | short d_reclen; 43 | short d_namlen; 44 | char d_name[NAME_MAX + 1]; 45 | }; 46 | 47 | typedef struct { 48 | short ioFDirIndex; 49 | short ioVRefNum; 50 | long ioDrDirID; 51 | short flags; 52 | struct dirent currEntry; 53 | } DIR; 54 | 55 | #define direct dirent 56 | 57 | DIR *opendir(char *); 58 | struct dirent *readdir(DIR *); 59 | void rewinddir(DIR *); 60 | int closedir(DIR *); 61 | 62 | #endif /* !__DIRENT_H */ 63 | -------------------------------------------------------------------------------- /macos/source/macstat.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /***************************************************************** 10 | * 11 | * stat.h 12 | * 13 | *****************************************************************/ 14 | 15 | #ifndef __macstat_h 16 | #define __macstat_h 17 | 18 | #include 19 | typedef long dev_t; 20 | typedef long ino_t; 21 | typedef long off_t; 22 | 23 | #define _STAT 24 | 25 | struct stat { 26 | dev_t st_dev; 27 | ino_t st_ino; 28 | unsigned short st_mode; 29 | short st_nlink; 30 | short st_uid; 31 | short st_gid; 32 | dev_t st_rdev; 33 | off_t st_size; 34 | time_t st_atime, st_mtime, st_ctime; 35 | long st_blksize; 36 | long st_blocks; 37 | }; 38 | 39 | #define S_IFMT 0xF000 40 | #define S_IFIFO 0x1000 41 | #define S_IFCHR 0x2000 42 | #define S_IFDIR 0x4000 43 | #define S_IFBLK 0x6000 44 | #define S_IFREG 0x8000 45 | #define S_IFLNK 0xA000 46 | #define S_IFSOCK 0xC000 47 | #define S_ISUID 0x800 48 | #define S_ISGID 0x400 49 | #define S_ISVTX 0x200 50 | #define S_IREAD 0x100 51 | #define S_IWRITE 0x80 52 | #define S_IEXEC 0x40 53 | 54 | #define S_IRUSR 00400 55 | #define S_IWUSR 00200 56 | #define S_IXUSR 00100 57 | #define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) /* = 00700 */ 58 | 59 | #define S_IRGRP 00040 60 | #define S_IWGRP 00020 61 | #define S_IXGRP 00010 62 | #define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) /* = 00070 */ 63 | 64 | #define S_IROTH 00004 65 | #define S_IWOTH 00002 66 | #define S_IXOTH 00001 67 | #define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) /* = 00007 */ 68 | 69 | 70 | extern int UZmacstat(const char *path, struct stat *buf); 71 | 72 | #endif /* !__macstat_h */ 73 | -------------------------------------------------------------------------------- /macos/source/macstuff.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2001 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef _MACSTUFF_H 10 | #define _MACSTUFF_H 1 11 | 12 | #include "MoreFilesExtras.h" 13 | #include "MoreDesktopMgr.h" 14 | #include "MoreFiles.h" 15 | #include "FSpCompat.h" 16 | #include "FullPath.h" 17 | 18 | #endif /* _MACSTUFF_H */ 19 | -------------------------------------------------------------------------------- /macos/source/mactime.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef _MACTIME_H_ 10 | #define _MACTIME_H_ 11 | /* ----------------------------------------------------------------------------- 12 | 13 | The original functions (Metrowerks Codewarrior pro 3.0) gmtime, localtime, 14 | mktime and time do not work correctly. The supplied link library mactime.c 15 | contains replacement functions for them. 16 | 17 | * Caveat: On a Mac, we only know the GMT and DST offsets for 18 | * the current time, not for the time in question. 19 | * Mac has no support for DST handling. 20 | * DST changeover is all manually set by the user. 21 | 22 | 23 | ------------------------------------------------------------------------------*/ 24 | 25 | #include 26 | #include 27 | 28 | /*****************************************************************************/ 29 | /* Macros, typedefs */ 30 | /*****************************************************************************/ 31 | 32 | 33 | /* 34 | * ARGH. Mac times are based on 1904 Jan 1 00:00, not 1970 Jan 1 00:00. 35 | * So we have to diddle time_t's appropriately: add or subtract 66 years' 36 | * worth of seconds == number of days times 86400 == (66*365 regular days + 37 | * 17 leap days ) * 86400 == (24090 + 17) * 86400 == 2082844800L seconds. 38 | * We hope time_t is an unsigned long (ulg) on the Macintosh... 39 | */ 40 | /* 41 | This Offset is only used by MacFileDate_to_UTime() 42 | */ 43 | 44 | #define MACOS_TO_UNIX(x) (x) -= (unsigned long)MacOS_2_Unix 45 | #define UNIX_TO_MACOS(x) (x) += (unsigned long)MacOS_2_Unix 46 | 47 | /* 48 | The MacOS function GetDateTime returns the 49 | number of seconds elapsed since midnight, January 1, 1904. 50 | */ 51 | extern const unsigned long MacOS_2_Unix; 52 | 53 | 54 | /* prototypes for public utility functions */ 55 | time_t MacFtime2UnixFtime(unsigned long macftime); 56 | unsigned long UnixFtime2MacFtime(time_t unxftime); 57 | time_t AdjustForTZmoveMac(unsigned long macloctim, long s_gmtoffs); 58 | Boolean GetGMToffsetMac(unsigned long macftime, long *UTCoffset); 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /macos/source/pathname.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2001 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef PATHNAME_H 10 | #define PATHNAME_H 1 11 | 12 | 13 | char *StripPartialDir(char *CompletePath, 14 | const char *PartialPath, const char *FullPath); 15 | 16 | char *Real2RfDfFilen(char *RfDfFilen, const char *RealPath, short CurrentFork, 17 | short MacZipMode, Boolean DataForkOnly); 18 | char *RfDfFilen2Real(char *RealFn, const char *RfDfFilen, short MacZipMode, 19 | Boolean DataForkOnly, short *CurrentFork); 20 | 21 | unsigned short GetVolumeFromPath(const char *FullPath, char *VolumeName); 22 | char *GetCompletePath(char *CompletePath, const char *name, FSSpec *Spec, 23 | OSErr *err); 24 | char *TruncFilename(char *DirPath, const char *FilePath); 25 | char *GetFilename(char *CompletePath, const char *name); 26 | char *GetFullPathFromSpec(char *CompletePath, FSSpec *Spec, OSErr *err); 27 | char *GetFullPathFromID(char *CompletePath, short vRefNum, long dirID, 28 | ConstStr255Param name, OSErr *err); 29 | 30 | char *GetAppName(void); 31 | void createArchiveName(char *Path); 32 | void FindDesktopFolder(char *Path); 33 | char *FindNewExtractFolder(char *ExtractPath, Boolean uniqueFolder); 34 | OSErr FSpFindFolder( 35 | short vRefNum, /* Volume reference number. */ 36 | OSType folderType, /* Folder type taken by FindFolder. */ 37 | Boolean createFolder, /* Should we create it if non-existant. */ 38 | FSSpec *spec); /* Pointer to resulting directory. */ 39 | 40 | char *MakeFilenameShorter(const char *LongFilename); 41 | 42 | /* 43 | Rule: UnKnown_EF should always be zero. 44 | JohnnyLee_EF, NewZipMode_EF should always greater than all 45 | other definitions 46 | */ 47 | #define UnKnown_EF 0 48 | #define TomBrownZipIt1_EF 10 49 | #define TomBrownZipIt2_EF 20 50 | #define JohnnyLee_EF 30 51 | #define NewZipMode_EF 40 52 | 53 | 54 | 55 | #define ResourceFork -1 56 | #define DataFork 1 57 | #define NoFork 0 58 | 59 | 60 | #ifndef NAME_MAX 61 | #define NAME_MAX 1024 62 | #endif 63 | 64 | #endif /* PATHNAME_H */ 65 | -------------------------------------------------------------------------------- /man/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "man" subdirectory for UnZip 5.41 and later: 2 | 3 | Contents this file 4 | funzip.1 fUnZip manual page, nroff format 5 | unzip.1 UnZip manual page, nroff format 6 | unzipsfx.1 UnZipSFX manual page, nroff format 7 | zipgrep.1 ZipGrep manual page, nroff format 8 | zipinfo.1 ZipInfo manual page, nroff format 9 | 10 | This subdirectory contains the master source files for the UnZip user 11 | documentation. Although these documents are Unix man-page sources, they 12 | are of general interest and therefore stored separately. 13 | Some non-Unix systems may supply a man-page reader where they could be 14 | used; and they are the sources for the generic ASCII text document files. 15 | -------------------------------------------------------------------------------- /msdos/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "msdos" subdirectory for UnZip 5.3 and later: 2 | 3 | Contents this file 4 | README notes about quirks in MS-DOS executables and compilers 5 | crc_i86.asm optimized 8086/80286 assembler version of generic crc32.c 6 | doscfg.h OS-dependent configuration, included by unzpriv.h 7 | msdos.c OS-dependent UnZip routines for MS-DOS 8 | makefile.bc makefile for Borland C++ and Turbo C++ 9 | makefile.msc makefile for Microsoft C and make or nmake 10 | makefile.tc makefile for Turbo C and make 11 | makefile.wat makefile for Watcom C 12 | makefile.dj1 makefile for GNU C, djgpp v1.12m4 port 13 | makefile.dj2 makefile for GNU C, djgpp v2.x port 14 | makefile.emx makefile for GNU C, emx 0.9c port, gnu make 15 | 16 | Notes: 17 | 18 | (1) Two makefiles for djgpp/GNU make are provided, one for djgpp 1.12 and one 19 | for djgpp v2.x. In addition, the Unix makefile (unix/Makefile) contains 20 | a djgpp v2.x target using the go32-gcc cross compiler on Linux. Read the 21 | appropriate makefile sections for details. 22 | 23 | (2) The makefile for emx+gcc has been used with GNU Make ports from DJGPP and 24 | the GNUish MS-DOS project. Other make utilities may work, too. The 25 | resulting executables require emx.exe or rsx.exe to run (akin to djgpp 26 | 1.x's go32.exe). 27 | 28 | (3) The OS/2 makefile includes several (cross compilation ?) targets to 29 | generate MS-DOS executables which can be used with MSC 6.0 or later 30 | (`mscdos', 16-bit), Watcom C/C++ 9.0 or later (`watcom16dos', 16-bit; 31 | `watcomdos' and `pmodew', 32-bit) and emx+gcc 0.9c or later (`gccdos', 32 | 32-bit). These targets have only been tested in cross-compilation from 33 | OS/2 to MS-DOS, but they may work on a plain MS-DOS system, when a proper 34 | make utility is available. 35 | 36 | -------------------------------------------------------------------------------- /msdos/msc51opt.dif: -------------------------------------------------------------------------------- 1 | Date: Mon, 28 Aug 1995 23:53:23 CET +0100 2 | From: "Christian Spieler, Institut fuer Kernphysik, Schlossgartenstr. 9, 3 | D-64289 Darmstadt" 4 | Subject: More MSC 5.1 related patches for UnZip 5.20f2 5 | 6 | 7 | D) I want to suggest two small patches to allow the use of 8 | full optimization (including loop optimization) when compiling UnZip 9 | with MSC (5.1, and probably newer). There are only two small pieces 10 | of code (containing to deeply nested loops) that break MSC 5.1's loop 11 | optimization. I have guarded these loops with "#pragma loop_opt (off)" 12 | to allow loop optimization for the rest of the code. Here are the patches: 13 | 14 | ===================== cut here ======================== 15 | diff -c ./inflate.c ./modif/inflate.c 16 | *** ./inflate.c Thu Oct 05 14:57:38 1995 17 | --- ./modif/inflate.c Thu Oct 05 14:58:24 1995 18 | *************** 19 | *** 1162,1173 **** 20 | --- 1162,1179 ---- 21 | { /* too few codes for k-w bit table */ 22 | f -= a + 1; /* deduct codes from patterns left */ 23 | xp = c + k; 24 | + #if defined (MSC) 25 | + #pragma loop_opt (off) 26 | + #endif /* MS C compilers */ 27 | while (++j < z) /* try smaller tables up to z bits */ 28 | { 29 | if ((f <<= 1) <= *++xp) 30 | break; /* enough codes to use up j bits */ 31 | f -= *xp; /* else deduct codes from patterns */ 32 | } 33 | + #if defined (MSC) 34 | + #pragma loop_opt () 35 | + #endif /* MS C compilers */ 36 | } 37 | if ((unsigned)w + j > el && (unsigned)w < el) 38 | j = el - w; /* make EOB code end at table */ 39 | diff -c ./zipinfo.c ./modif/zipinfo.c 40 | *** ./zipinfo.c Thu Oct 05 14:51:58 1995 41 | --- ./modif/zipinfo.c Thu Oct 05 14:52:42 1995 42 | *************** 43 | *** 1134,1145 **** 44 | --- 1134,1151 ---- 45 | workspace[10] = 'E'; 46 | 47 | p = attribs; 48 | + #if defined (MSC) && (!defined (_MSC_VER) || _MSC_VER < 600) 49 | + #pragma loop_opt (off) 50 | + #endif /* MS C, Version < 6.00 */ 51 | for (k = j = 0; j < 3; ++j) { /* groups of permissions */ 52 | for (i = 0; i < 4; ++i, ++k) /* perms within a group */ 53 | if (workspace[k]) 54 | *p++ = workspace[k]; 55 | *p++ = ','; /* group separator */ 56 | } 57 | + #if defined (MSC) && (!defined (_MSC_VER) || _MSC_VER < 600) 58 | + #pragma loop_opt () 59 | + #endif /* MS C, Version < 6.00 */ 60 | *--p = ' '; /* overwrite last comma */ 61 | if ((p - attribs) < 12) 62 | sprintf(&attribs[12], "%d.%d", hostver/10, hostver%10); 63 | -------------------------------------------------------------------------------- /netware/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "netware" subdirectory for UnZip 5.53 and later: 2 | 3 | Contents this file 4 | README notes about Novell NetWare port 5 | makefile.wat makefile for compiling unzip.nlm using Watcom C 11.0 6 | nlmcfg.h OS-dependent configuration, included by unzpriv.h 7 | netware.c OS-dependent UnZip routines for NetWare 8 | unzip.build Korn-shell build script 9 | unzip.link Watcom link directive file 10 | 11 | Notes: 12 | 13 | This port is courtesy of Vance Baarda (Novell NetWare Server Install). 14 | It is designed to compile with the Watcom C compiler. See the README 15 | for further info. 16 | -------------------------------------------------------------------------------- /netware/README: -------------------------------------------------------------------------------- 1 | 1) I used the Watcom version 11 compiler and the Novell NetWare SDK 2 | from October 1998. You can get the latest NetWare SDK (free). Go to 3 | http://developer.novell.com/ndk/netware.htm#C/C++ and look for "NLM and 4 | NetWare Libraries for C (including CLIB and XPlat)" 5 | 6 | 2) The unzip.nlm runs in the same address space as the NetWare OS. 7 | In other words, if unzip.nlm crashes, the server will most likely crash. 8 | Therefore, I recommend you do not load unzip.nlm on a server that your 9 | company depends on for business until it's been thoroughly tested on a 10 | test server. 11 | 12 | 3) I've designed this unzip.nlm port to load on any version of NetWare 13 | starting with NetWare 3.12. However, I've tested it only on NetWare 5.0. 14 | If unzip.nlm does not load or run correctly, try the following in 15 | this order: 16 | 17 | a) Load clibaux.nlm version 1.21a or later before loading 18 | unzip.nlm. The clibaux.nlm is part of the NetWare SDK package 19 | mentioned above. It's also part of the 3.x C library package 20 | mentioned below. 21 | 22 | b) On NetWare 3.x, install the latest 3.x C library modules. 23 | Go to http://support.novell.com/misc/patlst.htm#nw and look for 24 | "NetWare 3.12/3.2 CLIB". 25 | 26 | c) On NetWare 4.10, install the latest 4.10 C library modules. 27 | Go to http://support.novell.com/misc/patlst.htm#nw and look for 28 | "Updated modular CLIB and DSAPI". 29 | 30 | d) On NetWare 4.11 and 4.2, install the latest support pack. 31 | Go to http://support.novell.com/misc/patlst.htm#nw and look for 32 | "NetWare 4 Support Pack". 33 | 34 | 4) This unzip.nlm assumes that support for the long name space (also 35 | known as the OS/2 name space) has already been added to the current 36 | working volume. If it has not, and the zip archive contains files with 37 | long names, then the fopen() for such files will just fail. The code 38 | does not attempt to rename the file to fit in a DOS-style name. The same 39 | problem would occur with long directory names. 40 | 41 | 5) If unzip.nlm works correctly on NetWare 3.x (which it should, 42 | but I've not tried it), it will create all files and directories with 43 | all-uppercase names. The reason is that the NetWare 3.x C library does 44 | not support creating mixed-case or lowercase file names, even in the long 45 | (OS/2) name space. 46 | 47 | 6) To change the current working volume and current working directory 48 | in which unzip.nlm loads and runs, load unzip.nlm like this: 49 | 50 | load unzip (CLIB_OPT)/P: 51 | 52 | For example: 53 | 54 | load unzip archive.zip (CLIB_OPT)/Pvol1:\usr\home 55 | 56 | For more information on CLIB_OPT, go to http://developer.novell.com/search/ 57 | and enter "CLIB_OPT" in the "Novell Developer Kit Search" box. 58 | 59 | 7) To find out more about clibaux.nlm, go to 60 | http://developer.novell.com/search/ and enter "clibaux" in the "Novell 61 | Developer Kit Search" box. 62 | 63 | 64 | Vance Baarda 65 | NetWare Server Install 66 | Novell, Inc. 67 | -------------------------------------------------------------------------------- /netware/nlm_EOL.pat: -------------------------------------------------------------------------------- 1 | diff -rc2 ./fileio.c e:fileio.c 2 | *** ./fileio.c Sat Dec 4 19:58:26 1999 3 | --- e:fileio.c Sat Dec 4 20:54:10 1999 4 | *************** 5 | *** 85,88 **** 6 | --- 85,91 ---- 7 | (win_fprintf(pG, strm, (extent)len, (char far *)buf) != (int)(len)) 8 | #else /* !WINDLL */ 9 | + #ifdef NLM 10 | + # define WriteError(buf,len,strm) nlm_WriteError(buf, (extent)(len), strm) 11 | + #else /* !NLM */ 12 | # ifdef USE_FWRITE 13 | # define WriteError(buf,len,strm) \ 14 | *************** 15 | *** 92,95 **** 16 | --- 95,99 ---- 17 | ((extent)write(fileno(strm),(char *)(buf),(extent)(len)) != (extent)(len)) 18 | # endif 19 | + #endif /* ?NLM */ 20 | #endif /* ?WINDLL */ 21 | 22 | diff -rc2 ./netware/nlmcfg.h e:netware/nlmcfg.h 23 | *** ./netware/nlmcfg.h Sat Dec 4 20:39:20 1999 24 | --- e:netware/nlmcfg.h Sat Dec 4 21:20:36 1999 25 | *************** 26 | *** 21,25 **** 27 | # define lenEOL 2 28 | # define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} 29 | - # define USE_FWRITE /* write() fails to support textmode output */ 30 | # if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) 31 | # define TIMESTAMP 32 | --- 21,24 ---- 33 | *************** 34 | *** 30,32 **** 35 | --- 29,32 ---- 36 | void InitUnZipConsole OF((void)); 37 | int screenlines OF((void)); 38 | + int nlm_WriteError OF((uch *buf, extent len, FILE *strm)); 39 | #endif /* NLM */ 40 | diff -rc2 ./netware/netware.c e:netware/netware.c 41 | *** ./netware/netware.c Sat Dec 4 21:11:52 1999 42 | --- e:netware/netware.c Sat Dec 4 21:28:38 1999 43 | *************** 44 | *** 22,25 **** 45 | --- 22,26 ---- 46 | version() 47 | screenlines() 48 | + nlm_WriteError() 49 | 50 | ---------------------------------------------------------------------------*/ 51 | *************** 52 | *** 821,822 **** 53 | --- 822,850 ---- 54 | 55 | #endif /* MORE */ 56 | + 57 | + 58 | + /*******************************/ 59 | + /* Function nlm_WriteError() */ 60 | + /*******************************/ 61 | + 62 | + int nlm_WriteError(buf, len, strm) 63 | + uch *buf; 64 | + extent len; 65 | + FILE *strm; 66 | + { 67 | + /* The write() implementation in the Novell C RTL lacks support of 68 | + text-mode streams (fails to translate '\n' into "CR-LF" when 69 | + writing to text-mode channels like the console). 70 | + In contrast, fwrite() takes into account when an output stream 71 | + was opened in text-mode, but fails to handle output of large 72 | + buffers correctly. 73 | + So, we have to use Unix I/O style write() when emitting data 74 | + to "regular" files but switch over to stdio's fwrite() when 75 | + writing to the console streams. 76 | + */ 77 | + if ((strm == stdout)) || (file == stderr)) { 78 | + return ((extent)fwrite((char *)buf, 1, len, strm) != len); 79 | + } else { 80 | + return ((extent)write(fileno(strm), (char *)buf, len) != len); 81 | + } 82 | + } /* end function nlm_WriteError() */ 83 | -------------------------------------------------------------------------------- /netware/nlmcfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifdef NLM 10 | # include 11 | # include 12 | # include 13 | # include 14 | # include 15 | # include 16 | # define DIRENT 17 | # include 18 | # ifndef DATE_FORMAT 19 | # define DATE_FORMAT DF_MDY 20 | # endif 21 | # define lenEOL 2 22 | # define PutNativeEOL {*q++ = native(CR); *q++ = native(LF);} 23 | # define USE_FWRITE /* write() fails to support textmode output */ 24 | # if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) 25 | # define TIMESTAMP 26 | # endif 27 | # define MAIN main 28 | # define DECLARE_TIMEZONE 29 | # define SCREENWIDTH 80 30 | # define SCREENSIZE(scrrows, scrcols) screensize(scrrows, scrcols) 31 | void InitUnZipConsole OF((void)); 32 | int screensize OF((int *tt_rows, int *tt_cols)); 33 | #endif /* NLM */ 34 | -------------------------------------------------------------------------------- /netware/unzip.build: -------------------------------------------------------------------------------- 1 | export WATCOM='\\prv-dev2\dev\tool\wcc\1100' 2 | CC='\\prv-dev2\dev\tool\wcc\1100\binnt\wcc386' 3 | LINK='\\prv-dev2\dev\tool\wcc\1100\binnt\wlink' 4 | 5 | CFLAGS="-olax -5s -zq -zp1 -ei -ez -ri -w4" 6 | DEFS="-DNLM -DN_PLAT_NLM -U_WIN32" 7 | INCS='-I. -Inetware -Ic:\novell\ndk\nwsdk\include\nlm -Ic:\novell\ndk\nwsdk\include\nlm\sys -Ic:\novell\ndk\nwsdk\include -Ic:\novell\ndk\nwsdk\include\nlm\nit' 8 | 9 | cd .. 10 | for i in crc32.c crypt.c envargs.c explode.c extract.c fileio.c \ 11 | globals.c inflate.c list.c match.c netware\\netware.c process.c \ 12 | ttyio.c unreduce.c unshrink.c unzip.c zipinfo.c 13 | do 14 | $CC $CFLAGS $DEFS $INCS $i 15 | done 16 | 17 | $LINK @netware/unzip.link 18 | -------------------------------------------------------------------------------- /netware/unzip.link: -------------------------------------------------------------------------------- 1 | format novell NLM 'unzip utility' 2 | name unzip 3 | option caseexact 4 | option copyright 'Copyright 1990-2005 Info-ZIP (www.info-zip.org).' 5 | option map = unzip.map 6 | option nodefaultlibs 7 | option quiet 8 | option screenname 'none' 9 | option stack = 32k 10 | option symfile = unzip.sym 11 | option threadname 'unzip' 12 | option version = 5.5.1 13 | module clib 14 | import @c:/novell/ndk/nwsdk/imports/clib.imp 15 | import @c:/novell/ndk/nwsdk/imports/nlmlib.imp 16 | import @c:/novell/ndk/nwsdk/imports/threads.imp 17 | import @c:/novell/ndk/nwsdk/imports/nit.imp 18 | file crc32.obj 19 | file crypt.obj 20 | file envargs.obj 21 | file explode.obj 22 | file extract.obj 23 | file fileio.obj 24 | file globals.obj 25 | file inflate.obj 26 | file list.obj 27 | file match.obj 28 | file netware.obj 29 | file process.obj 30 | file ttyio.obj 31 | file unreduce.obj 32 | file unshrink.obj 33 | file unzip.obj 34 | file zipinfo.obj 35 | file c:/novell/ndk/nwsdk/imports/nwpre.obj 36 | -------------------------------------------------------------------------------- /os2/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "os2" subdirectory for UnZip 5.3 and later: 2 | 3 | Contents this file 4 | makefile.os2 makefile for almost every compiler available under OS/2 5 | os2.c OS/2-specific support routines 6 | os2data.h OS/2-specific data declarations 7 | os2cfg.h OS/2-specific configuration, included in unzpriv.h 8 | os2acl.c OS/2-specific routines for access-control-list support 9 | os2acl.h OS/2-specific header file for access-control-list support 10 | rexxapi.c interface to integrate UnZip DLL in REXX API 11 | rexxapi.def OS/2 linker definition file for REXX API DLL 12 | rexxhelp.c help function for UnZip's REXX API DLL 13 | rexxtest.cmd REXX script for testing UnZip's REXX API DLL 14 | stub.def OS/2 linker definition file (generic UnZip DLL API) 15 | unzip.def OS/2 linker definition file 16 | zip2exe.cmd REXX script for creating self-extracting archives 17 | zipgrep.cmd really cool REXX script to search for strings in a zipfile 18 | zgrepapi.cmd new version of zipgrep.cmd; takes advantage of REXX API DLL 19 | 20 | There is no support for the ancient Zortech and GCC/2 (Michael Johnson/Colin 21 | Jensen) compilers. The free emx+gcc is supported, as are roughly half a dozen 22 | commercial compilers. 23 | -------------------------------------------------------------------------------- /os2/os2acl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* os2acl.h 10 | * 11 | * Author: Kai Uwe Rommel 12 | * Created: Fri Mar 29 1996 13 | */ 14 | 15 | /* $Id: os2acl.h,v 1.1 1996/03/30 09:35:00 rommel Exp rommel $ */ 16 | 17 | /* 18 | * $Log: os2acl.h,v $ 19 | * Revision 1.1 1996/03/30 09:35:00 rommel 20 | * Initial revision 21 | * 22 | */ 23 | 24 | #ifndef _OS2ACL_H 25 | #define _OS2ACL_H 26 | 27 | #define ACL_BUFFERSIZE 4096 28 | 29 | int acl_get(char *server, const char *resource, char *buffer); 30 | int acl_set(char *server, const char *resource, char *buffer); 31 | 32 | #endif /* _OS2ACL_H */ 33 | 34 | /* end of os2acl.h */ 35 | -------------------------------------------------------------------------------- /os2/rexxapi.def: -------------------------------------------------------------------------------- 1 | LIBRARY UNZIP32 INITINSTANCE LONGNAMES 2 | PROTMODE 3 | DESCRIPTION 'Info-ZIP UnZip API - Copyright Scott Maxwell 1994, Info-ZIP 1995-1997' 4 | DATA MULTIPLE NONSHARED 5 | EXPORTS 6 | UzpVersion @1 7 | UzpUnzipToMemory @2 8 | UzpFileTree @3 9 | UzpMain @4 10 | UzpAltMain @5 11 | UzpVersion2 @6 12 | UZDROPFUNCS = UZDropFuncs @2000 13 | UZLOADFUNCS = UZLoadFuncs @2001 14 | UZFILETREE = UZFileTree @2002 15 | UZUNZIPTOVAR = UZUnZipToVar @2003 16 | UZUNZIPTOSTEM = UZUnZipToStem @2004 17 | UZVER = UZVer @2005 18 | UZUNZIP = UZUnZip @2007 19 | -------------------------------------------------------------------------------- /os2/rexxtest.cmd: -------------------------------------------------------------------------------- 1 | /* Test REXX UnZip API */ 2 | call RxFuncAdd 'UZLoadFuncs', 'UNZIP32', 'UZLoadFuncs' 3 | call UZLoadFuncs 4 | 5 | parse arg all 6 | 7 | say; say 'Demonstrating UZUnZip' UZUnZip(all,'TEST.') 8 | do num=1 to test.0 9 | say num':'test.num 10 | end 11 | 12 | /*** Demonstrate UZFileTree ***/ 13 | fname = 'g:\cqc\channel1\12-30.qwk' 14 | say; say 'Demonstrating UZFileTree by displaying all entries in', 15 | fname 16 | exc.0 = 2 17 | exc.1 = '*.dat' 18 | exc.2 = '*.ndx' 19 | call UZFileTree fname, 'files','','exc' 20 | do num=1 to files.0 21 | say num':'files.num 22 | end 23 | 24 | say; say 'Demonstrating UZUnZipToVar -' UZUnZipToVar(fname,'CONTROL.DAT') 25 | 26 | 27 | test. = 0 28 | say; say 'Demonstrating UZUnZipToVar -' UZUnZipToVar(fname,'CONTROL.DAT','test.') 29 | SAY "Test =" test.0 30 | do num=1 to test.0 31 | say num':'test.num 32 | end 33 | 34 | test. = 0 35 | say; say 'Demonstrating UZUnZipToStem -' UZUnZipToStem('\SourceCode\cqc\cqcmain.zip','test',"*.rch",,'T') 36 | call recout "test" 37 | 38 | say; say 'Demonstrating UZVer -' UZVer() 39 | 40 | call UZDropFuncs 41 | exit 42 | 43 | recout: PROCEDURE EXPOSE test. 44 | parse arg this 45 | say this "Contains" value(this'.0') "entries" 46 | do num=1 to value(this'.0') 47 | tval = value(this'.'num) 48 | say "Got" this'.'num':' tval 49 | if Right(tval,1) = '/' then 50 | call recout this'.'left(tval,length(tval)-1) 51 | else 52 | say "Contains:" value(this'.tval') 53 | end 54 | return 55 | -------------------------------------------------------------------------------- /os2/stub.def: -------------------------------------------------------------------------------- 1 | DESCRIPTION 'The world-famous Info-ZIP unarchiving utilities' 2 | STACKSIZE 0x50000 3 | IMPORTS 4 | UNZIP32.UzpVersion 5 | UNZIP32.UzpMain 6 | UNZIP32.UzpVersion2 7 | -------------------------------------------------------------------------------- /os2/unzip.def: -------------------------------------------------------------------------------- 1 | NAME WINDOWCOMPAT NEWFILES 2 | DESCRIPTION 'The world-famous Info-ZIP unarchiving utilities' 3 | ; SEGMENTS 4 | ; _MSGSEG32 CLASS 'CODE' 5 | -------------------------------------------------------------------------------- /os2/zgrepapi.cmd: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | 3 | zapigrep.cmd (ye olde REXX procedure for OS/2) 4 | 5 | Script to search members of a zipfile for a string and print the names of 6 | any such members (and, optionally, the matching text). 7 | 8 | This is the zipgrep.cmd program completely rewritten to take advantage 9 | of the REXX API. Among the improvements are: 10 | egrep no longer needed. All work done by API and this script. 11 | Added option switches. 12 | 13 | Be aware, however, that this script does not support regular expressions 14 | as zipgrep does. 15 | 16 | ---------------------------------------------------------------------------*/ 17 | 18 | PARSE ARG args 19 | 20 | nocase = 0 21 | word = 0 22 | text = 0 23 | 24 | DO WHILE Left(args,1) == '-' | Left(args,1) == '/' 25 | PARSE VAR args option args 26 | option = Translate(SubStr(option,2)) 27 | DO WHILE option \= '' 28 | oneopt = Left(option,1) 29 | option = SubStr(option,2) 30 | SELECT 31 | WHEN oneopt == 'W' THEN 32 | word = 1 33 | WHEN oneopt == 'I' THEN 34 | nocase = 1 35 | WHEN oneopt == 'T' THEN 36 | text = 1 37 | OTHERWISE NOP 38 | END 39 | END 40 | END 41 | 42 | PARSE VAR args string zipfile members 43 | 44 | IF (string == '') THEN DO 45 | SAY 'usage: zipgrep [-i][-t][-w] search_string zipfile [members...]' 46 | SAY ' Displays the names of zipfile members containing a given string.' 47 | SAY ' By default it displays filenames only of members containing an' 48 | SAY ' exact match of the string. Options are:'"0a"x 49 | SAY ' -i Ignore case' 50 | SAY ' -t Display matching lines' 51 | SAY ' -w Match words only' 52 | EXIT 1 53 | END 54 | string = Strip(string,'b','"') 55 | IF nocase THEN string = Translate(string) 56 | 57 | CALL RxFuncAdd 'UZLoadFuncs', 'UNZIP32', 'UZLoadFuncs' 58 | CALL UZLoadFuncs 59 | 60 | CALL UZUnZipToStem zipfile, 'file.', members 61 | 62 | DO i = 1 TO file.0 63 | ptr = file.i 64 | file = file.ptr 65 | IF nocase THEN file = Translate(file) 66 | IF word THEN DO 67 | wp = WordPos(string,file) 68 | IF wp>0 THEN 69 | scan = WordIndex(file,wp) 70 | ELSE 71 | scan = 0 72 | END 73 | ELSE 74 | scan = Pos(string,file) 75 | IF scan \= 0 THEN DO 76 | SAY file.i':' 77 | IF text THEN DO 78 | DO WHILE scan > 0 79 | from = LastPos('0a'x,file,scan)+1 80 | to = Pos('0a'x,file,scan) 81 | IF to = 0 THEN to = Length(file.ptr) 82 | oneline = Strip(SubStr(file.ptr,from,to-from),'T','0a'x) 83 | SAY Strip(oneline,'T','0d'x) 84 | IF word THEN DO 85 | wp = WordPos(string,file,wp+1) 86 | IF wp>0 THEN 87 | scan = WordIndex(file,wp) 88 | ELSE 89 | scan = 0 90 | END 91 | ELSE 92 | scan = Pos(string,file,scan+1) 93 | END 94 | END 95 | END 96 | END 97 | 98 | EXIT 0 99 | -------------------------------------------------------------------------------- /os2/zip2exe.cmd: -------------------------------------------------------------------------------- 1 | /**** REXX ******** ZIP2EXE.CMD ************** 01/04/96 *********\ 2 | |** This exec will prepend the Info Zip unzipsfx.exe file to an **| 3 | |** existing ZIP file to create a self extracting zip. **| 4 | |** **| 5 | |** The exec requires 1 argument, the name of the zip file to be **| 6 | |** acted upon. **| 7 | |** **| 8 | |** Put this exec into the path that contains your Info Zip **| 9 | |** executables. **| 10 | |** **| 11 | \*********************************************************************/ 12 | rc = 0 13 | /** Start Argument processing ** End Initialization **/ 14 | PARSE UPPER ARG zip_file 15 | IF zip_file = "" 16 | THEN 17 | DO 18 | SAY "You must specify the name of the file to be processed" 19 | SAY "Please try again" 20 | rc = 9 21 | SIGNAL FINI 22 | END 23 | IF POS(".ZIP",zip_file) = 0 24 | THEN 25 | DO 26 | sfx_file = zip_file||".EXE" 27 | zip_file = zip_file||".ZIP" 28 | END 29 | ELSE 30 | sfx_file = SUBSTR(zip_file,1,LASTPOS(".",zip_file))||"EXE" 31 | zip_file = STREAM(zip_file,"C","QUERY EXISTS") 32 | IF zip_file = "" 33 | THEN 34 | DO 35 | SAY "The file "||ARG(1)||" Does not exist" 36 | SAY "Processing terminated" 37 | rc = 9 38 | SIGNAL FINI 39 | END 40 | /** Start unzipsfx location ** End Argument processing **/ 41 | PARSE UPPER SOURCE . . command_file 42 | unzipsfx = SUBSTR(command_file,1,LASTPOS("\",command_file))||, 43 | "UNZIPSFX.EXE" 44 | IF STREAM(unzipsfx,"C","QUERY EXISTS") = "" 45 | THEN 46 | DO 47 | SAY "We are unable to locate the UNZIPSFX.EXE source" 48 | SAY "Ensure that the ZIP2EXE command is in the directory", 49 | "which contains UNZIPSFX.EXE" 50 | rc = 9 51 | SIGNAL FINI 52 | END 53 | /** Execute the command ** End Argument processing **/ 54 | ADDRESS CMD "@COPY /b "||unzipsfx||"+"||zip_file, 55 | sfx_file||" > NUL" 56 | IF rc = 0 57 | THEN 58 | SAY sfx_file||" successfully created" 59 | ELSE 60 | SAY sfx_file||" creation failed" 61 | FINI: 62 | EXIT rc 63 | -------------------------------------------------------------------------------- /os2/zipgrep.cmd: -------------------------------------------------------------------------------- 1 | /*--------------------------------------------------------------------------- 2 | 3 | zipgrep.cmd (ye olde REXX procedure for OS/2) 4 | 5 | Script to search members of a zipfile for a string or regular expression 6 | and print the names of any such members (and, optionally, the matching 7 | text). The search is case-insensitive by default. 8 | 9 | History: 10 | original Bourne shell version by Jean-loup Gailly 11 | modified by Greg Roelofs for Ultrix (no egrep -i) and zipinfo -1 12 | OS/2 REXX script by Greg Roelofs 13 | 14 | Last modified: 19 Jul 93 15 | 16 | ---------------------------------------------------------------------------*/ 17 | 18 | PARSE ARG string zipfile members 19 | 20 | if (string == '') then do 21 | say 'usage: zipgrep search_string zipfile [members...]' 22 | say ' Displays the names of zipfile members containing a given string,' 23 | say ' in addition to the matching text. This procedure requires unzip' 24 | say ' and egrep in the current path, and it is quite slow....' 25 | exit 1 26 | end 27 | 28 | /* doesn't seem to work... 29 | newq = RXQUEUE("Create",zipgrep_pipe) 30 | oldq = RXQUEUE("Set",newq) 31 | */ 32 | 33 | /* flush the queue before starting */ 34 | do QUEUED() 35 | PULL junk 36 | end 37 | 38 | /* GRR: can also add "2>&1" before pipe in following external command */ 39 | '@unzip -Z1' zipfile members '| rxqueue' 40 | 41 | do while QUEUED() > 0 42 | PARSE PULL file 43 | '@unzip -p' zipfile file '| egrep -is' string 44 | if rc == 0 then do 45 | SAY file':' 46 | /* can comment out following line if just want filenames */ 47 | '@unzip -p' zipfile file '| egrep -i' string 48 | end 49 | end 50 | 51 | /* 52 | call RXQUEUE "Delete",newq 53 | call RXQUEUE "Set",oldq 54 | */ 55 | 56 | exit 0 57 | -------------------------------------------------------------------------------- /proginfo/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "proginfo" subdirectory for UnZip 5.42 and later: 2 | 3 | Contents this file 4 | CONTRIBS list of contributors to UnZip 5 | ZipPorts Info-ZIP rules and guidelines on contributions to the cause 6 | 3rdparty.bug known bugs in PK[UN]ZIP, WinZip, etc. 7 | defer.in info about the NEXTBYTE macro and defer/undefer_input functions 8 | extrafld.txt info about all known "extra field" types 9 | fileinfo.cms info about the VM/CMS file system, including record formats 10 | nt.sd info about support for Windows NT's Security Descriptors (ACLs) 11 | perform.dos relative performance of Zip and UnZip with various DOS compilers 12 | timezone.txt explanation of the TZ environment variable for timezones 13 | ziplimit.txt limits of the Zip archive format and InfoZip's implementation 14 | -------------------------------------------------------------------------------- /proginfo/defer.in: -------------------------------------------------------------------------------- 1 | [Regarding an optimization to the bounds-checking code in the core 2 | NEXTBYTE macro, which code is absolutely vital to the proper processing 3 | of corrupt zipfiles (lack of checking can result in an infinite loop) 4 | but which also slows processing.] 5 | 6 | 7 | The key to the solution is a pair of small functions called 8 | defer_leftover_input() and undefer_input(). The idea is, whenever 9 | you are going to be processing input using NEXTBYTE, you call 10 | defer_leftover_input(), and whenever you are going to process input by 11 | any other means, such as readbuf(), ZLSEEK, or directly reading stuff 12 | into G.inbuf, you call undefer_input(). What defer_leftover_input() 13 | does is adjust G.incnt so that any data beyond the current end of file 14 | is not visible. undefer_input() restores it to visibility. So when 15 | you're calling NEXTBYTE (or NEEDBITS or READBITS), an end-of-data 16 | condition only occurs at the same time as an end-of-buffer condition, 17 | and can be handled inside readbyte() instead of needing a check in the 18 | NEXTBYTE macro. Note: none of this applies to fUnZip. 19 | 20 | In order for this to work, certain conditions have to be met: 21 | 22 | 1) NEXTBYTE input must not be mixed with other forms of input involving 23 | G.inptr and G.incnt. They must be separated by defer/undefer. 24 | 25 | I believe this condition is fully met by simply bracketing the central 26 | part of extract_or_test_member with defer/undefer, around the part 27 | where the actual decompression is done, and another defer/undefer pair 28 | in decrypt() around the reading of the RAND_HEADER_LEN password bytes. 29 | 30 | When USE_ZLIB is defined, I think that calls of fillinbuf() must be 31 | bracketed by defer/undefer. 32 | 33 | 2) G.csize must not be assumed to contain the number of bytes left to 34 | process, when decompressing with NEXTBYTE. Instead, it contains 35 | the number of bytes left after the current buffer is exausted. To 36 | check the number of bytes remaining, use (G.csize + G.incnt). 37 | 38 | I believe the only places this change was needed were in explode.c, 39 | mostly in the check at the end of each explode function that tests 40 | whether the correct number of bytes has been read. G.incnt will 41 | normally be zero at that time anyway. The other place is the line 42 | that says "bd = G.csize > 200000L ? 8 : 7;" but that's just a rough 43 | heuristic anyway. 44 | 45 | [Paul Kienitz] 46 | -------------------------------------------------------------------------------- /qdos/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "qdos" subdirectory for UnZip 5.4 and later: 2 | 3 | Contents this file 4 | IZREADME.SMS release notes from Jonathan Hudson (author of port) 5 | Makefile makefile for xtc68 cross-compiler on Linux (native QDOS exes) 6 | callstub.c user interface stub for SMS/QDOS specific SFX archives 7 | config.S assembler routine for ...? 8 | crc68.s 68000 version of CRC code 9 | izqdos.h SMS/QDOS-specific header file 10 | makesfx.c source for MakeSFX utility (simple concatenation does not work) 11 | qdos.c SMS/QDOS-specific functions 12 | 13 | Notes: 14 | 15 | "Makefile" is for the xtc68 cross compiler on Linux, but conversion to a 16 | native c68 makefile should be trivial. To build a Linux (or other Unix) 17 | UnZip that understands QDOS extra fields, add "-DQLZIP" to the LOCAL_UNZIP 18 | environment variable and compile with the normal Unix makefile (for example, 19 | linux_asm target). The "QLZIP" flag enables the Qdos "cross-UnZip" support 20 | in unix/unix.c. 21 | -------------------------------------------------------------------------------- /qdos/crc68.s: -------------------------------------------------------------------------------- 1 | ;=========================================================================== 2 | ; Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | ; 4 | ; See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | ; (the contents of which are also included in zip.h) for terms of use. 6 | ; If, for some reason, all these files are missing, the Info-ZIP license 7 | ; also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | ;=========================================================================== 9 | .text 10 | 11 | .globl _crc32 ; (ulg val, uch *buf, extent bufsize) 12 | .globl _get_crc_table ; ulg *get_crc_table(void) 13 | 14 | _crc32: 15 | move.l 8(sp),d0 16 | bne valid 17 | moveq #0,d0 18 | rts 19 | valid: movem.l d2/d3,-(sp) 20 | jsr _get_crc_table 21 | move.l d0,a0 22 | move.l 12(sp),d0 23 | move.l 16(sp),a1 24 | move.l 20(sp),d1 25 | not.l d0 26 | 27 | move.l d1,d2 28 | lsr.l #3,d1 29 | bra decr8 30 | loop8: moveq #0,d3 31 | move.b (a1)+,d3 32 | eor.b d0,d3 33 | lsl.w #2,d3 34 | move.l 0(a0,d3.w),d3 35 | lsr.l #8,d0 36 | eor.l d3,d0 37 | moveq #0,d3 38 | move.b (a1)+,d3 39 | eor.b d0,d3 40 | lsl.w #2,d3 41 | move.l 0(a0,d3.w),d3 42 | lsr.l #8,d0 43 | eor.l d3,d0 44 | moveq #0,d3 45 | move.b (a1)+,d3 46 | eor.b d0,d3 47 | lsl.w #2,d3 48 | move.l 0(a0,d3.w),d3 49 | lsr.l #8,d0 50 | eor.l d3,d0 51 | moveq #0,d3 52 | move.b (a1)+,d3 53 | eor.b d0,d3 54 | lsl.w #2,d3 55 | move.l 0(a0,d3.w),d3 56 | lsr.l #8,d0 57 | eor.l d3,d0 58 | moveq #0,d3 59 | move.b (a1)+,d3 60 | eor.b d0,d3 61 | lsl.w #2,d3 62 | move.l 0(a0,d3.w),d3 63 | lsr.l #8,d0 64 | eor.l d3,d0 65 | moveq #0,d3 66 | move.b (a1)+,d3 67 | eor.b d0,d3 68 | lsl.w #2,d3 69 | move.l 0(a0,d3.w),d3 70 | lsr.l #8,d0 71 | eor.l d3,d0 72 | moveq #0,d3 73 | move.b (a1)+,d3 74 | eor.b d0,d3 75 | lsl.w #2,d3 76 | move.l 0(a0,d3.w),d3 77 | lsr.l #8,d0 78 | eor.l d3,d0 79 | moveq #0,d3 80 | move.b (a1)+,d3 81 | eor.b d0,d3 82 | lsl.w #2,d3 83 | move.l 0(a0,d3.w),d3 84 | lsr.l #8,d0 85 | eor.l d3,d0 86 | decr8: dbra d1,loop8 87 | and.w #7,d2 88 | bra decr1 89 | loop1: moveq #0,d3 90 | move.b (a1)+,d3 91 | eor.b d0,d3 92 | lsl.w #2,d3 93 | move.l 0(a0,d3.w),d3 94 | lsr.l #8,d0 95 | eor.l d3,d0 96 | decr1: dbra d2,loop1 97 | done: movem.l (sp)+,d2/d3 98 | not.l d0 99 | rts 100 | -------------------------------------------------------------------------------- /qdos/izqdos.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef _IZQDOS_H 10 | #define _IZQDOS_H 11 | 12 | #include 13 | typedef struct 14 | { 15 | unsigned short shortid; 16 | struct 17 | { 18 | unsigned char lo; 19 | unsigned char hi; 20 | } len; 21 | char longid[8]; 22 | struct qdirect header; 23 | } qdosextra; 24 | 25 | typedef struct 26 | { 27 | unsigned short shortid; 28 | struct 29 | { 30 | unsigned char lo; 31 | unsigned char hi; 32 | } len; 33 | char longid[4]; 34 | struct qdirect header; 35 | } jbextra; 36 | 37 | #define SHORTID 0x4afb 38 | #define JBSHORTID 0x4afb 39 | #define LONGID "QDOS02" 40 | #define JBLONGID "QZHD" 41 | #define EXTRALEN (sizeof(qdosextra) - 2 * sizeof(char) - sizeof(short)) 42 | #define JBEXTRALEN (sizeof(jbextra) - 2 * sizeof(char) - sizeof(short)) 43 | 44 | extern short qlflag; 45 | extern short qlwait; 46 | #endif 47 | -------------------------------------------------------------------------------- /tandem/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "tandem" subdirectory for UnZip 5.42 and later: 2 | 3 | Contents this file 4 | README 5 | HISTORY 6 | commacs generic support macros for compiling 7 | doit macro to extract and rename required Tandem files from archive 8 | macros Info-ZIP-specific macros for compiling 9 | make Tandem NSK script to compile UnZip intelligently 10 | makesfx Tandem NSK script to compile UnZipSFX 11 | tandem.c Tandem NSK-specific Zip & UnZip support routines 12 | tandem.h Tandem NSK-specific data declarations 13 | tanunz.c Tandem NSK-specific UnZip support routines 14 | tannsk.h Tandem NSK-specific declarations that need delayed including 15 | 16 | To compile, run the rename.unix script on a Unix system (renames *.c files 17 | to *c and *.h files to *h, and leaves all files necessary for Tandem port 18 | in the Tandem subdirectory). Then transfer the renamed files to the Tandem 19 | system (if by ftp, use ASCII mode so the line-endings are converted to CR/LF 20 | format properly). Edit the `make' script and change all references to 21 | $DATA9.DAVESZIP with whatever subvol you use, and change all references to 22 | SUPER.DAVES with whatever user id you use. Then run it. Individual object 23 | files will be named *o (that is, unzip.c -> unzipc -> unzipo), and an 24 | intermediate UnZip library (unziplib) and final UnZip binary (unzipl or 25 | unzipw, depending on large or wide model) will be created. 26 | 27 | The filecode for unzipl should be 100 [OBJECT]...presumably this is automatic. 28 | -------------------------------------------------------------------------------- /tandem/commacs: -------------------------------------------------------------------------------- 1 | ?section CC ROUTINE 2 | #FRAME 3 | [#PUSH file stem src obj htime file prev time stime otime 4 | comp out options sup buf col locn group 5 | ] 6 | 7 | [#IF [#ARGUMENT /VALUE file/ WORD /SPACE/ END]] 8 | [#IF [#EMPTYV file] |THEN| 9 | #OUTPUT Syntax: CC 10 | #RESET FRAMES 11 | #RETURN 12 | ] 13 | 14 | [#IF NOT [#FILEINFO /EXISTENCE/ [file]] 15 | |THEN| 16 | #OUTPUT [file] does not exist ! 17 | #RESET FRAMES 18 | #RETURN 19 | ] 20 | 21 | #PUSH #DEFAULTS vol subvol 22 | #SETMANY vol subvol src, [#FILEINFO /VOLUME, SUBVOL, FILE/ [file]] 23 | VOLUME [vol].[subvol] 24 | 25 | #SETV stem file 26 | #CHARDEL stem [#CHARCOUNT stem] 27 | #SET obj [stem]O 28 | #SETV stem src 29 | #CHARDEL stem [#CHARCOUNT stem] 30 | 31 | [#IF [#ARGUMENT /VALUE out/ DEVICE END]] 32 | [#IF [#EMPTYV out] |THEN| #SET out $T.#C] 33 | 34 | #SETMANY col group, [#FILEINFO /VOLUME, SUBVOL/ [out]] 35 | #SET locn [group].[stem] 36 | #SET sup [#LOOKUPPROCESS /ANCESTOR/ [col]] 37 | 38 | #SET options [#REST] 39 | 40 | == Find newest Header file 41 | #SET htime 0 42 | #SET file [#FILENAMES /MAXIMUM 1/ *H] 43 | [#LOOP |WHILE| NOT [#EMPTYV file] 44 | |DO| 45 | #SET time [#FILEINFO /MODIFICATION/ [file]] 46 | [#IF time > htime |THEN| #SETV htime time] 47 | 48 | #SETV prev file 49 | #SET file [#FILENAMES /MAXIMUM 1, PREVIOUS [prev]/ *H] 50 | ] 51 | 52 | #SET stime [#FILEINFO /MODIFICATION/ [src]] 53 | #SET otime [#FILEINFO /MODIFICATION/ [obj]] 54 | 55 | #SET comp 0 56 | 57 | [#IF otime < htime 58 | |THEN| 59 | #OUTPUT Header file(s) changed since object [obj] compiled 60 | #SET comp -1 61 | ] 62 | 63 | [#IF otime < stime 64 | |THEN| 65 | #OUTPUT Source file [src] changed since object [obj] compiled 66 | #SET comp -1 67 | ] 68 | 69 | [#IF comp 70 | |THEN| 71 | SPOOLCOM /OUTV buf/ OPEN [sup];JOB (OWNER, LOC [locn]),STATUS,DELETE ! 72 | #SET buf 73 | #OUTPUT Compiling [src]... [options] 74 | C /IN [src], OUT [out].[stem]/[obj];SYMBOLS,HIGHPIN [options] 75 | [#CASE [tacl^completioncode] 76 | | 0 | 77 | #OUTPUT Compiled OK: [src] 78 | SPOOLCOM /OUTV buf/ OPEN [sup];JOB (OWNER, LOC [locn]),STATUS,DELETE ! 79 | #SET _completion:completioncode 0 80 | | 1 | 81 | #OUTPUT [src]: Compile Warnings 82 | SPOOLCOM /OUTV buf/ OPEN [sup];JOB (OWNER, LOC [locn]),STATUS 83 | #OUTPUTV buf 84 | |OTHERWISE| 85 | #OUTPUT [src]: Compile FAILED ! 86 | SPOOLCOM /OUTV buf/ OPEN [sup];JOB (OWNER, LOC [locn]),STATUS 87 | #OUTPUTV buf 88 | ] 89 | |ELSE| 90 | #OUTPUT Object file [obj] is up to date 91 | #SET _completion:completioncode 0 92 | ] 93 | 94 | #UNFRAME 95 | -------------------------------------------------------------------------------- /tandem/doit: -------------------------------------------------------------------------------- 1 | ?tacl macro 2 | #frame 3 | #push zipfile 4 | #SET zipfile [#FILEINFO /SUBVOL/ A] 5 | 6 | unzip -a [zipfile] *.c -x */* 7 | == Following not required 8 | RENAME apic apicz 9 | RENAME apihelpc apihelpz 10 | RENAME timezonc timezonz 11 | 12 | unzip -a [zipfile] *.h -x */* 13 | 14 | unzip -aj [zipfile] tandem/*.h 15 | 16 | unzip -aj [zipfile] tandem/*.c 17 | 18 | unzip -aj [zipfile] tandem/* -x tandem/*.* 19 | 20 | #unframe 21 | -------------------------------------------------------------------------------- /tandem/makesfx: -------------------------------------------------------------------------------- 1 | ?tacl routine 2 | #FRAME 3 | load /keep 1/ commacs 4 | 5 | #PUSH file prev memory OK model sfx lib accel unlicensed licensed options 6 | #PUSH #DEFAULTS 7 | 8 | load /keep 1/ macros 9 | 10 | #SET OK -1 11 | 12 | [#IF [#ARGUMENT /VALUE memory/ KEYWORD /WORDLIST LARGE WIDE/ OTHERWISE ]] 13 | [#IF [#ARGUMENT /VALUE unlicensed/ KEYWORD /WORDLIST UNLICENSED/ OTHERWISE ]] 14 | 15 | [#IF memory '=' "WIDE" 16 | |THEN| 17 | #SET model WIDE 18 | #SET sfx SFX 19 | |ELSE| 20 | #SET memory LARGE 21 | #SET model NOWIDE 22 | #SET sfx SFX 23 | ] 24 | #OUTPUT Creating SFX Module 25 | #SET lib [sfx]B 26 | #SET accel SFX 27 | 28 | #SET options [options], [model], define SFX 29 | 30 | [#IF unlicensed '=' "UNLICENSED" 31 | |THEN| 32 | #SET sfx [sfx]U 33 | #SET accel [accel]U 34 | #SET lib [lib]U 35 | |ELSE| 36 | #SET licensed LICENSED 37 | #SET options [options], define [licensed] 38 | ] 39 | 40 | #OUTPUT Memory Model : [memory] 41 | #OUTPUT Axcel Module : [accel] 42 | #OUTPUT Run Module : [sfx] 43 | 44 | [#IF [#FILEINFO /MODIFICATION/ EXTRACTC] > [#FILEINFO /MODIFICATION/ EXTRACTX] 45 | |THEN| 46 | #OUTPUT Compiling EXTRACTC for SFX 47 | C /IN EXTRACTC, OUT $T.#SFX.EXTRACT/EXTRACTX;SYMBOLS,HIGHPIN [options] 48 | |ELSE| 49 | #OUTPUT EXTRACT(SFX) is up to date 50 | ] 51 | 52 | [#IF [#FILEINFO /MODIFICATION/ PROCESSC] > [#FILEINFO /MODIFICATION/ PROCESSX] 53 | |THEN| 54 | #OUTPUT Compiling PROCESSC for SFX 55 | C /IN PROCESSC, OUT $T.#SFX.PROCESS/PROCESSX;SYMBOLS,HIGHPIN [options] 56 | |ELSE| 57 | #OUTPUT PROCESS(SFX) is up to date 58 | ] 59 | 60 | [#IF [#FILEINFO /MODIFICATION/ TANUNZC] > [#FILEINFO /MODIFICATION/ TANUNZX] 61 | |THEN| 62 | #OUTPUT Compiling TANUNZC for SFX 63 | C /IN TANUNZC , OUT $T.#SFX.TANUNZ /TANUNZX ;SYMBOLS,HIGHPIN [options] 64 | |ELSE| 65 | #OUTPUT TANUNZ(SFX) is up to date 66 | ] 67 | 68 | [#IF [#FILEINFO /MODIFICATION/ UNZIPC] > [#FILEINFO /MODIFICATION/ UNZIPX] 69 | |THEN| 70 | #OUTPUT Compiling UNZIPC for SFX 71 | C /IN UNZIPC , OUT $T.#SFX.UNZIP /UNZIPX ;SYMBOLS,HIGHPIN [options] 72 | |ELSE| 73 | #OUTPUT UNZIP(SFX) is up to date 74 | ] 75 | 76 | BBSFXLIB 77 | BBSFX [sfx] [memory] 78 | 79 | #UNFRAME 80 | -------------------------------------------------------------------------------- /tandem/tannsk.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2002 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* 10 | * Header declaration(s) which are forced to go after earlier includes 11 | */ 12 | 13 | #ifndef __tannsk_h /* prevent multiple inclusions */ 14 | #define __tannsk_h 15 | 16 | /* ztimbuf is declared in zip\tailor.h after include of tandem.h */ 17 | int utime (const char *, const ztimbuf *); 18 | 19 | #endif /* !__tannsk_h */ 20 | -------------------------------------------------------------------------------- /testmake.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/testmake.zip -------------------------------------------------------------------------------- /theos/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "theos" subdirectory for UnZip 5.41 and later: 2 | 3 | Contents this file 4 | makefile makefile for UnZip for THEOS architectures 5 | theos.c Theos-specific support routines 6 | thscfg.h 7 | charconv.h 8 | oldstat.h 9 | stat.h 10 | _fprintf.c 11 | _isatty.c 12 | _opendir.c 13 | _setargv.c 14 | _sprintf.c 15 | _stat.c 16 | 17 | Type "make" or "make help" to get general compile instructions (beyond 18 | those in the INSTALL file), or "make list" for a list of makefile targets. 19 | Note that there are some MS-DOS and cross-compilation targets thrown in 20 | just to make things more exciting. 21 | -------------------------------------------------------------------------------- /theos/_fprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #include 10 | #include 11 | 12 | /* for Info and similar macroes. fprintf is already a macro and fprintf x 13 | * fools the preprocessor 14 | */ 15 | 16 | int _fprintf(FILE* fp, const char* fmt, ...) 17 | { 18 | va_list ap; 19 | long n; 20 | 21 | va_start(ap, fmt); 22 | n = vfprintf(fp, fmt, (long*) ap); 23 | va_end(ap); 24 | return n; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /theos/_isatty.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* replace standard library function who needs a FILE* */ 10 | 11 | #pragma library 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | short _isatty(int fd) 19 | { 20 | register short lub; 21 | 22 | lub = (int) _fcntl(&stdin[fd], 5, (size_t) 0); 23 | return (lub >= CONIN && lub <= CONOUT) 24 | || (lub >= COM1 && lub <= COM4) 25 | || (lub >= COM5 && lub <= COM16); 26 | } 27 | -------------------------------------------------------------------------------- /theos/_sprintf.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #include 10 | #include 11 | 12 | /* for Info and similar macroes. fprintf is already a macro and fprintf x 13 | * fools the preprocessor 14 | */ 15 | 16 | int _sprintf(char *s, const char *fmt, ...) 17 | { 18 | va_list ap; 19 | long n; 20 | 21 | va_start(ap, fmt); 22 | n = vsprintf(s, fmt, (long*) ap); 23 | va_end(ap); 24 | return n; 25 | } 26 | 27 | -------------------------------------------------------------------------------- /theos/oldstat.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #define _THS_IFMT 0xff00 /* type of file */ 10 | #define _THS_IFLIB 0x8000 /* library */ 11 | #define _THS_IFDIR 0x4000 /* directory */ 12 | #define _THS_IFCHR 0x2000 /* character device */ 13 | #define _THS_IFREG 0x1000 /* regular file */ 14 | #define _THS_IODRC 0x0800 /* direct */ 15 | #define _THS_IOKEY 0x0400 /* keyed */ 16 | #define _THS_IOIND 0x0200 /* indexed */ 17 | #define _THS_IOPRG 0x0100 /* program */ 18 | #define _THS_IO286 0x2100 /* program */ 19 | #define _THS_IO386 0x4100 /* program */ 20 | #define _THS_IREAD 0x0001 /* read permission */ 21 | #define _THS_IWRITE 0x0002 /* write permission */ 22 | #define _THS_IEXEC 0x0004 /* execute permission */ 23 | #define _THS_IERASE 0x0008 /* erase permission */ 24 | #define _THS_IRWXU 0x000f /* read, write, execute, erase: owner */ 25 | #define _THS_IRUSR 0x0001 /* read permission: owner */ 26 | #define _THS_IWUSR 0x0002 /* write permission: owner */ 27 | #define _THS_IXUSR 0x0004 /* execute permission: owner */ 28 | #define _THS_IEUSR 0x0008 /* erase permission: owner */ 29 | #define _THS_IROTH 0x0010 /* read permission: other */ 30 | #define _THS_IWOTH 0x0020 /* write permission: other */ 31 | #define _THS_IXOTH 0x0040 /* execute permission: other */ 32 | #define _THS_HIDDN 0x0080 /* hidden, 0 = true */ 33 | -------------------------------------------------------------------------------- /theos/thscfg.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef __theos_thscfg_h 10 | #define __theos_thscfg_h 11 | 12 | #include /* dup proto & unix system calls live here */ 13 | #define _HANDLE_DEFINED 14 | #include /* O_BINARY for open() w/o CR/LF translation */ 15 | #include 16 | #include 17 | #include /* off_t, time_t, dev_t, ... */ 18 | #include "theos/stat.h" 19 | #include 20 | #define GOT_UTIMBUF 21 | #define DATE_FORMAT dateformat() 22 | #define SCREENLINES screenlines() 23 | #define USE_EF_UT_TIME 24 | #define DIR_END '/' 25 | #define INT_SPRINTF 26 | #define lenEOL 1 27 | #define PutNativeEOL *q++ = native(CR); 28 | #define PIPE_ERROR (errno = 9999) 29 | #define isatty(a) _isatty(a) 30 | #undef match 31 | int open(const char *name, int mode, ...); 32 | size_t read(int fd, char *buf, size_t len); 33 | size_t write(int fd, char *buf, size_t len); 34 | unsigned long lseek(int fd, long offset, int base); 35 | int close(int); 36 | int _fprintf(FILE *fp, const char *fmt, ...); 37 | int _isatty(int); 38 | typedef unsigned char uid_t; 39 | typedef unsigned char gid_t; 40 | 41 | extern int _sprintf(char *s, const char *fmt, ...); 42 | 43 | #ifndef NO_BOGUS_SPC 44 | # include 45 | # undef fprintf 46 | # undef sprintf 47 | # define fprintf _fprintf 48 | # define sprintf _sprintf 49 | #else /* NO_BOGUS_SPC */ 50 | #ifndef Info /* may already have been defined for redirection */ 51 | # ifdef FUNZIP 52 | # define Info(buf,flag,sprf_arg) \ 53 | fprintf((flag)&1? stderr : stdout, (char *)(_sprintf sprf_arg, (buf))) 54 | # else 55 | # define Info(buf,flag,sprf_arg) \ 56 | UzpMessagePrnt((zvoid *)&G, (uch *)(buf), (ulg)_sprintf sprf_arg, (flag)) 57 | # endif 58 | #endif /* !Info */ 59 | #endif /* ?NO_BOGUS_SPC */ 60 | 61 | #endif /* !__theos_thscfg_h */ 62 | 63 | -------------------------------------------------------------------------------- /timezone.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2001 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in zip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef __timezone_h 10 | #define __timezone_h 11 | 12 | #ifndef IZ_MKTIME_ONLY 13 | 14 | /* limits for our timezone info data: 15 | * we support only basic standard and daylight time, with max 2 transitions 16 | * per year, but for the maximum range of years a 32-bit second counter 17 | * can cover (these are 136 years plus a bit more than one month) 18 | */ 19 | #define TZ_MAX_TIMES 272 /* (=2*(LastGoodYr + 1 - FirstGoodYr) */ 20 | #define TZ_MAX_TYPES 2 /* We only support basic standard and daylight */ 21 | #ifdef WIN32 /* Win32 tzinfo supplies at max (2 * 32) chars of tz names */ 22 | #define TZ_MAX_CHARS 64 /* Maximum number of abbreviation characters */ 23 | #else 24 | #define TZ_MAX_CHARS 50 /* Maximum number of abbreviation characters */ 25 | #endif 26 | 27 | /* supported types of transition rules */ 28 | #define JULIAN_DAY 0 /* Jn - Julian day */ 29 | #define DAY_OF_YEAR 1 /* n - day of year */ 30 | #define MONTH_NTH_DAY_OF_WEEK 2 /* Mm.n.d - month, week, day of week */ 31 | 32 | 33 | struct ttinfo { 34 | long tt_gmtoff; /* UTC offset in seconds */ 35 | int tt_isdst; /* used to set tm_isdst */ 36 | int tt_abbrind; /* abbreviation list index */ 37 | }; 38 | 39 | struct state { 40 | int timecnt; 41 | int typecnt; 42 | int charcnt; 43 | time_t ats[TZ_MAX_TIMES]; 44 | unsigned char types[TZ_MAX_TIMES]; 45 | struct ttinfo ttis[TZ_MAX_TYPES]; 46 | char chars[TZ_MAX_CHARS]; 47 | }; 48 | 49 | struct rule { 50 | int r_type; /* type of rule--JULIAN_DAY etc */ 51 | int r_day; /* day number of rule */ 52 | int r_week; /* week number of rule */ 53 | int r_mon; /* month number of rule */ 54 | long r_time; /* transition time of rule */ 55 | }; 56 | 57 | extern int real_timezone_is_set; /* set by tzset() */ 58 | 59 | 60 | /* prototypes of functions not in time.h */ 61 | 62 | void __tzset OF((void)); 63 | 64 | #ifdef NEED__ISINDST 65 | int _isindst OF((struct tm *tb)); 66 | #endif 67 | 68 | /* callback function to be supplied by the program that uses this library */ 69 | int GetPlatformLocalTimezone OF((register struct state * ZCONST sp, 70 | void (*fill_tzstate_from_rules)(struct state * ZCONST sp_res, 71 | ZCONST struct rule * ZCONST start, 72 | ZCONST struct rule * ZCONST end))); 73 | #ifdef IZTZ_SETLOCALTZINFO 74 | void set_TZ OF((long time_zone, int day_light)); 75 | #endif 76 | 77 | #endif /* !IZ_MKTIME_ONLY */ 78 | 79 | time_t mkgmtime OF((struct tm *tm)); 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /tops20/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "tops20" sub-archive for UnZip 5.3 and later: 2 | 3 | Contents this file 4 | make.mic command file to make UnZip and ZipInfo with KCC 5 | rename.mic command file to rename Info-ZIP filenames to KCC format 6 | tops20.c TOPS20-specific routines for UnZip 7 | 8 | This port has not been updated since version 5.0. 9 | -------------------------------------------------------------------------------- /tops20/make.mic: -------------------------------------------------------------------------------- 1 | @te no pau e 2 | @cc -c -q unzip 3 | @cc -c -q crc32 4 | @cc -c -q crypt 5 | @cc -c -q envarg 6 | @cc -c -q explod 7 | @cc -c -q extrac 8 | @cc -c -q fileio 9 | @cc -c -q global 10 | @cc -c -q inflat 11 | @cc -c -q list 12 | @cc -c -q match 13 | @cc -c -q proces 14 | @cc -c -q ttyio 15 | @cc -c -q unredu 16 | @cc -c -q unshri 17 | @cc -c -q zipinf 18 | @cc -c -q tops20 19 | @cc -o unzip unzip.rel crc32.rel crypt.rel envarg.rel explod.rel extrac.rel fileio.rel global.rel inflat.rel match.rel proces.rel ttyio.rel unredu.rel unshri.rel zipinf.rel tops20.rel -ltmx 20 | @kmic 21 | -------------------------------------------------------------------------------- /tops20/rename.mic: -------------------------------------------------------------------------------- 1 | @rename envargs.c envarg.c 2 | @rename explode.c explod.c 3 | @rename extract.c extrac.c 4 | @rename globals.c global.c 5 | @rename inflate.c inflat.c 6 | @rename unreduce.c unredu.c 7 | @rename unshrink.c unshri.c 8 | @rename zipinfo.c zipinf.c 9 | @kmic 10 | -------------------------------------------------------------------------------- /ubz2err.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2008 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2007-Mar-04 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /*--------------------------------------------------------------------------- 10 | 11 | ubz2err.c 12 | 13 | This file contains the "fatal error" callback routine required by the 14 | "minimal" (silent, non-stdio) setup of the bzip2 compression library. 15 | 16 | The fatal bzip2 error bail-out routine is provided in a separate code 17 | module, so that it can be easily overridden when the UnZip package is 18 | used as a static link library. One example is the WinDLL static library 19 | usage for building a monolythic binary of the Windows application "WiZ" 20 | that supports bzip2 both in compression and decompression operations. 21 | 22 | Contains: bz_internal_error() (USE_BZIP2 only) 23 | 24 | ---------------------------------------------------------------------------*/ 25 | 26 | 27 | #define __UBZ2ERR_C /* identifies this source module */ 28 | #define UNZIP_INTERNAL 29 | #include "unzip.h" 30 | #ifdef WINDLL 31 | # ifdef POCKET_UNZIP 32 | # include "wince/intrface.h" 33 | # else 34 | # include "windll/windll.h" 35 | # endif 36 | #endif 37 | 38 | #ifdef USE_BZIP2 39 | 40 | /**********************************/ 41 | /* Function bz_internal_error() */ 42 | /**********************************/ 43 | 44 | /* Call-back function for the bzip2 decompression code (compiled with 45 | * BZ_NO_STDIO), required to handle fatal internal bug-type errors of 46 | * the bzip2 library. 47 | */ 48 | void bz_internal_error(bzerrcode) 49 | int bzerrcode; 50 | { 51 | GETGLOBALS(); 52 | 53 | Info(slide, 0x421, ((char *)slide, 54 | "error: internal fatal libbzip2 error number %d\n", bzerrcode)); 55 | #ifdef WINDLL 56 | longjmp(dll_error_return, 1); 57 | #else 58 | DESTROYGLOBALS(); 59 | EXIT(PK_BADERR); 60 | #endif 61 | } /* end function bz_internal_error() */ 62 | 63 | #endif /* USE_BZIP2 */ 64 | -------------------------------------------------------------------------------- /unix/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "unix" subdirectory for UnZip 6.0 and later: 2 | 3 | Contents this file 4 | Makefile makefile for UnZip for various architectures and OS's 5 | configure automatic build configuration script 6 | unix.c Unix-specific support routines 7 | unxcfg.h Unix-specific configuration settings 8 | zipgrep script to scan zip archive entries for lines matching a pattern 9 | Packaging/ subdirectory containing SysV.4 (e.g., Solaris 2.x) package info 10 | 11 | Type "make" or "make help" to get general compile instructions (beyond 12 | those in the INSTALL file), or "make list" for a list of makefile targets. 13 | Note that there are some MS-DOS and cross-compilation targets thrown in 14 | just to make things more exciting. 15 | -------------------------------------------------------------------------------- /unix/Packaging/README: -------------------------------------------------------------------------------- 1 | Solaris packaging 2 | ----------------- 3 | 4 | To generate a Solaris package for Info-ZIP UnZip utilities, 5 | first see the top level INSTALL and README files. Do a 6 | "make solaris", which will automatically build two Solaris 7 | installable package files for the package, IZunzip. 8 | 9 | IZunzip -- Solaris installable package in directory format. 10 | IZunzip_$(arch).pkg -- Solaris installable package in "stream" format. 11 | 12 | Where: $(arch) := system architecture, currently i386, sparc, or ppc. 13 | (use "uname -p" to determine) 14 | 15 | The ".pkg" file is a single file datastream that can be compressed 16 | and/or ftp'd. This is the recommended form, because all required 17 | files are resident in the archive, and it is easily distributed. 18 | 19 | To install, simply: 20 | 21 | 1) copy the package to the target system's /tmp directory. 22 | 2) login or su to root 23 | 3) pkgadd -d /tmp/IZunzip_$(arch).pkg 24 | 4) add /opt/Info-ZIP/IZunzip/bin to PATH 25 | 5) add /opt/Info-ZIP/IZunzip/man to MANPATH 26 | 27 | This works for both SPARC and x86. 28 | 29 | Ongoing maintenance: 30 | 31 | Keep the files, "prototype" and "pkginfo.in" up to date. 32 | Observe variable substitutions made by "Makefile". 33 | See manpages for pkginfo(1), pkginfo(4), pkgmk(1), pkgproto(1) 34 | 35 | Variations: 36 | 37 | If you wish the base directory to be set to something other than 38 | /opt/Info-ZIP, change the setting BASEDIR in pkginfo.in and 39 | re-run the make. 40 | 41 | 42 | -John Bush (John.Bush@East.Sun.COM) 43 | July 20, 1996 44 | 45 | -------------------------------------------------------------------------------- /unix/Packaging/pkginfo.in: -------------------------------------------------------------------------------- 1 | PKG=IZunzip 2 | NAME=Info-ZIP UnZip Utilities 3 | CATEGORY=application 4 | VENDOR=Info-ZIP 5 | EMAIL=Zip-Bugs@lists.wku.edu 6 | HOTLINE=Zip-Bugs@lists.wku.edu 7 | DESC=Copyrighted FREEWARE. See README, WHERE, and LICENSE docs in pkg's doc dir. 8 | CLASSES=none 9 | BASEDIR=/opt/Info-ZIP 10 | #BASEDIR=/usr/local 11 | VERSION=".VERSION." 12 | PSTAMP=".PSTAMP." 13 | ARCH=".ARCH." 14 | -------------------------------------------------------------------------------- /unix/Packaging/postinstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Post installation script (simply inform installer about PATH etc) 4 | # 5 | echo " " 6 | echo " " 7 | echo "Installation is complete. Now, you should add the following" 8 | echo "(or equivalnet) commands to the appropriate initial user shell" 9 | echo "scripts (such as .profile, .login, etc) -- " 10 | echo " " 11 | echo " For korn or bourne shell:" 12 | echo " PATH=\${PATH}:${BASEDIR}/${PKG}/bin" 13 | echo " MANPATH=\${MANPATH}:${BASEDIR}/${PKG}/man" 14 | echo " export PATH MANPATH" 15 | echo " " 16 | echo " For C shell:" 17 | echo " set path=(\$path ${BASEDIR}/${PKG}/bin)" 18 | echo " setenv MANPATH \$MANPATH:${BASEDIR}/${PKG}/man" 19 | echo " " 20 | echo " See the files under ${BASEDIR}/${PKG}/doc for more information." 21 | echo " " 22 | exit 0 23 | -------------------------------------------------------------------------------- /unix/Packaging/preinstall.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo " " 3 | echo "REPORT ALL BUGS, PROBLEMS, AND ACCOLADES TO:" 4 | echo " " 5 | echo " Zip-Bugs@lists.wku.edu" 6 | echo " " 7 | echo "Checking architecture platform for .ARCH. ..." 8 | arch=`uname -p` 9 | if [ "arch_${arch}" != "arch_.ARCH." ]; then 10 | echo " " 11 | echo "This product MUST be installed on a Solaris .ARCH. platform." 12 | echo "Your machine looks like it is a ${arch} platform." 13 | echo "Please install the version for the .ARCH. architecture." 14 | echo "Aborting the installation because of this. " 15 | echo " " 16 | returncode=1 17 | else 18 | echo " " 19 | echo "This product works on .ARCH., which you happen to have!" 20 | echo " " 21 | returncode=0 22 | fi 23 | echo " " 24 | /usr/bin/sleep 4 25 | exit ${returncode:-1} 26 | # 27 | -------------------------------------------------------------------------------- /unix/Packaging/prototype: -------------------------------------------------------------------------------- 1 | d none $BASEDIR 0755 root bin 2 | d none $BASEDIR/$PKG 0755 root bin 3 | d none $PKG/bin 0755 root bin 4 | f none $PKG/bin/unzip=unzip 0755 root bin 5 | f none $PKG/bin/funzip=funzip 0755 root bin 6 | f none $PKG/bin/unzipsfx=unzipsfx 0755 root bin 7 | f none $PKG/bin/zipgrep=unix/zipgrep 0755 root bin 8 | s none $PKG/bin/zipinfo=unzip 9 | d none $PKG/doc 0755 root bin 10 | f none $PKG/doc/ZipPorts=proginfo/ZipPorts 0644 root bin 11 | f none $PKG/doc/CONTRIBS=proginfo/CONTRIBS 0644 root bin 12 | f none $PKG/doc/COPYING.OLD=COPYING.OLD 0644 root bin 13 | f none $PKG/doc/LICENSE=LICENSE 0644 root bin 14 | f none $PKG/doc/README=README 0644 root bin 15 | f none $PKG/doc/WHERE=WHERE 0644 root bin 16 | f none $PKG/doc/INSTALL=INSTALL 0644 root bin 17 | f none $PKG/doc/funzip.txt=funzip.txt 0644 root bin 18 | f none $PKG/doc/unzip.txt=unzip.txt 0644 root bin 19 | f none $PKG/doc/unzipsfx.txt=unzipsfx.txt 0644 root bin 20 | f none $PKG/doc/zipgrep.txt=zipgrep.txt 0644 root bin 21 | f none $PKG/doc/zipinfo.txt=zipinfo.txt 0644 root bin 22 | d none $PKG/man 0755 root bin 23 | d none $PKG/man/man1 0755 root bin 24 | f none $PKG/man/man1/funzip.1=man/funzip.1 0644 root bin 25 | f none $PKG/man/man1/unzip.1=man/unzip.1 0644 root bin 26 | f none $PKG/man/man1/unzipsfx.1=man/unzipsfx.1 0644 root bin 27 | f none $PKG/man/man1/zipgrep.1=man/zipgrep.1 0644 root bin 28 | f none $PKG/man/man1/zipinfo.1=man/zipinfo.1 0644 root bin 29 | i pkginfo 30 | i prototype 31 | i README 32 | i preinstall 33 | i postinstall 34 | -------------------------------------------------------------------------------- /unix/zipgrep: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # zipgrep: Use unzip and egrep to search the specified members of a 4 | # Zip archive for a string or pattern. Search all members if no members 5 | # are specified explicitly. The script attempts to handle egrep's "-h" 6 | # and "-l" options internally. 7 | # 8 | # This script assumes that the desired "unzip" and "egrep" (and "sed") 9 | # programs are on the user's PATH. 10 | # 11 | 12 | pat="" 13 | opt="" 14 | while test $# -ne 0; do 15 | case "$1" in 16 | -e | -f) opt="$opt $1"; shift; pat="$1";; 17 | -*) opt="$opt $1";; 18 | *) if test -z "$pat"; then 19 | pat="$1" 20 | else 21 | break; 22 | fi;; 23 | esac 24 | shift 25 | done 26 | 27 | if test $# = 0; then 28 | echo usage: `basename "$0"` "[egrep_options] pattern zipfile [members...]" 29 | echo Uses unzip and egrep to search the zip members for a string or pattern. 30 | exit 1 31 | fi 32 | zipfile="$1"; shift 33 | 34 | list=0 35 | silent=0 36 | opt=`echo "$opt" | sed -e 's/ //g' -e 's/-//g'` 37 | case "$opt" in 38 | *l*) list=1; opt=`echo $opt | sed s/l//` 39 | esac 40 | case "$opt" in 41 | *h*) silent=1 42 | esac 43 | if test -n "$opt"; then 44 | opt="-$opt" 45 | fi 46 | 47 | status_grep_global=1 48 | IFS=' 49 | ' 50 | 51 | # Escape shell-special characters in "pat". 52 | pat=` echo "$pat" | \ 53 | sed -e 's/\\\\/\\\\\\\\/g' -e 's/|/\\\|/g' -e 's/&/\\\&/g' ` 54 | 55 | # Use "unzip -Z1" to get a listing of the specified members from the 56 | # specified archive. Escape any backslashes in a file name. 57 | for i in `unzip -Z1 "$zipfile" ${1+"$@"} | sed -e 's/\\\\/\\\\\\\\/g' `; do 58 | if test $list -eq 1; then 59 | # "-l": Show only the archive member name, not the matching line(s). 60 | unzip -p-L "$zipfile" "$i" | \ 61 | egrep $opt "$pat" > /dev/null && echo "$i" 62 | status_grep=$? 63 | elif test $silent -eq 1; then 64 | # "-h": Show only the matching line(s), not the archive member name. 65 | # ("-s" in "opt" will silence "egrep", stopping all output.) 66 | unzip -p-L "$zipfile" "$i" | \ 67 | egrep $opt "$pat" 68 | status_grep=$? 69 | else 70 | # Escape (or re-escape) shell-special characters in the archive 71 | # member name, "i". 72 | i=` echo "$i" | \ 73 | sed -e 's/\\\\/\\\\\\\\/g' -e 's/|/\\\|/g' -e 's/&/\\\&/g' ` 74 | 75 | # Globally, send fd 4 to stdout. In the pipeline, send normal 76 | # stdout to fd 4, and send grep status to fd 3. Collect fd 3 77 | # with ``. 78 | exec 4>&1 79 | status_grep=` ( \ 80 | ( unzip -p-L "$zipfile" "$i" | \ 81 | egrep $opt "$pat" 1>&4 ; echo $? >&3 ) 4>&1 | \ 82 | sed "s|^|${i}:|" 1>&4 \ 83 | ) 3>&1 ` 84 | fi 85 | 86 | # Save the primary command status. (May be the grep status.) 87 | sts=$? 88 | # If this grep status was zero, set the global grep status to zero. 89 | test "$status_grep" -eq 0 && status_grep_global=0 90 | # If this grep status was not zero or one, exit now. 91 | test "$status_grep" -gt 1 && exit "$status_grep" 92 | 93 | done 94 | 95 | # If "sts" is good (0), then exit with the global grep status. 96 | # Else, when "sts" is bad, exit with the worst status we can find. 97 | if test $sts -eq 0 ; then 98 | exit $status_grep_global 99 | else 100 | if test "$status_grep" -gt 1 ; then 101 | exit "$status_grep" 102 | else 103 | exit $sts 104 | fi 105 | fi 106 | -------------------------------------------------------------------------------- /unreduce.c: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2002 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /*--------------------------------------------------------------------------- 10 | 11 | unreduce.c 12 | 13 | Copyright-clean dummy module, without any real code. 14 | 15 | If you really need unreduce support, replace this module by the full 16 | source code, available as add-on package from our distribution site. 17 | 18 | ---------------------------------------------------------------------------*/ 19 | 20 | 21 | #define __UNREDUCE_C /* identifies this source module */ 22 | #define UNZIP_INTERNAL 23 | #include "unzip.h" /* defines COPYRIGHT_CLEAN by default */ 24 | 25 | 26 | #ifndef COPYRIGHT_CLEAN 27 | 28 | /* This line is indented to hide the #error directive from pure traditional 29 | * K&R C preprocessors. These do not recognize the #error directive, but 30 | * they also recognize only lines that start with a '#' in column 1 as 31 | * preprocessor directives. 32 | */ 33 | #error This dummy-module does not support the unreduce method! 34 | 35 | #endif /* !COPYRIGHT_CLEAN */ 36 | -------------------------------------------------------------------------------- /vms/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "vms" sub-archive for UnZip 6.00 and later: 2 | 3 | Contents this file 4 | INSTALL.VMS VMS-specific build and install instructions 5 | NOTES.TXT description of new features in VMS Zip 3.0 and UnZip 6.0 6 | README general VMS info about using UnZip and zipfiles 7 | UNZIP_MSG.MSG messages source for VMS built-in error message facility 8 | unzip_def.rnh UnZip default help page, RUNOFF format 9 | unzip_cli.help UnZip VMSCLI help page, TPU format 10 | unzipsfx.hlp UnZipSFX pre-formatted help page 11 | cvthelp.tpu TPU macro file to convert .help file to RUNOFF format 12 | cmdline.c VMS-style command-line-interface code (if VMSCLI defined) 13 | unz_cli.cld more VMS-command-line stuff (if VMSCLI defined) 14 | vms.c VMS file manipulation code 15 | vms.h VMS header file for UnZip 16 | vmscfg.h VMS-specific configuration settings 17 | vmsdefs.h VMS system declarations (missing C compiler support) 18 | build_unzip.com command file to build or (re-)link UnZip 19 | descrip.mms MMK/MMS makefile for UnZip/ZipInfo and UnZipSFX 20 | descrip_deps.mms MMK/MMS include file providing source dependencies 21 | descrip_mkdeps.mms MMK/MMS makefile for regenerating descrip_deps.mms 22 | descrip_src.mms MMK/MMS include file, provides environment setup 23 | collect_deps.com command file used in source dependencies creation 24 | mod_deps.com command file used in source dependencies creation 25 | unzip.opt options file used for linking unzip 26 | unzipsfx.opt options file used for linking unzipsfx 27 | makesfx.com command file to create self-extracting archives 28 | unixio_gcc.h unixio.h system header replacement for gcc 29 | unixlib_gcc.h unixlib.h system header replacement for gcc 30 | bzlib.h VMS wrapper header file for the bzip2 library definitions 31 | find_bzip2_lib.com command procedure to set up environment for bzip2 support 32 | infback9.h VMS wrapper header file for zlib inflate64 definitions 33 | zlib.h VMS wrapper header file for zlib library definitions 34 | 35 | MAKE/VMS is no longer supported since MMK (MMS clone by Matt Madison/MadGoat 36 | Enterprises, compatible with descrip.mms) is both free and becoming quite 37 | popular. MMK is available by anonymous ftp from ftp.spc.edu/ftp.wku.edu and 38 | by mailserver at lists.wku.edu. Check VMS newsgroups for announcements and 39 | exact location. 40 | 41 | Detailed compilation and installation instructions can be found in the 42 | INSTALL.VMS file in this directory. 43 | -------------------------------------------------------------------------------- /vms/UNZIP_MSG.MSG: -------------------------------------------------------------------------------- 1 | ! VMS Error Message Source File for UnZip 2 | ! 3 | ! Because the facility code was formally assigned by HP, the .FACILITY 4 | ! directive below specifies /SYSTEM. Because the messages are, in 5 | ! general, specific to UnZip, this file is not compiled with /SHARED. 6 | ! For example: 7 | ! 8 | ! MESSAGE /OBJECT = [.dest]UNZIP_MSG.OBJ /NOSYMBOLS [.VMS]UNZIP_MSG.MSG 9 | ! 10 | ! LINK /SHAREABLE = [.dest]UNZIP_MSG.EXE [.dest]UNZIP_MSG.OBJ 11 | ! 12 | !----------------------------------------------------------------------- 13 | 14 | .TITLE Info-ZIP UnZip Error Messages 15 | .FACILITY IZ_UNZIP, 1954 /SYSTEM 16 | .IDENT 'V6.0-000' 17 | 18 | ! PK_ 19 | .BASE 0 20 | OK /SUCCESS 21 | .BASE 2 22 | WARN /WARNING 23 | .BASE 4 24 | ERR /ERROR 25 | .BASE 6 26 | BADERR /SEVERE 27 | .BASE 8 28 | MEM /SEVERE 29 | .BASE 10 30 | MEM2 /SEVERE 31 | .BASE 12 32 | MEM3 /SEVERE 33 | .BASE 14 34 | MEM4 /SEVERE 35 | .BASE 16 36 | MEM5 /SEVERE 37 | .BASE 18 38 | NOZIP /ERROR 39 | .BASE 20 40 | PARAM /ERROR 41 | .BASE 22 42 | FIND /ERROR 43 | 44 | .BASE 100 45 | DISK /SEVERE 46 | .BASE 102 47 | EOF /SEVERE 48 | 49 | ! IZ_ 50 | .BASE 160 51 | CTRLC /ERROR 52 | .BASE 162 53 | UNSUP /ERROR 54 | .BASE 164 55 | BADPWD /ERROR 56 | .BASE 166 57 | ERRBF /ERROR 58 | 59 | .END 60 | -------------------------------------------------------------------------------- /vms/bzlib.h: -------------------------------------------------------------------------------- 1 | /* 2007-01-02 SMS. 2 | * VMS-specific BZLIB.H jacket header file to ensure compatibility with 3 | * BZIP2 code compiled using /NAMES = AS_IS. 4 | * 5 | * The logical name INCL_BZIP2 must point to the BZIP2 source directory. 6 | * 7 | * A "names as_is" prototype for bz_internal_error() is included for the 8 | * same reason. See bzip2 "bzlib_private.h". Note that this "names 9 | * as_is" prototype must be the first to be read by the compiler, but 10 | * one or more other prototypes (perhaps with the default "names" 11 | * attributes) should cause no trouble. 12 | */ 13 | 14 | #pragma names save 15 | #pragma names as_is 16 | 17 | #include "INCL_BZIP2:BZLIB.H" 18 | 19 | extern void bz_internal_error ( int bzerrcode ); 20 | 21 | #pragma names restore 22 | -------------------------------------------------------------------------------- /vms/collect_deps.com: -------------------------------------------------------------------------------- 1 | $! 1 December 2006. SMS. 2 | $! 3 | $! Info-ZIP VMS accessory procedure. 4 | $! 5 | $! For the product named by P1, 6 | $! collect all source file dependencies specified by P3, 7 | $! and add P4 prefix. 8 | $! Convert absolute dependencies to relative from one level above P5. 9 | $! P2 = output file specification. 10 | $! 11 | $! MMS /EXTENDED_SYNTAX can't easily pass a macro invocation for P4, so 12 | $! we remove any internal spaces which might have been added to prevent 13 | $! immediate evaluation of a macro invocation. 14 | $! 15 | $ prefix = f$edit( p4, "COLLAPSE") 16 | $! 17 | $ dev_lose = f$edit( f$parse( p5, , , "DEVICE", "SYNTAX_ONLY"), "UPCASE") 18 | $ dir_lose = f$edit( f$parse( p5, , , "DIRECTORY", "SYNTAX_ONLY"), "UPCASE") 19 | $ suffix = ".VMS]" 20 | $ suffix_loc = f$locate( suffix, dir_lose) 21 | $ if (suffix_loc .lt f$length( dir_lose)) 22 | $ then 23 | $ dev_dir_lose = dev_lose+ dir_lose- suffix 24 | $ else 25 | $ dev_dir_lose = dev_lose+ dir_lose- "]" 26 | $ endif 27 | $! 28 | $! For portability, make the output file record format Stream_LF. 29 | $! 30 | $ create /fdl = sys$input 'p2' 31 | RECORD 32 | Carriage_Control carriage_return 33 | Format stream_lf 34 | $! 35 | $ open /read /write /error = end_main deps_out 'p2' 36 | $ on error then goto loop_main_end 37 | $! 38 | $! Include proper-inclusion-check preface. 39 | $! 40 | $ incl_macro = "INCL_"+ f$parse( p2, , , "NAME", "SYNTAX_ONLY") 41 | $ write deps_out "#" 42 | $ write deps_out "# ''p1' for VMS - MMS (or MMK) Source Dependency File." 43 | $ write deps_out "#" 44 | $ write deps_out "" 45 | $ write deps_out - 46 | "# This description file is included by other description files. It is" 47 | $ write deps_out - 48 | "# not intended to be used alone. Verify proper inclusion." 49 | $ write deps_out "" 50 | $ write deps_out ".IFDEF ''incl_macro'" 51 | $ write deps_out ".ELSE" 52 | $ write deps_out - 53 | "$$$$ THIS DESCRIPTION FILE IS NOT INTENDED TO BE USED THIS WAY." 54 | $ write deps_out ".ENDIF" 55 | $ write deps_out "" 56 | $! 57 | $! Actual dependencies from individual dependency files. 58 | $! 59 | $ loop_main_top: 60 | $ file = f$search( p3) 61 | $ if (file .eqs. "") then goto loop_main_end 62 | $! 63 | $ open /read /error = end_subs deps_in 'file' 64 | $ loop_subs_top: 65 | $ read /error = loop_subs_end deps_in line 66 | $ line_reduced = f$edit( line, "COMPRESS, TRIM, UPCASE") 67 | $ colon = f$locate( " : ", line_reduced) 68 | $ d_d_l_loc = f$locate( dev_dir_lose, - 69 | f$extract( (colon+ 3), 1000, line_reduced)) 70 | $ if (d_d_l_loc .eq. 0) 71 | $ then 72 | $ front = f$extract( 0, (colon+ 3), line_reduced) 73 | $ back = f$extract( (colon+ 3+ f$length( dev_dir_lose)), - 74 | 1000, line_reduced) 75 | $ line = front+ "["+ back 76 | $ endif 77 | $ write deps_out "''prefix'"+ "''line'" 78 | $ goto loop_subs_top 79 | $! 80 | $ loop_subs_end: 81 | $ close deps_in 82 | $! 83 | $ goto loop_main_top 84 | $! 85 | $ loop_main_end: 86 | $ close deps_out 87 | $! 88 | $ end_main: 89 | $! 90 | -------------------------------------------------------------------------------- /vms/find_bzip2_lib.com: -------------------------------------------------------------------------------- 1 | $! 28 December 2006. SMS. 2 | $! 3 | $! Info-ZIP VMS accessory procedure. 4 | $! 5 | $! Find the BZIP2 object library under P1, starting in the [.'P2'] 6 | $! destination directory. (We assume, initially, that the BZIP2 7 | $! directory has a destination directory structure like ours.) 8 | $! 9 | $! Set the P4 logical name to the directory where it was found. 10 | $! P5 and P6 may be used for qualifiers on the DEFINE command. 11 | $! 12 | $ bz_orig = p1 13 | $ dest = p2 14 | $ libbz2 = p3 15 | $! 16 | $! Remove any trailing colon, to allow logical name translation. 17 | $! 18 | $ bz_dev_dir = "" 19 | $ bz_base = bz_orig 20 | $ if (f$extract( (f$length( bz_base)- 1), 1, bz_base) .eqs. ":") 21 | $ then 22 | $ bz_base = bz_base- ":" 23 | $ endif 24 | $! 25 | $ bz_base_eqv = f$trnlnm( bz_base) 26 | $ if (bz_base_eqv .nes. "") 27 | $ then 28 | $ bz_orig = bz_base_eqv 29 | $ bz_base = bz_base_eqv 30 | $ endif 31 | $ bz_base = bz_base- "]" 32 | $! 33 | $! Candidate 1 = the actual analogue destination directory. 34 | $! 35 | $ bz_dev_dir_cand = bz_base+ "."+ dest+ "]" 36 | $ lib_cand = bz_dev_dir_cand+ libbz2 37 | $ if (f$search( lib_cand) .nes. "") 38 | $ then 39 | $ bz_dev_dir = bz_dev_dir_cand 40 | $ else 41 | $! 42 | $! Candidate 2 = the actual analogue destination directory + "L". 43 | $! 44 | $ bz_dev_dir_cand = bz_base+ "."+ dest+ "L]" 45 | $ lib_cand = bz_dev_dir_cand+ libbz2 46 | $ if (f$search( lib_cand) .nes. "") 47 | $ then 48 | $ bz_dev_dir = bz_dev_dir_cand 49 | $ else 50 | $! 51 | $! Candidate 3 = the actual user-specified directory. 52 | $! 53 | $ bz_dev_dir_cand = bz_orig 54 | $ lib_cand = bz_dev_dir_cand+ libbz2 55 | $ if (f$search( lib_cand) .nes. "") 56 | $ then 57 | $ bz_dev_dir = bz_dev_dir_cand 58 | $ endif 59 | $ endif 60 | $ endif 61 | $! 62 | $ if (bz_dev_dir .nes. "") 63 | $ then 64 | $ if (p4 .eqs. "") 65 | $ then 66 | $ write sys$output bz_dev_dir 67 | $ else 68 | $ define 'p5' 'p4' 'bz_dev_dir' 'p6' 69 | $ endif 70 | $ endif 71 | $! 72 | -------------------------------------------------------------------------------- /vms/hlp_lib_next.com: -------------------------------------------------------------------------------- 1 | $! 21 November 2004. SMS. 2 | $! 3 | $! HLP_LIB_NEXT.COM 4 | $! 5 | $! Find the next available HLP$LIBRARY[_*] logical name. 6 | $! 7 | $ base = "HLP$LIBRARY" 8 | $ candidate = base$ i = 0 9 | $! 10 | $ loop_top: 11 | $ if (i .gt. 0) then candidate = base+ "_"+ f$string( i) 12 | $ i = i+ 1 13 | $ if (f$trnlnm( candidate) .nes. "") then goto loop_top 14 | $! 15 | $ write sys$output candidate 16 | $! 17 | -------------------------------------------------------------------------------- /vms/infback9.h: -------------------------------------------------------------------------------- 1 | /* 2008-07-29 SMS. 2 | * VMS-specific INFBACK9.H jacket header file to help find the 3 | * relatively obscure actual header file. 4 | * 5 | * The logical name INCL_ZLIB_CONTRIB_INFBACK9 must point to the ZLIB 6 | * source subdirectory where infback9.h is situated. 7 | */ 8 | 9 | #include "INCL_ZLIB_CONTRIB_INFBACK9:INFBACK9.H" 10 | -------------------------------------------------------------------------------- /vms/makesfx.com: -------------------------------------------------------------------------------- 1 | $! 2 | $! MAKESFX.COM: command-procedure to create self-extracting ZIP archives 3 | $! usage: @MAKESFX foo (foo.zip -> foo.exe) 4 | $! 5 | $! Change history: 6 | $! 7 | $! Date Who What 8 | $! -------- ---- ----------------------------------------------------------- 9 | $! 19940804 MPJZ Created 10 | $! 19940810 GRR Removed superflous creation of name symbol 11 | $! 20000113 MPJZ Better symbol check, fixed bug in zip "-A" check 12 | $! 13 | $! MPJZ: Martin P.J. Zinser 14 | $! 15 | $! For this to work a symbol unzipsfx has to be defined which contains the 16 | $! location of the unzip stub (e.g., unzipsfx:== device:[dir]unzipsfx.exe) 17 | $! 18 | $! The zipfile given in p1 will be concatenated with unzipsfx and given a 19 | $! filename extension of .exe. The default file extension for p1 is .zip 20 | $! 21 | $! Use at your own risk, there is no guarantee here. If it doesn't work, 22 | $! blame me (zinser@decus.de), not the people from Info-ZIP. 23 | $! 24 | $!----------------------------------------------------------------------------- 25 | $! 26 | $! First check stub related stuff 27 | $! 28 | $ if (f$type(unzipsfx).nes."STRING") 29 | $ then 30 | $ type sys$input 31 | You need to define the symbol "unzipsfx" to point to the location of the 32 | unzipsfx stub before invoking this procedure. 33 | Exiting now... 34 | $ exit 2 35 | $ endif 36 | $ usfx = f$parse(unzipsfx) - ";" 37 | $ if (f$search(usfx).eqs."") 38 | $ then 39 | $ write sys$output "The unzipsfx stub can not be found on the location" 40 | $ write sys$output "pointed to by the unzipsfx symbol -- ''usfx'" 41 | $ write sys$output "Exiting now" 42 | $ exit 2 43 | $ endif 44 | $! 45 | $! Now check the input file 46 | $! 47 | $ if (p1.eqs."") 48 | $ then 49 | $ type sys$input 50 | Required parameter input-file missing 51 | Exiting now... 52 | $ exit 2 53 | $ endif 54 | $ inf = p1 55 | $ file = f$parse(inf,,,"DEVICE") + f$parse(inf,,,"DIRECTORY") + - 56 | f$parse(inf,,,"NAME") 57 | $ finf = file + f$parse(inf,".ZIP",,"TYPE") + f$parse(inf,,,"VERSION") 58 | $ if (f$search(finf).eqs."") 59 | $ then 60 | $ write sys$output "Input file ''finf' does not exist" 61 | $ exit 2 62 | $ endif 63 | $! 64 | $! Finally create the self-extracting archive 65 | $! 66 | $ copy 'usfx','finf' 'file'.exe 67 | $! 68 | $! Zip "-A" will make the resulting archive compatible with other 69 | $! unzip programs, but is not essential for running the exe. 70 | $! 71 | $ if (f$type(zip).eqs."STRING") then zip "-A" 'file'.exe 72 | $ exit 73 | -------------------------------------------------------------------------------- /vms/mod_dep.com: -------------------------------------------------------------------------------- 1 | $! 3 March 2005. SMS. 2 | $! 3 | $! Info-ZIP VMS accessory procedure. 4 | $! 5 | $! Modify a dependencies file (P1), changing the object file name to 6 | $! P2. 7 | $! P3 = output file specification. 8 | $! 9 | $! 10 | $ prefix = f$edit( p3, "COLLAPSE") 11 | $! 12 | $! Strip any device:[directory] from P2. 13 | $! 14 | $ obj_name = f$parse( P2, , , "NAME", "SYNTAX_ONLY")+ - 15 | f$parse( P2, , , "TYPE", "SYNTAX_ONLY") 16 | $! 17 | $ open /read /error = end_main deps_in 'p1' 18 | $ open /write /error = end_main deps_out 'p3' 19 | $ on error then goto loop_main_end 20 | $ loop_main_top: 21 | $ read /error = loop_main_end deps_in line 22 | $ line_reduced = f$edit( line, "COMPRESS, TRIM") 23 | $ colon = f$locate( " : ", line_reduced) 24 | $ line = obj_name+ f$extract( colon, 2000, line) 25 | $ write deps_out "''line'" 26 | $ goto loop_main_top 27 | $! 28 | $ loop_main_end: 29 | $ close deps_in 30 | $ close deps_out 31 | $! 32 | $ end_main: 33 | $! 34 | -------------------------------------------------------------------------------- /vms/unixio_gcc.h: -------------------------------------------------------------------------------- 1 | /* 2004-12-12 SMS. 2 | * 3 | * Emergency replacement UNIXIO.H for GNU C, for use as needed. 4 | * Install as GNU_CC_INCLUDE:[000000]UNIXIO.H 5 | */ 6 | 7 | #ifndef __UNIXIO_LOADED 8 | #define __UNIXIO_LOADED 1 9 | 10 | #include 11 | 12 | #include 13 | 14 | #ifndef SEEK_SET 15 | # define SEEK_SET 0 16 | #endif /* ndef SEEK_SET */ 17 | 18 | #ifndef SEEK_CUR 19 | # define SEEK_CUR 1 20 | #endif /* ndef SEEK_CUR */ 21 | 22 | #ifndef SEEK_END 23 | # define SEEK_END 2 24 | #endif /* ndef SEEK_END */ 25 | 26 | #endif /* ndef __UNIXIO_LOADED */ 27 | 28 | -------------------------------------------------------------------------------- /vms/unixlib_gcc.h: -------------------------------------------------------------------------------- 1 | /* 2004-12-12 SMS. 2 | * 3 | * Emergency replacement UNIXLIB.H for GNU C, for use as needed. 4 | * Install as GNU_CC_INCLUDE:[000000]UNIXLIB.H 5 | */ 6 | 7 | #ifndef __UNIXLIB_LOADED 8 | #define __UNIXLIB_LOADED 1 9 | 10 | #include 11 | #include 12 | 13 | typedef struct stat stat_t; 14 | 15 | #endif /* ndef __UNIXLIB_LOADED */ 16 | 17 | -------------------------------------------------------------------------------- /vms/unzip.opt: -------------------------------------------------------------------------------- 1 | Ident = "UnZip 6.0" 2 | -------------------------------------------------------------------------------- /vms/unzipsfx.opt: -------------------------------------------------------------------------------- 1 | Ident = "UnZipSFX 6.0" 2 | -------------------------------------------------------------------------------- /vms/zlib.h: -------------------------------------------------------------------------------- 1 | /* 2008-07-26 SMS. 2 | * VMS-specific ZLIB.H jacket header file. 3 | * 4 | * The logical name INCL_ZLIB must point to the ZLIB source directory. 5 | */ 6 | 7 | #include "INCL_ZLIB:ZLIB.H" 8 | -------------------------------------------------------------------------------- /win32/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "win32" sub-archive for UnZip 6.0 and later: 2 | 3 | Contents this file 4 | Makefile makefile for UnZip using MS Visual C++ 5 | Makefile.bc makefile for UnZip using Borland C++ 6 | Makefile.dj makefile for UnZip using djgpp v2.x with rsxntdj 1.31 7 | Makefile.emx makefile for UnZip using emx+gcc 0.9c with RSXNT 1.4 (+) 8 | Makefile.gcc makefile for UnZip using native Win32 gcc ports (Cygwin, MinGW) 9 | Makefile.lcc makefile for UnZip using free LCC-Win32 compiler 10 | Makefile.wat makefile for UnZip using Watcom C/C++ 11 | crc_i386.asm 32-bit Intel-assembler version of CRC routine 12 | crc_i386.c ditto, for MS[V]C with no MASM only 13 | crc_lcc.asm ditto, adapted for LCC-Win32 assembler syntax 14 | nt.c WinNT-specific support routines (ACLs/security descriptors) 15 | nt.h WinNT-specific support header 16 | rsxntwin.h supplement header for RSXNT, fills holes in their 17 | w32cfg.h Win32-specific configuration, included by unzpriv.h 18 | win32.c Win32-specific support routines 19 | win32i64.c 20 | winapp.rc resource file for regular console-mode UnZip application 21 | vc6/ directory containing Visual C++ 6.0 project files 22 | funzip.dsp MSVC++ 6.0 project file for fUnZip command-line tool 23 | unzip.dsp MSVC++ 6.0 project file for UnZip command-line main program 24 | unzipsfx.dsp MSVC++ 6.0 project file for UnZipSFX console mode stub 25 | unzipbz2.dsp MSVC++ 6.0 project file for UnZip with bzip2 support 26 | bz2lib.dsp MSVC++ 6.0 project file for bz2lib (de)compression library 27 | unzip.dsw MSVC++ 6.0 workspace file for all UnZip command line tools 28 | vc8/ directory containing Visual C++ 2005 (8.0) project files 29 | funzip.vcproj MSVC++ 8.0 project file for fUnZip command-line tool 30 | unzip.vcproj MSVC++ 8.0 project file for UnZip command-line main program 31 | unzipsfx.vcproj MSVC++ 8.0 project file for UnZipSFX console mode stub 32 | unzipbz2.vcproj MSVC++ 8.0 project file for UnZip with bzip2 support 33 | bz2lib.vcproj MSVC++ 8.0 project file for bz2lib (de)compression library 34 | unzip.sln MSVC++ 8.0 workspace file for all UnZip command line tools 35 | 36 | crc_i386.c has been tested with MSVC and can be selected through the MSVC 37 | makefile. It is provided for those who may have MSVC but no assembler. 38 | Note that some C compilers on Pentium-class machines have been reported 39 | to emit faster code from the plain C sources (crc32.c) than the assembler 40 | routines provide. This has not been tested lately, however. 41 | -------------------------------------------------------------------------------- /win32/nt.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2005 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* nt.h: central header for EF_NTSD "SD" extra field */ 10 | 11 | #ifndef _NT_H 12 | #define _NT_H 13 | 14 | #define NTSD_BUFFERSIZE (1024) /* threshold to cause malloc() */ 15 | #define OVERRIDE_BACKUP 1 /* we have SeBackupPrivilege on remote */ 16 | #define OVERRIDE_RESTORE 2 /* we have SeRestorePrivilege on remote */ 17 | #define OVERRIDE_SACL 4 /* we have SeSystemSecurityPrivilege on remote */ 18 | 19 | typedef struct { 20 | BOOL bValid; /* are our contents valid? */ 21 | BOOL bUsePrivileges; /* use privilege overrides? */ 22 | DWORD dwFileSystemFlags; /* describes target file system */ 23 | BOOL bRemote; /* is volume remote? */ 24 | DWORD dwRemotePrivileges; /* relevant only on remote volumes */ 25 | DWORD dwFileAttributes; 26 | char RootPath[MAX_PATH+1]; /* path to network / filesystem */ 27 | } VOLUMECAPS, *PVOLUMECAPS, *LPVOLUMECAPS; 28 | 29 | BOOL SecuritySet(char *resource, PVOLUMECAPS VolumeCaps, uch *securitydata); 30 | BOOL GetVolumeCaps(char *rootpath, char *name, PVOLUMECAPS VolumeCaps); 31 | BOOL ValidateSecurity(uch *securitydata); 32 | 33 | #endif /* _NT_H */ 34 | -------------------------------------------------------------------------------- /win32/vc6/bz2lib.dsp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/win32/vc6/bz2lib.dsp -------------------------------------------------------------------------------- /win32/vc6/unzip.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "bz2lib"=".\bz2lib.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "funzip"=".\funzip.dsp" - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "unzip"=".\unzip.dsp" - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | Project: "unzipbz2"=".\unzipbz2.dsp" - Package Owner=<4> 43 | 44 | Package=<5> 45 | {{{ 46 | }}} 47 | 48 | Package=<4> 49 | {{{ 50 | Begin Project Dependency 51 | Project_Dep_Name bz2lib 52 | End Project Dependency 53 | }}} 54 | 55 | ############################################################################### 56 | 57 | Project: "unzipsfx"=".\unzipsfx.dsp" - Package Owner=<4> 58 | 59 | Package=<5> 60 | {{{ 61 | }}} 62 | 63 | Package=<4> 64 | {{{ 65 | }}} 66 | 67 | ############################################################################### 68 | 69 | Global: 70 | 71 | Package=<5> 72 | {{{ 73 | }}} 74 | 75 | Package=<3> 76 | {{{ 77 | }}} 78 | 79 | ############################################################################### 80 | 81 | -------------------------------------------------------------------------------- /win32/winapp.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #if (defined(WIN32) && !defined(__EMX__) && !defined(__MINGW32__)) 3 | #include 4 | #endif 5 | #include "../unzvers.h" 6 | 7 | VS_VERSION_INFO VERSIONINFO 8 | FILEVERSION UZ_MAJORVER,UZ_MINORVER,UZ_PATCHLEVEL,0 9 | PRODUCTVERSION UZ_MAJORVER,UZ_MINORVER,UZ_PATCHLEVEL,0 10 | FILEFLAGSMASK 0x3L 11 | #ifdef _DEBUG 12 | FILEFLAGS 0x1L 13 | #else 14 | FILEFLAGS 0x0L 15 | #endif 16 | FILEOS VOS__WINDOWS32 17 | FILETYPE VFT_APP 18 | FILESUBTYPE 0x0L 19 | BEGIN 20 | BLOCK "StringFileInfo" 21 | BEGIN 22 | #ifdef _UNICODE 23 | BLOCK "040904B0" 24 | #else 25 | BLOCK "040904E4" 26 | #endif 27 | BEGIN 28 | VALUE "Comments", "\0" 29 | VALUE "CompanyName", IZ_COMPANY_NAME "\0" 30 | VALUE "FileDescription", "Info-ZIP's UnZip for Win32 console\0" 31 | VALUE "FileVersion", UZ_VER_STRING "\0" 32 | VALUE "InternalName", "UnZip\0" 33 | VALUE "LegalCopyright", "Info-ZIP 1996-2009\0" 34 | VALUE "LegalTrademarks", "\0" 35 | VALUE "OriginalFilename", "UNZIP.EXE\0" 36 | VALUE "PrivateBuild", "\0" 37 | VALUE "ProductName", "Info-ZIP's UnZip for Windows\0" 38 | VALUE "ProductVersion", UZ_VER_STRING "\0" 39 | VALUE "SpecialBuild", "\0" 40 | END 41 | END 42 | BLOCK "VarFileInfo" 43 | BEGIN 44 | #ifdef _UNICODE 45 | VALUE "Translation", 0x409, 1200 46 | #else 47 | VALUE "Translation", 0x409, 1252 48 | #endif 49 | END 50 | END 51 | -------------------------------------------------------------------------------- /wince/Contents: -------------------------------------------------------------------------------- 1 | Contents of the "WinCE" subdirectory for UnZip 5.52 and later: 2 | 3 | Contents This file. 4 | README Information about the Windows CE port and its author. 5 | punzip.h Main header file for the entire Pocket UnZip project. 6 | wcecfg.h Common system-specific configurations for Windows CE port code. 7 | wcemain.c Main entry code for Win CE command line tool. 8 | winmain.cpp Contains the entire user interface and all Windows code. 9 | winmain.h Header for winmain.cpp. 10 | intrface.cpp The interface between the Windows code and Info-ZIP code. 11 | intrface.h Header for intrface.cpp. 12 | wince.cpp All the Win32 APIs and C runtimes called by Info-ZIP. 13 | wince.h Header for wince.cpp. 14 | punzip.rc Resource file for all dialogs, bitmaps, menus, icons, etc. 15 | resource.h Resource header file for punzip.rc and other source modules. 16 | punzip.htp Windows CE help file (rename to punzip.html for WinNT). 17 | punzip.rcv Version resource and version defines. 18 | punzip.ic2 Windows CE app icons (16x16 and 32x32, both 2 bits/pixel). 19 | punzip.ico Windows NT application icons (16x16 and 32x32, 16 bits/pixel). 20 | zipfile.ic2 Windows CE zip icons (16x16 and 32x32, both 2 bits/pixel). 21 | zipfile.ico Windows NT zip file icons (16x16 and 32x32, 16 bits/pixel). 22 | imglist.2bp Windows CE image list bitmap (2 bits/pixel). 23 | imglist.bmp Windows NT image list bitmap (16 bits/pixel including mask). 24 | ilmask.bmp Windows CE image list mask bitmap (1 bit/pixel). 25 | toolbar.2bp Windows CE toolbar bitmap (2 bits/pixel). 26 | toolbar.bmp Windows NT toolbar bitmap (16 bits/pixel). 27 | inc\ Contains dummy headers that are called by Info-ZIP code. 28 | vc5\ 29 | punzip.dsp Visual C++ 5.0 project for WinCE (SH3 and MIPS) and WinNT. 30 | vc6\ 31 | punzip.dsp Visual C++ 6.0 project for WinCE (SH3 and MIPS) and WinNT. 32 | vcEMbed3\ 33 | punzip.vcp Visual C++ Embedded Tools 3.0 project for pUnZip (WinCE). 34 | unzipcmd.vcp Visual C++ Embedded Tools 3.0 project for WinCE cmdline tool. 35 | unzipwce.vcw Visual C++ Embedded Tools 3.0 workspace for all WinCE tools. 36 | 37 | Please note that Info-ZIP's source distribution for UnZip contains all text 38 | files in UNIX format (LF line terminators). But the Microsoft tools require 39 | some of the sources and project files to be supplied in MSDOS format (CR-LF 40 | line terminators). You have to apply UnZip's "-a" option (or use some third- 41 | party line termination converter) to get the UnZip sources unpacked in the 42 | correct file format. 43 | -------------------------------------------------------------------------------- /wince/ilmask.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/ilmask.bmp -------------------------------------------------------------------------------- /wince/imglist.2bp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/imglist.2bp -------------------------------------------------------------------------------- /wince/imglist.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/imglist.bmp -------------------------------------------------------------------------------- /wince/inc/conio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/inc/conio.h -------------------------------------------------------------------------------- /wince/inc/errno.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/inc/errno.h -------------------------------------------------------------------------------- /wince/inc/locale.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/inc/locale.h -------------------------------------------------------------------------------- /wince/inc/signal.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/inc/signal.h -------------------------------------------------------------------------------- /wince/inc/stdio.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/inc/stdio.h -------------------------------------------------------------------------------- /wince/punzip.htp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/punzip.htp -------------------------------------------------------------------------------- /wince/punzip.ic2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/punzip.ic2 -------------------------------------------------------------------------------- /wince/punzip.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/punzip.ico -------------------------------------------------------------------------------- /wince/toolbar.2bp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/toolbar.2bp -------------------------------------------------------------------------------- /wince/toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/toolbar.bmp -------------------------------------------------------------------------------- /wince/vcEMbed3/unzipwce.vcw: -------------------------------------------------------------------------------- 1 | Microsoft eMbedded Visual Tools Workspace File, Format Version 3.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "punzip"=".\punzip.vcp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "unzipcmd"=".\unzipcmd.vcp" - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Global: 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<3> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | -------------------------------------------------------------------------------- /wince/zipfile.ic2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/zipfile.ic2 -------------------------------------------------------------------------------- /wince/zipfile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/wince/zipfile.ico -------------------------------------------------------------------------------- /windll/csharp/App.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/windll/csharp/App.ico -------------------------------------------------------------------------------- /windll/csharp/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | // 9 | [assembly: AssemblyTitle("")] 10 | [assembly: AssemblyDescription("")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("")] 14 | [assembly: AssemblyCopyright("")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Revision and Build Numbers 27 | // by using the '*' as shown below: 28 | 29 | [assembly: AssemblyVersion("1.0.*")] 30 | 31 | // 32 | // In order to sign your assembly you must specify a key to use. Refer to the 33 | // Microsoft .NET Framework documentation for more information on assembly signing. 34 | // 35 | // Use the attributes below to control which key is used for signing. 36 | // 37 | // Notes: 38 | // (*) If no key is specified, the assembly is not signed. 39 | // (*) KeyName refers to a key that has been installed in the Crypto Service 40 | // Provider (CSP) on your machine. KeyFile refers to a file which contains 41 | // a key. 42 | // (*) If the KeyFile and the KeyName values are both specified, the 43 | // following processing occurs: 44 | // (1) If the KeyName can be found in the CSP, that key is used. 45 | // (2) If the KeyName does not exist and the KeyFile does exist, the key 46 | // in the KeyFile is installed into the CSP and used. 47 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 48 | // When specifying the KeyFile, the location of the KeyFile should be 49 | // relative to the project output directory which is 50 | // %Project Directory%\obj\. For example, if your KeyFile is 51 | // located in the project directory, you would specify the AssemblyKeyFile 52 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] 53 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 54 | // documentation for more information on this. 55 | // 56 | [assembly: AssemblyDelaySign(false)] 57 | [assembly: AssemblyKeyFile("")] 58 | [assembly: AssemblyKeyName("")] 59 | -------------------------------------------------------------------------------- /windll/csharp/ReadMeCS.txt: -------------------------------------------------------------------------------- 1 | On Windows open this file in WordPad. 2 | 3 | Contents of the "windll/csharp" sub-archive 4 | 5 | This directory contains Visual C Sharp (C#) sample project for 6 | using the unzip32.dll library. This project was generously donated 7 | by Adrian Maull. The Zip source archive contains a corresponding 8 | project for using the zip32.dll library. 9 | 10 | These sample projects are distributed as part of the Info-ZIP distribution 11 | under the Info-ZIP license. 12 | 13 | Note that the files may be saved in "UNIX LF" format with carriage returns 14 | stripped. These may need to be restored before the project can be successfully 15 | used. 16 | 17 | The project is based on .NET Framework 1.1. It was contributed 18 | to the Info-Zip project April 2005. If you have questions or comments, 19 | contact us at www.Info-ZIP.org or for specific questions about these 20 | projects contact Adrian Maull directly at adrian.maull@sprintpcs.com. 21 | 22 | See UnZip.cs for more detailed information about the project. Currently 23 | the sample project has some bugs as noted in the above file. 24 | 25 | The original code has been adapted to the modified WinDLL interface of 26 | UnZip 6, using Visual C# 2005 (.Net Framework 2.0) and a unzip32.dll compiled 27 | by Visual C++ 6.0. The provided project file is still in the format for 28 | Visual Studio 7.1 (VS .Net 2003, .Net 1.1). But the code of the project 29 | can be used with newer Visual Studio versions (2005 = 8.0 or 2008 = 9.0); 30 | only the project file gets (irreversibly) converted to the newer Visual 31 | Studio format when first opened. 32 | 33 | However, this project is not tested throughoutly by us at this time. 34 | 35 | Note on using Visual Studio C# 2005, 2008 (or newer?): 36 | The UnZip maintainer was unsuccessful to run the C# sample code using 37 | Visual Studio 2005 or 2008 together with an unzip32.dll compiled with 38 | the same Visual Studio version in default configuration (unzip32.dll linked 39 | against the DLL version of the C runtime library). The C# program failed 40 | to load the unzip32.dll because of an "OS loader lock" conflict. This conflict 41 | should only show up when loading "mixed mode" dll that contain both managed 42 | and unmanaged code. So, it cannot be caused by the "pure native code" 43 | unzip32.dll directly, which contains nothing dangerous in its DLLMain() 44 | function. It seems to be caused by the new "side-by-side" C runtime dlls 45 | (msvcr80.dll or msvcr90.dll being loaded multiple times by a .NET application 46 | that uses msvcr??-linked native dlls). 47 | To fix this issue, one of the following work-arounds could be used: 48 | a) use an unzip32.dll that was linked against the system msvcrt.dll (the 49 | "old" MSVC 6.0 runtime) that is a core system component of all Windows 50 | versions from Windows 98/Windows ME and Windows 2000 and newer (at least 51 | up to Windows Vista/Windows Server 2008), 52 | or 53 | b) use a statically linked variant of unzip32.dll (see the option DLLSTANDALONE 54 | in the MSC Makefile for Win32 executables, "win32/Makefile"). 55 | 56 | Ed Gordon, Christian Spieler 57 | 2009/01/17 58 | -------------------------------------------------------------------------------- /windll/csharp/UnZipDLLPrintMessageEventArgs.cs: -------------------------------------------------------------------------------- 1 | #region README 2 | 3 | //_____________________________________________________________________________ 4 | // 5 | //Sample C# code, .NET Framework 1.1, contributed to the Info-Zip project by 6 | //Adrian Maull, April 2005. 7 | // 8 | //If you have questions or comments, contact me at adrian.maull@sprintpcs.com. Though 9 | //I will try to respond to coments/questions, I do not guarantee such response. 10 | // 11 | //THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 12 | //KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | //IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 14 | //PARTICULAR PURPOSE. 15 | // 16 | //_____________________________________________________________________________ 17 | 18 | 19 | #endregion 20 | 21 | using System; 22 | 23 | namespace CSharpInfoZip_UnZipSample 24 | { 25 | /// 26 | /// Summary description for UnZipDLLPrintMessageEventArgs. 27 | /// 28 | public class UnZipDLLPrintMessageEventArgs : EventArgs 29 | { 30 | private string m_PrintMessage = string.Empty; 31 | 32 | public UnZipDLLPrintMessageEventArgs(string msg) 33 | { 34 | m_PrintMessage = msg; 35 | } 36 | 37 | public string PrintMessage 38 | { 39 | get {return m_PrintMessage;} 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /windll/csharp/UnZipDLLServiceMessageEventArgs.cs: -------------------------------------------------------------------------------- 1 | #region README 2 | 3 | //_____________________________________________________________________________ 4 | // 5 | //Sample C# code, .NET Framework 1.1, contributed to the Info-Zip project by 6 | //Adrian Maull, April 2005. 7 | // 8 | //If you have questions or comments, contact me at adrian.maull@sprintpcs.com. Though 9 | //I will try to respond to coments/questions, I do not guarantee such response. 10 | // 11 | //THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 12 | //KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | //IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 14 | //PARTICULAR PURPOSE. 15 | // 16 | //_____________________________________________________________________________ 17 | 18 | 19 | #endregion 20 | 21 | using System; 22 | 23 | namespace CSharpInfoZip_UnZipSample 24 | { 25 | /// 26 | /// Summary description for UnZipDLLServiceMessageEventArgs. 27 | /// 28 | public class UnZipDLLServiceMessageEventArgs 29 | { 30 | private ulong m_ZipFileSize = 0; 31 | private ulong m_SizeOfFileEntry = 0; 32 | private string m_FileEntryName = string.Empty; 33 | 34 | //zipFileSize = Total size of the zip file 35 | //fileEntryBytes - size of an individual file in the zip 36 | //fileEntryName - name of an individual file in the zip 37 | public UnZipDLLServiceMessageEventArgs(ulong zipFileSize, string fileEntryName, ulong fileEntryBytes) 38 | { 39 | m_ZipFileSize = zipFileSize; 40 | m_SizeOfFileEntry = fileEntryBytes; 41 | m_FileEntryName = fileEntryName; 42 | } 43 | 44 | public ulong ZipFileSize 45 | { 46 | get {return m_ZipFileSize;} 47 | } 48 | 49 | public ulong SizeOfFileEntry 50 | { 51 | get {return m_SizeOfFileEntry;} 52 | } 53 | 54 | public string FileEntryName 55 | { 56 | get {return m_FileEntryName;} 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /windll/csharp/ZipFileEntries.cs: -------------------------------------------------------------------------------- 1 | #region README 2 | 3 | //_____________________________________________________________________________ 4 | // 5 | //Sample C# code, .NET Framework 1.1, contributed to the Info-Zip project by 6 | //Adrian Maull, April 2005. 7 | // 8 | //If you have questions or comments, contact me at adrian.maull@sprintpcs.com. Though 9 | //I will try to respond to coments/questions, I do not guarantee such response. 10 | // 11 | //THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 12 | //KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | //IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 14 | //PARTICULAR PURPOSE. 15 | // 16 | //_____________________________________________________________________________ 17 | 18 | 19 | #endregion 20 | 21 | using System; 22 | using System.Collections; 23 | 24 | namespace CSharpInfoZip_UnZipSample 25 | { 26 | /// 27 | /// Summary description for ZipFileEntries 28 | /// 29 | [Serializable] 30 | public class ZipFileEntries: CollectionBase, IDisposable 31 | { 32 | 33 | public ZipFileEntries() 34 | { 35 | } 36 | 37 | //the normal collections methods... 38 | public void Add(ZipFileEntry obj) 39 | { 40 | List.Add(obj); 41 | } 42 | 43 | public void Remove(int index) 44 | { 45 | if (index > Count - 1 || index < 0) 46 | { 47 | //throw an error here... 48 | } 49 | else 50 | { 51 | List.RemoveAt(index); 52 | } 53 | } 54 | 55 | public ZipFileEntry Item(int Index) 56 | { 57 | return (ZipFileEntry) List[Index]; 58 | } 59 | 60 | 61 | #region IDisposable Members 62 | 63 | public void Dispose() 64 | { 65 | //Any custom dispose logic goes here... 66 | } 67 | 68 | #endregion 69 | 70 | 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /windll/csharp/ZipFileEntry.cs: -------------------------------------------------------------------------------- 1 | #region README 2 | 3 | //_____________________________________________________________________________ 4 | // 5 | //Sample C# code, .NET Framework 1.1, contributed to the Info-Zip project by 6 | //Adrian Maull, April 2005. 7 | // 8 | //If you have questions or comments, contact me at adrian.maull@sprintpcs.com. Though 9 | //I will try to respond to coments/questions, I do not guarantee such response. 10 | // 11 | //THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 12 | //KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 13 | //IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A 14 | //PARTICULAR PURPOSE. 15 | // 16 | //_____________________________________________________________________________ 17 | 18 | 19 | #endregion 20 | 21 | using System; 22 | 23 | namespace CSharpInfoZip_UnZipSample 24 | { 25 | /// 26 | /// Summary description for ZipFileEntry. 27 | /// 28 | public class ZipFileEntry 29 | { 30 | 31 | #region Private Vars 32 | 33 | private string m_FileName; 34 | private string m_FilePath; 35 | private bool m_IsFolder; 36 | private ulong m_FileSize; 37 | private int m_FileMonth; 38 | private int m_FileDay; 39 | private int m_FileYear; 40 | private int m_FileHour; 41 | private int m_FileMinute; 42 | private int m_CompressionFactor; 43 | private ulong m_CompressedSize; 44 | private string m_CompressMeth; 45 | 46 | #endregion 47 | 48 | public ZipFileEntry() 49 | { 50 | } 51 | 52 | #region Properties 53 | 54 | public string FileName 55 | { 56 | get {return m_FileName;} 57 | set {m_FileName = value;} 58 | } 59 | 60 | public string FilePath 61 | { 62 | get {return m_FilePath;} 63 | set {m_FilePath = value;} 64 | } 65 | 66 | public bool IsFolder 67 | { 68 | get {return m_IsFolder;} 69 | set {m_IsFolder = value;} 70 | } 71 | 72 | public ulong FileSize 73 | { 74 | get {return m_FileSize;} 75 | set {m_FileSize = value;} 76 | } 77 | 78 | public int FileMonth 79 | { 80 | get {return m_FileMonth;} 81 | set {m_FileMonth = value;} 82 | } 83 | 84 | public int FileDay 85 | { 86 | get {return m_FileDay;} 87 | set {m_FileDay = value;} 88 | } 89 | 90 | public int FileYear 91 | { 92 | get {return m_FileYear;} 93 | set {m_FileYear = value;} 94 | } 95 | 96 | public int FileHour 97 | { 98 | get {return m_FileHour;} 99 | set {m_FileHour = value;} 100 | } 101 | 102 | public int FileMinute 103 | { 104 | get {return m_FileMinute;} 105 | set {m_FileMinute = value;} 106 | } 107 | 108 | public int CompressionFactor 109 | { 110 | get {return m_CompressionFactor;} 111 | set {m_CompressionFactor = value;} 112 | } 113 | 114 | public ulong CompressedSize 115 | { 116 | get {return m_CompressedSize;} 117 | set {m_CompressedSize = value;} 118 | } 119 | 120 | public string CompressionMethShort 121 | { 122 | get {return m_CompressMeth;} 123 | set {m_CompressMeth = value;} 124 | } 125 | 126 | #endregion 127 | 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /windll/decs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2007 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2007-Mar-04 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef __decs_h /* prevent multiple inclusions */ 10 | #define __decs_h 11 | 12 | /* for UnZip, the "basic" part of the win32 api is sufficient */ 13 | #ifndef WIN32_LEAN_AND_MEAN 14 | # define WIN32_LEAN_AND_MEAN 15 | # define IZ_HASDEFINED_WIN32LEAN 16 | #endif 17 | #include 18 | #ifndef __unzip_h 19 | # include "../unzip.h" 20 | #endif 21 | #ifndef __structs_h 22 | # include "../windll/structs.h" 23 | #endif 24 | #ifdef IZ_HASDEFINED_WIN32LEAN 25 | # undef WIN32_LEAN_AND_MEAN 26 | # undef IZ_HASDEFINED_WIN32LEAN 27 | #endif 28 | 29 | #define Wiz_Match match 30 | 31 | #ifdef __cplusplus 32 | extern "C" { 33 | #endif 34 | 35 | void WINAPI Wiz_NoPrinting(int f); 36 | int WINAPI Wiz_Validate(LPSTR archive, int AllCodes); 37 | BOOL WINAPI Wiz_Init(zvoid *, LPUSERFUNCTIONS); 38 | BOOL WINAPI Wiz_SetOpts(zvoid *, LPDCL); 39 | int WINAPI Wiz_Unzip(zvoid *, int, char **, int, char **); 40 | int WINAPI Wiz_SingleEntryUnzip(int, char **, int, char **, 41 | LPDCL, LPUSERFUNCTIONS); 42 | int WINAPI Wiz_SingleEntryUnzpList(unsigned, LPCSTR, unsigned, LPCSTR, 43 | LPDCL, LPUSERFUNCTIONS); 44 | 45 | int WINAPI Wiz_UnzipToMemory(LPSTR zip, LPSTR file, 46 | LPUSERFUNCTIONS lpUserFunctions, 47 | UzpBuffer *retstr); 48 | int WINAPI Wiz_Grep(LPSTR archive, LPSTR file, LPSTR pattern, 49 | int cmd, int SkipBin, 50 | LPUSERFUNCTIONS lpUserFunctions); 51 | 52 | #ifdef __cplusplus 53 | } 54 | #endif 55 | 56 | #endif /* __decs_h */ 57 | -------------------------------------------------------------------------------- /windll/guisfx/dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2000 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* dialog.h for sfxwiz */ 10 | #define ICN_INSTALL 10 11 | #define IDM_REPLACE_NO 100 12 | #define IDM_REPLACE_TEXT 101 13 | #define IDM_REPLACE_YES 102 14 | #define IDM_REPLACE_ALL 103 15 | #define IDM_REPLACE_NONE 104 16 | #define ID_TARGET 201 17 | #define ID_TEXT1 202 18 | #define ID_TEXT2 203 19 | #define ID_TEXT3 204 20 | #define ID_BROWSE 205 21 | #define ID_INSTALL 206 22 | #define ID_INFOZIP 207 23 | #define ID_AUTHOR 208 24 | #define ID_EMAIL 209 25 | #define ID_STATUS 210 26 | #define INITDIALOG 300 27 | 28 | -------------------------------------------------------------------------------- /windll/guisfx/sfxw.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/windll/guisfx/sfxw.ico -------------------------------------------------------------------------------- /windll/guisfx/sfxwiz.rc: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | #include "dialog.h" 5 | 6 | #include "sfxwiz.dlg" 7 | 8 | ICN_INSTALL ICON "sfxw.ico" 9 | 10 | -------------------------------------------------------------------------------- /windll/guisfx/unzsfx16.def: -------------------------------------------------------------------------------- 1 | ;module-definition file for Windows UnZip static Library -- used by link.exe 2 | LIBRARY UNZSFX16 ; Library module name 3 | 4 | DESCRIPTION 'Windows Info-ZIP UnZip SFX Library (16 bit), by Mike White' 5 | 6 | CODE PRELOAD FIXED 7 | 8 | DATA PRELOAD MOVEABLE 9 | 10 | EXPORTS 11 | Wiz_SingleEntryUnzip 12 | UzpVersion 13 | Wiz_Grep 14 | Wiz_Init 15 | Wiz_SetOpts 16 | Wiz_Unzip 17 | Wiz_Validate 18 | Wiz_NoPrinting 19 | UzpVersion2 20 | Wiz_UnzipToMemory 21 | Wiz_Match 22 | UzpFreeMemBuffer 23 | 24 | -------------------------------------------------------------------------------- /windll/unziplib.def: -------------------------------------------------------------------------------- 1 | ;module-definition file for Windows UnZip static Library -- used by link.exe 2 | LIBRARY UNZIP32 ; Library module name 3 | 4 | ;DESCRIPTION 'Windows Info-ZIP UnZip Library (32 bit), by Mike White' 5 | 6 | CODE PRELOAD FIXED 7 | 8 | DATA PRELOAD MOVEABLE 9 | 10 | EXPORTS 11 | Wiz_SingleEntryUnzip 12 | UzpVersion 13 | Wiz_Init 14 | Wiz_SetOpts 15 | Wiz_Unzip 16 | Wiz_Validate 17 | Wiz_NoPrinting 18 | UzpVersion2 19 | Wiz_UnzipToMemory 20 | Wiz_Match 21 | Wiz_Grep 22 | UzpFreeMemBuffer 23 | 24 | -------------------------------------------------------------------------------- /windll/uzexampl.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2009 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2009-Jan-02 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* 10 | Example header file 11 | 12 | Do not use this header file in the WiZ application, use WIZ.H 13 | instead. 14 | 15 | */ 16 | #ifndef _UZEXAMPL_H 17 | #define _UZEXAMPL_H 18 | 19 | #include 20 | #ifdef __RSXNT__ 21 | # include "../win32/rsxntwin.h" 22 | #endif 23 | #include /* required for all Windows applications */ 24 | #include 25 | #include 26 | #include 27 | #ifndef __RSXNT__ 28 | # include 29 | #endif 30 | #include 31 | 32 | #include "../unzip.h" 33 | #include "../windll/structs.h" 34 | #include "../windll/decs.h" 35 | 36 | /* Defines */ 37 | 38 | typedef const UzpVer * (WINAPI * _DLL_UZVER)(void); 39 | typedef int (WINAPI * _DLL_UNZIP)(int, char **, int, char **, 40 | LPDCL, LPUSERFUNCTIONS); 41 | 42 | /* Global variables */ 43 | 44 | extern LPUSERFUNCTIONS lpUserFunctions; 45 | extern LPDCL lpDCL; 46 | 47 | extern HINSTANCE hUnzipDll; 48 | 49 | extern int hFile; /* file handle */ 50 | 51 | /* Global functions */ 52 | 53 | int WINAPI DisplayBuf(LPSTR, unsigned long); 54 | 55 | /* Procedure Calls */ 56 | #ifdef Z_UINT8_DEFINED 57 | void WINAPI ReceiveDllMessage(z_uint8 ucsize, z_uint8 csize, 58 | unsigned cfactor, 59 | unsigned mo, unsigned dy, unsigned yr, unsigned hh, unsigned mm, 60 | char c, LPCSTR filename, LPCSTR methbuf, unsigned long crc, char fCrypt); 61 | #else 62 | void WINAPI ReceiveDllMessage(unsigned long ucsize, unsigned long csize, 63 | unsigned cfactor, 64 | unsigned mo, unsigned dy, unsigned yr, unsigned hh, unsigned mm, 65 | char c, LPCSTR filename, LPCSTR methbuf, unsigned long crc, char fCrypt); 66 | #endif 67 | void WINAPI ReceiveDllMessage_NO_INT64(unsigned long ucsiz_l, 68 | unsigned long ucsiz_h, unsigned long csiz_l, unsigned long csiz_h, 69 | unsigned cfactor, 70 | unsigned mo, unsigned dy, unsigned yr, unsigned hh, unsigned mm, 71 | char c, LPCSTR filename, LPCSTR methbuf, unsigned long crc, char fCrypt); 72 | #endif /* _UZEXAMPL_H */ 73 | -------------------------------------------------------------------------------- /windll/vb/VBReadMe.txt: -------------------------------------------------------------------------------- 1 | On Windows, please read this file using WordPad to format lines properly. 2 | 3 | This directory contains a short example on how to use the Win32 UnZip DLL 4 | with Visual Basic. The example code consists of a simple dialog form and 5 | a standard module containing the interface code to call unzip32.dll. 6 | The code assumes that the unzip32.dll binary is available somewhere on the 7 | execution path. The easiest way to satisfy this rule is to keep a copy of 8 | unzip32.dll in the directory where the VB executable is stored, but if 9 | it's in the command path it should be found. 10 | NOTE: Whenever a VB program is run from the VB6 IDE, the "path of the VB 11 | executable" is the path where the IDE program file "VB6.EXE" is stored, 12 | NOT the storage directory of the VB project file (= result of the App.Path 13 | property accessed from within the VB program). 14 | 15 | The example code has been edited last with Visual Basic 6, but should be 16 | compatible with VB 5. To maintain compatibility with VB5 after having modified 17 | the example project in VB6, the project file has to be edited using a standard 18 | text editor (e.g.: Notepad), to remove the line specifying the "Retained" 19 | property. This property line is not recognized by VB 5 and would prevent 20 | correct loading of the project in VB 5. 21 | 22 | This VB example makes use of the "Windows Common Dialogs" ActiveX control 23 | comdlg32.ocx, supplied with Visual Basic. Unfortunately, there are different 24 | revisions of this control available which are not binary compatible. In order 25 | to maintain compatibility of the source code with all available versions of 26 | comdlg32.ocx, the source files may have to be edited manually after the 27 | program has been saved from the VB environment on a system containing the 28 | latest release of comdlg32.ocx: 29 | 30 | Both vbunzip.frm and vbunzip.vbp should contain a reference line for the 31 | common dialog ocx reading like: 32 | Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX" 33 | ^^^ 34 | The important section of this line is the revision number "1.1" (marked by 35 | the "^^^" signs). On a system with a more recent version of comdlg32.ocx 36 | installed, this version number is updated to "1.2" (or higher) by VB 37 | automatically. This number has to be changed back to "1.1" manually, 38 | otherwise the example code can no longer be used on systems with old versions 39 | of comdlg32.ocx. 40 | 41 | When fetching the VB example code from the UnZip source distribution, one 42 | has to make sure that the files are stored in the correct "DOS/Windows-native" 43 | text format with "CR-LF" line endings. Visual Basic does not accept Unix style 44 | text format (LF line terminators) for Form class modules (*.frm) and the 45 | project file (*.vbp). You may use unzip's -a option to convert the project 46 | on extraction. If this is a full source distribution, see the Where file for 47 | where to download the compiled unzip DLL for a specific platform which includes 48 | this example project in native format for that platform. 49 | 50 | For more information, see the comments within the VB source. 51 | -------------------------------------------------------------------------------- /windll/vb/vbunzip.vbp: -------------------------------------------------------------------------------- 1 | Type=Exe 2 | Form=vbunzip.frm 3 | Module=VBUnzBas; vbunzip.bas 4 | Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0; COMDLG32.OCX 5 | IconForm="VBUnzFrm" 6 | Startup="VBUnzFrm" 7 | HelpFile="" 8 | Title="VBUnZip" 9 | ExeName32="VBunzip.exe" 10 | Command32="" 11 | Name="VBUnzipProject" 12 | HelpContextID="0" 13 | CompatibleMode="0" 14 | MajorVer=1 15 | MinorVer=0 16 | RevisionVer=0 17 | AutoIncrementVer=0 18 | ServerSupportFiles=0 19 | VersionCompanyName="Info-ZIP" 20 | VersionLegalCopyright="(c) Info-ZIP 1998-2009" 21 | CompilationType=0 22 | OptimizationType=0 23 | FavorPentiumPro(tm)=0 24 | CodeViewDebugInfo=0 25 | NoAliasing=0 26 | BoundsCheck=0 27 | OverflowCheck=0 28 | FlPointCheck=0 29 | FDIVCheck=0 30 | UnroundedFP=0 31 | StartMode=0 32 | Unattended=0 33 | ThreadPerObject=0 34 | MaxNumberOfThreads=1 35 | -------------------------------------------------------------------------------- /windll/vc5/sfx/SFXWiz32.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/windll/vc5/sfx/SFXWiz32.dsw -------------------------------------------------------------------------------- /windll/vc5/unzip32.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/windll/vc5/unzip32.dsw -------------------------------------------------------------------------------- /windll/vc6/sfx/SFXWiz32.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/windll/vc6/sfx/SFXWiz32.dsw -------------------------------------------------------------------------------- /windll/vc6/unzip32.dsw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madler/unzip/0b82c20ac7375b522215b567174f370be89a4b12/windll/vc6/unzip32.dsw -------------------------------------------------------------------------------- /windll/vc8/sfx/SFXWiz32.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual C++ Express 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SFXWiz", "SFXWiz32.vcproj", "{6BC29537-2E45-4429-A634-5C45B649436C}" 5 | ProjectSection(ProjectDependencies) = postProject 6 | {7545BD38-9F08-4F69-A944-E9981A5AB398} = {7545BD38-9F08-4F69-A944-E9981A5AB398} 7 | EndProjectSection 8 | EndProject 9 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unzsfx32", "unzsfx32.vcproj", "{7545BD38-9F08-4F69-A944-E9981A5AB398}" 10 | EndProject 11 | Global 12 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 13 | ASM Debug|Win32 = ASM Debug|Win32 14 | ASM Release|Win32 = ASM Release|Win32 15 | Debug|Win32 = Debug|Win32 16 | Release|Win32 = Release|Win32 17 | EndGlobalSection 18 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 19 | {6BC29537-2E45-4429-A634-5C45B649436C}.ASM Debug|Win32.ActiveCfg = ASM Debug|Win32 20 | {6BC29537-2E45-4429-A634-5C45B649436C}.ASM Debug|Win32.Build.0 = ASM Debug|Win32 21 | {6BC29537-2E45-4429-A634-5C45B649436C}.ASM Release|Win32.ActiveCfg = ASM Release|Win32 22 | {6BC29537-2E45-4429-A634-5C45B649436C}.ASM Release|Win32.Build.0 = ASM Release|Win32 23 | {6BC29537-2E45-4429-A634-5C45B649436C}.Debug|Win32.ActiveCfg = Debug|Win32 24 | {6BC29537-2E45-4429-A634-5C45B649436C}.Debug|Win32.Build.0 = Debug|Win32 25 | {6BC29537-2E45-4429-A634-5C45B649436C}.Release|Win32.ActiveCfg = Release|Win32 26 | {6BC29537-2E45-4429-A634-5C45B649436C}.Release|Win32.Build.0 = Release|Win32 27 | {7545BD38-9F08-4F69-A944-E9981A5AB398}.ASM Debug|Win32.ActiveCfg = ASM Debug|Win32 28 | {7545BD38-9F08-4F69-A944-E9981A5AB398}.ASM Debug|Win32.Build.0 = ASM Debug|Win32 29 | {7545BD38-9F08-4F69-A944-E9981A5AB398}.ASM Release|Win32.ActiveCfg = ASM Release|Win32 30 | {7545BD38-9F08-4F69-A944-E9981A5AB398}.ASM Release|Win32.Build.0 = ASM Release|Win32 31 | {7545BD38-9F08-4F69-A944-E9981A5AB398}.Debug|Win32.ActiveCfg = Debug|Win32 32 | {7545BD38-9F08-4F69-A944-E9981A5AB398}.Debug|Win32.Build.0 = Debug|Win32 33 | {7545BD38-9F08-4F69-A944-E9981A5AB398}.Release|Win32.ActiveCfg = Release|Win32 34 | {7545BD38-9F08-4F69-A944-E9981A5AB398}.Release|Win32.Build.0 = Release|Win32 35 | EndGlobalSection 36 | GlobalSection(SolutionProperties) = preSolution 37 | HideSolutionNode = FALSE 38 | EndGlobalSection 39 | EndGlobal 40 | -------------------------------------------------------------------------------- /windll/windll.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2003 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2000-Apr-09 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | #ifndef __windll_h /* prevent multiple inclusions */ 10 | #define __windll_h 11 | 12 | #include 13 | #include /* required for all Windows applications */ 14 | #include 15 | 16 | #include "../unzip.h" 17 | #include "../windll/structs.h" 18 | #include "../windll/decs.h" 19 | 20 | /* Allow compilation under Borland C++ also */ 21 | #ifndef __based 22 | # define __based(A) 23 | #endif 24 | 25 | #ifdef UNZIP_INTERNAL 26 | 27 | extern jmp_buf dll_error_return; 28 | 29 | extern HANDLE hInst; /* current instance */ 30 | 31 | int win_fprintf(zvoid *pG, FILE *file, unsigned int, char far *); 32 | #endif 33 | 34 | #endif /* __windll_h */ 35 | -------------------------------------------------------------------------------- /windll/windll.rc: -------------------------------------------------------------------------------- 1 | #include 2 | #if (defined(WIN32) && !defined(__EMX__) && !defined(__MINGW32__)) 3 | #include 4 | #endif 5 | #include "../unzvers.h" 6 | 7 | VS_VERSION_INFO VERSIONINFO 8 | FILEVERSION UZ_MAJORVER,UZ_MINORVER,UZ_PATCHLEVEL,0 9 | PRODUCTVERSION UZ_MAJORVER,UZ_MINORVER,UZ_PATCHLEVEL,0 10 | FILEFLAGSMASK 0x3L 11 | #ifdef _DEBUG 12 | FILEFLAGS 0x1L 13 | #else 14 | FILEFLAGS 0x0L 15 | #endif 16 | FILEOS VOS__WINDOWS32 17 | FILETYPE VFT_DLL 18 | FILESUBTYPE 0x0L 19 | BEGIN 20 | BLOCK "StringFileInfo" 21 | BEGIN 22 | #ifdef _UNICODE 23 | BLOCK "040904B0" 24 | #else 25 | BLOCK "040904E4" 26 | #endif 27 | BEGIN 28 | VALUE "Comments", "\0" 29 | VALUE "CompanyName", IZ_COMPANY_NAME "\0" 30 | VALUE "FileDescription", "Info-ZIP's UnZip DLL for Win32\0" 31 | VALUE "FileVersion", UZ_VER_STRING "\0" 32 | VALUE "InternalName", "UnZip32\0" 33 | VALUE "LegalCopyright", "Info-ZIP 1996-2009\0" 34 | VALUE "LegalTrademarks", "\0" 35 | VALUE "OriginalFilename", "UNZIP32.DLL\0" 36 | VALUE "PrivateBuild", "\0" 37 | VALUE "ProductName", "Info-ZIP's UnZip Windows DLL\0" 38 | VALUE "ProductVersion", UZ_VER_STRING "\0" 39 | VALUE "SpecialBuild", "\0" 40 | END 41 | END 42 | BLOCK "VarFileInfo" 43 | BEGIN 44 | #ifdef _UNICODE 45 | VALUE "Translation", 0x409, 1200 46 | #else 47 | VALUE "Translation", 0x409, 1252 48 | #endif 49 | END 50 | END 51 | -------------------------------------------------------------------------------- /windll/windll16.def: -------------------------------------------------------------------------------- 1 | ;module-definition file for Windows UnZip16 DLL -- used by link.exe 2 | LIBRARY UNZIP16 ; Library module name 3 | 4 | DESCRIPTION 'Windows Info-ZIP UnZip16 DLL by Mike White' 5 | 6 | CODE PRELOAD FIXED 7 | 8 | DATA PRELOAD MOVEABLE 9 | 10 | EXPORTS 11 | Wiz_SingleEntryUnzip 12 | UzpVersion 13 | Wiz_Init 14 | Wiz_SetOpts 15 | Wiz_Unzip 16 | Wiz_Validate 17 | Wiz_NoPrinting 18 | UzpVersion2 19 | 20 | -------------------------------------------------------------------------------- /windll/windll32.def: -------------------------------------------------------------------------------- 1 | ;module-definition file for Windows UnZip32 DLL -- used by link.exe 2 | LIBRARY UNZIP32 ; Library module name 3 | 4 | ;DESCRIPTION 'Windows Info-ZIP UnZip32 DLL by Mike White' 5 | 6 | ;CODE PRELOAD FIXED 7 | 8 | ;DATA PRELOAD MOVEABLE 9 | 10 | EXPORTS 11 | Wiz_SingleEntryUnzip 12 | Wiz_SingleEntryUnzpList 13 | UzpVersion 14 | Wiz_Init 15 | Wiz_SetOpts 16 | Wiz_Unzip 17 | Wiz_Validate 18 | Wiz_NoPrinting 19 | UzpVersion2 20 | Wiz_UnzipToMemory 21 | Wiz_Grep 22 | UzpFreeMemBuffer 23 | 24 | -------------------------------------------------------------------------------- /windll/windll_lc.def: -------------------------------------------------------------------------------- 1 | LIBRARY UNZIP32 2 | 3 | 4 | EXPORTS 5 | Wiz_SingleEntryUnzip=Wiz_SingleEntryUnzip 6 | Wiz_SingleEntryUnzpList=Wiz_SingleEntryUnzpList 7 | UzpVersion=UzpVersion 8 | Wiz_Init=Wiz_Init 9 | Wiz_SetOpts=Wiz_SetOpts 10 | Wiz_Unzip=Wiz_Unzip 11 | Wiz_Validate=Wiz_Validate 12 | Wiz_NoPrinting=Wiz_NoPrinting 13 | UzpVersion2=UzpVersion2 14 | Wiz_UnzipToMemory=Wiz_UnzipToMemory 15 | Wiz_Grep=Wiz_Grep 16 | UzpFreeMemBuffer=UzpFreeMemBuffer 17 | -------------------------------------------------------------------------------- /windll/windllgcc.def: -------------------------------------------------------------------------------- 1 | LIBRARY UNZIP32 2 | 3 | ;DESCRIPTION 'Windows Info-ZIP UnZip32 DLL by Mike White' 4 | 5 | 6 | EXPORTS 7 | Wiz_SingleEntryUnzip=Wiz_SingleEntryUnzip@24 8 | Wiz_SingleEntryUnzpList=Wiz_SingleEntryUnzpList@24 9 | UzpVersion=UzpVersion@0 10 | Wiz_Init=Wiz_Init@8 11 | Wiz_SetOpts=Wiz_SetOpts@8 12 | Wiz_Unzip=Wiz_Unzip@20 13 | Wiz_Validate=Wiz_Validate@8 14 | Wiz_NoPrinting=Wiz_NoPrinting@4 15 | UzpVersion2=UzpVersion2@4 16 | Wiz_UnzipToMemory=Wiz_UnzipToMemory@16 17 | Wiz_Grep=Wiz_Grep@24 18 | UzpFreeMemBuffer=UzpFreeMemBuffer@4 19 | -------------------------------------------------------------------------------- /zip.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 1990-2005 Info-ZIP. All rights reserved. 3 | 4 | See the accompanying file LICENSE, version 2003-May-08 or later 5 | (the contents of which are also included in unzip.h) for terms of use. 6 | If, for some reason, all these files are missing, the Info-ZIP license 7 | also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html 8 | */ 9 | /* This is a dummy zip.h to allow the source files shared with Zip 10 | (crypt.c, crc32.c, ttyio.c, win32/win32i64.c) to compile for UnZip. 11 | (In case you are looking for the Info-ZIP license, please follow 12 | the pointers above.) */ 13 | 14 | #ifndef __zip_h /* don't include more than once */ 15 | #define __zip_h 16 | 17 | #define UNZIP_INTERNAL 18 | #include "unzip.h" 19 | 20 | #define local static 21 | 22 | #define ZE_MEM PK_MEM 23 | #define ziperr(c, h) return 24 | 25 | #endif /* !__zip_h */ 26 | --------------------------------------------------------------------------------