From 3e42e7fc9c149c0677813d7bb29ce014036c6d84 Mon Sep 17 00:00:00 2001 From: Kim Kibum Date: Mon, 21 May 2012 17:50:24 +0900 Subject: [PATCH] Upload Tizen:Base source --- BUGS | 82 + COPYING.OLD | 212 + Contents | 84 + History.600 | 1117 ++++ INSTALL | 861 +++ LICENSE | 62 + README | 347 + ToDo | 226 + WHERE | 266 + acorn/Contents | 26 + acorn/GMakefile | 138 + acorn/ReadMe | 69 + acorn/RunMe1st | 17 + acorn/acorn.c | 994 +++ acorn/makefile | 128 + acorn/riscos.c | 364 ++ acorn/riscos.h | 136 + acorn/srcrename | Bin 0 -> 4719 bytes acorn/swiven.h | 69 + acorn/swiven.s | 316 + amiga/Contents | 32 + amiga/amiga.c | 1034 +++ amiga/amiga.h | 190 + amiga/crc_68.a | 144 + amiga/filedate.c | 599 ++ amiga/flate.a | 513 ++ amiga/makefile.azt | 257 + amiga/makesfx.c | 184 + amiga/smakefile | 629 ++ amiga/stat.c | 293 + amiga/z-stat.h | 95 + aosvs/Contents | 7 + aosvs/README | 145 + aosvs/aosvs.c | 1585 +++++ aosvs/aosvs.h | 66 + aosvs/make_unz.cli | 5 + api.c | 714 +++ apihelp.c | 155 + atari/Contents | 12 + atari/Makefile | 304 + atari/Makefile.old | 229 + atari/README.old | 43 + atari/atari.c | 1019 +++ atari/make_unz.mup | 8 + atheos/Contents | 10 + atheos/Makefile | 322 + atheos/README | 16 + atheos/athcfg.h | 70 + atheos/atheos.c | 1415 ++++ atheos/atheos.h | 53 + beos/Contents | 15 + beos/Makefile | 427 ++ beos/README | 77 + beos/beocfg.h | 61 + beos/beos.c | 1544 +++++ beos/beos.h | 46 + beos/beosmain.cpp | 44 + beos/unzip.rsc | Bin 0 -> 2896 bytes beos/unzipsfx.rsc | Bin 0 -> 2863 bytes bzip2/00README.IZ | 9 + bzip2/Makebz2.iz | 54 + bzip2/buildbz2.com | 277 + bzip2/descrbz2.mms | 285 + bzip2/makbz2iz.msc | 62 + bzip2/makbz2iz.wat | 62 + cmsmvs/INSTALL.CMS | 159 + cmsmvs/README.CMS | 434 ++ cmsmvs/README.MVS | 169 + cmsmvs/WHATSNEW.CMS | 27 + cmsmvs/ccunzip.exec | 77 + cmsmvs/mc.exec | 85 + cmsmvs/mvs.mki | 151 + cmsmvs/unzip.exec | 66 + cmsmvs/unzip.makefile | 25 + cmsmvs/unzmvsc.job | 130 + cmsmvs/unzvmc.exec | 56 + cmsmvs/vmmvs.c | 683 ++ cmsmvs/vmmvs.h | 96 + cmsmvs/vmstat.h | 57 + cmsmvs/zipinfo.exec | 66 + consts.h | 54 + crc32.c | 732 +++ crc32.h | 60 + crc_i386.S | 304 + crypt.c | 653 ++ crypt.h | 169 + ebcdic.h | 301 + envargs.c | 317 + explode.c | 618 ++ extract.c | 2820 ++++++++ file_id.diz | 10 + fileio.c | 2855 +++++++++ flexos/Contents | 8 + flexos/README | 39 + flexos/flexos.c | 936 +++ flexos/flxcfg.h | 30 + flexos/hc.pro | 19 + flexos/makefile | 199 + funzip.c | 547 ++ funzip.txt | 92 + gbloffs.c | 104 + globals.c | 222 + globals.h | 443 ++ human68k/Contents | 7 + human68k/Makefile | 229 + human68k/crc_68.s | 144 + human68k/flate.s | 499 ++ human68k/human68k.c | 976 +++ inflate.c | 1775 ++++++ inflate.h | 39 + list.c | 733 +++ macos/Contents | 62 + macos/HISTORY.TXT | 600 ++ macos/README.TXT | 569 ++ macos/UnZp.h | 151 + macos/UnZpLib.h | 161 + macos/UnZpPrj.xml | 1 + macos/UnZpSFX.h | 158 + macos/UnZpSx.h | 142 + macos/source/charmap.h | 380 ++ macos/source/getenv.c | 398 ++ macos/source/helpers.c | 479 ++ macos/source/helpers.h | 57 + macos/source/macbin3.c | 763 +++ macos/source/macbin3.h | 153 + macos/source/maccfg.h | 258 + macos/source/macdir.c | 169 + macos/source/macdir.h | 62 + macos/source/macos.c | 1986 ++++++ macos/source/macscreen.c | 462 ++ macos/source/macstat.c | 187 + macos/source/macstat.h | 72 + macos/source/macstuff.h | 18 + macos/source/mactime.c | 451 ++ macos/source/mactime.h | 61 + macos/source/macunzip.c | 848 +++ macos/source/pathname.c | 726 +++ macos/source/pathname.h | 64 + macos/source/sxunzip.c | 144 + macos/source/unzip_rc.hqx | 92 + man/Contents | 14 + man/funzip.1 | 127 + man/unzip.1 | 1040 +++ man/unzipsfx.1 | 336 + man/zipgrep.1 | 89 + man/zipinfo.1 | 517 ++ match.c | 442 ++ msdos/Contents | 35 + msdos/README | 117 + msdos/crc_i86.asm | 497 ++ msdos/doscfg.h | 342 + msdos/makefile.bc | 232 + msdos/makefile.dj1 | 214 + msdos/makefile.dj2 | 259 + msdos/makefile.emx | 223 + msdos/makefile.msc | 252 + msdos/makefile.tc | 225 + msdos/makefile.wat | 329 + msdos/msc51opt.dif | 62 + msdos/msdos.c | 2431 +++++++ netware/Contents | 15 + netware/README | 66 + netware/makefile.wat | 143 + netware/netware.c | 915 +++ netware/nlm_EOL.pat | 82 + netware/nlmcfg.h | 33 + netware/unzip.build | 17 + netware/unzip.link | 35 + new-cmdparser/unz6-newcmdparser-diffs.txt | 3476 ++++++++++ os2/Contents | 22 + os2/makefile.os2 | 662 ++ os2/os2.c | 2412 +++++++ os2/os2acl.c | 385 ++ os2/os2acl.h | 34 + os2/os2cfg.h | 166 + os2/os2data.h | 149 + os2/rexxapi.c | 894 +++ os2/rexxapi.def | 18 + os2/rexxhelp.c | 186 + os2/rexxtest.cmd | 54 + os2/stub.def | 6 + os2/unzip.def | 4 + os2/zgrepapi.cmd | 98 + os2/zip2exe.cmd | 62 + os2/zipgrep.cmd | 56 + packaging/unzip-6.0-attribs-overflow.patch | 12 + packaging/unzip-6.0-bzip2-configure.patch | 29 + packaging/unzip-6.0-close.patch | 176 + packaging/unzip-6.0-exec-shield.patch | 10 + packaging/unzip-6.0-nostrip.patch | 12 + packaging/unzip.changes | 244 + packaging/unzip.spec | 60 + process.c | 3088 +++++++++ proginfo/3rdparty.bug | 114 + proginfo/CONTRIBS | 262 + proginfo/Contents | 13 + proginfo/ZipPorts | 285 + proginfo/defer.in | 45 + proginfo/extrafld.txt | 1608 +++++ proginfo/fileinfo.cms | 231 + proginfo/nt.sd | 111 + proginfo/perform.dos | 183 + proginfo/timezone.txt | 85 + proginfo/ziplimit.txt | 256 + qdos/Contents | 20 + qdos/IZREADME.SMS | 600 ++ qdos/Makefile | 131 + qdos/callstub.c | 224 + qdos/config.S | 154 + qdos/crc68.s | 99 + qdos/izqdos.h | 46 + qdos/makesfx.c | 255 + qdos/qdos.c | 1130 ++++ tandem/Contents | 27 + tandem/HISTORY | 97 + tandem/README | 118 + tandem/commacs | 94 + tandem/doit | 20 + tandem/macros | 571 ++ tandem/make | 138 + tandem/makesfx | 79 + tandem/tandem.c | 889 +++ tandem/tandem.h | 236 + tandem/tannsk.h | 19 + tandem/tanunz.c | 1047 +++ testmake.zip | Bin 0 -> 527 bytes theos/Contents | 20 + theos/_fprintf.c | 26 + theos/_isatty.c | 26 + theos/_setargv.c | 165 + theos/_sprintf.c | 26 + theos/_stat.c | 353 + theos/charconv.h | 93 + theos/makefile | 192 + theos/oldstat.h | 32 + theos/stat.h | 107 + theos/theos.c | 1206 ++++ theos/thscfg.h | 62 + timezone.c | 813 +++ timezone.h | 81 + tops20/Contents | 8 + tops20/make.mic | 20 + tops20/rename.mic | 9 + tops20/tops20.c | 329 + ttyio.c | 705 ++ ttyio.h | 227 + ubz2err.c | 63 + unix/Contents | 14 + unix/Makefile | 1026 +++ unix/Packaging/README | 44 + unix/Packaging/pkginfo.in | 13 + unix/Packaging/postinstall | 22 + unix/Packaging/preinstall.in | 26 + unix/Packaging/prototype | 33 + unix/configure | 652 ++ unix/unix.c | 1876 ++++++ unix/unxcfg.h | 230 + unix/zipgrep | 105 + unreduce.c | 35 + unshrink.c | 336 + unzip.c | 2655 ++++++++ unzip.h | 722 +++ unzip.txt | 955 +++ unzipsfx.txt | 279 + unzipstb.c | 126 + unzpriv.h | 3123 +++++++++ unzvers.h | 89 + vms/Contents | 42 + vms/INSTALL.VMS | 145 + vms/NOTES.TXT | 372 ++ vms/README | 98 + vms/UNZIP_MSG.MSG | 59 + vms/build_unzip.com | 802 +++ vms/bzlib.h | 21 + vms/cmdline.c | 1136 ++++ vms/collect_deps.com | 89 + vms/cvthelp.tpu | 180 + vms/descrip.mms | 397 ++ vms/descrip_deps.mms | 240 + vms/descrip_mkdeps.mms | 289 + vms/descrip_src.mms | 462 ++ vms/find_bzip2_lib.com | 71 + vms/hlp_lib_next.com | 16 + vms/infback9.h | 9 + vms/makesfx.com | 72 + vms/mod_dep.com | 33 + vms/unixio_gcc.h | 27 + vms/unixlib_gcc.h | 16 + vms/unz_cli.cld | 103 + vms/unzip.opt | 1 + vms/unzip_cli.help | 619 ++ vms/unzip_def.rnh | 296 + vms/unzipsfx.hlp | 233 + vms/unzipsfx.opt | 1 + vms/vms.c | 5751 +++++++++++++++++ vms/vms.h | 382 ++ vms/vmscfg.h | 191 + vms/vmsdefs.h | 320 + vms/zlib.h | 7 + .../unz60d10_w32wide-Unicode_patch.txt | 4101 ++++++++++++ win32/Contents | 40 + win32/Makefile | 778 +++ win32/Makefile.bc | 561 ++ win32/Makefile.dj | 146 + win32/Makefile.emx | 229 + win32/Makefile.gcc | 570 ++ win32/Makefile.lcc | 353 + win32/Makefile.wat | 352 + win32/crc_i386.asm | 330 + win32/crc_i386.c | 310 + win32/crc_lcc.asm | 166 + win32/nt.c | 554 ++ win32/nt.h | 33 + win32/rsxntwin.h | 166 + win32/vc6/bz2lib.dsp | 178 + win32/vc6/funzip.dsp | 218 + win32/vc6/unzip.dsp | 283 + win32/vc6/unzip.dsw | 80 + win32/vc6/unzipbz2.dsp | 283 + win32/vc6/unzipsfx.dsp | 254 + win32/vc8/bz2lib.vcproj | 581 ++ win32/vc8/funzip.vcproj | 715 +++ win32/vc8/unzip.sln | 69 + win32/vc8/unzip.vcproj | 1195 ++++ win32/vc8/unzipbz2.vcproj | 1283 ++++ win32/vc8/unzipsfx.vcproj | 943 +++ win32/w32cfg.h | 573 ++ win32/win32.c | 3139 +++++++++ win32/win32i64.c | 129 + win32/winapp.rc | 50 + wince/Contents | 42 + wince/README | 216 + wince/ilmask.bmp | Bin 0 -> 190 bytes wince/imglist.2bp | Bin 0 -> 326 bytes wince/imglist.bmp | Bin 0 -> 630 bytes wince/inc/conio.h | 0 wince/inc/errno.h | 0 wince/inc/locale.h | 0 wince/inc/signal.h | 0 wince/inc/stdio.h | 0 wince/intrface.cpp | 1873 ++++++ wince/intrface.h | 139 + wince/punzip.h | 146 + wince/punzip.htp | 412 ++ wince/punzip.ic2 | Bin 0 -> 662 bytes wince/punzip.ico | Bin 0 -> 1078 bytes wince/punzip.rc | 404 ++ wince/punzip.rcv | 209 + wince/resource.h | 97 + wince/toolbar.2bp | Bin 0 -> 646 bytes wince/toolbar.bmp | Bin 0 -> 1270 bytes wince/vc5/punzip.dsp | 2488 ++++++++ wince/vc6/punzip.dsp | 3978 ++++++++++++ wince/vcEMbed3/punzip.vcp | 4053 ++++++++++++ wince/vcEMbed3/unzipcmd.vcp | 6734 ++++++++++++++++++++ wince/vcEMbed3/unzipwce.vcw | 41 + wince/wcecfg.h | 323 + wince/wcemain.c | 144 + wince/wince.cpp | 812 +++ wince/wince.h | 339 + wince/winmain.cpp | 3880 +++++++++++ wince/winmain.h | 169 + wince/zipfile.ic2 | Bin 0 -> 662 bytes wince/zipfile.ico | Bin 0 -> 1078 bytes windll/Contents | 96 + windll/csharp/App.ico | Bin 0 -> 1078 bytes windll/csharp/AssemblyInfo.cs | 58 + windll/csharp/CSharpInfoZip_UnZipSample.csproj | 153 + windll/csharp/Form1.cs | 322 + windll/csharp/Form1.resx | 202 + windll/csharp/ReadMeCS.txt | 57 + windll/csharp/UnZipDLLPrintMessageEventArgs.cs | 42 + windll/csharp/UnZipDLLServiceMessageEventArgs.cs | 59 + windll/csharp/Unzip.cs | 791 +++ windll/csharp/ZipFileEntries.cs | 73 + windll/csharp/ZipFileEntry.cs | 129 + windll/csharp/frmShowContents.cs | 169 + windll/csharp/frmShowContents.resx | 166 + windll/decs.h | 56 + windll/guisfx/dialog.h | 27 + windll/guisfx/sfxw.ico | Bin 0 -> 766 bytes windll/guisfx/sfxwiz.c | 583 ++ windll/guisfx/sfxwiz.dlg | 50 + windll/guisfx/sfxwiz.rc | 9 + windll/guisfx/sfxwiz16.mak | 198 + windll/guisfx/unzsfx16.def | 23 + windll/structs.h | 187 + windll/unziplib.def | 23 + windll/uzexampl.c | 477 ++ windll/uzexampl.h | 72 + windll/vb/VBReadMe.txt | 50 + windll/vb/vbunzip.bas | 714 +++ windll/vb/vbunzip.frm | 384 ++ windll/vb/vbunzip.vbp | 34 + windll/vc5/dll/unz32dll.dsp | 348 + windll/vc5/exampl/c_dll_ex.dsp | 151 + windll/vc5/lib/unz32lib.dsp | 212 + windll/vc5/sfx/SFXWiz32.dsp | 174 + windll/vc5/sfx/SFXWiz32.dsw | 44 + windll/vc5/sfx/unzsfx32.dsp | 184 + windll/vc5/unzip32.dsw | 83 + windll/vc6/dll/unz32dll.dsp | 347 + windll/vc6/exampl/c_dll_ex.dsp | 152 + windll/vc6/lib/unz32lib.dsp | 222 + windll/vc6/sfx/SFXWiz32.dsp | 175 + windll/vc6/sfx/SFXWiz32.dsw | 44 + windll/vc6/sfx/unzsfx32.dsp | 194 + windll/vc6/unzip32.dsw | 83 + windll/vc8/dll/unz32dll.vcproj | 2382 +++++++ windll/vc8/exampl/c_dll_ex.vcproj | 821 +++ windll/vc8/lib/unz32lib.vcproj | 1119 ++++ windll/vc8/sfx/SFXWiz32.sln | 39 + windll/vc8/sfx/SFXWiz32.vcproj | 509 ++ windll/vc8/sfx/unzsfx32.vcproj | 917 +++ windll/vc8/unzip32.sln | 120 + windll/windll.c | 1075 ++++ windll/windll.h | 34 + windll/windll.rc | 50 + windll/windll.txt | 434 ++ windll/windll16.def | 19 + windll/windll32.def | 23 + windll/windll_lc.def | 16 + windll/windllgcc.def | 18 + zip.h | 25 + zipgrep.txt | 75 + zipinfo.c | 2315 +++++++ zipinfo.txt | 436 ++ 427 files changed, 169714 insertions(+) create mode 100644 BUGS create mode 100644 COPYING.OLD create mode 100644 Contents create mode 100644 History.600 create mode 100644 INSTALL create mode 100644 LICENSE create mode 100644 README create mode 100644 ToDo create mode 100644 WHERE create mode 100644 acorn/Contents create mode 100644 acorn/GMakefile create mode 100644 acorn/ReadMe create mode 100644 acorn/RunMe1st create mode 100644 acorn/acorn.c create mode 100644 acorn/makefile create mode 100644 acorn/riscos.c create mode 100644 acorn/riscos.h create mode 100644 acorn/srcrename create mode 100644 acorn/swiven.h create mode 100644 acorn/swiven.s create mode 100644 amiga/Contents create mode 100644 amiga/amiga.c create mode 100644 amiga/amiga.h create mode 100644 amiga/crc_68.a create mode 100644 amiga/filedate.c create mode 100644 amiga/flate.a create mode 100644 amiga/makefile.azt create mode 100644 amiga/makesfx.c create mode 100644 amiga/smakefile create mode 100644 amiga/stat.c create mode 100644 amiga/z-stat.h create mode 100644 aosvs/Contents create mode 100644 aosvs/README create mode 100644 aosvs/aosvs.c create mode 100644 aosvs/aosvs.h create mode 100644 aosvs/make_unz.cli create mode 100644 api.c create mode 100644 apihelp.c create mode 100644 atari/Contents create mode 100644 atari/Makefile create mode 100644 atari/Makefile.old create mode 100644 atari/README.old create mode 100644 atari/atari.c create mode 100644 atari/make_unz.mup create mode 100644 atheos/Contents create mode 100644 atheos/Makefile create mode 100644 atheos/README create mode 100644 atheos/athcfg.h create mode 100644 atheos/atheos.c create mode 100644 atheos/atheos.h create mode 100644 beos/Contents create mode 100644 beos/Makefile create mode 100644 beos/README create mode 100644 beos/beocfg.h create mode 100644 beos/beos.c create mode 100644 beos/beos.h create mode 100644 beos/beosmain.cpp create mode 100644 beos/unzip.rsc create mode 100644 beos/unzipsfx.rsc create mode 100644 bzip2/00README.IZ create mode 100644 bzip2/Makebz2.iz create mode 100644 bzip2/buildbz2.com create mode 100644 bzip2/descrbz2.mms create mode 100644 bzip2/makbz2iz.msc create mode 100644 bzip2/makbz2iz.wat create mode 100644 cmsmvs/INSTALL.CMS create mode 100644 cmsmvs/README.CMS create mode 100644 cmsmvs/README.MVS create mode 100644 cmsmvs/WHATSNEW.CMS create mode 100644 cmsmvs/ccunzip.exec create mode 100644 cmsmvs/mc.exec create mode 100644 cmsmvs/mvs.mki create mode 100644 cmsmvs/unzip.exec create mode 100644 cmsmvs/unzip.makefile create mode 100644 cmsmvs/unzmvsc.job create mode 100644 cmsmvs/unzvmc.exec create mode 100644 cmsmvs/vmmvs.c create mode 100644 cmsmvs/vmmvs.h create mode 100644 cmsmvs/vmstat.h create mode 100644 cmsmvs/zipinfo.exec create mode 100644 consts.h create mode 100644 crc32.c create mode 100644 crc32.h create mode 100644 crc_i386.S create mode 100644 crypt.c create mode 100644 crypt.h create mode 100644 ebcdic.h create mode 100644 envargs.c create mode 100644 explode.c create mode 100644 extract.c create mode 100644 file_id.diz create mode 100644 fileio.c create mode 100644 flexos/Contents create mode 100644 flexos/README create mode 100644 flexos/flexos.c create mode 100644 flexos/flxcfg.h create mode 100644 flexos/hc.pro create mode 100644 flexos/makefile create mode 100644 funzip.c create mode 100644 funzip.txt create mode 100644 gbloffs.c create mode 100644 globals.c create mode 100644 globals.h create mode 100644 human68k/Contents create mode 100644 human68k/Makefile create mode 100644 human68k/crc_68.s create mode 100644 human68k/flate.s create mode 100644 human68k/human68k.c create mode 100644 inflate.c create mode 100644 inflate.h create mode 100644 list.c create mode 100644 macos/Contents create mode 100644 macos/HISTORY.TXT create mode 100644 macos/README.TXT create mode 100644 macos/UnZp.h create mode 100644 macos/UnZpLib.h create mode 100644 macos/UnZpPrj.xml create mode 100644 macos/UnZpSFX.h create mode 100644 macos/UnZpSx.h create mode 100644 macos/source/charmap.h create mode 100644 macos/source/getenv.c create mode 100644 macos/source/helpers.c create mode 100644 macos/source/helpers.h create mode 100644 macos/source/macbin3.c create mode 100644 macos/source/macbin3.h create mode 100644 macos/source/maccfg.h create mode 100644 macos/source/macdir.c create mode 100644 macos/source/macdir.h create mode 100644 macos/source/macos.c create mode 100644 macos/source/macscreen.c create mode 100644 macos/source/macstat.c create mode 100644 macos/source/macstat.h create mode 100644 macos/source/macstuff.h create mode 100644 macos/source/mactime.c create mode 100644 macos/source/mactime.h create mode 100644 macos/source/macunzip.c create mode 100644 macos/source/pathname.c create mode 100644 macos/source/pathname.h create mode 100644 macos/source/sxunzip.c create mode 100644 macos/source/unzip_rc.hqx create mode 100644 man/Contents create mode 100644 man/funzip.1 create mode 100644 man/unzip.1 create mode 100644 man/unzipsfx.1 create mode 100644 man/zipgrep.1 create mode 100644 man/zipinfo.1 create mode 100644 match.c create mode 100644 msdos/Contents create mode 100644 msdos/README create mode 100644 msdos/crc_i86.asm create mode 100644 msdos/doscfg.h create mode 100644 msdos/makefile.bc create mode 100644 msdos/makefile.dj1 create mode 100644 msdos/makefile.dj2 create mode 100644 msdos/makefile.emx create mode 100644 msdos/makefile.msc create mode 100644 msdos/makefile.tc create mode 100644 msdos/makefile.wat create mode 100644 msdos/msc51opt.dif create mode 100644 msdos/msdos.c create mode 100644 netware/Contents create mode 100644 netware/README create mode 100644 netware/makefile.wat create mode 100644 netware/netware.c create mode 100644 netware/nlm_EOL.pat create mode 100644 netware/nlmcfg.h create mode 100644 netware/unzip.build create mode 100644 netware/unzip.link create mode 100644 new-cmdparser/unz6-newcmdparser-diffs.txt create mode 100644 os2/Contents create mode 100644 os2/makefile.os2 create mode 100644 os2/os2.c create mode 100644 os2/os2acl.c create mode 100644 os2/os2acl.h create mode 100644 os2/os2cfg.h create mode 100644 os2/os2data.h create mode 100644 os2/rexxapi.c create mode 100644 os2/rexxapi.def create mode 100644 os2/rexxhelp.c create mode 100644 os2/rexxtest.cmd create mode 100644 os2/stub.def create mode 100644 os2/unzip.def create mode 100644 os2/zgrepapi.cmd create mode 100644 os2/zip2exe.cmd create mode 100644 os2/zipgrep.cmd create mode 100644 packaging/unzip-6.0-attribs-overflow.patch create mode 100644 packaging/unzip-6.0-bzip2-configure.patch create mode 100644 packaging/unzip-6.0-close.patch create mode 100644 packaging/unzip-6.0-exec-shield.patch create mode 100644 packaging/unzip-6.0-nostrip.patch create mode 100644 packaging/unzip.changes create mode 100644 packaging/unzip.spec create mode 100644 process.c create mode 100644 proginfo/3rdparty.bug create mode 100644 proginfo/CONTRIBS create mode 100644 proginfo/Contents create mode 100644 proginfo/ZipPorts create mode 100644 proginfo/defer.in create mode 100644 proginfo/extrafld.txt create mode 100644 proginfo/fileinfo.cms create mode 100644 proginfo/nt.sd create mode 100644 proginfo/perform.dos create mode 100644 proginfo/timezone.txt create mode 100644 proginfo/ziplimit.txt create mode 100644 qdos/Contents create mode 100644 qdos/IZREADME.SMS create mode 100644 qdos/Makefile create mode 100644 qdos/callstub.c create mode 100644 qdos/config.S create mode 100644 qdos/crc68.s create mode 100644 qdos/izqdos.h create mode 100644 qdos/makesfx.c create mode 100644 qdos/qdos.c create mode 100644 tandem/Contents create mode 100644 tandem/HISTORY create mode 100644 tandem/README create mode 100644 tandem/commacs create mode 100644 tandem/doit create mode 100644 tandem/macros create mode 100644 tandem/make create mode 100644 tandem/makesfx create mode 100644 tandem/tandem.c create mode 100644 tandem/tandem.h create mode 100644 tandem/tannsk.h create mode 100644 tandem/tanunz.c create mode 100644 testmake.zip create mode 100644 theos/Contents create mode 100644 theos/_fprintf.c create mode 100644 theos/_isatty.c create mode 100644 theos/_setargv.c create mode 100644 theos/_sprintf.c create mode 100644 theos/_stat.c create mode 100644 theos/charconv.h create mode 100644 theos/makefile create mode 100644 theos/oldstat.h create mode 100644 theos/stat.h create mode 100644 theos/theos.c create mode 100644 theos/thscfg.h create mode 100644 timezone.c create mode 100644 timezone.h create mode 100644 tops20/Contents create mode 100644 tops20/make.mic create mode 100644 tops20/rename.mic create mode 100644 tops20/tops20.c create mode 100644 ttyio.c create mode 100644 ttyio.h create mode 100644 ubz2err.c create mode 100644 unix/Contents create mode 100644 unix/Makefile create mode 100644 unix/Packaging/README create mode 100644 unix/Packaging/pkginfo.in create mode 100755 unix/Packaging/postinstall create mode 100644 unix/Packaging/preinstall.in create mode 100644 unix/Packaging/prototype create mode 100755 unix/configure create mode 100644 unix/unix.c create mode 100644 unix/unxcfg.h create mode 100755 unix/zipgrep create mode 100644 unreduce.c create mode 100644 unshrink.c create mode 100644 unzip.c create mode 100644 unzip.h create mode 100644 unzip.txt create mode 100644 unzipsfx.txt create mode 100644 unzipstb.c create mode 100644 unzpriv.h create mode 100644 unzvers.h create mode 100644 vms/Contents create mode 100644 vms/INSTALL.VMS create mode 100644 vms/NOTES.TXT create mode 100644 vms/README create mode 100644 vms/UNZIP_MSG.MSG create mode 100644 vms/build_unzip.com create mode 100644 vms/bzlib.h create mode 100644 vms/cmdline.c create mode 100644 vms/collect_deps.com create mode 100644 vms/cvthelp.tpu create mode 100644 vms/descrip.mms create mode 100644 vms/descrip_deps.mms create mode 100644 vms/descrip_mkdeps.mms create mode 100644 vms/descrip_src.mms create mode 100644 vms/find_bzip2_lib.com create mode 100644 vms/hlp_lib_next.com create mode 100644 vms/infback9.h create mode 100644 vms/makesfx.com create mode 100644 vms/mod_dep.com create mode 100644 vms/unixio_gcc.h create mode 100644 vms/unixlib_gcc.h create mode 100644 vms/unz_cli.cld create mode 100644 vms/unzip.opt create mode 100644 vms/unzip_cli.help create mode 100644 vms/unzip_def.rnh create mode 100644 vms/unzipsfx.hlp create mode 100644 vms/unzipsfx.opt create mode 100644 vms/vms.c create mode 100644 vms/vms.h create mode 100644 vms/vmscfg.h create mode 100644 vms/vmsdefs.h create mode 100644 vms/zlib.h create mode 100644 win32-experimental/unz60d10_w32wide-Unicode_patch.txt create mode 100644 win32/Contents create mode 100644 win32/Makefile create mode 100644 win32/Makefile.bc create mode 100644 win32/Makefile.dj create mode 100644 win32/Makefile.emx create mode 100644 win32/Makefile.gcc create mode 100644 win32/Makefile.lcc create mode 100644 win32/Makefile.wat create mode 100644 win32/crc_i386.asm create mode 100644 win32/crc_i386.c create mode 100644 win32/crc_lcc.asm create mode 100644 win32/nt.c create mode 100644 win32/nt.h create mode 100644 win32/rsxntwin.h create mode 100644 win32/vc6/bz2lib.dsp create mode 100644 win32/vc6/funzip.dsp create mode 100644 win32/vc6/unzip.dsp create mode 100644 win32/vc6/unzip.dsw create mode 100644 win32/vc6/unzipbz2.dsp create mode 100644 win32/vc6/unzipsfx.dsp create mode 100644 win32/vc8/bz2lib.vcproj create mode 100644 win32/vc8/funzip.vcproj create mode 100644 win32/vc8/unzip.sln create mode 100644 win32/vc8/unzip.vcproj create mode 100644 win32/vc8/unzipbz2.vcproj create mode 100644 win32/vc8/unzipsfx.vcproj create mode 100644 win32/w32cfg.h create mode 100644 win32/win32.c create mode 100644 win32/win32i64.c create mode 100644 win32/winapp.rc create mode 100644 wince/Contents create mode 100644 wince/README create mode 100644 wince/ilmask.bmp create mode 100644 wince/imglist.2bp create mode 100644 wince/imglist.bmp create mode 100644 wince/inc/conio.h create mode 100644 wince/inc/errno.h create mode 100644 wince/inc/locale.h create mode 100644 wince/inc/signal.h create mode 100644 wince/inc/stdio.h create mode 100644 wince/intrface.cpp create mode 100644 wince/intrface.h create mode 100644 wince/punzip.h create mode 100644 wince/punzip.htp create mode 100644 wince/punzip.ic2 create mode 100644 wince/punzip.ico create mode 100644 wince/punzip.rc create mode 100644 wince/punzip.rcv create mode 100644 wince/resource.h create mode 100644 wince/toolbar.2bp create mode 100644 wince/toolbar.bmp create mode 100644 wince/vc5/punzip.dsp create mode 100644 wince/vc6/punzip.dsp create mode 100644 wince/vcEMbed3/punzip.vcp create mode 100644 wince/vcEMbed3/unzipcmd.vcp create mode 100644 wince/vcEMbed3/unzipwce.vcw create mode 100644 wince/wcecfg.h create mode 100644 wince/wcemain.c create mode 100644 wince/wince.cpp create mode 100644 wince/wince.h create mode 100644 wince/winmain.cpp create mode 100644 wince/winmain.h create mode 100644 wince/zipfile.ic2 create mode 100644 wince/zipfile.ico create mode 100644 windll/Contents create mode 100644 windll/csharp/App.ico create mode 100644 windll/csharp/AssemblyInfo.cs create mode 100644 windll/csharp/CSharpInfoZip_UnZipSample.csproj create mode 100644 windll/csharp/Form1.cs create mode 100644 windll/csharp/Form1.resx create mode 100644 windll/csharp/ReadMeCS.txt create mode 100644 windll/csharp/UnZipDLLPrintMessageEventArgs.cs create mode 100644 windll/csharp/UnZipDLLServiceMessageEventArgs.cs create mode 100644 windll/csharp/Unzip.cs create mode 100644 windll/csharp/ZipFileEntries.cs create mode 100644 windll/csharp/ZipFileEntry.cs create mode 100644 windll/csharp/frmShowContents.cs create mode 100644 windll/csharp/frmShowContents.resx create mode 100644 windll/decs.h create mode 100644 windll/guisfx/dialog.h create mode 100644 windll/guisfx/sfxw.ico create mode 100644 windll/guisfx/sfxwiz.c create mode 100644 windll/guisfx/sfxwiz.dlg create mode 100644 windll/guisfx/sfxwiz.rc create mode 100644 windll/guisfx/sfxwiz16.mak create mode 100644 windll/guisfx/unzsfx16.def create mode 100644 windll/structs.h create mode 100644 windll/unziplib.def create mode 100644 windll/uzexampl.c create mode 100644 windll/uzexampl.h create mode 100644 windll/vb/VBReadMe.txt create mode 100644 windll/vb/vbunzip.bas create mode 100644 windll/vb/vbunzip.frm create mode 100644 windll/vb/vbunzip.vbp create mode 100644 windll/vc5/dll/unz32dll.dsp create mode 100644 windll/vc5/exampl/c_dll_ex.dsp create mode 100644 windll/vc5/lib/unz32lib.dsp create mode 100644 windll/vc5/sfx/SFXWiz32.dsp create mode 100644 windll/vc5/sfx/SFXWiz32.dsw create mode 100644 windll/vc5/sfx/unzsfx32.dsp create mode 100644 windll/vc5/unzip32.dsw create mode 100644 windll/vc6/dll/unz32dll.dsp create mode 100644 windll/vc6/exampl/c_dll_ex.dsp create mode 100644 windll/vc6/lib/unz32lib.dsp create mode 100644 windll/vc6/sfx/SFXWiz32.dsp create mode 100644 windll/vc6/sfx/SFXWiz32.dsw create mode 100644 windll/vc6/sfx/unzsfx32.dsp create mode 100644 windll/vc6/unzip32.dsw create mode 100644 windll/vc8/dll/unz32dll.vcproj create mode 100644 windll/vc8/exampl/c_dll_ex.vcproj create mode 100644 windll/vc8/lib/unz32lib.vcproj create mode 100644 windll/vc8/sfx/SFXWiz32.sln create mode 100644 windll/vc8/sfx/SFXWiz32.vcproj create mode 100644 windll/vc8/sfx/unzsfx32.vcproj create mode 100644 windll/vc8/unzip32.sln create mode 100644 windll/windll.c create mode 100644 windll/windll.h create mode 100644 windll/windll.rc create mode 100644 windll/windll.txt create mode 100644 windll/windll16.def create mode 100644 windll/windll32.def create mode 100644 windll/windll_lc.def create mode 100644 windll/windllgcc.def create mode 100644 zip.h create mode 100644 zipgrep.txt create mode 100644 zipinfo.c create mode 100644 zipinfo.txt diff --git a/BUGS b/BUGS new file mode 100644 index 0000000..0ee3946 --- /dev/null +++ b/BUGS @@ -0,0 +1,82 @@ +Bogus bugs (not our fault!): +--------------------------- + + By far THE BIGGEST source of bug reports to Info-ZIP/zip-bugs is the + incorrect transfer of zipfiles (or of the UnZip executable itself). + ALWAYS TRANSFER IN BINARY MODE! This includes ftp transfers and *both* + ends of a Kermit connection ("set file type binary"). If your copy + isn't exactly the same size as the original, you made a mistake. + + Another common source of errors such as "compression method 8 not sup- + ported" is the existence of an old version of UnZip somewhere in your + path. Make sure you're using the version you think you're using; give + the full path explicitly if necessary. Executing "unzip" without any + options will print a help screen, at the top of which is the UnZip + version number and release date; and executing "unzip -v" without any + zipfile or other options will give information about what compiler was + used, the target operating system, any special UnZip options, and the + date of compilation--only for version 5.11 and later, though! (Also, + under Unix C shell and some Bourne shells, "which unzip" will print + the path of the unzip you're actually using. Under OS/2 and MS-DOS, + whch21gr.zip [on Simtel mirror sites] will do the same thing; in addi- + tion, "which -a unzip" will show *all* copies of "unzip" in your path.) + + +Bugs (real and/or imagined): +--------------------------- + + - [OS/2 DLL] when trying to use the REXX function UzUnZipToStem to extract a + file with `&' in its name, the DLL crashes (but UzUnZipToVar still works) + [Daniel H, 961215] + - UnZip has problems with archives bigger than 2GB; it may print "note: didn't + find end-of-central-dir signature at end of central dir" (harmless) or + may not be able to seek to member files [James Lemley 970107, Iris Spaniol + 970206, ...] + + Fixed with Zip64 support in UnZip 6.0 + + - fix overwrite behavior: hidden/system problems?; etc. + - 32-bit DOS UnZip still unable to set volume labels? + - 32-bit DOS UnZip under OS/2 doesn't extract all wildcard zipfiles? + [DOS box: unzip386 (ver 5.12) x:\32bit\unix\emx09a\*.zip, Hobbes 3/95] + - 32-bit DOS UnZip under OS/2 doesn't set timestamp when overwriting files + on HPFS partition? (go32 and pmode/w both; emx/rsx OK) [Eberhard Mattes + 950726] + - USE_FWRITE still causes occasional CRC errors when extracting on Pyramid? + [Kevin Fritz 931102] + - still NT/W95 bug with "unzip -v d:*.zip" not matching properly? [Steve S + 940527] + 980427: bug no longer exists, Opendir() must have been corrected by someone + + - when ^Z received in no-echo mode, echo is not restored (works OK if + resume, however) + - signal() handler disabled after first use with one of BSD/SysV? + - MKS Korn shell: unzip assumes the MKS-style command-line environment + options are relevant to it, but this is not the case if unzip was called + by another program (e.g., from a .BAT file). A fix for this exists for + Borland compilers but not for MSC, Watcom, djgpp, etc. + - OS/2: for paths with one long component, the .LONGNAME EA may be saved for + all components (waste of disk space): how to check?? + - VMS: for extracting to other directories, only the VMS-style "-d [.foo]" + format is accepted; "-d foo" should also be allowed. Long filenames are + not automatically truncated to 39.39. + - Novell Netware: Netware drives may clear the archive bit on extracted + files under OS/2 and/or MS-DOS. UnZip always *tries* to set the archive + bit, however. [pynq@uchicago, 940527] + - DEC Ultrix: on long zipfiles, unzip will sometimes fail (bad CRC, not always + reproducible); this is apparently due either to a hardware bug (cache mem) + or OS bug (page faults?) [Igor, Jean-loup, bottom of BUGS.long] + - funzip/more/decryption/no-echo bug: race condition(?) causes terminal to + be "reset" to no-echo state + - Macintosh (100200), Atari (020000) external file attributes not interpreted + correctly (both unzip and zipinfo) + - pkbug error: zipfile with incorrect csize and/or ucsize--check for end of + compressed (csize) data in uncompression routines: + unreduce.c: while (((outpos + outcnt) < ucsize) && (!zipeof)) { + [James Birdsall, Mark, bottom of BUGS.long] + - OS/2: directory EAs not restored if directory exists [Kai Uwe, KG27515@uark] + (subsequent note: no way to determine which EAs are newer ==> cannot + restore without user input) + (update: as of UnZip 5.30, option -o forces restoring of directory EAs) + - MS-DOS: Borland executables don't allow other than 80-column, 25/43/50-line + screen modes (Borland bug) [Michael Stillwell] diff --git a/COPYING.OLD b/COPYING.OLD new file mode 100644 index 0000000..16eaccc --- /dev/null +++ b/COPYING.OLD @@ -0,0 +1,212 @@ +__________________________________________________________________________ + + This is the Info-ZIP file COPYING (for UnZip), last updated 17 Jul 2000. +__________________________________________________________________________ + + FIRST NOTE: + This file contains some details about the copyright history of + contributions to the UnZip project. + Additionally, it summarises some exceptions to the general BSD-like + copyright found in LICENSE that covers our generic code and most of + the system specific ports. + Please read LICENSE first to find out what is allowed to do with + Info-ZIP's UnZip code. + +- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + There are currently two explicit copyrights on portions of UnZip + code (at least, of which Info-ZIP is aware): + Jim Luther's Mac OS File Manager interface code; and Christopher Evans' + MacBinaryIII coding code (for the MacOS port).. These copyrights + are discussed in more detail below. + + All remaining code is now (starting with UnZip version 5.41) covered + by the new Info-ZIP license. For details, please read the acompaning + file LICENSE. The terms and conditions in this license supersede the + copyright conditions of the contributions by Igor Mandrichenko + (vms/vms.c), Greg Roelofs (zipinfo.c, new version of unshrink.c), + Mike White (Windows DLL code in "windll/*"), Steve P. Miller (Pocket + UnZip GUI "wince/*"), and Mark Adler (inflate/explode decompresseion + core routines, previously put into the public domain). All these + Info-ZIP contributors (or "primary" authors) have permitted us to + replace their copyright notes by the Info-ZIP License. + + Frequently Asked Questions regarding (re)distribution of Zip and UnZip + are near the end of this file. + + There are no known patents on any of the code in UnZip. Unisys + claims a patent on LZW encoding and on LZW decoding _in an apparatus + that performs LZW encoding_, but the patent appears to exempt a stand- + alone decoder (as in UnZip's unshrink.c). Unisys has publicly claimed + otherwise, but the issue has never been tested in court. Since this + point is unclear, unshrinking is not enabled by default. It is the + responsibility of the user to make his or her peace with Unisys and + its licensing requirements. (unshrink.c may be removed from future + releases altogether.) +__________________________________________________________________________ + + The original unzip source code has been extensively modified and + almost entirely rewritten (changes include random zipfile access + rather than sequential; replacement of unimplode() with explode(); + replacement of old unshrink() with new (unrelated) unshrink(); re- + placement of output routines; addition of inflate(), wildcards, + filename-mapping, text translation, ...; etc.). As far as we can + tell, only the core code of the unreduce method remained substantially + similar to Mr. Smith's original source. As of UnZip 5.42, the complete + core code is now covered by the Info-ZIP Licence. Therefore, support + for the reduce method has been removed. + The drop of the reduce method should only affect some test archives, + reducing was never used in any publically distributed Zip program. + For pathologic cases where support for reduced archive entries is + needed, the unreduce code copyrighted by Samuel H. Smith is available + as a separate distribution (the restricted copyright of this code is + cited below in the "historical" section). + + The following copyright applies to the Mac OS File Manager interface code + (macos/source/macstuff.[ch]), distributed with UnZip 5.4 and later: + + * MoreFiles + * + * A collection of File Manager and related routines + * + * by Jim Luther (Apple Macintosh Developer Technical Support Emeritus) + * with significant code contributions by Nitin Ganatra + * (Apple Macintosh Developer Technical Support Emeritus) + * Copyright 1992-1998 Apple Computer, Inc. + * Portions copyright 1995 Jim Luther + * All rights reserved. + * The Package "More Files" is distributed under the following + * license terms: + * + * "You may incorporate this sample code into your + * applications without restriction, though the + * sample code has been provided "AS IS" and the + * responsibility for its operation is 100% yours. + * However, what you are not permitted to do is to + * redistribute the source as "DSC Sample Code" after + * having made changes. If you're going to + * redistribute the source, we require that you make + * it clear in the source that the code was descended + * from Apple Sample Code, but that you've made + * changes." + + The usage terms of this copyright note are compatible with the + Info-ZIP license, they do not add further restrictions. + + + The following copyright applies to the Mac OS "macbin3" decoding code + (extra field compatibility with ZipIt): + + * MacBinaryIII.h + * + * Copyright 1997 Christopher Evans (cevans@poppybank.com) + * + * Basic encoding and decoding of Macintosh files to the + * MacBinary III spec. + * ---------------------------------------------------------------------- + * This source is copyrighted by Christopher Evans (cevans@poppybank.com) + * (available at ftp://ftp.lazerware.com/MacBinaryIII_src_C.sit + * homepage of Leonard Rosenthol leonardr@netcom.com) + + This copyright note does not contain any usage terms. So, we assume + that this code is freely reusable until we are proved wrong... + +-------------------------------------------------------------------------- + + The remaining copyright notes have been superseeded by the new + Info-ZIP license, with explicit permission from the respective + original authors. They are cited here for historical reasons, + only: + + The following copyright applies to the full-featured unreduce.c + (now distributed separately): + + * Copyright 1989 Samuel H. Smith; All rights reserved + * + * Do not distribute modified versions without my permission. + * Do not remove or alter this notice or any other copyright notice. + * If you use this in your own program you must distribute source code. + * Do not use any of this in a commercial product. + + Regarding the first stipulation, Mr. Smith was tracked down in southern + California some years back [Samuel H. Smith, The Tool Shop; as of mid- + May 1994, (213) 851-9969 (voice), (213) 887-2127(?) (subscription BBS), + 71150.2731@compuserve.com]: + + "He says that he thought that whoever contacted him understood that + he has no objection to the Info-ZIP group's inclusion of his code. + His primary concern is that it remain freely distributable, he said." + + Despite the fact that our "normal" code has been entirely rewritten + and by default no longer contains any of Mr. Smith's code, Info-ZIP + remains indebted and grateful to him. We hope he finds our contribu- + tions as useful as we have his. + + Note that the third and fourth stipulations still apply to any com- + pany that wishes to incorporate the unreduce code into its products; + if you wish to do so, you must contact Mr. Smith directly regarding + licensing. + + ----- + + The following copyright applied to most of the VMS code in vms.c, + distributed with UnZip version 4.2 and later: + + * Copyright (c) 1992-93 Igor Mandrichenko. + * Permission is granted to any individual or institution to use, copy, + * or redistribute this software so long as all of the original files + * are included unmodified and that this copyright notice is retained. + + ----- + + The following copyright applied to the new version of unshrink.c, + distributed with UnZip version 5.2 and later: + + * Copyright (c) 1994 Greg Roelofs. + * Permission is granted to any individual/institution/corporate + * entity to use, copy, redistribute or modify this software for + * any purpose whatsoever, subject to the conditions noted in the + * Frequently Asked Questions section below, plus one additional + * condition: namely, that my name not be removed from the source + * code. (Other names may, of course, be added as modifications + * are made.) Corporate legal staff (like at IBM :-) ) who have + * problems understanding this can contact me through Zip-Bugs... + + ----- + + The following copyright applied to the Windows DLL code (windll/*), + distributed with UnZip version 5.2 and later: + + * Copyright (c) 1996 Mike White. + * Permission is granted to any individual or institution to use, + * copy, or redistribute this software so long as all of the original + * files are included, that it is not sold for profit, and that this + * copyright notice is retained. + + ----- + + The following copyright applied to the Windows CE GUI port, ``Pocket + UnZip,'' distributed with UnZip version 5.3 and later: + + * All the source files for Pocket UnZip, except for components + * written by the Info-ZIP group, are copyrighted 1997 by Steve P. + * Miller. The product "Pocket UnZip" itself is property of the + * author and cannot be altered in any way without written consent + * from Steve P. Miller. + + ----- + + The remaining code was written by many people associated with the + Info-ZIP group, with large contributions from (but not limited to): + Greg Roelofs (overall program logic, ZipInfo, unshrink, filename + mapping/portability, etc.), Mark Adler (inflate, explode, funzip), + Kai Uwe Rommel (OS/2), John Bush and Paul Kienitz (Amiga), Antoine + Verheijen (Macintosh), Hunter Goatley (more VMS), Mike White (Windows + DLLs), Christian Spieler (overall logic, optimization, VMS, etc.) and + others. See the file CONTRIBS in the source distribution for a much + more complete list of contributors. + The decompression core code for the deflate method (inflate.[ch], + explode.c) was originally written by Mark Adler who submitted it + as public domain code. + +-------------------------------------------------------------------------- diff --git a/Contents b/Contents new file mode 100644 index 0000000..ec85c82 --- /dev/null +++ b/Contents @@ -0,0 +1,84 @@ +Contents of the UnZip 6.00 source archive. The OS-specific subdirectories +at the end contain their own Contents listings: + + Contents this file + README what UnZip is; general information + LICENSE Info-ZIP license; terms for using and distributing UnZip + COPYING.OLD historic copyrights and distribution policy (obsolete) + INSTALL how to compile and install UnZip and related utilities + WHERE where Zip/UnZip and encryption/decryption support can be found + History.600 new features and fixes of the last major release + ToDo rough priority list of new features to be added in next release + BUGS known bugs, problems, and (possible) other features to be added + unzip.txt UnZip manual page, human-readable format + unzipsfx.txt UnZipSFX manual page, human-readable format + zipinfo.txt ZipInfo manual page, human-readable format + zipgrep.txt ZipGrep manual page, human-readable format + funzip.txt fUnZip manual page, human-readable format + file_id.diz BBS-oriented file describing this archive + testmake.zip test archive for checking whether newly compiled UnZip works + api.c generic DLL entry points, support functions (required for DLLs) + apihelp.c API help text for DLL versions (currently OS/2 only) + consts.h global, initialized variables that never change (required) + crc32.c code for calculation 32bit CRC of a string buffer (required*) + crc32.h declarations for the crc-32 code (required*) + crc_i386.S fast assembler replacement for crc32() (Intel 386 and newer) + crypt.c de-/encryption routines (required*) + crypt.h de-/encryption header file (required*) + ebcdic.h static lookup table for ASCII <-> EBCDIC translation (required) + envargs.c code to read options from environment variables (required) + explode.c code for exploding (required) + extract.c high-level extraction and decryption code (required) + fileio.c file manipulation and password code (required) + funzip.c filter unzip: extracts in a pipe from stdin to stdout + gbloffs.c helper program to retrieve offsets of globals struct members + globals.c code to support global variables with reentrancy (required) + globals.h definition of global structure G (required) + inflate.c code for inflating (required*) + inflate.h header file for inflating (required*) + list.c UnZip listing routines, non-ZipInfo mode (required) + match.c pattern-matching code for filename wildcards (required) + process.c zipfile headers code (required) + timezone.c timezone and timestamp functions (required) + timezone.h header file for interface to "internal" tz functions (required) + ttyio.c code for handling nonecho tty input: password, pager (required) + ttyio.h header file for nonecho tty input: password, pager (required) + ubz2err.c callback handler for fatal bzip2 errors (bzip2 support only) + unreduce.c code for unreducing (required) + unshrink.c code for unshrinking (required) + unzip.c UnZip main(), usage and options code (required) + unzip.h public half of main UnZip header file (required*) + unzipstb.c minimal UnZip "stub" file demonstrating use of DLL versions + unzpriv.h private (internal) half of main UnZip header file (required*) + unzvers.h header with UnZip/UnZipSFX and ZipInfo version info (required) + zip.h dummy header for use with crypt.c (required*) + zipinfo.c UnZip listing routines, ZipInfo mode (required) + acorn/ support files for compiling under Acorn RISC OS + amiga/ support files for compiling under AmigaDOS + aosvs/ support files for compiling under Data General AOS/VS + atari/ support files for compiling under Atari TOS + atheos/ support files for compiling under AtheOS/Syllable + beos/ support files for compiling under BeOS + cmsmvs/ support files for compiling under VM/CMS and MVS + flexos/ support files for compiling under FlexOS + human68k/ support files for compiling under X68000/Human68K + macos/ support files for compiling under Macintosh OS + msdos/ support files for compiling under MS-DOS + netware/ support files for compiling for Novell Netware NLM + os2/ support files for compiling under OS/2 (includes DLL stuff) + qdos/ support files for compiling under SMS/QDOS + tandem/ support files for compiling under Tandem NSK + theos/ support files for compiling under Theos + tops20/ support files for compiling under TOPS-20 + unix/ support files for compiling under Unix + vms/ support files for compiling under VMS + win32/ support files for compiling under Windows 9x and Windows NT + wince/ support files for compiling under Windows CE (GUI version) + windll/ support files for compiling Windows 3.x/9x/NT DLLs + bzip2/ subfolder for source of externally supplied bzip2 extension + man/ nroff man-page sources for the main user documentation + proginfo/ programming docs, additional technical info, contributor list + +Files marked "required*" are also needed to compile fUnZip. The normal +UnZip makefile targets now make both UnZipSFX and fUnZip, except in a few +cases; ZipInfo is now incorporated into UnZip (see zipinfo.txt for usage). diff --git a/History.600 b/History.600 new file mode 100644 index 0000000..7ebef49 --- /dev/null +++ b/History.600 @@ -0,0 +1,1117 @@ +UnZip, version 6.00, 20 April 2009 + +Features added (or removed): + +6.00a (): + - Many changes by Myles + +6.00b (12 Nov 04): + - Added dll changes from Mike White. [Mike White (MW), Ed Gordon (EG)] + - Added Unix Large File Support but must be enabled manually. [EG] + - Humble beginnings of adding configure script to Unix port to + autoconfigure large file support. [EG] + - VMS changes, including large file support, better handling of + -V and new -VV options, revised build procedures, and + documentation updates. [Steven Schweda (SMS)] + - file_size added to process.c to handle files sizes larger + than 2 GiB more cleanly when no large file support. [SMS] + - Large file debugging on Unix and VMS. [SMS, EG] + - Split w32i64.h with large file includes for dll [EG] + +6.00c (1 Feb 05): + - Various Amiga and Win32 changes (see files). [Paul Kienitz (PK)] + - Add NOSHARE compile option for VMS. [SMS] + - Updates to windll (list.c, structs.h, uzexampl.c, uzexampl.h, windll.aps, + windll.c, windll.h, windll.rc, windll.txt, sfxwiz.c) to add VB support + for Zip64 to dll [MW] + +6.00c (14 Feb 05): + - Added ODS5 extended file name support for VMS. (Eight-bit-only, no + Unicode.) Zip name character "?" is mapped to VMS name character + "/". ODS2 file names are now explicitly upper-case. [SMC] + - New VMS option, -2 (/ODS2), forces ODS2-compatible file names even + when the destination file system is ODS5. [SMC] + - New VMS option, -Y (/DOT_VERSION), causes archived file name endings + of ".nnn" (where "nnn" is a decimal number) to be treated as if they + were VMS version numbers (";nnn"). Example: "a.b.3" -> "a.b;3". [SMC] + +6.00c8 (08 May 05): + - Added optional BZIP2 support, using the free BZIP2 library. Enabled + by defining the compile time option USE_BZIP2. [Johnny Lee] + - Revised optional ZLIB support to use the new zlib 1.2.x callback interface + when available (significant performance gain, now faster than UnZip's + built-in decompression code) [Christian Spieler] + - Added interface into zlib's unsupported "inflate9" callback code (a contri- + buted extension in zlib 1.2.x), for extracting Deflate64 entries. Enabled + by defining the compile time option HAVE_ZL_INFLAT64. [Christian Spieler] + - windll: added separate entry point Wiz_SingleEntryUnzipList for VB support, + changed Wiz_SingleEntryUnzip back to 5.x version [Christian Spieler] + +6.00c9 (15 May 05): + - NO feature changes. + +6.00c10 (21 May 05): + - WinCE port: Adapted PocketUnzip to UnZip6 code and enabled Zip64 support + for the WIN32 (non-WinCE) targets. [Chr. Spieler] + +6.00c11 (23 May 05): + - NO feature changes. + +6.00c12 (15 Aug 05): + - windll/csharp: new example project for .NET framework 1.1, written in C#. + (currently unsupported by the Info-ZIP group) [Adrian Maull] + - MSDOS port: added warning message when used in an (32/64-bit) Windows + virtual MSDOS process; currently only shown when an error or warning + occured. [Johnny Lee, Chr. Spieler] + +6.00c13 (02 Oct 05), 6.00c14 (15 Nov 05), 6.00c15(17 Nov 05): + - NO feature changes. + +6.00c (19 Nov 05): + - NO feature changes. + +6.00d01 (04 Mar 07): + - unix/unix.c: when extracting directory entries, keep a SGID attribute + inherited from the parent dir (to allow content created in these new + directories to inherit the parent's GID), unless the directory entry was + created on UNIX, and UnZip was requested to restore UID/GID or SUID/SGID. + [Matthew Seitz, Chr. Spieler] + - process.c, modified info message handling for timestamping operation mode + to be more consistent with message handling of other operations: suppress + summary message only when qflag > 1 in process_zipfiles(); added time-stamp + success message to do_seekable() in non-quiet mode; moved message strings + to Far string constants. [Steven M. Schweda, Chr. Spieler] + - process.c - process_zipfiles(): suppress the "cannot find any wildcard + match ..." warning message for (qflag >= 3). [Chr. Spieler] + - vms/vms.c: added support for delayed restoration of directory attributes + [Steven M. Schweda] + - vms/vms.c - return_VMS(): implemented official HP-assigned facility code + in the calculation of UnZip's (non-success) VMS exit status codes. + [Steven M. Schweda] + - vms/vms.c, vms/cmdline.c vms/unz_cli.cld, unzip.c, unzip.h: added "-S" + option to change output record format into Stream-LF for text files when + extracted in "convert text-files" mode. [Steven M. Schweda] + - unzpriv.h, extract.c, unix/unix.c, atari/atari.c, atheos/atheos.c, + beos/beos.c: added separate pInfo flag to record symlink entries, moved + symlink detection code into mapattr(), added VMS to the list of hosts known + to support symbolic links. [Steven M. Schweda, Christian Spieler] + - VMS: added support to extract "symlink" entries as symbolic links (requires + up-to-date version of OpenVMS). [Steven M. Schweda, Chr. Spieler] + - unzip.1: added description of new VMS-specific "-S" option. [Chr. Spieler] + - unzip_cli.help, unzip_def.rnh: updated exit codes documentation, added new + option (-S resp. /TEXT=STMLF). [Steven M. Schweda, Chr. Spieler] + - unzip_cli.help, unzip_def.rnh: completed resp. added description of new + VMS-specific options (-Y, -2). [Chr. Spieler] + - process.c: added preliminary (alpha-state) support for reading of Unicode + Path extra field that now sets globals unipath_filename and + unipath_escapedfilename (not yet functional). [EG] + +6.00d02 (08 Mar 07), 6.00d03 (10 Mar 07), 6.00d04 (11 Mar 07): + - NO feature changes. + +6.00d05 (31 Mar 07): + - win32/vc6: added VC6 project files for compiling UnZip with support for + bzip2 decompression. [Chr. Spieler] + - INSTALL, unix/Makefile, unix/configure: support compiling of UnZip with + integrated bzip2 decompression capability, added check for presence of + bzip2 library sources to configure script, updated bzip2-related + documentation in INSTALL. [Chr. Spieler] + +6.00d06 (02 Dec 07): + - VMS: added support for displaying UnZip exit code error messages through + the VMS built-in message facility; new vms/UNZIP_MSG.MSG message string + source, modified vms/descrip.mms makefile. [Steven M. Schweda] + - UNIX: added new "-^" command line option that switches off the control + character filter for extracted filenames. [Chr. Spieler] + - UNIX: added support for restoring attributes and UID/GID for symbolic + links when appropiate OS support is provided. [Chr. Spieler] + +6.00d07 (26 Dec 07): + - New "-D" option which allows skipping of timestamp restoration for extracted + directory entry or for all files ("-DD"). [Chr. Spieler] + - windll: added support for new -D (-DD) option to dll interface, updated + the documentation. [Chr. Spieler] + +6.00d08 (29 Dec 07): + - On VMS, the default is now to not restore directory timestamps (consistent + with BACKUP); "-D" skips all timestamp restorations, "--D" enables + timestamp restoration for all entries. [Chr. Spieler, Steven M. Schweda] + +6.00d09 (06 Jan 08): + - NO feature changes. + +6.00d10 (10 Feb 08): + - partial integration of Ed Gordon's UNICODE_SUPPORT code (W9x-ANSI mode only + for now) seems to be finished. [Ed Gordon, C. Spieler] + - zipinfo.c: added support for "UTF-8 path" extra field display to zi_long(). + [Chr. Spieler] + +6.00d11 (16 Feb 08): + - ATheOS, BeOS, Tandem, Unix: experimental extension of "Ux" extra field to + allow restoration of 32-bit UID & GID values (affected generic sources: + unzpriv.h and process.c). [Chr. Spieler] + +6.00d (17 Feb 08): + - NO feature changes. + +6.00e01 (21 Feb 08): + - NO feature changes. + +6.00e02 (08 Mar 08): + - ATheOS, BeOS, Tandem, Unix: removed experimental 32-bit extension of "Ux" + extra field (affected generic sources: process.c). [Chr. Spieler] + +6.00e03 (29 Mar 08): + - general (ebcdic.h, process.c, unpriv.h): modified infrastructure to make + OEM<-->ISO translation configurable at runtime. [Chr. Spieler] + - MSDOS (doscfg.h, msdos.c): OEM<-->ISO configured at runtime, depending on + system codepage (enabled for 437, 850, 858; disabled for 932, 936, 949, + 950, 874, 1258; currently also disabled for all other OEM codepages because + of missing translation tables). [Chr. Spieler] + +6.00e04 (27 Apr 08): + - NO feature changes. + +6.00e05 (09 Sep 08): + - unzip.c: added framework for verbose multi-page online help, called by + option "-hh". [Ed Gordon] + - process.c, unzpriv.h, unix/unix.c: added support for new IZUNIX3 extra field + providing 32-bit UID/GID data. [Ed Gordon, Chr. Spieler] + - unzip.c - uz_opts(): do not exit immediately after recognizing help screen + request; this allows to specify the pager option after the explicit help + request. [Chr. Spieler] + +6.00e06 (13 Sep 08): + - NO feature changes. + +6.00e (04 Jan 09): + - unzip.h: enable -B option for Unix, OS/2, and Win32. [EG, Chr. Spieler] + +6.00f (11 Jan 09): + - NO feature changes. + +6.00g01 (08 Jan 09), 6.00g02 (25 Jan 09), 6.00g03 (10 Feb 09), +6.00g04 (16 Feb 09), 6.00g (28 Feb 09), +6.00h01 (09 Mar 09), 6.00h02 (16 Apr 09), 6.00h03 (17 Apr 09), +6.00 (20 Apr 09): + - NO feature changes. + +Bugs fixed: + +6.00b (12 Nov 04): + - Output bug fixes to account for sizes > 2 GiB and < 4 GiB. [EG] + - Bug fixes in ZipInfo. [EG] + - Reverted unix.c to an older version to make + calls to defer_dir_attribs compatible. Also needed to rework + win32.c to make compatible. Probably broke NT but haven't tested. + Need to trace out and fix. [EG] + +6.00c (1 Feb 05): + - Various bug fixes (see files gbloffs.c, process.c, unzpriv.h, amiga/amiga.h, + amiga/filedate.c, amiga/flate.a, amiga/makefile.azt, and win32/w32cfg.h). + [PK] + - Some type changes in globals.h. [SMS] + +6.00c (14 Feb 05): + - Disambiguated some identical VMS error messages. [SMC] + +6.00c8 (08 May 05): + - extract.c, unzip.c, unzpriv.h: Some tweaks and corrections to the optional + BZIP2 support [Christian Spieler] + - VMS, cmdline.c unz_cli.cld: fixed the completely broken addition of + the /ODS2 and /DOT_VERSION options [Christian Spieler] + - Merged in all additions and fixes of the UnZip 5.5x code tree from + UnZip 5.50i up to UnZip 5.52 release. Removed History.5?? files. + Removed all History.600 entries that have been covered by fixes from + the UnZip 5.5x code. + For detailed ChangeLog see History.550, History.551, and History.552, + as found in unzip552.zip source distribution and the UnZipHist.zip + ChangeLog archive. [Christian Spieler] + - crypt.[ch]: updated to 2.10 (synchronized with zip 2.31) [Christian Spieler] + - envargs.c: do not declare getenv() for "modern" compilers [Cosmin Truta] + - extract.c: better echo message for CR or LF at overwrite prompt [Cosmin?] + - fileio.c: added specific message for SIGILL in handler() [Chr. Spieler] + - process.c: fixed code of optional USE_STRM_INPUT variant [Chr. Spieler] + - VMS, vms.c: requires "-vv" instead of only "-v" to enable VMS diagnostic + output (enable DIAG_FLAG for vflag >= 3, only; DIAG output is not available + for the unzip modi "extract to disk" and "zipinfo") [Christian Spieler] + - VMS cli interface: added (undocumented) option modified /FULL=DIAGNOSTICS to + control "-vv" diagnostic messages [Steven M Schweda, Christian Spieler] + - WIN32/MSDOS (maybe others): fixed abort exception handling for CTRL-BREAK + [Christian Spieler] + - revised ecrec64 search logic: ecrec64 need not be present when one of + the ecrec fields is filled with all 1's. [Christian Spieler] + - added user-defined types for 8-byte and 4-byte Zip archive (unsigned) + quantities [Christian Spieler] + - MSDOS 32-bit port revitalized [Christian Spieler] + - windll: changed interface definition to be independent of compile/feature + configuration [Christian Spieler] + - man/unzip.1: Typo corrections [anonymous DEBIAN contribution, Santiago Vila] + - man/unzip.1: removed duplicated quotes from VMS example in environment + variable section [Steven M. Schweda] + +6.00c9 (15 May 05): + - zipinfo.c, list.c: fix the structure check for correct end-of-central dir + to be aware of Zip64 extensions [Christian Spieler] + - windll, sfxgui: synchronize function definitions with changed windll + interface [Mike White] + - extract.c, fileio.c, process.c: fixed USE_STRM_INPUT variant of file + position seeking [Christian Spieler] + - process.c - file_size(): changed scope into static; added non-USE_STRM_INPUT + variant that uses zlseek instead of zfseeko and zftello; do not include in + SFX stub; do not compile function definition when not used [Chr. Spieler] + - unzpriv.h: revised and cleaned up setup definitions for zstat, zfstat and + other 64-bit configuration macros [Christian Spieler] + - win32/w32cfg.h: revised automatic ZIP64 support enabling logic and compiler- + specific configuration; turned off ZIP64 support for lcc and BorlandC + because of missing LARGE_FILE support; verified LARGE_FILE support for + Watcom C and MinGW [Chr. Spieler] + - win32/win32.c: fixed type specification in zstat_win32() [Chr. Spieler] + - win32/win32i64.c: do not include seek replacement functions when not needed + [Christian Spieler] + - zipinfo.c: adapted verbose printouts to longer number printings of Zip64- + enabled UnZip; fixed extra-space detection in zi_long() by moving the + extra-field read in front of the offset comparison [Christian Spieler] + +6.00c10 (21 May 05): + - zipinfo.c - zi_long(): fixed expression for detecting 64-bit local entry + offset [Chr. Spieler] + - process.c - find_ecrec64(): added type-casts to shut up conversion warnings, + removed code that clobbered the ecrec signature "pseudo-constant" by + overwriting it with the ecrec64 signature (this bug broke the reentrancy + of the dll code) [Chr. Spieler] + - win32/win32.c, unzpriv.h: adapted SetFileSize for 64-bit offsets[C. Spieler] + - extract.c, fileio.c, process.c: removed unneeded (FILE *) type-casts in + calls to zfseeko() and zftello() [Chr. Spieler] + - extract.c, list.c, zipinfo.c, unzpriv.h: use symbolic constants for the + 16-bit and 64-bit masks in the checks for zip entry count consistency + [Steven M. Schweda, Chr. Spieler] + - process.c: reorganized the extended Zip filesize-checking code (for > 2GB + detection) by moving it behind the open_infile () call and using the + already opened global zipfile handle [Steven M. Schweda, Chr. Spieler] + - fileio.c: allow output redirection to memory when ZIP64_SUPPORT is enabled + [Chr. Spieler] + - windll: synchronized uzexampl.c and uzexampl.h with current windll interface + declarations [Chr. Spieler] + +6.00c11 (23 May 05): + - process.c: fixed bugs in last filesize-checking revision (added missing + semi-colon, synchronized file_size() call with its prototype declaration + [Steven M. Schweda, Chr. Spieler] + +6.00c12 (15 Aug 05): + - VMS port: updated the dependency build routines (*.mms, *.com) and the VMS + install documentation (INSTALL) [Steven M. Schweda] + - api.c - redirect_outfile(): initialize check_conversion variable in the + non-textmode case [Chr. Spieler] + - process.c, extract.c: moved the crctab initialization and check of the + extraction root dir from do_seekable() further down the call tree into + extract_or_test_files() [Chr. Spieler] + - extract.c - extract_or_test_entrylist(): moved central-vs-local consistency + checks behind the local Zip64-e.f. code [Chr. Spieler] + - fileio.c - do_string() bugfix: do not call getZip64Data() when previous + allocation of extra field buffer has failed [Chr. Spieler] + - inflate.c - inflate_dynamic(): free table-decoding huft-tree when exiting + prematurely from the literal/distance tree data reading because of invalid + compressed data [Rudolf Lechleitner, Chr. Spieler] + - unzip.c - uz_opts(): local variable "error" should only take boolean values, + no PK error codes (cosmetic correction) [Chr. Spieler] + - vms/vms.c, process.c: modified handling of VMS do_wild() lookup errors to + give more helpful messages to the end user [Steven M. Schweda] + - unix/zipgrep: fixed security hole by handling shell metacharacters like '|' + and '&' properly when they occurred in input file names [Greg Roelofs] + - match.c: copied and adapted optimization for "*fixedstring" patterns from + the Zip code into recmatch(); provided two local helper functions isshexp() + and namecmp() for this optimization [Johnny Lee, Chr. Spieler] + - Where: used the newer version from UnZip 5.52 [Chr. Spieler] + +6.00c13 (02 Oct 05): + - AOS/VS, Atari, AtheOS, BeOS, UNIX: fixed symlink code by avoiding fclose() + on NULL handle in extract.c [Dan Yefimov] + - AOS/VS, Atari, AtheOS, BeOS, UNIX (and unzpriv.h, fileio.c): modified the + symlink code to use the opened outfile handle for re-reading the symlink + target data; modified open_outfile to allow read access on outfile handle + (security fix against "ToCToU" vulnerability) [Chr. Spieler] + - UNIX (unix.c, Makefile, configure): fixed "ToCToU" security vulnerability + in close_outfile by using fchown() & fchmod() instead of chown() & chmod() + (only when available); added check for function existence to configure + [Dan Yefimov, Matthias Scheler, Chr. Spieler] + - fileio.c - open_outfile(): deny access for group&world to currently open + outfile on all systems that support umask() (AOS/VS, Atari, AtheOS, BeOS, + QDOS, Tandem, UNIX) [Chr. Spieler] + - unzpriv.h, fileio.c - open_outfile(): open outfile in "write update" mode + when supporting symlinks or QLZIP extensions; these features require the + ability to reread the opened outfile [Chr. Spieler] + - fileio.c: added WriteTxtErr() macro to allow differenciating between + text-mode write function calls (in UzpMessagePrnt()) and binary write calls + (everywhere else) [Chr. Spieler] + - fileio.c, VMS only: use fprintf() instead of (f)write in WriteTxtErr(), to + work around RMS record handling problem (e.g. when using PIPE to redirect + messages) [Steven M. Schweda] + - UNIX port: revised unix/configure and unix/Makefile for better integration + of automatic configuration in the build procedure [Chr. Spieler] + +6.00c14 (15 Nov 05): + - VMS, descrip.mms: repaired CLEAN_ALL target which did not always delete + all expected files [Steven M. Schweda] + - unzip.c, fixes for online help screen: corrected "-v" description and moved + it from modifier section into options section, added description of "-T" + option, removed the "DLL && API_DOC"-only description of the "-A extended + API help" option [Chr. Spieler, Steven M. Schweda] + - man/unzip.1: minor corrections in wording of "-v" option description + [Chr. Spieler, Steven M. Schweda] + +6.00c15 (17 Nov 05): + - vms/vms.c: fixed do_wild() logic error introduced in August 2005, + sys$search fails (at least on VAX) when not preceeded by a sys$parse + call with "syntax-check-only" flag cleared [Steven M. Schweda] + - process.c: cosmetic change in process_zipfiles() to shut-up gcc warning + on non-UNIX (non-QDOS) systems [Chr. Spieler] + +6.00c (19 Nov 05): + - extract.c, bzip2 support: fixed missing ";" error (was only a problem + when enabling BZIP2 support without LARGE_FILE support); added some + (cosmetic) typecasts to shut up compiler warnings [Steven M. Schweda] + - VMS support for BZIP2 decompression: updated make procedures and scripts, + added "find_bzip2_dir" helper script and bzlib.h include file wrapper + [Steven M. Schweda] + +6.00d01 (04 Mar 07): + - extract.c: replaced local wsize variable (DLL only) by reference to the + "global" variable G._wsize [Chr. Spieler] + - unzpriv.h: use fputs() instead of fprintf() as output function in the + FUNZIP variant of the Info() macro, to prevent misinterpreting format + specifiers in the sprintf() output. [Martin Pitt, ubuntu] + - unix/unix.c: added detailed compiler version info for SunPro cc, HP cc, + DEC cc. [Steven M. Schweda] + - vms/descrip.mms: added support for architecture detection macro symbols + built into newer versions of MMK (a MMS clone). [Steven M. Schweda] + - fileio.c - is_vms_varlen_txt(): commented out the currently unused code for + determining the VMS fileorg setting. [Steven M. Schweda] + - extract.c - extract_or_test_files(): the "back at endsig" checking code + is not used for the SFX stub. [Steven M. Schweda] + - win32: changed all Win32-API calls with string parameters to explicitely use + the ANSI variant; this removes the dependency on the UNICODE and _UNICODE + compile flags being undefined. [NN, Chr. Spieler] + - zipinfo.c: on WIN32, archive filename display must be fed through codepage + translation. [Chr. Spieler] + - zipinfo.c - zipinfo(): repaired several memory leaks when the listing loop + is stopped prematurely because of inner errors. [Chr. Spieler] + - crc32.c, crc32.h, crc_i386.S, crc_i386.asm, crc_i386.c: comprehensive + revision of crc32 calculation, implementing the optimized algorithms from + the zlib source code which depend on specific machine architecture + characteristics (removed crctab.c, added crc32.h). [Chr. Spieler] + - crypt.c, crypt.h: adapted to the modifications of crc32. [Chr. Spieler] + - msdos, win32, vms, unix: enabled optimized crc32 algorithms on i386, VAX, + and AXP architectures. [Chr. Spieler] + - win32/nt.c: tried to fix mutex handle leak in Initialize(). + [Johnny Lee, Chr. Spieler] + - vms/vms.c - check_format(): added system error message to sys$open failure + message. [Steven M. Schweda] + - wince/intrface.cpp - checkdir(): corrected typo ('0' should be '\0') + [Shawn Carey] + - wince/wcemain.c - WinMain(): correct the removal code for enclosing argument + quotes. [Shawn Carey, Chr. Spieler] + - os2, win32 - checkdir(): fixed buffer overflow security bug for FAT-style + buildpath, optimized code by removing overflow checks inside the copy loops + [Johnny Lee, Chr. Spieler] + - win32/win32.c - VFatFileTime2utime(): fixed return data generation in error + branch for the "input time stamp cannot be converted to local time" case + [Steve Youngs] + - added new compression methods and e.f. IDs from PKWARE Appnote 6.3.0 as of + 2006-09-29 [Chr. Spieler] + - extract.c - extract_or_test_files(): remove dead branch in the code section + handling archive test summary messages. [Chr. Spieler] + - fileio.c - zstrnicmp(): added (uch) typecasts to comparison, to improve + "compatibility" with "extended ASCII characters". [Chr. Spieler] + - vms: use CRTL-supplied function strncasecmp() for STRNICMP() when available. + [Steven M. Schweda, Chr. Spieler] + - vms/vms.c, vms/vms.h: for better synchronisation with upcoming UnZip 6 code, + the macros for masking the "ODS2 vs. ODS5" support differences have been + cleanded up and ported back to the 5.5x VMS code. [Chr. Spieler] + - ubz2err.c: new source file to isolate the bzip2 "fatal error" callback + routine in its own module; this allows easy replacement of this routine + when the UnZip package is used as a static library (e.g. for WiZ with + bzip2 support). [Chr. Spieler] + - general: added new ubz2err.c module to the make procedures of ports that + (might) support bzip2. [Chr. Spieler] + - crypt.c: optimized crypt-keys handling for Big-Endian systems using the + optimized CRC32 code by introducing a local copy of the crc32 table + containing byte-swapped values. [Chr. Spieler] + - extract.c, unzpriv.h: modified calling interface of find_compr_idx() to + use unsigned instead of ush. [Steven M. Schweda, Chr. Spieler] + - vms/vms.c: added missing include of crc32.h header, added missing fab, nam + variable declarations to checkdir(). [Steven M. Schweda] + - vms/make_unz.com, vms/link_unz.com: avoid link problems with sticky + dev:[dir] spec from externally supplied bzip2 lib. [Steven M. Schweda] + - vms/vms.[ch]: changed "ODS2 vs. ODS5" masking macros back to pre-5.53d + style. [Steven M. Schweda] + - vms: updated/corrected build procedures to handle modified bzip2 support. + [Steven M. Schweda] + - typo correction "explicitly" in various files. [Steven M. Schweda] + - cosmetic documentation change: use the "bzip" name all-lowercase when + applied to the "library". [Steven M. Schweda, Chr. Spieler] + - vms/vms.c - return_VMS(): corrected mapping of PK_WARN to VMS status code + severity level "Warning" (fixed regression bug introduced in UnZip 5.32). + [Steven M. Schweda] + - process.c: preliminary fixed Zip64 support to match 4.5 AppNote, removing + the 76 byte error [EG] + +6.00d02 (08 Mar 07): + - extract.c: corrected typo (missing ";") in SYMLINKS code. [Steven M.Schweda] + - VMS: updated MMS/MMK scripts (adapt for case-sensitive ODS5 and changed/new + source/header files). [Steven M. Schweda] + - vms/vms.c: provide RMS resp. QIO re-read functionality for SYMLINKS support. + [Steven M. Schweda] + - vms/vms.c: revised SYMLINKS support (no special symlinks handling in -c, -p + piping output mode, fixed buffer overflow security holes, moved symlink + post-processing from close_outfile into the mode-specific subroutines, + for "-V archived" entries the symlink target spec is only read back when + needed for informational display purpose). [Christian Spieler] + +6.00d03 (10 Mar 07): + - vms/vms.c: modified style of static function declarations into "independent" + lines (on request of Steven M. Schweda). [Chr. Spieler] + - vms/vms.c: checked compilation, removed typos and wrong-named variables + [Chr. Spieler] + +6.00d04 (11 Mar 07): + - vms/vms.c: used "better self-documenting" names for qio status structures, + corrected/enhanced some error messages (unified formatting, specified + "location" in code). [Steven M. Schweda] + - unix/Makefile: added some (preliminary) support for compiling with optional + bzip2 decompression capability (mostly copied from msdos/Makefile.dj2, + is not yet tested). [Chr. Spieler] + - process.c: added additional consistency checks to find_ecrec64(). + - extract.c, list.c, zipinfo.c: reviewed the "central dir processing complete" + check to take into account the new status semantics from find_ecrec64(). + [Chr. Spieler] + +6.00d05 (31 Mar 07): + - Win32 port: added VC6 project files for "minimal" bz2lib and unzip with + bzip2 support. [Chr. Spieler] + - list.c: added missing "PPMd" entry to array of known compression methods. + [Chr. Spieler] + - vms/vms.c: close a potential buffer overflow hole in symlinks handling code. + [Chr. Spieler] + - inflate.c - inflate_dynamic(): fixed erroneous huft_free() calls for + unallocated memory when processing invalid data. [Chr. Spieler] + - crc32.[ch], crc_i386.S: added updated files that were accidentally missed + in update 6.0d01. [Chr. Spieler] + - bz2lib renamed to bzip2 at request from Ed Gordon and Steven M. Schweda, + updated affected makefiles (MS-DOS, Unix, Win32). [Chr. Spieler] + - renamed "Novell" port to "Netware" for clarity. [Chr. Spieler] + - win32.c - close_outfile(): on WinNT, truncate outfile to actual bytes + written before close; otherwise, preallocated disk space does not get freed + when extraction failed or was interrupted. [Chr. Spieler] + - process.c: corrected bugs in ecloc64 and ecrec64 recognition code. + [Ed Gordon] + - process.c: some cleanup in debugging code (changed TTrace() to Trace() in + non-timestamp-related code portions. [Chr. Spieler] + - unzip.h: updated license text to last version of License. [Chr. Spieler] + +6.00d06 (02 Dec 07): + - bzip2/makbz2iz.msc, bzip2/makbz2iz.wat: hide individual commands of the + `clean' target. [Chr. Spieler] + - extract.c: corrected "extracted" message for bzipped entries to "bunzipped" + [Steven M. Schweda] + - unzpriv.h: removed "suspicious" explicit mask from Zip64 version of + MASK_ZUCN64 preprocessor constant. [Steven M. Schweda] + - extract.c - fnfilter(): added check against internal buffer overflow. + [Chr. Spieler] + - unzpriv.h, fileio.c, win32/w32cfg.h, wince/wcecfg.h: repaired the MBCS + definition for the CLEN() macro; this macro is assumed to return a strictly + positive byte count. [Kazuki Matsuda, Chr. Spieler] + - unix/zipgrep: return the correct exit code from egrep even in cases where + the egrep output is further piped through sed. [Niklas Klein] + - vms/vms.c: corrected case of the "__ia64" predefined preprocessor symbol. + [Steven M. Schweda] + - bzip2/descrbz2.mms: added make Info-ZIP specific VMS make script, as a + starting point for integrated bzip2 compilation support in a similar + way to other OS (Win32, Unix). (not yet working, requires more work to + get completed and debugged...). [Chr. Spieler] + - win32/makefile.bc, win32/makefile.gcc, win32/makefile.wat: completed clean + target functionality. [Chr. Spieler] + - win32, wince: added workaround to keep Visual Studio 2005 C compiler quiet. + [N.N.] + - unzpriv.h, extract.c, list.c, zipinfo.c: added "WavPack" (supported by + WinZip 11+) to list of recognized compression types. [Christian Spieler] + - win32/nt.c: prevent calling IsValidAcl() with a NULL Acl pointer, to fix + false 'EA security check' failures. [Will Menninger] + - renamed proginfo/extra.fld into proginfo/extrafld.txt, to synchronize with + Zip3. [Chr. Spieler] + - process.c: added second try to find the EOCD64 record, to compensate for + (SFX-stub) bytes prepended to the archive without adjustment of the offset + records in the Zip file structures. [Will Menninger, Ed Gordon] + - fileio.c, process.c: replaced spurious use of Z_OFF_T by zoff_t. + [Chr. Spieler] + - win32/win32.c - utime2VFatFileTime(): initialize the wMillisecond field of + the SYSTEMTIME structure to 0 to ensure deterministic time conversion. + [N.N.] + - explode.c: corrected type for data stream size variables from zoff_t into + zusz_t. [Chr. Spieler] + - unix/configure, unix/Makefile: made automatic detection & compilation of + bzip2 support working for the 'generic' target. [Chr. Spieler] + +6.00d07 (26 Dec 07): + - fileio.c: old-style function head for fzofft(). [Steven M. Schweda] + - acorn/makefile: updated to support bzip2 decompression (change was missed + for 6.00d06). [Chr. Spieler] + - unix/configure: added/modified cc optimization checks [Steven M. Schweda] + - unix/unix.c: added detailed IBM C version reporting to version(). + [Steven M. Schweda] + - unix/unxcfg.h: use __hpux instead of __HP_cc to determine UTIMEBUF + configuration [Steven M. Schweda] + - unzip.h, unzip.c: removed IZ_COMPERR runtime error code. This code was only + used in compile-time assertions of development code and did never get into + a production environment. [Chr. Spieler] + - vms/vms.c, vms/UNZIP_MSG.MSG, vms/unzip_def.rnh, vms/unzip_cli.help: removed + IZ_COMPERR support and documentation; debugging code should not be + mentioned in end-user documentation. [Chr. Spieler] + - unzpriv.h: use __hpux instead of __HP_cc to determine support of "long long" + type for HP (bundled ??) compiler. [Steven M. Schweda] + >>> This change may be wrong?? "long long" support is a compiler feature, + not a runtime library feature! [Chr. Spieler] <<< + - VMS: added message file build to make procedures (missed change from + 6.00d06). [Steven M. Schweda] + - wince/wcemain.c: added missing modifications from unz553d beta (25 Dec 06), + see also "wince/wcemain.c" changelog entry for 6.00d01. [Chr. Spieler] + - fileio.c - uzmbclen(): corrected return type definition. [Chr. Spieler] + - win32/nt.c: added some typecasts in Initialize() to get newer gcc quiet. + [Chr. Spieler] + - win32/win32.c: added some superfluous variable initializations to prevent + gcc compiler warnings. [Chr. Spieler] + - bzip2/descrbz2.mms: made MMS description file work (at least on OpenVMS 8.3 + IA64 testdrive account). [Chr. Spieler] + - vms/descrip_src.mms: modified bzip2 support so that it works with the + library created by bzip2/descrbz2.mms, using the original bzip2 1.0.4 + sources. [Chr. Spieler] + +6.00d08 (29 Dec 07): + - bzip2/descrbz2.mms: modified compile options to create a library which is + binary compatible with the results of the SMS-specific deviated bzip2 + distribution for VMS. [Chr. Spieler] + - bzip2/buildbz2.com: new VMS DCL build script for the bzip2 "BZ_NO_STDIO" + library used by the bzip2 support in UnZip. [Chr. Spieler] + - vms/descrip.mms, vms/descrip_src.mms: changed back so that the SMS-specific + deviated bzip2 source package works again; added/completed support for + standalone bzip2-included build using bzip2/descrbz2.mms. [Chr. Spieler] + - vms/make_unz.com, vms/link_unz.com: removed these obsolete files, they have + been replaced by vms/build_unzip.com. [Chr. Spieler] + - vms/build_unzip.com: added support for compiling bzip2-enabled programs + in "standalone" source setup, using bzip2/buildbz2.com for creating the + bz2 object library. [Chr. Spieler] + - updated the UNICODE_SUPPORT code from Ed Gordon's work (6.00d05t, excluding + the win32-wide specific code). This code is unfinished, besides other + issues there is a memory leak to be fixed. [Ed Gordon, Chr. Spieler] + - unzip.c: Added "static" to test_buf definition in the "NEXTBYTE operation + test" code block of main function unzip(). [SMS] + - unzpriv.h: Added -related stuff from 6.00d05t (SMS), with some + corrections. [Steven M. Schweda, Chr. Spieler] + +6.00d09 (06 Jan 08): + - unzip.c: corrected parser code for "negated -D" option. [Steven M. Schweda] + - man/unzip.1: extended explanation of the VMS-specific differences in the + "-D" option behaviour for clarity. [Steven M. Schweda] + - vms/unzip_cli.cld, vms/cmdline.c: corrections and refinements applied to + the CLI parsing code for the new "-D" option. [Steven M. Schweda] + - vms/INSTALL.VMS: added/updated build description aspects concerning optional + bzip2 support. [Steven M. Schweda] + - vms/unzip_cli.help: clarified description of the changed and extended + /RESTORE qualifier. [Steven M. Schweda] + - vms/vms.c, vms/vms.h, vms/cmdline.c, ttyio.c: Added defines to translate all + used system routine names to uppercase, to allow using /NAMES=AS_IS with + the broken header files of older DECC distributions. [Steven M. Schweda] + +6.00d10 (10 Feb 08): + - globals.h, process.c, fileio.c: fix memory leak concerning filename_full + handling (UNICODE_SUPPORT code). [Chr. Spieler] + - ubz2err.c: renamed formal parameter "errcode" into "bzerrcode" to work + around a bug in MS Visual C++ 9.0 (2008). [Chr. Spieler] + - VMS: small cleanups to CLI code. [Steven Schweda, Chr. Spieler] + - vms/vmscfg.h: added missing cma$tis_errno_get_addr uppercase define for + broken compiler distributions. [Steven Schweda, Chr. Spieler] + - vms/descrip_mkdeps.com: Added CLEAN and CLEAN_ALL targets. [Steven Schweda] + - win32, windll: added MS VC++ 8.0 project files. [Chr. Spieler] + - win32/Makefile: removed dependency on ntwin32.mak, for better compatibility + with VC++ 8.0 Express Edition. [Chr. Spieler] + - api.c: moved include down behind "unzip.h" include to shut up + "depreciation" warnings with VC++ 8.0 and newer. [Chr. Spieler] + - windll/struct.h: added D_flag support to option structure. [Chr. Spieler] + - windll/vb/vbunzip.bas: corrected UZDLLPAss callback function interface, + adapted to recent DLL interface changes. [Johnny Lee, Chr. Spieler] + - windll: removed "DESCRIPTION" clause from all module definition files; + newest VC++ version does no longer tolerate it. [Chr. Spieler] + - unzip.h: enable H_flag and U_flag for UNIX, VMS, WIN32 (those systems that + are currently supposed to support UTF8 names); unzip.h must not depend on + internal configuration settings like UNICODE_SUPPORT. [Chr. Spieler] + +6.00d11 (16 Feb 08): + - vms/cmdline.c: canceled name-change for local variable 'restore_date' + (was incomplete in 6.00d10 and broke compilation). [Chr. Spieler] + - unzpriv.h: removed "fixed" allocation of space for the two string + delimiters from the definition of type slinkentry. [Steven M. Schweda] + - unix/unix.c - set_symlnk_attribs(): modified usage of typecasts to remove + some compiler warnings. [Steven M. Schweda] + - aosvs, atari, atheos, beos, unix, vms - close_outfile(): Increased the + allocation size for the slnk_entry structure by 2 for the two '\0' + end-of-string markers. [Chr. Spieler] + - unix/Makefile: modified bzip2 lib target to be only applicable to the + bzip2 subdir of the UnZip distribution. [Chr. Spieler] + - unix/configure: extended bzip2 support check from Zip's configure to better + support "externally" supplied bzip2 libraries. [St. Schweda, Chr. Spieler] + - vms/descrip_src.mms, bzip2/descrbz2.mms: cleaned up VMS MMS support for + integrated build of bzip2-enabled UnZip executables. [Chr. Spieler] + - msdos, unix, vms, win32: at request from SMS, changed all occurrences of + "DIR_BZ2LIB" symbol in build scripts for the directory of the bzip2 library + sources (and often also binaries) into "IZ_BZIP2", for synchronization + with Zip. [Chr. Spieler] + +6.00d (17 Feb 08): + - win32/Makefile: fixed configuration variations of bzip2 support when using + non-standard build options regarding rtl linking; added documentation + section for the supported build variant flags on the nmake command line. + [Chr. Spieler] + +6.00e01 (17 Feb 08): + - unzpriv.h: re-added "fixed" allocation of space for the first of two string + delimiters from the definition of type slinkentry, the "buf[]" structure + member is not accepted by some older compilers. [Chr. Spieler] + - aosvs, atari, atheos, beos, unix, vms - close_outfile(): Reduced the + allocation size for the slnk_entry structure by 1, one of the two '\0' + end-of-string markers is again part of the structure. [Chr. Spieler] + - unix/configure: export CC and IZ_BZIP2 symbols to flags, to feed their + current settings to the child make process without having to use special + make command qualifiers. [Steven M. Schweda, Chr. Spieler] + +6.00e02 (08 Mar 08): + - unix/unix.c - close_outfile(): added missing semicolon in the SYMLINKS code + for the non-SET_SYMLINK_ATTRIBS case. [Steven M. Schweda] + - unzip.c: removed extra "credit to Myles Bennet" note from startup screen + for space considerations; added credit note to README and referenced + Myles Bennet in proginfo/CONTRIBS. [Chr. Spieler] + - vms/vms.c: fixed dir separator find logic in vms_path_fixdown() for cases + where directory name contains a '.' or '[' itself. [Steven M. Schweda] + - crc32.h: replaced explicit inclusion of zip.h by a note that this header + should be read after zip.h resp. unzip.h. [Steven M. Schweda, C. Spieler] + - unix/configure, unix/Makefile: cleaned up auto-configured build procedure. + * pass the "configure"-selected C optimizations to the bzip2 build process. + * clean only affects the unzip-specific bzip2 subdirectory. + * let make display the bzip2 clean subprocess call. + [Steven M. Schweda] + - unzip.c, unzip.h, zipinfo.c, fileio.c - UNICODE_SUPPORT, revised the + options to control UTF-8 handling: + * removed the -H option + * modified -U option syntax: -U forces to escape all non-ASCII UTF-8 chars, + -UU must be used now to entirely disable UTF-8 support. + [Chr. Spieler] + - windll/windll.{c|txt}: added U_flag to option stucture. [Chr. Spieler] + - man/unzip.1, man/zipinfo.1: added description of the new UTF-8 related + syntax for the -U option. [Chr. Spieler] + - win32/w32cfg.h, wince/wcecfg.h: enabled UNICODE_SUPPORT by default. + [Chr. Spieler] + - win32/Makefile: adapted to modified UNICODE_SUPPORT default. [Chr. Spieler] + - wince/intrface.cpp - close_outfile(): moved local (wide string) copy of + filename outside of conditional "set timestamps" block. [Chr. Spieler] + - unzpriv.h: do never include here for the wince port (_WIN32_WCE or + POCKET_UNZIP), this must be handled elsewhere for C++. [Chr. Spieler] + - unzip.c: removed the -U option description from the introductory screen for + WIN32 because of lacking space. Maybe, these "debugging" options should not + be shown there at all. [Chr. Spieler] + +6.00e03 (29 Mar 08): + - unix/configure: corrected detection of ANSI C vs. bundled C compiler on + HP-UX. [Steven M. Schweda] + - VMS, unzip.c: help screen extended to show correct "-D" semantics for the + special VMS defaults. [Steven M. Schweda] + - unix/Makefile: added "generic_gcc" target, using auto-configuration with + GNU compiler. [Steven M. Schweda] + - unzip.c: renamed error message constant for clarity. [Chr. Spieler] + - unshrink.c: revision to fix long-standing decompression bug, added boundary + checks to detect invalid compressed data. [Santiago Vila, Chr. Spieler] + - extract.c: added error message handling for "invalid data" errors from + unshrink(). [Chr. Spieler] + - process.c, unzpriv.h: disabled compilation of unused UNICODE_SUPPORT helper + function. [Chr. Spieler] + - process.c, win32/win32.c: added special win32-only version of the + wide_to_local_string() helper function to work around "ANSI vs. OEM" + codepage problems with non-Microsoft C-runtime libraries. [Chr. Spieler] + - zipinfo.c - zipinfo(): corrected "back at end-of-cdir" check (synchronized + it with the corresponding list_files() code). [Chr. Spieler] + - fileio.c - do_string(): closed UNICODE_SUPPORT related memory leaks + (free allocated utf8 buffers when no longer used). [Chr. Spieler] + - vms/vms.c - set_direc_attribs(): do not restore any size info from the + (PK-style) extra field record attributes settings. The new directory + created during extraction may contain fewer (restored) entries than the + original source folder, so that the old non-matching size data would + result in corrupted interal directory structures. [Steven M. Schweda] + +6.00e04 (27 Apr 08): + - vms/vms.c - set_direc_attribs(): fixed NAM[L] initialization for the + "normal" non-VMS-attributes case. [Steven M. Schweda] + - vms/NOTES.TXT updated (version copied from zip30h05). [Steven M. Schweda] + - unzip.c, vms/NOTES.TXT: added SYMLINKS to the special compilation options + reported by show_version_info(); updated Symbolic Links section in + NOTES.TXT. [Chr. Spieler] + - INSTALL: added documentation for the new UNICODE_SUPPORT related options. + [Chr. Spieler] + - README: added anouncement of the new UTF-8 coded entry names support. + [Chr. Spieler] + - fileio.c, process.c, unzip.c, globals.h, unzpriv.h, win32/w32cfg.h, + wince/wcecfg.h : revised the UNICODE_SUPPORT code, added direct support for + UTF-8 being the native MBCS char encoding, allowed separate activation of + the "UTF-8 is native character coding" and the "translate UTF-8 <==> native + extended-ASCII via Unicoded wchar_t" support methods. [Chr. Spieler] + - unix/configure, unix/Makefile: extended configure script to support + automatic selection of UNICODE_SUPPORT support on capable systems, + completed configuration support for the linking step. [Chr. Spieler] + - unix/unxcfg.h: changed interdependency rules of LARGE_FILE_SUPPORT and + ZIP64_SUPPORT to prevent unsupported symbol combinations. [Chr. Spieler] + - man/unzip.1: extended description of -U option to mention the #Lxxxxxx + escape format for characters beyond the basic unicode page. [Chr. Spieler] + - proginfo/extrafld.txt: updated wording and line wrapping of Info-ZIP + Unicode extra fields. [Chr. Spieler] + +6.00e05 (09 Sep 08): + - unix/unix.c - version(): added OS info support for Mac OS X (including a + note for the recognized CPU architecture). [Steven M. Schweda] + - unix/configure: check for Mac OS X special linker options is only executed + on systems that have been identified as Mac OS X. [Steven M. Schweda] + - unix/Makefile: moved "solaris" targets into new "autoconfig generic" group + of machine target aliases. [Steven M. Schweda, Chr. Spieler] + - extract.c, fileio.c: use "sizeof(G.answerbuf)" as length argument in fgets() + calls, for better robustness and "in-code" documentation. [Chr. Spieler] + - extract.c - extract_or_test_entrylist(): fixed handling of \n in response + to "overwrite (y/n/r)" prompt. [Steven M. Schweda, Chr. Spieler] + - extract.c, special version of "replace file" prompt for VMS to take into + account that VMS normally created a new version instead of overwriting + an existing file. [Steven M. Schweda] + - unzpriv.h: for VMS, undefine the PATH_MAX definition provided by , + because it does not take into account long name support of ODS-5 volumes. + [Steven M. Schweda] + - VMS: added zlib.h and infback9.h jacket headers for support of using zlib + as inflate decompression code; revised build procedures for zlib support + (build_unzip.com, descrip.mms, descrip_src.mms). [Steven M. Schweda] + - inflate.c: corrected condition when to include "infback9.h" for Deflate64 + support with zlib 1.2.x. [Chr. Spieler] + - extract.c: standardized wording of error messages in SET_DIR_ATTRIBS code. + [Steven M. Schweda] + - vms/vms.c - set_direc_attribs(): ensure that the FAB block used is properly + initialized. [Steven M. Schweda] + - aosvs, atari, atheos, beos, unix - mapname(): for all "unix-like" ports, the + reserved file names "." and ".." are mapped to "_" resp. "__". + [Steven M. Schweda, Chr. Spieler] + - list.c - changed listing layout to emit four-digit years for file + date-time-stamps. [Ed Gordon, Chr. Spieler] + - process.c - find_ecrec(): fixed zipfile comment handling within the Zip64- + compatible end-of-central-dir records scanning, to take into account that + the file pointer is no longer at the zipfile end when the eocdrec scanning + has finished. [Chr. Spieler] + - process.c, zipinfo.c: revised and reorganized zipinfo log header output; + the zip archive comment has to be reported before all of the eocdir info + could be collected. [Chr. Spieler] + - man/unzipsfx.1 - Debian patches 4461_002 and 5293_009 fixing text errors; + correct spelling of similarly and additional per debian patch; correct + wrong formatting command \P to \fP. [sanvila] + - vms/build_unzip.com: fixed integrated bzlib build support. [Chr. Spieler] + +6.00e06 (13 Sep 08): + - unix/unix.c - set_symlnk_attribs(): removed erronous surplus line with only + "if" on it. [Steven M. Schweda] + - vms/descrip_deps.mms: restored correct file which was accidentally + overwritten by vms/descrip_src.mms. [Steven M. Schweda] + - vms/build_unzip.com: optimized the distinction between "compile destination + subdir" for integrated BZIP2 compilation (should distinguish between the + different compilers supported for VAX) and "external library dir" for + user-supplied BZIP2 (and ZLIB) libraries (user-supplied library is expected + to work with any supported compiler on VAX, so no dependency on the + specific compiler used). [Steven M. Schweda] + - unzip.c: replaced tab characters in output messages by appropiate number of + spaces (assuming standard tab spacing of 8 chars), to prevent mis-formatted + output on terminals with non-standard tabstop settings. [S. M. Schweda] + - unix/unix.c + * set_symlnk_attribs(): fixed uid/gid size check before calling lchown(); + * set_direc_attribs(): repared wrongly inserted patch and fixed uid/gid + size check before calling chown(). [Chr. Spieler] + - vms/vms.c: fixed user-query code for existing files on VMS when extracting + in "-V" mode (retaining version numbers); fixed some problems with exotic + extended ODS5 file names, and files named ".". [Steven M. Schweda] + - vms/cmdline.c, vms/unz_cli.cld: extended CLI to support the new extended + meaning of the -o flag (-oo => "overwrite ALL existing" when retaining + version numbers ("-V") and extracting archive members with attached version + number (new /EXISTING option). [Steven M. Schweda] + - extract.c - extract_or_test_entrylist(): added code to skip the generic user + query "overwrite (y/n/r)?" when extracting an entry with attached version + number in "-V" (keep version number) mode. [Steven M. Schweda, C. Spieler] + - vms/unzip_cli.help, vms/unzip_hlp.rnh: updated documentation to reflect the + UI extension to handle VMS-specific "overwrite or new version" settings. + [Steven M. Schweda] + - unzip.c: added VMS specific -n and -o (-oo) option description sections + to online help screen definitions. [Steven M. Schweda] + - vms/cmdline.c: corrected some small formatting issues in online help output. + [Chr. Spieler] + - vms/unzip_cli.help, vms/unzip_hlp.rnh: corrected a few typos and updated the + help screen for the "unix-style" commands in the CLI help. [Chr. Spieler] + - vms/vms.c, extract.c, unzpriv.h: fixed the the error handling of the VMS- + specific "newver/overwrite/skip" query by extending the return code range + of open_output() for VMS, without any new global data. [Chr. Spieler] + +6.00e (04 Jan 09): + - fileio.c: changed tmpstat from struct stat to z_stat. [EG] + - unzip.c: expanded extended help to include unzip and zipinfo options. [EG] + - man/unzip.1: updated multi-part archive information; minor additions + to authors activities list. [EG] + - fileio.c: added strerror(errno) output to CannotCreateFile message. [SMS] + - unix/unix.c: add more detailed error message using strerror() when a + file error occurs. [SMS] + - unix/zipgrep - add additional information to top. Clean up some lines and + add commments. Added code to handle backslashes in archive file names, + and shell-special characters in the pattern. Changed to use "sed" for all + escaping of shell-special characters. Tried to get the exit status to + follow the status of egrep in the complex (default) situation, using only + standard Bourne shell features, and to exit early if egrep returns + status 2 (error). [SMS] + - vms/unzip_cli.help - VMS help updates. [SMS] + - vms/unzip_def.rnh - synchronized option description with unzip_cli.help. + [Chr. Spieler] + - fileio.c: extend backup number range from 65535 to 99999 on 32-bit systems; + fixed limit detection on 16-bit systems. [Chr. Spieler] + - zipinfo.c: changed date layout of "short" (one-line) zipinfo modes to always + use ISO-style YMD order. [Chr. Spieler] + - unix/configure: added a simple compiler test to check for a working C + compiler setup. [Steven M. Schweda] + - cmsmvs/vmmvs.h: removed __EBCDIC preprocessor symbol definition (not used + anywhere in UnZip, breaks compilation on Z-OS). ["Lutz", Chr. Spieler] + - unix/makefile - moved -L link option earlier in unzip$E rule. [Lutz] + - unzip.c - Remove "s" from "permits" in SYMLINKS feature message. [SMS] + - vms/vms.c: simplified the scheme to escape non-last dots, for compatibility + with modifications in Zip 3.1. [SMS] + - vms/vms.c, vms/vms.h, function create_qio_output(): revised NMCTL flag + handling ("overwrite or create-new" code) to be VAXC compatible. [SMS] + - extract.c - extract_or_test_entrylist(): removed '\n in middle of WINDLL + "file exists ... skipping" message to get it displayed on one line. [EG] + - man/unzip.1, INSTALL: updated/corrected documentation for the UNIXBACKUP + feature and the description of its -B qualifier. [Chr. Spieler] + - proginfo/ziplimits.txt: updated discussion of program implementation limits + to the state of "released" Zip 3.0 and UnZip 6.0. [EG, Chr. Spieler] + - README, Bugs, ToDo: updated and syncronized documentation for release + candidate. [Chr. Spieler] + - windll/structs.h: added structure version id field at the "top" of the + "DCL" options struct. [EG] + - windll/structs.h: added UZ_DCL_STRUCTVER preprocessor symbol, holding the + currently valid version id of the DCL structure definition. [Chr. Spieler] + - windll/windll.c - Wiz_SetOpts(): exit function if version id of passed in + "DCL" structure is not equal to the expected setting. [EG, Chr. Spieler] + - windll/unexampl.c: synchronized with recent WinDLL option structure + addition. [EG, Chr. Spieler] + - windll/vc?/exampl/c_dll_ex.[dsp|vcproj]: new Visual Studio project files + for building the WinDLL C usage example uzexampl.exe. [EG, Chr. Spieler] + - windll/vb/vbunzip.bas: changed DLL interface to use UZxxx_I32 variants of + callback functions that split 64-bit values into high and low part 32-bit + integers that can be handled by VB(A)5/6. Inside the VB code, low and + high parts are added up in Currency type variables. Converted \ to / in + duplicate file message. Fixed MsgBox flags concatenation. Added support + for new OverwriteAll checkbox. [EG] + - windll/vb/vbunzip.frm: added OverwriteAll checkbox, added resizing to + txtMsgOut output box. [EG] + - windll/vb/vbunzip.frm, windll/vb/vbunzip.bas: cleaned up and completed the + recent modifications, resynchronized with WinDLL interface with UnZip 6.0 + master source, removed all modification incompatible with VB5, fixed the + UZDLLServ_I32() callback calling interface, used Double instead of + Currency as Int64 summation type to prevent potential numeric overflow + issues. [Chr. Spieler] + +6.00f (11 Jan 09): + - INSTALL: added notes on the difference between "old" Macintosh OS and + current Apple Mac OS/X, which is supported as a BSD Unix port . [EG] + - unzip.c - help_extended(): added some documentation about funzip and + unzipsfx stub. [EG] + - windll/csharp/: updated C# example to match the current Zip64-compatible + WinDLL API, revised string parameter marshalling, initialized/resetted + job statistic counters, added OverwriteAll checkbox. [Chr. Spieler] + - win32/Makefile: the DLL example frontend is now compiled with the same + runtime library settings as the DLL binary. [Chr. Spieler] + - LICENSE: updated to version 2009-Jan-2, which removes the requirement to + provide the LICENSE in documentation with distribution of binaries when + the redistributed programs support display of the LICENSE by some command + line option. [EG] + - vms/vms.h, vms/vms.c: moved "lowercase to uppercase mapping" define of + sys$setdfprot from vms.c into vms.h in front of the starlet.h include, + where all the other name case mappings are located. [Steven M. Schweda] + - vms/vms.c: made the declaration of sys$setdfprot() always active when + the SETDFPROT symbol is defined. [Chr. Spieler] + - unix/unix.c: added strerror(errno) output to various "Cannot..." I/O error + messages (in checkdir(), close_outfile(), set_symlnk_attribs()). + [Steven M. Schweda, Chr. Spieler] + - fileio.c - open_outfile(): added strerror(errno) output to the error + messages "cannot rename ..." and "cannot delete ...". [Chr. Spieler] + - fileio.c - do_string(): corrected string length passed to win_fprintf() + (comment string may get shortened by CRLF->LF translation). [Chr. Spieler] + - beos/beos.c, beos/beocfg.h, aosvs/aosvs.c, win32/win32.c: extended various + "Cannot..." I/O error messages with strerror(errno) output, to synchronize + code with current state of the Unix port. [Chr. Spieler] + - unzip.c, unzpriv.h, unix/configure: added better check for UTF-8 codeset + using nl_langinfo() function, as suggested on the sourceforge.net forum; + added nl_langinfo() to the "function existence" checks in the configure + script. [Chr. Spieler] + - wince/intrface.cpp: added missing wide_to_local_string() function from + win32.c (is [currently] needed in process.c). [Chr. Spieler] + +6.00g01 (18 Jan 09): + - extract.c, windll/structs.h, windll/windll.txt: added a bufsize parameter + to the "replace()" callback function, updated UZ_DCL_STRUCTVER setting to + 0x600. [Chr. Spieler] + - windll/uzexampl.c, windll/csharp/Unzip.cs, windll/vb/vbunzip.bas, + windll/guisfx/sfxwiz.c, wince/intrface.cpp: adapted frontend code to the + "replace()" callback function signature change; updated DCL.StructVersID + setting to reflect the change in the DLL code; added check against password + buffer overflow (not in uzexampl.c). [Chr. Spieler] + - windll/vb/vbunzip.frm: removed obsolete comment. [EG] + - windll/csharp/ReadMeCS.txt: added note on problem with Visual Studio 8.0 + and 9.0 when used with unzip32.dll that was linked against the Visual + Studio version of the MS C runtime dll. [Chr. Spieler] + - unix/Makefile: consistent use of "$E" for executable filename extension; + fixed dependency of binary builds on system specific config header; added + dependency of autoconfigured "generic" builds on the configure result. + [Chr. Spieler] + - unzip.c: added hint to "unzip -hh" extended help display to the short help + screen. [Chr. Spieler] + - unzip.c - help_extended(): removed superfluous "]", corrected availability + info for the "-B" option. [EG, Chr. Spieler] + - man/unzip.1, unzip.c, vms/unzip_def.rnh, vms/unzip_cli.help - modified + description of -X option for VMS to emphasize that this option controls + restoration of ACL protection info, whereas the standard S/O/G/W access + restrictions get always restored. [SMS, H. Goatley, Chr. Spieler] + - unzip.h, api.c, unzipstb.c, unzvers.h, windll/windll.txt, + windll/vb/vbunzip.bas: + revised and extended the "version info retrieve" function calls, added + version identifier for the "last incompatible API change", fixed version + structure size handling, updated API documentation. [Chr. Spieler] + - windll/windll.c - UnzipAllocMemory(): fixed operator precedence bug by + adding explicit parenteses. [Chr. Spieler] + - win32/Makefile.wat: added missing rule for crc32f.obj. [Chr. Spieler] + - unzip.c - uz_opts(): corrected parameter list for call of help_extended(). + [Chr. Spieler] + - unix/Makefile: adapted linux_shlib and linux_shlibz targets to work with + the changed organisation of the assembler CRC code. [Chr. Spieler] + +6.00g02 (25 Jan 09): + - History.600, unzpriv.h, unix/unix.c: corrected/unified spelling of + "dependent" and "dependence". [Steven M. Schweda] + - api.c - UzpVersion2(): added forgotten setting of dllapimin version info + (similar to UzpVersion()). [Chr. Spieler] + - unzipstb.c, windll/uzexampl.c, windll/uzexampl.h: extended DLL version + display to report the new "DLL API" version info; added compatibility + checks for version of loaded dll, using the recently added additional + API version info. [Chr. Spieler] + - windll/uzexampl.c: changed program return values to follow common usage + (0 for no error, -1 for fatal abort, unzipdll return code otherwise). + [Chr. Spieler] + - windll/vb/VBReadMe.txt, windll/vb/vbunzip.bas: revised and extended + documentation of unzip32.dll search process flow, added warning note + explaining the unexpected "dll not found" errors when running the VB code + inside the VB IDE. [Chr. Spieler] + - windll/vb/vbunzip.bas: added version/api compatibility checks for the + loaded unzip32.dll, aborting the program in case of any detected + incompatibility. [Chr. Spieler] + +6.00g03 (10 Feb 09): + - README, History.600: documented support for new 32-bit UID/GID extra field + on Unix. [Ed Gordon, Chr. Spieler] + - unzip.h: added "old lib swprintf" compatibility clause for Pocket-UnZip + (WinCE) to support current Visual Studio versions 8 and 9. [Chr. Spieler] + - wince/wcecfg.h: switched off UNIX_BACKUP for WinCE (rename() function not + available on Windows CE); moved the (none-WCE) configuration setup for + Zip64 support to the end (behind all header includes). [Chr. Spieler] + - wince/wince.h: added guard against redefinition of isalpha() macro. + [Chr. Spieler] + - wince/intrface.cpp - win_fprintf(): reordered local loop counter variable + declaration to achieve compatibility with standard C++ (without breaking + the non-standard MS VC++ 6.0 variant). [Chr. Spieler] + - extract.c, list.c, process.c, zipinfo.c: replaced strncmp() by memcmp() + when comparing against "binary" signatures. [Chr. Spieler] + - process.c - wide_to_escape_string(): fixed a "write to unallocated memory" + bug. [Chr. Spieler] + +6.00g04 (16 Feb 09): + - unzpriv.h: mapped zfseeko and zftello to C rtl supplied functions for MS + C runtime of VC 8.0 or newer. [Chr. Spieler] + - win32/win32i64.c: revised zfseeko() code to correctly clear the eof state + (and for "MSVC 6.0 or newer" rtl environments: manipulate internal flag + to prevent clearing a ferror() state). [Chr. Spieler] + - windll/vc5/, windll/vc6/, windll/vc8/: added "link against static C rtl" + configurations to the unzip32 dll and c_example projects. [Chr. Spieler] + - win32/vc8/, windll/vc8/: removed "UpdateFromVC600" property sheet settings, + they are not needed. [Chr. Spieler] + - windll/guisfx/sfxwiz.c: added compatiblity preprocessor switches to shut up + MS VC 8 (and newer) complaining about depreciated standard C functions. + [Chr. Spieler] + - INSTALL, windll/Contents: added notes about different runtime configurations + (linking against C rtl dll vs. static C rtl lib) when building the UnZip + DLL. [Chr. Spieler] + +6.00g (28 Feb 09): + - unzip.c: cleaned up the UTF-8 check according to the code found in the + latest Zip 3.1 beta, removed the "switch to UTF-8 codeset" code because + it proved to not work as expected. [Ed Gordon, Chr. Spieler] + - win32/w32cfg.h: use rtl-provided MBCS functions for MinGW32 when compiled + and linked against msvcrt.dll. [Chr. Spieler] + - extract.c - fnfilter(): added "enhanced" non-printable charcode filtering + when a locale-aware isprint() implementation is available (controlled by + the preprocessor symbol HAVE_WORKING_ISPRINT). [Chr. Spieler] + - win32: enabled "enhanced" fnfilter() filtering for compiler environments + using MSVC 6.0 (or newer) runtime, and for Borland C. [Chr. Spieler] + - vms: enabled "enhanced" fnfilter() filtering using isprint(), may get + disabled by defining the NO_WORKING_ISPRINT symbol. [Chr. Spieler] + - unix/unxcfg.h: enabled "enhanced" fnfilter() filtering when setlocale() is + available (NO_SETLOCALE is not defined). [Chr. Spieler] + - unix/configure: added NO_SETLOCALE define when setlocale() check fails. + [Chr. Spieler] + - INSTALL: added documentation of NO_SETLOCALE and HAVE_WORKING_ISPRINT resp. + NO_WORKING_ISPRINT symbols. [Chr. Spieler] + - general: unified spelling of "wildcard". [Chr. Spieler] + +6.00h01 (09 Mar 09): + - vms/vms.c: added missing case-translation define for sys$getdvi(), for + support of /NAMES=AS_IS with older DECC distributions. [Steven M. Schweda] + - vms/build_unzip.com, vms/descrip.mms, vms/descrip_src.mms: resolved a + /NAME=AS_IS case issue by changing the linking command for bzip2-enabled + builds to read the unzip code library twice (before and after the bzip2 + object library) to resolve the bzip2 error callback, instead of explicitely + loading the callback function. [Steven M. Schweda] + - vms/NOTES.TXT: cleaned up wording of the Symbolic Links section. [SMS] + - extract.c, fileio.c, process.c, unzpriv.h: fixed recognition of "native + UTF-8" general purpose flag bit 11 when processing local header, added + check against mismatching central vs. local GPFlag bit 11 (not for SFX) + with warning display (suppressible by -q command qualifier). [C. Spieler] + +6.00h02 (16 Apr 09): + - extract.c: fixed evaluation sequence of check expression by adding correct + pairs of parentheses. [EG, SMS] + - unix/configure: added working check for lchmod. [SMS] + - unzip.c: added compile option display for MBCS support. [Chr. Spieler] + - unzpriv.h, unix/unxcfg.h, win32/w32cfg.h: the new preprocessor symbol + NO_MBCS allows to explicitely disable MBCS support. [Chr. Spieler] + - INSTALL: documented _MBCS and NO_MBCS preprocessor symbols. [Chr. Spieler] + - unix/configure: added checks for MBCS support. [Chr. Spieler] + +6.00h03 (17 Apr 09): + - unzpriv.h: added missing OF() macro to uzmbclen() prototype. [SMS] + - man/*.1: changed revision info to intended release date. [Chr. Spieler] + +6.00 (20 Apr 09): + - unzpriv.h, fileio.c: removed superfluous "define indirection" zlstat, + link attributes do never ever need 64-bit treatment. [Chr. Spieler] + - man/unzip.1, ToDo: added remark to DECRYPTION section on still missing + support for UTF-8 encoded passwords on systems like Windows, that are + Unicode-aware without using UTF-8 as native character encoding; added + ToDo note about fixing UTF-8 password handling in the next release. + [Chr. Spieler] + - updated release dates (History.600, README, unzvers.h, all man pages), + changed all relevant files from BETA into release state. [Chr. Spieler] + +================== + +These changes occurred in beta versions 6.00a to 6.00. This list may have +left out some bugfixes and even some features...void where prohibited, your +mileage may vary, etc., etc. diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..1b14255 --- /dev/null +++ b/INSTALL @@ -0,0 +1,861 @@ +__________________________________________________________________________ + + This is the Info-ZIP file INSTALL (for UnZip), last updated 16 Apr 2009. +__________________________________________________________________________ + + Yes, this is a rather long file, but don't be intimidated: much of its + length is due to coverage of multiple operating systems and of optional + customization features, large portions of which may be skipped. +__________________________________________________________________________ + + + +To compile UnZip, UnZipSFX and/or fUnZip (quick-start instructions): +======================================== + +(1) Unpack everything into a work directory somewhere, and make sure you're + in the main UnZip directory (the one with this file in it). + * (See note below concerning line termination format used in the source + distribution) + +(2) Copy the appropriate makefile into the current directory, except under + OS/2. + +(3) Run your "make" utility on the makefile (e.g., "nmake -f makefile.msc"). + +(4) Try out your new UnZip the way you would any new utility: read the + docs first. + + Ah ha ha ha!! Oh, that kills me. But seriously... For VMS, see the + Install section below or [.vms]README. for details. + + For DOS and other OSes without explicit timezone support (i.e., everybody + but Unix, Windows 95 and NT), make sure the "TZ" environment variable is + set to a valid and reasonable value; see your compiler docs for details. + +(*) The unzip sources as well as other Info-ZIP source archives are packaged + in Unix format. All text files use single LF (Ascii 0x0a) characters as + line terminators. On systems that use different conventions for plain text + files (e.g.:DOS,Win9x,WinNT,OS/2 -> combined CR+LF; MacOS -> single CR), + some utilities (editors, compilers, etc.) may not accept source files + with LF line terminators. + For these systems, we recommend to use Info-ZIP's UnZip utility for + extraction of our distribution archives, applying the command option + "-a" (= translate text files to native format) in the extraction command. + In case this procedure is not applicable, an appropiate third-party + conversion utility may be used to achieve the desired line termination + style (examples: "flip", available for Unix, DOS, OS/2; or "tr" on Unix). + + +To compile UnZip, UnZipSFX and/or fUnZip (detailed instructions): +======================================== + +(1) Unpack *.c and *.h (the actual source files), preserving the directory + structure (e.g., ./unix/unix.c). The sole exception is TOPS-20, where + tops20/* should be unpacked into the current directory, but TOPS-20 + is no longer fully supported anyway. + + As of UnZip 5.41, full decryption support has been integrated in the + UnZip source distribution. If you wish to compile binaries without + decryption support, you must define the preprocessor flag NO_CRYPT. + For many environments, you may add this flag to the custom compilation + flags supplied by the environment variable LOCAL_UNZIP. For more + details, see the make procedures and accompanied documentation for your + particular target OS. + + As of UnZip 5.53, support for the bzip2 compression algorithm has been + added to UnZip. However, this support requires the original sources of + the bzip2 compression library which have to be aquired separately; + see "http://www.bzip.org/" for further reference. + + +(2) Choose the appropriate makefile based on the description in the Con- + tents file for your OS (that is, there's only one for Unix or OS/2, but + MS-DOS and several other OSes have several, depending on the compiler). + Copy it into the current directory and rename if necessary or desired. + (Some makefiles can be invoked in place; see (5) below.) + + Don't be afraid to read the makefile! Many options will be explained only + in the comments contained therein. The defaults may not quite suit your + system. When making changes, remember that some "make" utilities expect + tabs as part of the makefile syntax. Failure with cryptic error messages + will result if your editor quietly replaces those tabs with spaces. + + Special point of confusion: some non-MSDOS makefiles contain MS-DOS + targets (useful for cross-compilations). An example is the OS/2 makefile + os2/makefile.os2 that contains the gccdos target for DOS emx+gcc and + some more DOS related targets for Watcom C and MSC. But since version 5.3, + the msdos subdirectory contains makefiles for all supported DOS compilers. + [The old djgpp, djgpp1 and gcc_dos targets in unix/Makefile have been + removed in 5.3; use msdos/makefile.dj* instead.] + + Extra-special point of confusion: makefile.os2 expects to remain in + the os2 subdirectory. Invoke it via "nmake -f os2/makefile.os2 gcc", + for example. + + +(3) If you want a non-standard version of UnZip, define one or more of the + following optional macros, either by adding them to the LOCAL_UNZIP + environment variable or by editing your makefile as appropriate. The + syntax differs from compiler to compiler, but macros are often defined + via "-DMACRO_NAME" or similar (for one called MACRO_NAME). Note that + some of these may not be fully supported in future releases (or even + in the current release). Note also that very short command lines in + MS-DOS (128 characters) may place severe limits on how many of these + can be used; if need be, the definitions can be placed at the top of + unzip.h instead (it is included in all source files)--for example, + "#define MACRO_NAME", one macro per line. + + DOSWILD (MS-DOS only) + Treat trailing "*.*" like Unix "*" (i.e., matches anything); treat + trailing "*." as match for files without a dot (i.e., matches any- + thing, as long as no dots in name). Special treatment only occurs + if patterns are at end of arguments; i.e., "a*.*" matches all files + starting with "a", but "*.*c" matches all files ending in "c" *only* + if they have a dot somewhere before the "c". [The default method of + specifying files without a dot would be "* -x *.*", making use of + UnZip's exclude-files option.] The matching is actually the same as + Unix, if you assume that undotted filenames really have an invisible + dot at the end, which is how DOS and related systems treat filenames + in general. All other regular expressions (including "?" and + "[range_of_chars]") retain their Unix-like behavior. + + WILD_STOP_AT_DIR (incompatible with WINDLL!) + Enables an additional option "-W". When this qualifier is specified, + the pattern matching routine is modified so that both '?' (single-char + wildcard) and '*' (multi-char wildcard) do not match the directory + separator character '/'. Examples: + "*.c" matches "foo.c" but not "mydir/foo.c" + "*/*.c" matches "bar/foo.c" but not "baz/bar/foo.c" + "??*/*" matches "ab/foo" and "abc/foo" but not "a/foo" or "a/b/foo" + To enable matching across directory separator chars, two consecutive + multi-char wildcards "**" should be specified. + This modified behaviour is equivalent to the pattern matching style + used by the shells of some of UnZip's supported target OSs (one + example is Acorn RISC OS). + + VMSWILD (VMS only) + Use parentheses rather than brackets to delimit sets (ranges), and + use '%' instead of '?' as the single-character wildcard for internal + filename matching. (External matching of zipfile names always uses + the standard VMS wildcard facilities; character sets are disallowed.) + + VMSCLI (VMS only) + Use VMS-style "slash options" (/FOOBAR) instead of the default Unix- + style hyphenated options (-f). This capability does not affect options + stored in environment variables (UNZIP_OPTS or ZIPINFO_OPTS); those use + the Unix style regardless. Beginning with UnZip 5.32, the supplied + VMS build methods generate both VMS-style and default "UNIX-style" + executables; you should NOT add VMSCLI to the custom options. + + CHECK_VERSIONS (VMS only) + UnZip "extra fields" are used to store VMS (RMS) filesystem info, + and the format of this information may differ in various versions + of VMS. Defining this option will enable UnZip warnings when the + stored extra-field VMS version(s) do(es) not match the version of + VMS currently being used. This is a common occurrence in zipfiles + received from other sites, but since the format of the filesystem + does not seem to have changed in years (including on Alpha and + IA64 systems), the warnings are not enabled by default. + + RETURN_CODES (VMS only) + VMS interprets return codes according to a rigid set of guidelines, + which means it misinterprets normal UnZip return codes as all sorts + of really nasty errors. Therefore VMS UnZip returns an alternate set + of return codes; since these may be difficult to interpret, define + RETURN_CODES for human-readable explanations. + + VMS_TEXT_CONV (everybody except VMS) + VMS Stream_LF-format text files archived with the "-V" option + (/VMS), but NOT with -VV (/VMS=ALL), should be fine when extracted + on other systems. Stream_LF-files archived with -VV should be + readable as well, but they may get some junk appended. + Text files with other formats (like the default VFC, with its + embedded byte counts) may be only semi-readable at best when + extracted on other systems. Defining this option enables UnZip's + -aa option to detect and convert VMS VFC-record text files into + native text format. Non-VMS UnZips now use a rudimentary VMS extra + field analyser to relyably determine such text files. (Earlier + versions of UnZip applied some heuristics instead.) + Therefore this option is now enabled by default for the main program + (but not the SFX stub), because it can be extremely useful on those + rare occasions when a VMS text file must be extracted as normal text. + + USE_DJGPP_ENV (MS-DOS DJGPP 2.0x only) + Regular DJGPP v2.0x compiled programs which use ENVIRONMENT are + able to read from the file "djgpp.env" as well as those set in the + environment. This adds about 1KB to the size of the executable. + This option is disabled by default in Info-ZIP source. If you are + able to use "djgpp.env" and don't like to clutter the environment + with many special purpose variables, you may want to compile with + this option set. + + USE_DJGPP_GLOB (MS-DOS DJGPP 2.0x only) + If you like to get UnZip binaries that handle command line arguments + similar to Unix tools which are run in an Unix shell, you might want + to set this compilation option. This option enables the support for + globbing command line arguments containing wildcards that is built + into the DJGPP startup code. When using a binary compiled with this + option, you may have to enclose wildcard arguments in double quotes + to get them passed to the program unmodified. Enabling this option + is not recommended, because it results in Info-Zip binaries that do + not behave as expected for MS-DOS programs. + + USE_VFAT (MS-DOS only, for using same executable under DOS and Win95/NT) + djgpp 2.x and emx/gcc+RSX 5.1 can detect when they are running under a + Win32 DOS box and will accordingly enable long-filename support. For + now only djgpp 2.x and emx/gcc with RSX 5.1 or later have this feature + (and it is defined by default in msdos/makefile.dj2 and makefile.emx), + but if/when other compilers build in similar support, define this + macro to enable its use. See also msdos/doscfg.h. [Note that djgpp + 2.0's LFN support is flaky; users should upgrade to 2.01 or later.] + + NO_W32TIMES_IZFIX (Win32 including WinDLL, and WinCE) + By specifying this option, you can disable Info-ZIP's special timestamp + adjustment to get stable time stamps on NTFS disks that do not change + depending on the current time being normal vs. daylight saving time. + When this option is set, UnZip behaves exactly like other programs; + file timestamps on NTFS partitions are created so that their >current< + local time representation displayed by directory listings (cmd.exe + "dir" command or Windows Explorer listings) is the same as shown by + UnZip's listing. But the actual UTC timestamp values stored in the + NTFS file attributes vary depending on whether extraction is done + at summer or winter time. + This option is not recommended because it sacrifies the timestamp + comparison checks when extracting or modifying archives in "update + only newer" mode. + However, for environments where consistency of >displayed< dates + of files extracted to NTFS vs. FAT disks is considered more important + than correctly working update/freshen tasks of Zip&UnZip, this + option may be used. + >> DO NOT DISTRIBUTE OR PUBLISH executables that were compiled with + this option! << + + NOTIMESTAMP + This option disables the -T option, which basically does exactly what + Zip's -go options do (i.e., set the timestamp of the zipfile to that of + the newest file in the archive without rewriting the archive). Unlike + Zip, however, UnZip supports wildcard specifications for the archive + name; for example, "unzip -T *.zip" will set the dates of all zipfiles + in the current directory. (UnZip's option is also much faster.) + + DATE_FORMAT=DF_DMY or DF_MDY or DF_YMD + This option controls the order in which date components are printed + in non-ZipInfo-mode listings: day-month-year or month-day-year or + year-month-day. + For DOS, FlexOS, OS2, Theos and Win32, the format is automatically + obtained from the operating system; most others default to DF_MDY. + + DATE_SEPCHAR='-' or '.' or '/' etc. + This option controls the character that separates the date components + shown in (non-ZipInfo-mode) listings. The Win32 port obtains the + separator automatically from the operating system's locale settings; + all others default to '-'. + + ACORN_FTYPE_NFS (needs support for long filenames with embedded commas) + This option enables a -F option that instructs UnZip to interpret the + filetype information extracted from Acorn RiscOS extra field blocks. + The filetype IDs are translated into "NFS filetype extensions" and + appended to the names of the extracted files. This feature facilitates + maintenance of Unix-based NFS volumes that are exported to Acorn RiscOS + systems. + + QLZIP (Unix only) + Add some support for QDOS extra fields. This option enables Unix + UnZip to append "datalen info" to QDOS exec type files in the same + format as used by QDOS cross-compilers on Unix or the qltools v2.2(+). + + UNIXBACKUP (default on OS/2, Unix, Win32) + This option enables a -B option that instructs UnZip to rename files + that would normally be overwritten. The renamed files are given a + tilde suffix and a unique sequence number (`~#####'). Note that + previously renamed files may be overwritten without notice, even + if the -n option is given. + On target ports where UNIXBACKUP is enabled by default, the negated + option NO_UNIXBACKUP may be used to disable this feature. + + OS2_EAS + List the sizes of OS/2 EAs and ACLs for each file as two extra columns + in "unzip -l" output. This is primarily useful for OS/2 systems, but + because zipfiles are portable, OS2_EAS can be defined for any system. + (May be extended someday to show sizes of Mac resource forks, RISCOS + and VMS file info, etc.) + + DELETE_IF_FULL (anybody with unlink() function) + If a write error is encountered (most likely due to a full disk), + enabling this option will cause the incomplete file to be deleted + instead of closed normally. This is particularly useful for the + Windows CE port, which must generally contend with extremely limited + resources. + + ASM_CRC (Amiga/Aztec C; many x86 systems: DOS, OS/2, Win32, Unix) + Use an assembler routine to calculate the CRC for each file (speed). + + ASM_INFLATECODES (Amiga/Aztec C only, for now) + Use an assembler version of inflate_codes() for speed. + + OLD_EXDIR + No longer supported. + + SFX_EXDIR + Enable the "-d " option for UnZipSFX. This is now + enabled by default (since UnZip 5.5) to facilitate use with + automated installation scripts and the like. For disabling + this feature, see the NO_SFX_EXDIR option. + + NO_SFX_EXDIR + Disables the "-d " option for UnZipSFX to generate the + smallest possible executable stub. (Prior to the UnZip 5.5 release, + this was the default.) + + CHEAP_SFX_AUTORUN + Enable a simple "run command after extraction" feature for + the (command line) UnZipSFX stub. This feature is currently + incompatible with the "-d " command line option, + therefore CHEAP_SFX_AUTORUN implicitely sets the NO_SFX_EXDIR + option. + + NO_ZIPINFO + Compile without ZipInfo mode (-Z) enabled; makes a smaller executable + because many text strings are left out. Automatically enabled for + some small-model compiles under MS-DOS and OS/2, so ordinarily there + is no need to specify this explicitly. (Note that even with this + defined, the resulting executable may still be too big to extract + some zipfiles correctly, if compiled with the small memory model.) + + USE_DEFLATE64 (default for UnZip and fUnZip) + NO_DEFLATE64 (default for UnZipSFX stub) + The "deflate64" algorithm from PKZIP 4.0 (or newer) is an enhanced + variant of the deflate algorithm that achieves slightly better + compression ratios on highly redundant data. Normally, UnZip should + be compiled with support for this compression algorithm enabled. + However, this results in significantly larger memory requirements + to run the program. For 16-bit executables (DOS and OS/2), the + special memory management to support the 64k history buffer results + in a slight performance (= speed) penalty. And for the SFX stub, + "deflate64" support might be unnessessary as long as the Info-ZIP + Zip utility does not support it (quite likely, this will never + get implemented). So, the NO_DEFLATE64 option is provided to allow + exclusion of the deflate64 support. + + USE_BZIP2 (requires additional external code distribution) + UnZip can optionally support the "bzip2" compression algorithm for + most ports on 32-bit (or higher) platforms. Currently, this support + is integrated in the Make procedures of MSDOS 32-bit (DJGPP), VMS, + Win32, and many Unix systems. + Prerequisites: + You have to obtain the bzip2 source distribution (version 1.03 or + higher) and extract it into the "bzip2" subdirectory. + Compilation: + - MSDOS, Win32: You have to supply the symbol definition + "USEBZ2=1" on the command line when you invoke the make program. + - Unix: The target "generic" automatically activates bzip2 support + when its configure script detects the presence of the bzip2 sources. + For other targets, there are two options: + a) Use the command + "make -f unix/Makefile D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2 \ + LIBBZ2=bzip2/libbz2.a YourTarget" + (Do not use the continuation line and replace YourTarget with + the appropiate target name.) + b) Edit the Makefile and remove the comment signs from the lines + that define the macros D_USE_BZ2, L_BZ2, and LIBBZ2 (at about + line 84 ff.). + - VMS: The MMS/MMK build program should automatically activate the + bzip2 support when it detects the presence of the bzip2 sources. + + MULT_VOLUME (experimental for 5.5x, do NOT use in production versions!) + NO_MULT_VOLUME (default) + The symbol MULT_VOLUME is used to flag code portions needed for + support of multi-volume archives. For now, this flag MUST NOT be + used to compile a production versions of UnZip. This flag has been + introduced to allow integration of experimental code for multi-volume + support in the master source tree. This feature will become a default + option in the future 6.1 release of UnZip. + + LZW_CLEAN + USE_UNSHRINK (now default, as of January 2005) + The "shrinking" algorithm from PKZIP 1.0 is an LZW variant. Unisys + patented the Lempel-Ziv-Welch algorithm in 1985 and has publicly + claimed that decompression is covered by it. (IBM also patented the + same thing in a filing 3 weeks prior to Unisys's.) In 2004, the + Unisys and IBM patents expired worldwide, so unshrinking is now + enabled again by default. If you do not wish to include the LZW + method, you may still disable it by defining LZW_CLEAN. + (Unshrinking was used by PKZIP 1.0 and 1.1, and Zip 1.0 and 1.1. + All newer archives use only the deflation method.) + + COPYRIGHT_CLEAN (now default) + USE_SMITH_CODE + The last chunk of code in UnZip that was blatantly derived from Sam + Smith's unzip 2.0 (as in, "substantially similar") is in unreduce.c. + Since reducing was only used by very early PKZIP beta versions (0.9x), + support for it is now omitted by default (COPYRIGHT_CLEAN). To in- + clude unreducing capability, define USE_SMITH_CODE and replace the + stub unreduce.c source file by the separatly distributed full source + code module. Note that this subjects UnZip to any and all restrictions + in Smith's copyright; see the UnZip COPYING.OLD file for details. + + USE_CRYPT + Enable decryption support for all binaries. The default setting + is to disable decryption support for the SFX stub to keep its size + as small as possible. For other binaries of the UnZip distribution, + decryption support is enabled by default. + + NO_CRYPT + Disable decryption support for all binaries. + + PASSWD_FROM_STDIN (with full crypt sources only; Unix, VMS only) + Used to allow the password on encrypted files to be read from stdin + rather than the default stderr. This was useful for those who wished + to automate the testing or decoding of encrypted archives (say, in a + shell script via ``echo "password" | unzip -tq archive''), but as of + version 5.3, UnZip has a -P option for passing a password directly to + the program. PASSWD_FROM_STDIN will therefore probably be phased out + in future versions. Note that the same security warnings given in the + description of the -P option apply here as well. + + UNICODE_SUPPORT + Enable restoring from UTF-8 encoded paths. These paths are stored + in extra fields in a backward-compatible way so that archives with + UTF-8 paths still work on zips and unzips that don't support Unicode. + This support follows the recent additions to the PKWare AppNote for + Unicode support, except that Unicode comments on systems where UTF-8 + is not the current character set is not implemented in this release. + + Internally, Unicode support can be achieved by three methods: + a) The charset encoding used by the system is already UTF-8, so + the program just has to select the UTF-8 versions of the stored + filenames for file name handling. + This method is enabled by setting the symbol UTF8_MAYBE_NATIVE; + this activates code to check for native UTF-8 encoding in the + locale settings. + b) The operating system and the compilation environment support + "wide character" data in Unicode encoding (UCS-2/UTF-16 or UCS-4), + which are used to translate between UTF-8 and the native + extended-ASCII character encoding. + The code for this method is activated by setting the preprocessor + symbol UNICODE_WCHAR. + It may be activated together with UTF8_MAYBE_NATIVE to provide + more versatile Unicode support and additional "debugging" options + for checking the correct recognition of non-ASCII Unicode + characters. + c) The operating system and the compilation environment allow to use + unicode-encoded "wide character" data for native text strings + support. + Complete support for this method requires a throughout revision + of the UnZip code. All internal string handling and text output + needs to be ported to use wchar_t character storage. + This porting is still in an experimental stage and not ready + for general distribution. + + On some ports UNICODE_SUPPORT is set automatically: + - WIN32 (and WinCE) use method b) by defining UNICODE_SUPPORT and + UNICODE_WCHAR. + - On Unix, the automatic configuration script enables UNICODE_WCHAR + if ISO-10646 compatible wide characters are supported and + UTF8_MAYBE_NATIVE if the locale detection call is available. + For these ports, setting NO_UNICODE_SUPPORT forces deactivation of + the Unicode support. + + NO_SETLOCALE (for Unix) + On Unix, it is now assumed that and the setlocale function + are available, to setup locale-aware filtering of displayed filenames. + The option NO_SETLOCALE allows to disable the dependency on + and setlocale() on systems where this assumption is invalid (and the + auto-configuring make target "generic" cannot be used for capabilities + detection). + + _MBCS + NO_MBCS + Enable multi-byte character set support. This is the default for the + Human68k system (originated from Japan) and for Win32 (here only DBCS + "double-byte character set" support). The MBCS support should also be + enabled on systems which are capable of using UTF-8 as native charset. + For MBCS support, the C runtime library must supply implementations + for the mblen() function and the MB_CUR_MAX runtime macro/function. + The NO_MBCS symbol allows to explicitely disable MBCS support for + testing purpose, or when MBCS support does not work as expected. + + HAVE_WORKING_ISPRINT + NO_WORKING_ISPRINT + The symbol HAVE_WORKING_ISPRINT enables enhanced non-printable chars + filtering for filenames in the fnfilter() function. On some systems + (Unix, VMS, some Win32 compilers), this setting is enabled by default. + In cases where isprint() flags printable extended characters as + unprintable, defining NO_WORKING_ISPRINT allows to disable the enhanced + filtering capability in fnfilter(). (The ASCII control codes 0x01 to + 0x1f are always escaped on ASCII systems.) + + DEBUG + Used for debugging purposes; enables Trace() statements. Generally + it's best to compile only one or two modules this way. + + DEBUG_TIME + Used for debugging the timezone code in fileio.c; enables TTrace() + statements. This code is only used for the freshen/update options + (-f and -u), and non-Unix compilers often get it wrong. + + +(4) If you regularly compile new versions of UnZip and always want the same + non-standard option(s), you may wish to add it (them) to the LOCAL_UNZIP + environment variable (assuming it's supported in your makefile). Under + MS-DOS, for example, add this to AUTOEXEC.BAT: + + set LOCAL_UNZIP=-DDOSWILD -DDATE_FORMAT=DF_DMY + + You can also use the variable to hold special compiler options (e.g., + -FPi87 for Microsoft C, if the x87 libraries are the only ones on your + disk and they follow Microsoft's default naming conventions; MSC also + supports the CL environment variable, however). + + +(5) Run the make utility on your chosen makefile: + + Unix + For most systems it's possible to invoke the makefile in place, at + the possible cost of an ignorable warning; do "make -f unix/Makefile + list" to get a list of possible system targets, and then "make -f + unix/Makefile target" for your chosen target. The "generic" target + works for most systems, but if it fails with a message about ftime() + unresolved or timezone redefined, do "make clean", "make help", and + then either "make generic2" or "make generic3" as instructed. If all + else fails, read the makefile itself; it contains numerous comments. + (One of these days we'll make a configure script that automates this + procedure better.) + + VMS (OpenVMS): + On VMS, two build methods are provided: a command procedure, and + description files for MMS or MMK. Both methods must be run from + the main directory, not the [.VMS] subdirectory. + + A simple build using the command procedure looks like this: + @ [.VMS]BUILD_UNZIP.COM + + A simple build using MMS or MMK looks like this: + MMS /DESCRIP = [.VMS]DESCRIP.MMS ! Or, with MMK, ... + MMK /DESCRIP = [.VMS]DESCRIP.MMS + + Various options for each build method are explained in comments in + the main builder file, either BUILD_UNZIP.COM or DESCRIP.MMS. + + Here are some more complex build examples: + + o Build with the large-file option enabled (non-VAX only): + + @ [.VMS]BUILD_UNZIP LARGE + or: + MMS /DESC = [.VMS] /MACRO = LARGE=1 + + o Re-link the executables (small-file and large-file): + + @ [.VMS]BUILD_UNZIP LINK + @ [.VMS]BUILD_UNZIP LARGE LINK + or + MMK /DESC = [.VMS] CLEAN_EXE ! Deletes existing executables. + MMK /DESC = [.VMS] ! Builds new executables. + MMK /DESC = [.VMS] /MACRO = LARGE=1 CLEAN_EXE + MMK /DESC = [.VMS] /MACRO = LARGE=1 + + o Build a large-file product from scratch, for debug, getting + compiler listings and link maps: + + mms /desc = [.vms] clean + mms /desc = [.vms] /macro = (DBG=1, LARGE=1. LIST=1) + + On VAX, the builders attempt to cope with the various available C + compilers: DEC/Compaq/HP C, VAX C, or GNU C. If DEC/Compaq/HP C is + not available or not desired, comments in the relevant builder file + explain the command-line options used to select a different + compiler. + + System-architecture-specific files (like objects and executables) + are placed in separate directories, such as [.ALPHA], [.IA64], or + [.VAX]. Large-file products get their own directories, [.ALPHAL] + or [.IA64L]. On VAX, VAX C products are placed in [.VAXV], GNU C + products in [.VAXG]. Each product builder announces what the + destination directory will be when it is run. + + Common files, such as the help libraries (UNZIP.HLP for the + default UNIX-like command-line interface, UNZIP_CLI.HLP for the + VMS-like command-line interface), are placed in the main + directory. With a mixed-architecture VMS cluster, the same main + directory on a shared disk may may be used by all system types. + (Using the NOHELP option with BUILD_UNZIP.COM can keep it from + making the same help files repeatedly.) + + Some further information may be found in the files + [.VMS]README. and [.VMS]00BINARY.VMS, though much of what's + there is now obsolete. + + MS-DOS + See the msdos\Contents file for notes regarding which makefile(s) to + use with which compiler. In summary: pick one of msdos\makefile.* + as appropriate, or (as noted above) use the OS/2 gccdos target for + emx+gcc. There is also an mscdos cross-compilation target in + os2\makefile.os2 and a sco_dos cross-compilation target in the Unix + makefile. For Watcom 16-bit or 32-bit versions, see the comments in + the OS/2 section below. + + After choosing the appropriate makefile and editing as necessary or + desired, invoke the corresponding make utility. Microsoft's NMAKE + and the free dmake and GNU make utilities are generally the most + versatile. The makefiles in the msdos directory can be invoked in + place ("nmake -f msdos\makefile.msc", for example). + + OS/2 + Either GNU make, nmake or dmake may be used with the OS/2 makefile; + all are freely available on the net. Do "nmake -f os2\makefile.os2", + for example, to get a list of supported targets. More generally, + read the comments at the top of the makefile for an explanation of + the differences between some of the same-compiler targets. + + Win32 (WinNT or Win9x) + For creating Win32 executables, the Microsoft Visual C++ compiler + platforms from version 2.x up to 8.0 (Visual Studio .Net C++ 2005) + are supported. Recent build test have been run on VC++ 6.0, 7.1 + and 8.0. The linker of newer Microsoft Visual C++ versions (beginning + with Visual C++ 2008 - [VC++ 9.0]) create executables that are marked + to run on Windows 2000 and newer, only. Although these Visual C++ + environments may succeed in building Win32 Info-ZIP executables, + they cannot (and must not) be used to create binaries for public + distribution. + Alternative compilers for the Intel platforms are OpenWatcom C++, + GNU C (preferably the mingw32 port, CygWin and emx/rsxnt may also + work), Borland C++, or lcc-win32. + DEC C/C++ for NT/Alpha may or may not still work. + For the Watcom compiler, use WMAKE and win32\makefile.wat; for the + Microsoft compilers, use NMAKE and win32\Makefile; for mingw32 and + CygWin, GNU Make and win32\Makefile.gcc should do the job. + With emx+gcc, a good choice is GNUMake 3.75 (or higher) from the + djgpp V2 distribution used on win32\Makefile.emx. + + The unzip32.dll WinDLL executables can be built using the appropiate + Makefile in the win32\ subdirectory, or by using the Microsoft Visual + C++ project files supplied below the windll subdirectory. Besides the + MSC compilers, gcc-mingw32, Watcom C and Borland C allow to build the + Windows UnZip DLL. By default, the Makefiles for compilers that use + the Microsoft C runtime are configured to link against the shared + multithreading C runtime DLL. Depending on the intended usage for + unzip32.dll, a statically linked dll might be more suitable. The + make scripts for MSC support build variants with static linking; you + should look up the configuration switch DLLSTANDALONE in the MSC + Makefile or the "Static..." build configurations in the Visual Studio + project files. + + WinCE (WinCE or WinNT) + Only Microsoft Visual C++ 5.0, 6.0 or Visual C++ embedded 3.0 or later + are supported. Use the appropiate version of the included project + files and check wince\README for details. + + AmigaDOS + SAS/Lattice C and Manx Aztec C are supported. For SAS C 6.x do "smake + -f amiga/smakefile all"; for Aztec C do "make -f amiga/makefile.azt + all". The Aztec C version supports assembly-language versions of two + routines; these are enabled by default. + + Atari TOS + Turbo C is no longer supported; use gcc and the MiNT libraries, and + do "make". Note that all versions of gcc prior to 2.5.8 have a bug + affecting 68000-based machines (optimizer adds 68020 instructions). + See atari\README for comments on using other compilers. + + Macintosh + Metrowerks CodeWarrior Pro 4 with Universal Interfaces 3.1 is the only + currently supported compiler, although the Mac Programmer's Workbench + (MPW) and Think C were supported at one time and still have some hooks. + Other Compilers may work too, no compiler specific instructions + (pragma, header, macros, ...) were used in the code. + For CodeWarrior Pro 4, un-BinHex the CodeWarrior project file and + UnZip resource file (using Stuffit Expander or BinHex 4.0 or later), + then open the project and click on the compile button. + See ":macos:Contents" for the possible project targets. + Link order of the standard libraries is very important: Link all + sources first and all standard libraries last. + + Acorn (RISC OS) + Extract the files from the archive and place in standard 'Acorn' C + form (i.e., *.c, *.h and *.s become c.*, h.* and s.*, respectively), + either using the UNZIP$EXTS environment variable and a pre-built UnZip + binary, or using Spark[FS] and doing it manually. Then copy the + Acorn.Makefile to the main UnZip directory and either type 'amu' or + use the desktop make utility. + + VM/CMS + Unpack all the files and transfer them with ASCII -> EBCDIC conver- + sion to an appropriate directory/minidisk/whatever, then execute + UNZVMC to compile and link all the sources. This may require C/370 + version 2.1 or later and certain `nucleus extensions,' although + UnZip 5.3 has been reported to compile fine with the `ADCYCLE C/370 + v1.2 compiler.' Note that it will abend without access to the C/370 + runtime library. See the README.CMS file for more details. + + MVS + Unpack all the files and transfer them to an appropriate PDS with + ASCII -> EBCDIC conversion enabled, then edit UNZMVSC.JOB as required, + and execute it to compile and link all the sources. C/370 2.1 or + later is required. See README.MVS for further details. [This is a + new port and may need a little more work even to compile.] + + Human68K + [This is a Japanese machine and OS.] It appears that GNU make and + gcc are required; presumably just do "gmake -f human68k/Makefile.gcc" + to build everything. This port has not been tested since the 5.12 + release. + + TOPS-20 + [No longer fully supported due to new, unported features, although + patches are always accepted.] Unpack all files into the current + directory only (including those in the zipfile's tops20 directory), + then use make.mic and "do make". + + BeOS + You can run the BeOS makefile in place by typing "make -f + beos/Makefile". In fact, this is how the author tests it. + + Running the appropriate make utility should produce three executables on + most systems, one for UnZip/ZipInfo, one for UnZipSFX, and one for fUnZip. + (VMS is one prominent exception: fUnZip makes no sense on it. The Amiga + produces a fourth executable called MakeSFX, which is necessary because + Amiga self-extracting archives cannot be created by simple concatenation. + If necessary the source amiga/makesfx.c can be compiled on other systems.) + Read any OS-specific README files for notes on setting things up for + normal use (especially for VMS) and for warnings about known quirks and + bugs in various compilers (especially for MS-DOS). + + Also note that many OSes require a timezone variable to be set correctly + (often "TZ"); Unix and VMS generally do so by default, Win95/NT do if set + up properly, but other OSes generally do not. See the discussion of the + -f and -u options in the UnZip man page (or unzip.txt). BeOS doesn't + currently support timezone information at all, but this will probably be + added soon. + + Then test your new UnZip on a few archives and let us know if there are + problems (but *please* first make certain that the archives aren't actu- + ally corrupted and that you didn't make one of the silly mistakes dis- + cussed in the documentation). If possible, double-check any problems + with PKUNZIP or with a previous version of UnZip prior to reporting a + "bug." The zipfile itself may be damaged. + + + +To install: +=========== + +Unix + The default prefix for the installation location is /usr/local (things + go into the bin and man/man1 subdirectories beneath the prefix), and + the default man-page extension is "1" (corresponding to man/man1, above). + To install as per the defaults, do "make install"; otherwise do "make + prefix=/your/path manext=your_extension install". (For Intel Unix flavors + where the assembler CRC routines were used [ASM_CRC], use the install_asm + target instead of the regular install target.) For example, to install + in your home directory with "l" as the man-page extension (for "local"), + do "make prefix=$HOME manext=l install". Permissions will be 755 for the + executables and 644 for the man pages. In general root must perform in- + stallation into a public directory. Do "rehash" if your shell requires + it in order to find the new executables. + +VMS + To complete the installation, the executables may be left in place, + or moved (or copied) to a convenient place. While other methods + (like DCL$PATH) exist, most users define symbols to make the UnZip + executables available as foreign commands. These symbol definitions + may be placed in a user's SYS$LOGIN:LOGIN.COM, or in a more central + location, like SYS$MANAGER:SYLOGIN.COM. Typical symbol definitions + might look like these: + + UNZIP :== $ dev:[dir]UNZIP.EXE ! UNIX-like command line. + or: + UNZIP :== $ dev:[dir]UNZIP_CLI.EXE ! VMS-like command line. + + For convenience, a ZIPINFO symbol could also be defined, so: + + ZIPINFO :== $ dev:[dir]UNZIP.EXE """-Z""" + + On a non-VAX system, different symbols could be defined for the + small-file and large-file programs. For example: + + UNZIPS :== $ dev:[dir.ALPHA]UNZIP.EXE ! UNZIPS = small-file UnZip. + UNZIP*L :== $ dev:[dir.ALPHAL]UNZIP.EXE ! UNZIP[L] = large-file UnZip. + + The builders create help text files, UNZIP.HLP and UNZIP_CLI.HLP. + These may be incorporated into an existing help library, or a separate + UnZip help library may be created using commands like these, using + either UNZIP.HLP (as shown) or UNZIP_CLI.HLP: + + $ LIBRARY /HELP dev:[dir]existing_library.HLB UNZIP.HLP + + $ LIBRARY /CREATE /HELP UNZIP.HLB UNZIP.HLP + + UnZip help may then be accessed from a separate UnZip help library + using a command like: + + $ HELP /LIBRARY = device:[directory]UNZIP.HLB + + For greater ease, the user (or system manager) may define a + HLP$LIBRARY logical name to allow the HELP utility to find the UnZip + help library automatically. See HELP HELP /USERLIBRARY for more + details. The command procedure HLP_LIB_NEXT.COM may be used to + determine the next available HLP$LIBRARY logical name, and could be + adapted to define a HLP$LIBRARY logical name for an UnZip help library. + + The kit includes MAKESFX.COM, a command procedure intended to simplify + creating a self-extracting archive. It may be helpful to install this + procedure near the UnZip executables. MAKESFX.COM expects another + symbol definition, like one of these: + + UNZIPSFX :== $ dev:[dir]UNZIPSFX.EXE ! UNIX-like command line. + or: + UNZIPSFX :== $ dev:[dir]UNZIPSFX_CLI.EXE ! VMS-like command line. + + Again here, on a non-VAX system, either a small-file or a large-file + UNZIPSFX program may be used. (MAKESFX.COM could be modified to allow + a run-time choice to be made.) + +OS/2, MS-DOS, NT, Atari, Amiga + Move or copy unzip.exe (or unzip.ttp, or UnZip, or whatever) to a direc- + tory in your path; also possibly copy the UnZip executable to zipinfo.exe + (or ii.exe), or else create an alias or a batch/command file for ZipInfo + ("@unzip -Z %1 %2 %3 %4 %5 %6 %7 %8 %9" under MS-DOS). The latter is only + relevant if NO_ZIPINFO was *not* defined, obviously... Under djgpp 2.x, + zipinfo.exe is a 2K stub symbolically linked to unzip.exe. + +Acorn RISC OS + Copy the executables unzip, funzip and zipinfo to somewhere in your + Run$Path. See your Welcome manual if you don't know about Run$Path. + +BeOS + The default prefix for the installation location is /boot/usr/local + (things go into the bin and man/man1 subdirectories beneath the prefix), + and the default man-page extension is "1" (corresponding to the man/man1, + above). Of course, these Unix man-pages aren't useful until someone ports + something that can format them... plain text versions are also installed + with an extension of ".txt". To install, do a "make install", or to + change the prefix, do "make prefix=/your/path install". For example, to + install in /boot/bin, do "make prefix=/boot/bin install". + +Macintosh + (This port is for Macintosh OS before Mac OS X. See Unix Apple below for + Mac OS X and later.) + MacZip requires at least System 7 and a Macintosh with a minimum of a + Motorola 68020 or PowerPC 601 processor. Other configurations may work + but it is not tested at all. + The application (MacZip) is distributed as a combination of zip and unzip + in one program. The offical release is a fat binary with both regular 68K + and native PowerPC versions included. + Move the executable(s) somewhere--for example, drag it (or them) to your + Applications folder. For easy access, make an alias in the Launcher Control + Panel or directly on your desktop. + This port supports also Apple-event.So you can install it in your + WWW-Browser as a helper-app. + Look into "macos/README.TXT" (or ":macos:README.TXT" on Mac) for further + info. + +Macintosh OS X (Unix Apple) + Mac OS X and later are based on BSD Unix and are supported by the Unix + port. See the Unix port for details. Though support is currently + minimal, we plan to support additional Mac OS X features, such as resource + forks, in future releases. + +Human68K, TOPS-20, AOS/VS, MVS, VM/CMS, etc. + Dunno, sorry... diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..81411a1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,62 @@ +This is version 2009-Jan-02 of the Info-ZIP license. +The definitive version of this document should be available at +ftp://ftp.info-zip.org/pub/infozip/license.html indefinitely and +a copy at http://www.info-zip.org/pub/infozip/license.html. + + +Copyright (c) 1990-2009 Info-ZIP. All rights reserved. + +For the purposes of this copyright and license, "Info-ZIP" is defined as +the following set of individuals: + + Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, + Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, + Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, + David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, + Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, + Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, + Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, + Rich Wales, Mike White. + +This software is provided "as is," without warranty of any kind, express +or implied. In no event shall Info-ZIP or its contributors be held liable +for any direct, indirect, incidental, special or consequential damages +arising out of the use of or inability to use this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the above disclaimer and the following restrictions: + + 1. Redistributions of source code (in whole or in part) must retain + the above copyright notice, definition, disclaimer, and this list + of conditions. + + 2. Redistributions in binary form (compiled executables and libraries) + must reproduce the above copyright notice, definition, disclaimer, + and this list of conditions in documentation and/or other materials + provided with the distribution. Additional documentation is not needed + for executables where a command line license option provides these and + a note regarding this option is in the executable's startup banner. The + sole exception to this condition is redistribution of a standard + UnZipSFX binary (including SFXWiz) as part of a self-extracting archive; + that is permitted without inclusion of this license, as long as the + normal SFX banner has not been removed from the binary or disabled. + + 3. Altered versions--including, but not limited to, ports to new operating + systems, existing ports with new graphical interfaces, versions with + modified or added functionality, and dynamic, shared, or static library + versions not from Info-ZIP--must be plainly marked as such and must not + be misrepresented as being the original source or, if binaries, + compiled from the original source. Such altered versions also must not + be misrepresented as being Info-ZIP releases--including, but not + limited to, labeling of the altered versions with the names "Info-ZIP" + (or any variation thereof, including, but not limited to, different + capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the + explicit permission of Info-ZIP. Such altered versions are further + prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP + e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP + will provide support for the altered versions. + + 4. Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," + "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its + own source and binary releases. diff --git a/README b/README new file mode 100644 index 0000000..09245f7 --- /dev/null +++ b/README @@ -0,0 +1,347 @@ +This is the README file for the 20 April 2009 public release of the +Info-ZIP group's portable UnZip zipfile-extraction program (and related +utilities). + +unzip60.zip portable UnZip, version 6.0, source code distribution +unzip60.tar.Z same as above, but compress'd tar format +unzip60.tar.gz same as above, but gzip'd tar format + +__________________________________________________________________________ + +BEFORE YOU ASK: UnZip, its companion utility Zip, and related utilities +and support files can be found in many places; read the file "WHERE" for +further details. To contact the authors with suggestions, bug reports, +or fixes, continue reading this file (README) and, if this is part of a +source distribution, the file "ZipPorts" in the proginfo directory. Also +in source distributions: read "BUGS" for a list of known bugs, non-bugs +and possible future bugs; INSTALL for instructions on how to build UnZip; +and "Contents" for a commented listing of all the distributed files. +__________________________________________________________________________ + + +GENERAL INFO +------------ +UnZip is an extraction utility for archives compressed in .zip format (also +called "zipfiles"). Although highly compatible both with PKWARE's PKZIP +and PKUNZIP utilities for MS-DOS and with Info-ZIP's own Zip program, our +primary objectives have been portability and non-MSDOS functionality. + +This version of UnZip has been ported to a stupendous array of hardware-- +from micros to supercomputers--and operating systems: Unix (many flavors), +VMS, OS/2 (including DLL version), Windows NT and Windows 95 (including DLL +version), Windows CE (GUI version), Windows 3.x (including DLL version), +MS-DOS, AmigaDOS, Atari TOS, Acorn RISC OS, BeOS, Macintosh (GUI version), +SMS/QDOS, MVS, VM/CMS, FlexOS, Tandem NSK, Human68k (mostly), AOS/VS (partly) +and TOPS-20 (partly). UnZip features not found in PKUNZIP include source +code; default extraction of directory trees (with a switch to defeat this, +rather than the reverse); system-specific extended file attributes; and, of +course, the ability to run under most of your favorite operating systems. +Plus, it's free. :-) + +For source distributions, see the main Contents file for a list of what's +included, and read INSTALL for instructions on compiling (including OS- +specific comments). The individual operating systems' Contents files (for +example, vms/Contents) may list important compilation info in addition to +explaining what files are what, so be sure to read them. Some of the ports +have their own, special README files, so be sure to look for those, too. + +See unzip.1 or unzip.txt for usage (or the corresponding UnZipSFX, ZipInfo, +fUnZip and ZipGrep docs). For VMS, unzip_def.rnh or unzip_cli.help may be +compiled into unzip.hlp and installed as a normal VMS help entry; see +vms/descrip.mms. + + +CHANGES AND NEW FEATURES +------------------------ +UnZip 6.0 finally supports nowadays "large" files of sizes > 2 GiB! +This is the first release containing support for the PKWARE Zip64 +enhancements. +Major changes are: + - Support PKWARE ZIP64 extensions, allowing Zip archives and Zip archive + entries larger than 4 GiBytes and more than 65536 entries within a single + Zip archive. This support is currently only available for Unix, + OpenVMS and Win32/Win64. + - Support for bzip2 compression method. + - Support for UTF-8 encoded entry names, both through PKWARE's "General + Purpose Flags Bit 11" indicator and Info-ZIP's new "up" unicode path + extra field. (Currently, on Windows the UTF-8 handling is limited to + the character subset contained in the configured non-unicode "system + code page".) + - Added "wrong implementation used" warning to error messages of the MSDOS + port when used under Win32, in an attempt to reduce false bug reports. + - Fixed "Time of Creation/Time of Use" vulnerability when setting attributes + of extracted files, for Unix and Unix-like ports. + - Fixed memory leak when processing invalid deflated data. + - Fixed long-standing bug in unshrink (partial_clear), added boundary checks + against invalid compressed data. + - On Unix, keep inherited SGID attribute bit for extracted directories + unless restoration of owner/group id or SUID/SGID/Tacky attributes was + requested. + - On Unix, allow extracted filenames to contain embedded control characters + when explicitly requested by specifying the new command line option "-^". + - On Unix, support restoration of symbolic link attributes. + - On Unix, support restoration of 32-bit UID/GID data using the new "ux" + IZUNIX3 extra field introduced with Zip 3.0. + - Support for ODS5 extended filename syntax on new OpenVMS systems. + - Support symbolic links zipped up on VMS. + - On VMS (only 8.x or better), support symbolic link creation. + - On VMS, support option to create converted text files in Stream_LF format. + - New -D option to suppress restoration of timestamps for extracted + directory entries (on those ports that support setting of directory + timestamps). By specifying "-DD", this new option also allows to suppress + timestamp restoration for ALL extracted files on all UnZip ports which + support restoration of timestamps. + On VMS, the default behaviour is now to skip restoration of directory + timestamps; here, "--D" restores ALL timestamps, "-D" restores none. + - On OS/2, Win32, and Unix, the (previously optional) feature UNIXBACKUP + to allow saving backup copies of overwritten files on extraction is now + enabled by default. + +For the UnZip 6.0 release, we want to give special credit to Myles Bennet, +who started the job of supporting ZIP64 extensions and Large-File (> 2GiB) +and provided a first (alpha-state) port. + +The 5.52 maintenance release fixes a few minor problems found in the 5.51 +release, closes some more security holes, adds a new AtheOS port, and +contains a Win32 extra-field code cleanup that was not finished earlier. +The most important changes are: + + - (re)enabled unshrinking support by default, the LZW patents have expired + - fixed an extraction size bug for encrypted stored entries (12 excess bytes + were written with 5.51) + - fixed false "uncompressed size mismatch" messages when extracting + encrypted archive entries + - do not restore SUID/SGID/Tacky attribute bits on Unix (BeOS, AtheOS) + unless explicitely requested by new "-K" command line qualifier + - optional support for "-W" qualifier to modify the pattern matching syntax + (with -W: "*" stops at directory delimiter, "**" matches unlimited) + - prevent buffer overflow caused by bogus extra-long Zipfile specification + - performance enhancements for VMS port + - fixed windll interface handling of its extraction mode qualifiers + nfflag, ExtractOnlyNewer, noflag, PromptToOverwrite; added detailed + explanation of their meanings and interactions to the windll documentation + +The 5.51 maintenance release adds a command-line CE port, intended for +batch processing. With the integration of this port, the pUnZip port +has been revised and "revitalized". +The most important changes for the general public are a number of +bug fixes, mostly related to security issues: + + - repair a serious bug in the textmode output conversion code for the 16-bit + ports (16-bit MSDOS, OS/2 1.x, some variants of AMIGA, possibly others) + which was introduced by the Deflate64 support of release 5.5 + - fix a long standing bug in the the inflate decompression method that + prevented correct extraction in some rare cases + - fixed holes in parent dir traversal security code (e.g.: ".^C." slipped + through the previous version of the check code) + - fixed security hole: check naming consistency in local and central header + - fixed security hole: prevent extracted symlinks from redirecting file + extraction paths + +The main addition in the 5.5 release is support for PKWARE's new Deflate64(tm) +algorithm, which appeared first in PKZIP 4.0 (published November 2000). +As usual, some other bugfixes and clean-ups have been integrated: + + - support for Deflate64 (Zip compression method #9) + - support for extracting VMS variable length record text files on + any system + - optional "cheap autorun" feature for the SFX stub + - security fixes: + * strip leading slash from stored pathspecs, + * remove "../" parent dir path components from extracted file names + - new option "-:" to allow verbatim extraction of file names containing + "../" parent dir path specs + - fixed file handle leak for the DLL code + - repaired OS2 & WinNT ACL extraction which was broken in 5.42 + +The 5.42 maintenance release fixes more bugs and cleans up the redistribution +conditions: + + - removal of unreduce.c and amiga/timelib.c code to get rid of the last + distribution restrictions beyond the BSD-like Info-ZIP LICENSE + - new generic timelib replacement (currently used by AMIGA port) + - more reasonable mapping rules of UNIX "leading-dot" filenames to the + DOS 8.3 name convention + - repaired screensize detection in MORE paging code + (was broken for DOS/OS2/WIN32 in 5.41) + +The 5.41 maintenance release adds another new port and fixes some bugs. + + - new BSD-like LICENSE + - new Novell Netware NLM port + - supports extraction of archives with more than 64k entries + - attribute handling of VMS port was broken in UnZip 5.4 + - decryption support integrated in the main source distribution + +The 5.4 release adds new ports, again. Other important items are changes +to the listing format, new supplemental features and several bug fixes +(especially concerning time-stamp handling...): + + - new IBM OS/390 port, a UNIX derivate (POSIX with EBCDIC charset) + - complete revision of the MacOS port + - changed listing formats to enlarge the file size fields for more digits + - added capability to restore directory attributes on MSDOS, OS/2, WIN32 + - enabled support of symbolic links on BeOS + - Unix: optional Acorn filetype support, useful for volumes exported via NFS + - several changes/additions to the DLL API + - GUI SFX stub for Win16 (Windows 3.1) and Win32 (Windows 9x, Windows NT) + - new free GCC compiler environments supported on WIN32 + - many time-zone handling bug fixes for WIN32, AMIGA, ... + +The 5.32 release adds two new ports and a fix for at least one relatively +serious bug: + + - new FlexOS port + - new Tandem NSK port + - new Visual BASIC support (compatibility with the Windows DLLs) + - new -T option (set zipfile timestamp) for virtually all ports + - fix for timestamps beyond 2038 (e.g., 2097; crashed under DOS/Win95/NT) + - fix for undetected "dangling" symbolic links (i.e., no pointee) + - fix for VMS indexed-file extraction problem (stored with Zip 2.0 or 2.1) + - further performance optimizations + +The 5.31 release included nothing but small bug-fixes and typo corrections, +with the exception of some minor performance tweaks. + +The 5.3 release added still more ports and more cross-platform portability +features: + + - new BeOS port + - new SMS/QDOS port + - new Windows CE graphical port + - VM/CMS port fully updated and tested + - MVS port fully updated and tested + - updated Windows DLL port, with WiZ GUI spun off to a separate package + - full Universal Time (UTC or GMT) support for trans-timezone consistency + - cross-platform support for 8-bit characters (ISO Latin-1, OEM code pages) + - support for NT security descriptors (ACLs) + - support for overwriting OS/2 directory EAs if -o option given + - updated Solaris/SVR4 package facility + +What is (still!) not added is multi-part archive support (a.k.a. "diskette +spanning", though we really mean archive splitting and not the old diskette +spanning) and a unified and more powerful DLL interface. These are the two +highest priorities for the 6.x releases. Work on the former is almost +certain to have commenced by the time you read this. This time we mean it! +You betcha. :-) + +Although the DLLs are still basically a mess, the Windows DLLs (16- and 32- +bit) now have some documentation and a small example application. Note that +they should now be compatible with C/C++, Visual BASIC and Delphi. Weirder +languages (FoxBase, etc.) are probably Right Out. + + +INTERNET RESOURCES +------------------ + +Info-ZIP's web site is at http://www.info-zip.org/pub/infozip/ +and contains the most up-to-date information about coming releases, +links to binaries, and common problems. +(See http://www.info-zip.org/pub/infozip/FAQ.html for the latter.) +Files may also be retrieved via ftp://ftp.info-zip.org/pub/infozip/ . +Thanks to LEO (Munich, Germany) for previously hosting our primary site. + + +DISTRIBUTION +------------ +If you have a question regarding redistribution of Info-ZIP software, either +as is, as packaging for a commercial product, or as an integral part of a +commercial product, please read the Frequently Asked Questions (FAQ) section +of the included COPYING file. All Info-ZIP releases are now covered by +the Info-ZIP license. See the file LICENSE. The most current license +should be available at http://www.info-zip.org/license.html and +ftp://ftp.info-zip.org/pub/infozip/license.html. + +Insofar as C compilers are rare on some platforms and the authors only have +direct access to a subset of the supported systems, others may wish to pro- +vide ready-to-run executables for new systems. In general there is no prob- +lem with this; we require only that such distributions include this README +file, the WHERE file, the LICENSE file (contains copyright/redistribution +information), and the appropriate documentation files (unzip.txt and/or +unzip.1 for UnZip, etc.). If the local system provides a way to make self- +extracting archives in which both the executables and text files can be +stored together, that's best (in particular, use UnZipSFX if at all possible, +even if it's a few kilobytes bigger than the alternatives); otherwise we +suggest a bare UnZip executable and a separate zipfile containing the re- +maining text and binary files. If another archiving method is in common +use on the target system (for example, Zoo or LHa), that may also be used. + + +BUGS AND NEW PORTS: CONTACTING INFO-ZIP +---------------------------------------- +All bug reports and patches (context diffs only, please!) should be +submitted either through the new Info-ZIP Discussion Forum at +http://www.info-zip.org/board/board.pl or through the Info-ZIP SourceForge +site at http://sourceforge.net/projects/infozip/. The forum allows file +attachments while SourceForge provides a place to post patches. The old +Zip-Bugs@lists.wku.edu e-mail address for the Info-ZIP authors was +discontinued after heavy continuous spam, as was the QuickTopic discussion +forum. The above methods are public, but we also can be reached directly +using the web reply page at http://www.info-zip.org/zip-bug.html. If you +need to send us files privately, contact us first for instructions. + +"Dumb questions" that aren't adequately answered in the documentation +should also be directed to Zip-Bugs rather than to a global forum such +as Usenet. (Kindly make certain that your question *isn't* answered by +the documentation, however--a great deal of effort has gone into making +it clear and complete.) + +Suggestions for new features can be discussed on the new Discussion Forum. +A new mailing list for Info-ZIP beta testers and interested parties may +be created someday, but for now any issues found in the betas should use +the forum. We make no promises to act on all suggestions or even all +patches, but if it is something that is manifestly useful, sending the +required patches to Zip-Bugs directly (as per the instructions in the +ZipPorts file) is likely to produce a quicker response than asking us to +do it--the authors are always ridiculously short on time. (Please do +NOT send patches or encoded zipfiles to the Info-ZIP list. Please DO +read the ZipPorts file before sending any large patch. It would be +difficult to over-emphasize this point...) + +If you are considering a port, not only should you read the ZipPorts file, +but also please check in with Zip-Bugs BEFORE getting started, since the +code is constantly being updated behind the scenes. (For example, VxWorks, +VMOS and Netware ports were once claimed to be under construction, although +we have yet to see any up-to-date patches.) We will arrange to send you the +latest sources. The alternative is the possibility that your hard work will +be tucked away in a subdirectory and mostly ignored, or completely ignored +if someone else has already done the port (and you'd be surprised how often +this has happened). + + +BETA TESTING: JOINING INFO-ZIP +------------------------------- +If you'd like to keep up to date with our UnZip (and companion Zip utility) +development, join the ranks of beta testers, add your own thoughts and +contributions, or simply lurk, you may join one of our mailing lists. +There is an announcements-only list (Info-ZIP-announce) and a general +discussion/testing list (Info-ZIP). You must be a subscriber to post, and +you can subscribe via the links on our Frequently Asked Questions page: + + http://www.info-zip.org/pub/infozip/FAQ.html#lists + +(Please note that as of late May 2004, the lists are unavailable pending +a move to a new site; we hope to have them restored shortly. In the +interim ...) Feel free to use our bug-reporting web page for bug reports +and to ask questions not answered on the FAQ page above: + + http://www.info-zip.org/zip-bug.html + +For now the best option is to monitor and contribute to the various threads +on the new discussion forum site at: + + http://www.info-zip.org/board/board.pl + +The second best way to contribute is through the various features at +SourceForge, such as the bug posting areas. + +There is also a closed mailing list for internal discussions of our core +development team. This list is now kept secret to prevent us from being +flooded with spam messages. + + +-- Greg Roelofs (sometimes known as Cave Newt), principal UnZip developer + guy, with inspiration from David Kirschbaum, was Author of this text. + +-- Christian Spieler (shorthand: SPC), current UnZip maintenance coordinator, + applied the most recent changes, with Ed Gordon providing a few additions. diff --git a/ToDo b/ToDo new file mode 100644 index 0000000..519c90e --- /dev/null +++ b/ToDo @@ -0,0 +1,226 @@ +================================ +For UnZip 6.1/who knows: +================================ + + o add extraction support for other compression algorithms used by new + PKZIP, WinZIP, 7-Zip versions + - LZMA, compression type 14 (most important, because of its efficiency) + - PPMd, compression type 98 (maybe, less important) + - WavPacked, compression type 97 (maybe, less important) + + LZMA is first-level priority for 6.1, other formats may be taken + into consideration + + o add support for reading AES encrypted archives + - WinZIP format (priority 1) + - PKZip format (priority 2) + + top level item for 6.1 + + o add multi-part zipfile handling + + major feature for 6.x! + + could happen for 6.1 + + o better support for multilingual uses and different codepages; + support unicode (UTF-8 coded) filenames and comment texts + + a requested feature getting more and more important, + - partially done for the Windows port in 6.0 + (support restricted for chars of the current system codepage) + - partially done (beta state) for Unix + (requires native codepage to be UTF-8) + + o complete support for UTF-8 coded entry names (and comments) + - add new "win32_wide" port to extend unicode support on Windows + beyond the restrictions of the current (ANSI) system codepage + - revise/extend the WinDLL interface to allow passing of "wide" + string argument data + - add simple built-in character translation between UTF-8 and the + old (ISO-8851-1 / IBM850) code pages to allow old systems without + standard UTF-8 support to read UTF-8 encoded archives. + - extend the built-in translation tables to support other language + regions besides "Western_Latin1" (e.g. Russian-kyrillic, Japanese, + Chinese) + - streamline the multilingual codepage and UTF-8 support for the UNIX + port (standard codepage translation facility?, like WideChar<->AnsiCP + translation functions under MS Windows) + + should happen for 6.1 + (there is internal alpha-state code for better "wide" support on + Windows available at the time of the 6.0 release) + + o revise the "extended charcodes" handling in decryption password to + support UTF-8 encoding on Unicode-aware systems where the "native" + character coding is NOT UTF-8 (e.g. Windows). + + o revise the command line interface for more compatibility with Zip' + command parser + - implement the versatile command parser from Zip 3.0. + - add "long option" definitions for all existing options; revise + the UnZip user manual to document the long-option alternatives. + - add support for reading the "process these entries" and the "skip + these entries" pattern lists from a file (or from separate files ?). + - add a (long) option to switch off UnZip's internal pattern matching + on filename arguments. + + probably in 6.1, + (first prototype of the revised command parser was available at the + time of the 6.0 release) + + o add command line options for miscellaneous features requested by users + and/or development team members: + - display the Info-ZIP software license + - more fine-tuning for file attributes set/restored at extraction, like: + set/clear archive attribute on DOS/OS2/WIN32; + apply/skip standard or user-defined umask filter on UNIX (& Unix-alike) + - additional time-stamp related processing filters + - more listing display modifications + - overriding the default date-time display style + - ... + + All these options are of minor importance and/or would collide with + existing "one-character" options. The current UnZip maintainer does not + want to reserve any of the few not-yet-occupied short option characters. + for one of these features. So, any implementation effort for items + of this feature wish-list has to be delayed until the "long option" + support of the revised command line parser becomes available. + + some option may get implemented in 6.1 + + o support for + and/or development team members: + + o add new low-level, binary API; rewrite "normal" (command-line) UnZip + to use it + + maybe soon (maybe 6.1) + + o MSDOS/WIN32/others: detection of "reserved" names (= names of character + devices, or system extensions that look like a characters device driver) + at runtime; with the goal of emitting "meaningful" error messages and/or + rename queries. + (Currently, these reserved names are catched as "non-deletable files". + On MSDOS and WIN32, when the RTL stat() function allows to identify + character devices, the "reserved" names are automatically prefixed with + an underscore.) + + o redesign "file exists -- is newer/older -- overwrite/skip/rename" + logic in extract.c and the corresponding system specific mapname() + services; to prevent superfluous decryption key prompts for entry + that will be skipped, later. + + o rewrite to use fread/fseek/etc. [eventually: test + write(bytes) vs. fwrite(words), especially on Crays/Alphas] + + soon (probably in conjunction with multi-part handling) + + o incorporate new backfill version of inflate() + + wait for zlib version + + o check NEXTBYTE for EOF in crypt.c, funzip.c and explode.c, too + + whenever + + o add option to force completely non-interactive operation (no queries + for overwrite/rename, password, etc.); also allow some sort of non- + interactive password provision? (file? command-line? env. variable?) + + someday? + + o add testing of extra fields (if have CRC) + + later + + o rewrite to allow use as a filter + + way, way later... + + o add Unix hard-link support? + + way, way later... + + o add ".ini" file support as a (more elaborate) alternative to the presently + supported preconfiguring abilities via special environment variables + (UNZIP on many systems...)? + + way, way later (if ever)... + + o add option to search zipfile contents for a string and print the + results? ("zipgrep" option--e.g., unzip -g or unzip -S) (easy for + fixed strings, hard for wildcards/true regex's) + + way, way later, if at all...probably use libregex + + o add -y "display symlinks" option to zipinfo? various sorting options? + (-St date/time, -Sn name)? + + who knows + + o add "in-depth" option to zipinfo? (check local headers against + central, etc.)--make it a better debugging tool (or just create + zipfix) + + who knows (zip -F, -FF already exist) + +Some maintenance or OS specific topics for 6.0 release: + + * add "unix-style-path -> partitioned-dataset filename" conversion + to MVS port + + * should we add support for (null) entry names (empty entry name field), to + conform to the PKWARE specification? + + +======================================= + +Requested features: + + - extract or exclude on basis of UID [Armin Bub, Armin.Bub@bk.bosch.de, 970904] + +======================================= + + o miscellaneous little stuff: whenever + -------------------------- + + - change DOS -f/-u stuff to use DOS API for getting filetimes, not stat() + + - add (-N?) option to lose all user input and/or switch to "(*input)()" + function, replaceable by UzpAltMain() param + - add -@ option to read from stdin (zip) or from file (PKZIP)? (go32 built-in) + - add -oo option to overwrite OS/2 and DOS system and hidden files, too + - add option to compute MD5 checksum on files and/or on entire zipfile? + + - decide whether to use WinGUI "skipping" diagnostics in extract.c + - combine "y/n/A/N" query/response stuff into unified section with query + function(s) (InputFn?) + - disable ^V code in remaining mapname() routines + + - change filename-matching logic so case-insensitive if case-sensitive fails? + + - allow multiple dir creation with -d option? [Bob Maynard] + + - use gcc -pg, gprof to do profiling on unzip + + - Doug Patriarche (doug.patriarche.bvdhp01@nt.com) Northern Telecom Canada Ltd. + "I need to do a port of zip/unzip for Wind River Systems' VxWorks OS" + [GRR: 15 March 95 -> "early June"] + + +Features from old BUGS file (mostly duplicates of other entries above): + + - ignore case for internal filename match on non-Unix systems, unless file- + specs enclosed in single quotes + - modify to decompress input stream if part of a pipe, but continue using + central directory if not (BIG job!)--extended local header capability + - add zipinfo option(s) to sort alphabetically, by date/time, in reverse, etc. + - when listing filenames, use '?' for non-printables? [Thomas Wolff, 92.6.1] + - add zipinfo "in-depth" option? (check local vs. central filenames, etc.) + - create zipcat program to concatenate zipfiles + - add -oo option (overwrite and override)? no user queries (if bad password, + skip file; if disk full, take default action; if VMS special on non-VMS, + unpack anyway; etc.) + - add -Q[Q[Q]] option (quiet mode on comments, cautions, warnings and errors)? + forget -oo, or make synonym? Default level -Q? diff --git a/WHERE b/WHERE new file mode 100644 index 0000000..3f39910 --- /dev/null +++ b/WHERE @@ -0,0 +1,266 @@ +__________________________________________________________________________ + + This is the Info-ZIP file ``WHERE,'' last updated on 29 March 2008. +__________________________________________________________________________ + + The latest version of this file can be found online at: + + ftp://ftp.info-zip.org/pub/infozip/doc/WHERE + + Note that some ftp sites may not yet have the latest versions of Zip + and UnZip when you read this. The latest versions always appear in + ftp://ftp.info-zip.org/pub/infozip/ (and subdirectories thereof) first, + except for encryption binaries, which always appear in + ftp://ftp.icce.rug.nl/infozip/ (and subdirectories) first. + + IF YOU FIND AN ERROR: please let us know! We don't have time to + check each and every site personally (or even collectively), so any + number of the sites listed below may have moved or disappeared en- + tirely. E-mail to Zip-Bugs@lists.wku.edu and we'll update this file. +__________________________________________________________________________ + + +Info-ZIP's home WWW site is listed on Yahoo and is at: + + ftp://ftp.info-zip.org/pub/infozip/Info-ZIP.html (master version) + http://ftp.info-zip.org/pub/infozip/ (master version) + http://www.info-zip.org/ + +Note that the old sites at http://www.cdrom.com/pub/infozip/ and +http://www.freesoftware.com/pub/infozip are PERMANENTLY BROKEN. They +cannot be updated or removed, apparently. + +The Zip and UnZip pages have links to most known mirror sites carrying our +source and/or binary distributions, and they generally are more up-to-date +and have better information than what you are reading: + + ftp://ftp.info-zip.org/pub/infozip/Zip.html + ftp://ftp.info-zip.org/pub/infozip/UnZip.html + +The related zlib package by Info-ZIP's Jean-loup Gailly and Mark Adler is at: + + http://www.zlib.net/ + +Source-code archives for Info-ZIP's portable Zip, UnZip, and related +utilities: + + zip30.zip Zip 3.0 (deflation, bzip2, ZIP64 large archives, multi- + volume splits; includes zipnote/zipsplit/zipcloak) + zip30.tar.Z ditto, compress'd tar format + + zip232.zip Zip 2.32 (deflation; includes zipnote/zipsplit/zipcloak) + zip232.tar.Z ditto, compress'd tar format + + zip11.zip Zip 1.1 (shrinking, implosion; compatible w. PKUNZIP 1.1) + zip11.tar.Z ditto, compress'd tar format + + unzip60.zip UnZip 6.0 (all methods[*]; unzip/funzip/unzipsfx/zipgrep) + unzip60.tar.gz ditto, gzip'd tar format + unzip60.tar.Z ditto, compress'd tar format + + unred60.zip UnZip 6.0 add-on, contains copyrighted unreduce support + + zcrypt29.zip encryption support for Zip 2.3[**] + zcrypt10.zip encryption support for Zip 1.1 + + MacZip106src.zip contains all the GUI stuff and the project files to build + the MacZip main-app. To build MacZip successfully, both + the Zip 3.0 and UnZip 6.0 sources are required, too. + + wiz601.zip WiZ 6.01, Windows 9x/NT GUI front-end for Info-ZIP's DLLs, + as well as the source code and project files for the DLLs, + and static libraries. + +[*] Unreducing is disabled by default, but is available as add-on. + As of July 2004, Unisys's LZW patent was expired worldwide, and + unshrinking is turned on by default since the release of UnZip 5.52. + See UnZip's INSTALL file for details. + +[**] As of January 2000, US export regulations were amended to allow export + of free encryption source code from the US. As of June 2002, these + regulations were further relaxed to allow export of encryption binaries + associated with free encryption source code. The Zip 2.31, UnZip 5.52 + and Wiz 5.02 archives now include full crypto source code. As of the + Zip 2.31 release, all official binaries include encryption support; the + former "zcr" archives ceased to exist. + (Note that restrictions may still exist in other countries, of course.) + +Executables archives (and related files) for Info-ZIP's software; not all +of these will be immediately available due to lack of access to appropriate +systems on the part of Info-ZIP members. + + zip###x.zip MSDOS executables and docs + zip###x1.zip OS/2 1.x (16-bit) executables and docs + zip###x2.zip OS/2 2/3/4.x (32-bit) executables and docs + zip###xA.zip Amiga executables and docs + zip###xB.zip BeOS executables and docs + zip###xC.zip VM/CMS executable and docs + zip###xK.zip Tandem NSK executables and docs + zip###xM.xmit MVS classic executable + zip###xM-docs.zip MVS classic port, docs only + zip###dN.zip WinNT/Win9x (Intel) DLL, header files, docs + zip###xN.zip WinNT/Win9x (Intel) executables and docs + zip###xN-axp.zip WinNT (Alpha AXP) executables and docs + zip###xN-mip.zip WinNT (MIPS R4000) executables and docs + zip###xN-ppc.zip WinNT (PowerPC) executables and docs + zip###xO.zip IBM OS/390 Open Edition binaries and docs + zip###xQ.zip SMS/QDOS executables and docs + zip###xR.zip Acorn RISC OS executables and docs + zip###xT.zip Atari TOS executables and docs + zip###-vms-axp-obj.zip + VMS (Alpha AXP) object libs, link procedure and docs + zip###-vms-axp-exe.zip + VMS (Alpha AXP) executables for VMS 6.1 or later and docs + zip###-vms-vax-decc-obj.zip + VMS (VAX) object libs (new DEC C), link procedure and docs + zip###-vms-vax-decc-exe.zip + VMS (VAX) executables (DEC C) for VMS 6.1 or later; docs + zip###-vms-vax-vaxc-obj.zip + VMS (VAX) object libs (old VAX C), link procedure and docs + zip###x.hqx Macintosh BinHex'd executables and docs + + unz###x.exe MSDOS self-extracting executable (16-bit unzip, ..., docs) + unz###x3.exe MSDOS self-extracting executable (16-, 32-bit unzip, docs) + unz###x1.exe OS/2 1.x (16-bit) self-extracting executables and docs + unz###x2.exe OS/2 2/3/4.x (32-bit) self-extracting executables and docs + unz###d2.zip OS/2 2/3/4.x (32-bit) DLL, header file, demo exe and docs + unz###xA.ami Amiga self-extracting executables and docs + unz###xA.lha Amiga executables and docs, LHa archive + unz###xB.sfx BeOS self-extracting executables and docs + unz###xB.tar.gz BeOS executables and docs, gzip'd tar archive + unz###xC.mod VM/CMS executable module in "packed" format + unz###xC-docs.zip VM/CMS docs, only + unz###xF.zip FlexOS executable and docs + unz###xK.zip Tandem NSK executable and docs + unz###xM.xmit MVS classic executable + unz###xM-docs.zip MVS classic port, docs only + unz###dN.zip NT4/W2K/XP/2K3/W9x (32-bit Intel) DLL, header files, docs + unz###xN.exe NT/2K/XP/2K3/W9x self-extracting i386 executables and docs + unz###xN-axp.exe WinNT (Alpha AXP) self-extracting executables and docs + unz###xN-mip.exe WinNT (MIPS R4000) self-extracting executables and docs + unz###xN-ppc.exe WinNT (PowerPC) self-extracting executables and docs + unz###xQ.sfx SMS/QDOS self-extracting executables and docs + unz###xO.tar.Z IBM OS/390 Open edition (Unix-like), exes and docs + unz###xR.exe Acorn RISC OS self-extracting executables and docs + unz###xR.spk Acorn RISC OS Spark'd executables and docs + unz###xT.tos Atari TOS self-extracting executables and docs + unz###x-vms-axp-obj.bck VMS backup saveset, + contains UnZip (Alpha) obj libs, link procedure, docs + unz###x-vms-axp-obj.exe VMS (Alpha AXP) SFX archive (statically linked), + contains UnZip (Alpha) obj libs, link procedure, docs + unz###x-vms-axp-exe.exe VMS (Alpha AXP) SFX archive (dynamically linked), + contains UnZip (Alpha AXP, DEC C) executables and docs, + smaller than object archive, but requires VMS 6.1 + unz###x-vms-vax-decc-obj.bck VMS backup saveset, + contains UnZip (new DEC C) obj libs, link procedure, docs + unz###x-vms-vax-decc-obj.exe VMS (VAX) SFX archive (statically linked), + contains UnZip (new DEC C) obj libs, link procedure, docs + unz###x-vms-vax-decc-exe.exe VMS (VAX) SFX archive (dynamically linked), + contains UnZip (new DEC C) executables and docs, + smaller than object archive, but requires VMS 6.1 + unz###x-vms-vax-vaxc-obj.bck VMS backup saveset, + contains UnZip (old VAX C) obj libs, link procedure, docs + unz###x-vms-vax-vaxc-obj.exe VMS (VAX) SFX archive (statically linked), + contains UnZip (old VAX C) obj libs, link procedure, docs + unz###x.hqx Macintosh BinHex'd executables and docs for unzip + (unz###x.tar.{Z,gz} Unix exes/docs for Solaris 2.x, SCO Unix, Linux, etc., + depending on directory/location; generally only provided + in cases where the OS does *not* ship with a bundled C + compiler) + + MacZip106nc.hqx Macintosh combined Zip&UnZip application with GUI, + executables and docs (no encryption) + MacZip106c.hqx Macintosh combined Zip&UnZip application with GUI, + executables and docs (with encryption) + + wiz###xN.exe WiZ #.## 32-bit (Win9x/NT/2K/XP/2K3) app+docs (self-extr.) + + UnzpHist.zip complete changes-history of UnZip and its precursors + ZipHist.zip complete changes-history of Zip + +ftp/web sites for the US-exportable sources and executables: + + NOTE: Look for the Info-ZIP file names given above (not PKWARE or third- + party stuff) in the following locations. Some sites like to use slightly + different names, such as zip-#.##.tar.gz instead of zip###.tar.Z. + + http://sourceforge.net/project/showfiles.php?group_id=118012 + [THE INFO-ZIP SOURCES HOME SITE] + + ftp://ftp.info-zip.org/pub/infozip/ [THE INFO-ZIP HOME SITE] + ftp://sunsite.doc.ic.ac.uk/packages/zip/ [MIRRORS THE INFO-ZIP HOME SITE] + ftp://unix.hensa.ac.uk/mirrors/uunet/pub/archiving/zip/ + + ftp://ftp.cmdl.noaa.gov/aerosol/doc/archiver/{all,dos,os2,mac,vax_alpha}/ + ftp://garbo.uwasa.fi/pc/arcers/ [AND OTHER GARBO MIRRORS] + ftp://garbo.uwasa.fi/unix/arcers/ [AND OTHER GARBO MIRRORS] + ftp://ftp.elf.stuba.sk/pub/pc/pack/ [AND OTHER STUBA MIRRORS] + ftp://ftp-os2.cdrom.com/pub/os2/archiver/ + ftp://ftp-os2.nmsu.edu/os2/archiver/ + ftp://ftp.informatik.tu-muenchen.de/pub/comp/os/os2/archiver/ + ftp://sumex-aim.stanford.edu/info-mac/cmp/ + ftp://ftp.wustl.edu/pub/aminet/util/arc/ [AND OTHER AMINET MIRRORS] + ftp://atari.archive.umich.edu/pub/Archivers/ [AND OTHER UMICH MIRRORS] + http://www.umich.edu/~archive/atari/Archivers/ + ftp://jake.educom.com.au/pub/infozip/acorn/ [Acorn RISC OS] + http://www.sitec.net/maczip/ [MacZip port] + +ftp/web sites for the encryption and decryption sources and/or executables: + + Outside the US: + ftp://ftp.info-zip.org/pub/infozip/ [THE INFO-ZIP HOME SITE] + ftp://ftp.icce.rug.nl/infozip/ [THE INFO-ZIP ENCRYPTION HOME SITE] + ftp://ftp.elf.stuba.sk/pub/pc/pack/ + ftp://garbo.uwasa.fi/pc/arcers/ + ftp://ftp.inria.fr/system/arch-compr/ + ftp://ftp.leo.org/pub/comp/os/os2/leo/archiver/ + (mail server at ftp-mailer@ftp.leo.org) + + ftp://ftp.win.tue.nl/pub/compression/zip/ + ftp://ftp.uni-erlangen.de/pub/pc/msdos/arc-utils/zip/ + + +The primary distribution site for the MacZip port can be found at: + + http://www.sitec.net/maczip/ + +ftp sites for VMS-format Zip and UnZip packages (sources, object files and +executables, no encryption/decryption--see also "Mail servers" section below): + + ftp.spc.edu [192.107.46.27] and ftp.wku.edu: + + [.MACRO32]AAAREADME.TXT + [.MACRO32.SAVESETS]UNZIP.BCK or UNZIP.ZIP (if already have older version) + [.MACRO32.SAVESETS]ZIP.ZIP + +To find other ftp/web sites: + + The "archie" ftp database utility can be used to find an ftp site near + you (although the command-line versions always seem to find old ver- + sions...the `FTPsearch' server at http://ftpsearch.ntnu.no/ftpsearch + --formerly `Archie 95'--is quite up-to-date, however). Or check a stan- + dard WWW search engine like AltaVista (http://www.altavista.digital.com/) + or Yahoo (http://www.yahoo.com/). If you don't know how to use these, + DON'T ASK US--read the web sites' help pages or check the Usenet groups + news.announce.newusers or news.answers or some such, or ask your system + administrator. + +Mail servers: + + To get the encryption sources by e-mail, send the following commands + to ftp-mailer@informatik.tu-muenchen.de: + + get /pub/comp/os/os2/archiver/zcrypt29.zip + quit + + To get the VMS Zip/UnZip package by e-mail, send the following + commands in the body of a mail message to fileserv@wku.edu (the + "HELP" command is also accepted): + + SEND FILESERV_TOOLS + SEND UNZIP + SEND ZIP + + To get Atari executables by e-mail, send a message to + atari@atari.archive.umich.edu for information about the mail server. +__________________________________________________________________________ diff --git a/acorn/Contents b/acorn/Contents new file mode 100644 index 0000000..d803c49 --- /dev/null +++ b/acorn/Contents @@ -0,0 +1,26 @@ +Contents of the "acorn" subdirectory for UnZip 5.4 and later: + + acorn.c.acorn Acorn-specific resources + acorn.c.riscos mainly file-handling routines for FileCore-based filesystems + acorn.Contents this file + acorn.GMakeFile Makefile for gcc + acorn.h.riscos + acorn.h.swiven + acorn.makefile Makefile script for default Acorn C compiler + acorn.README notes about Acorn-specific features + acorn.RunMe1st Obey file to move files into suitable place for compilation + on RISC OS machines + acorn.s.swiven SWI veneers + acorn.srcrename small executable that converts files from Unix style to + RISC OS style, used by RunMe1st + +Notes: + + Use the "RunMe1st" file (it is an Obey file) to convert all the files from + "filename/[chs]" to "[chs].filename" (so that UnZip could be easily compiled + under RISC OS). It will also set the correct makefile. + + To compile just set the CSD to the main UnZip directory and run 'amu'. + + Currently only the Acorn C V5 compiler has been tested but probably also + Acorn C V4 and the Acorn Assembler V2 will be able to compile UnZip. diff --git a/acorn/GMakefile b/acorn/GMakefile new file mode 100644 index 0000000..48f8a33 --- /dev/null +++ b/acorn/GMakefile @@ -0,0 +1,138 @@ +# Makefile for UnZip, UnZipSFX, ZipInfo and fUnZip (5.53 or later) +# using gcc 2.95.4 (or later). +# You may look at for an up-to-date +# gcc port. + +CC = gcc -mlibscl +BIND = $(CC) +AS = $(CC) -c +ASM = as +SQUEEZE = squeeze -v +E = + +# flags +# CFLAGS flags for C compile +# LFLAGS1 flags after output file spec, before obj file list +# LFLAGS2 flags after obj file list (libraries, etc) +# +LIB = +CFLAGS = -O2 -mthrowback -DNO_STRNICMP +ASMFLAGS = -throwback -objasm -upper +LFLAGS1 = +LFLAGS2 = $(LIB) + +# object file lists +OBJS1 = o.unzip o.crc32 o.crypt o.envargs o.explode +OBJS2 = o.extract o.fileio o.globals o.inflate o.list o.match +OBJS3 = o.process o.ttyio o.unreduce o.unshrink o.zipinfo +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) o.riscos o.swiven o.acorn +OBJF = o.funzip o.crc32 o.cryptf o.globalsf o.inflatef o.ttyiof \ + o.riscos o.swiven +OBJX = o.unzipsfx o.crc32 o.crypt_ o.extract_ o.fileio_ o.globals_ \ + o.inflate_ o.match_ o.process_ o.ttyio_ o.acorn_ o.swiven o.riscos_ + +UNZIP_H = h.unzip h.unzpriv h.globals acorn.h.riscos acorn.h.swiven + +all: unzip funzip unzipsfx + + +install: unzip funzip unzipsfx + $(SQUEEZE) unzip %.unzip + $(SQUEEZE) funzip %.funzip + $(SQUEEZE) unzipsfx unzipsfx + copy %.unzip %.zipinfo ~CVF + +# rules for unzip and funzip +o.crc32: c.crc32 $(UNZIP_H) h.zip h.crc32 + $(CC) $(CFLAGS) -c c.crc32 -o o.crc32 +o.crypt: c.crypt $(UNZIP_H) h.zip h.crypt h.crc32 h.ttyio + $(CC) $(CFLAGS) -c c.crypt -o o.crypt +o.envargs: c.envargs $(UNZIP_H) + $(CC) $(CFLAGS) -c c.envargs -o o.envargs +o.explode: c.explode $(UNZIP_H) + $(CC) $(CFLAGS) -c c.explode -o o.explode +o.extract: c.extract $(UNZIP_H) h.crc32 h.crypt + $(CC) $(CFLAGS) -c c.extract -o o.extract +o.fileio: c.fileio $(UNZIP_H) h.crc32 h.crypt h.ttyio h.ebcdic + $(CC) $(CFLAGS) -c c.fileio -o o.fileio +o.funzip: c.funzip $(UNZIP_H) h.crc32 h.crypt h.ttyio + $(CC) $(CFLAGS) -c c.funzip -o o.funzip +o.globals: c.globals $(UNZIP_H) + $(CC) $(CFLAGS) -c c.globals -o o.globals +o.inflate: c.inflate h.inflate $(UNZIP_H) + $(CC) $(CFLAGS) -c c.inflate -o o.inflate +o.list: c.list $(UNZIP_H) + $(CC) $(CFLAGS) -c c.list -o o.list +o.match: c.match $(UNZIP_H) + $(CC) $(CFLAGS) -c c.match -o o.match +o.process: c.process $(UNZIP_H) h.crc32 + $(CC) $(CFLAGS) -c c.process -o o.process +o.ttyio: c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio + $(CC) $(CFLAGS) -c c.ttyio -o o.ttyio +o.unreduce: c.unreduce $(UNZIP_H) + $(CC) $(CFLAGS) -c c.unreduce -o o.unreduce +o.unshrink: c.unshrink $(UNZIP_H) + $(CC) $(CFLAGS) -c c.unshrink -o o.unshrink +o.unzip: c.unzip $(UNZIP_H) h.crypt h.unzvers h.consts + $(CC) $(CFLAGS) -c c.unzip -o o.unzip +o.zipinfo: c.zipinfo $(UNZIP_H) + $(CC) $(CFLAGS) -c c.zipinfo -o o.zipinfo + +o.crypt_: c.crypt $(UNZIP_H) h.zip h.crypt h.crc32 h.ttyio + $(CC) $(CFLAGS) -DSFX -c c.crypt -o o.crypt_ +o.extract_: c.extract $(UNZIP_H) h.crc32 h.crypt + $(CC) $(CFLAGS) -DSFX -c c.extract -o o.extract_ +o.fileio_: c.fileio $(UNZIP_H) h.crc32 h.crypt h.ttyio h.ebcdic + $(CC) $(CFLAGS) -DSFX -c c.fileio -o o.fileio_ +o.globals_: c.globals $(UNZIP_H) + $(CC) $(CFLAGS) -DSFX -c c.globals -o o.globals_ +o.inflate_: c.inflate h.inflate $(UNZIP_H) h.crypt + $(CC) $(CFLAGS) -DSFX -c c.inflate -o o.inflate_ +o.match_: c.match $(UNZIP_H) + $(CC) $(CFLAGS) -DSFX -c c.match -o o.match_ +o.process_: c.process $(UNZIP_H) h.crc32 + $(CC) $(CFLAGS) -DSFX -c c.process -o o.process_ +o.ttyio_: c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio + $(CC) $(CFLAGS) -DSFX -c c.ttyio -o o.ttyio_ + +o.unzipsfx: c.unzip $(UNZIP_H) h.crypt h.unzvers h.consts + $(CC) $(CFLAGS) -DSFX -c c.unzip -o o.unzipsfx + +o.cryptf: c.crypt $(UNZIP_H) h.zip h.crypt h.crc32 h.ttyio + $(CC) $(CFLAGS) -DFUNZIP -c c.crypt -o o.cryptf +o.globalsf: c.globals $(UNZIP_H) + $(CC) $(CFLAGS) -DFUNZIP -c c.globals -o o.globalsf +o.inflatef: c.inflate h.inflate $(UNZIP_H) h.crypt + $(CC) $(CFLAGS) -DFUNZIP -c c.inflate -o o.inflatef +o.ttyiof: c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio + $(CC) $(CFLAGS) -DFUNZIP -c c.ttyio -o o.ttyiof + +o.acorn: acorn.c.acorn $(UNZIP_H) + $(CC) $(CFLAGS) -I@ -c acorn.c.acorn +o.acorn_: acorn.c.acorn $(UNZIP_H) + $(CC) $(CFLAGS) -I@ -c -DSFX -DSFX_EXDIR -o o.acorn_ acorn.c.acorn + +o.riscos: acorn.c.riscos $(UNZIP_H) + $(CC) $(CFLAGS) -I@ -c acorn.c.riscos +o.riscos_: acorn.c.riscos $(UNZIP_H) + $(CC) $(CFLAGS) -I@ -c -DSFX -DSFX_EXDIR -o o.riscos_ acorn.c.riscos + +o.swiven: acorn.s.swiven + $(ASM) $(ASMFLAGS) acorn.s.swiven -o o.swiven + +unzip: $(OBJS) + $(BIND) -o unzip$(E) $(LFLAGS1) $(OBJS) $(LFLAGS2) +funzip: $(OBJF) + $(BIND) -o funzip$(E) $(LFLAGS1) $(OBJF) $(LFLAGS2) +unzipsfx: $(OBJX) + $(BIND) -o unzipsfx$(E) $(LFLAGS1) $(OBJX) $(LFLAGS2) + +clean: + remove unzip + remove funzip + remove zipinfo + remove unzipsfx + create o.!fake! 0 + wipe o.* ~cf + +# end of Makefile diff --git a/acorn/ReadMe b/acorn/ReadMe new file mode 100644 index 0000000..8768d07 --- /dev/null +++ b/acorn/ReadMe @@ -0,0 +1,69 @@ +Acorn-specific usage instructions +--------------------------------- + +As zipfiles can come from a variety of sources apart from Acorn machines, +consideration had to be given to the handling of dot-extensions, e.g. +"DOSFILE.TXT", "unix-filename.tar.gz". These are extracted as "DOSFILE/TXT" +and "unix-filename/tar/gz"; their names may or may not be truncated, +depending on where the files are being created: what filing system and, for +Filecore-based filing systems such as ADFS or an IDEFS or SCSIFS, which +disk/partition format (names will not be truncated if you're using E+ or F+). + +Where truncation occurs, you must be REALLY careful about extracting files +from archives. The files + + dummy_source.c and dummy_source.h + +will both be extracted as + + dummy_sour + +UnZip will prompt you for confirmation of the over-writing of these files, +but you must be really careful unless you wish to lose files! Also, because +UnZip is a unix-ported program, the filenames are CASE SENSITIVE. + + *unzip new/zip newfile + +will extract 'newfile', but not 'NewFile', 'NEWFILE' or any other +combinations. However, you can use the -C option to force operations to +disregard the case of filenames. + +The Acorn UnZip port has an additional feature to cope with the extraction of +files containing 'c' code. As you may be aware, Acorn Desktop C requires all +files called "foo.c" to be renamed to "c.foo", ie "foo" in a directory called +"c". + +There are two ways of using this feature. + +- The old way: use a colon-separated environment variable named "Unzip$Exts". + + Any extensions found in this variable will be extracted to directories + named after the extension, with the extension stripped. For example: + + *Set Unzip$Exts "c:h:o:s" + *unzip foo/zip + +- The new way: use the -/ option. For example: + + Any extensions found in the parameter for this option will be extracted to + directories named after the extension, with the extension stripped. For + example: + + *unzip -/c:h:o:s foo/zip + +If foo/zip contains a file named "foo.c", this file will be written as "foo" +in directory "c". This can be used to include "c:h:o:s:txt" to pull all the +text files out to a separate directory. + +UnZip fully supports SparkFS Extra Field. This means that zipfiles created +with SparkFS or Zip (on RISC OS) will be correctly unzipped, including +filetypes. + +UnZipSFX can be used to create self-extracting archives. To use it, just +create a common zipfile using Zip (or SparkFS), then load the UnZipSFX +executable into an editor (eg. Edit, Zap), go with the caret the end of the +file (using CTRL-CursorDown) and drag the zipfile to the editor window (in +other words, append the zipfile to the UnZipSFX executable). Now, saving the +resulting file (with filetype Absolute (&FF8)), you have a self-extracting +archive (ie. double-clicking on it will unzip the contents of the original +zipfile to the currently selected directory). diff --git a/acorn/RunMe1st b/acorn/RunMe1st new file mode 100644 index 0000000..aaad22d --- /dev/null +++ b/acorn/RunMe1st @@ -0,0 +1,17 @@ +| This Obey file prepares the UnZip port for a Desktop C re-compile. +| Run it and it will copy all the needed files into the correct +| place. + +| Set the correct type of 'srcrename' so that the only requirement +| for the user is to set 'RunMe1st' to Obey +SetType .srcrename FF8 + +| Run 'srcrename' on the main UnZip directory with recursion enabled +/.srcrename -r -e c:h:s:o .^ + +| Create the 'o' directory +CDir .^.o + +| Put the Makefile in its correct place and set the correct filetype +SetType .makefile FE1 +Copy .makefile .^.makefile ~C ~V F diff --git a/acorn/acorn.c b/acorn/acorn.c new file mode 100644 index 0000000..2557f25 --- /dev/null +++ b/acorn/acorn.c @@ -0,0 +1,994 @@ +/* + Copyright (c) 1990-2007 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2000-Apr-09 or later + (the contents of which are also included in unzip.h) for terms of use. + If, for some reason, all these files are missing, the Info-ZIP license + also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html +*/ +/*--------------------------------------------------------------------------- + + acorn.c + + RISCOS-specific routines for use with Info-ZIP's UnZip 5.2 and later. + + Contains: do_wild() <-- generic enough to put in fileio.c? + mapattr() + mapname() + checkdir() + mkdir() + setRISCOSexfield() + printRISCOSexfield() + close_outfile() + stamp_file() + version() + + ---------------------------------------------------------------------------*/ + + +#define UNZIP_INTERNAL +#include "^.unzip.h" +#include "riscos.h" + +#define FTYPE_FFF (1<<17) /* set filetype to &FFF when extracting */ + +#ifdef WILD_STOP_AT_DIR +# define WESEP , (oU.W_flag ? '.' : '\0') +#else +# define WESEP +#endif + +static int created_dir; /* used in mapname(), checkdir() */ +static int renamed_fullpath; /* ditto */ +static int has_mimemap = -1; /* used in mimemap() */ + +extern int mkdir(const char *path, int mode); +static int has_NFS_ext(const char *name); +static void setRISCOSexfield(ZCONST char *path, ZCONST void *ef_spark); +#ifdef DEBUG +static void printRISCOSexfield(int isdir, ZCONST void *extra_field); +#endif +static int uxtime2acornftime(unsigned *pexadr, unsigned *pldadr, time_t ut); +static int mimemap(const char *name); + + +#ifndef SFX + +/**********************/ +/* Function do_wild() */ /* for porting: dir separator; match(ignore_case) */ +/**********************/ + +char *do_wild(__G__ wildspec) + __GDEF + ZCONST char *wildspec; /* only used first time on a given dir */ +{ + static DIR *wild_dir = (DIR *)NULL; + static ZCONST char *wildname; + static char *dirname, matchname[FILNAMSIZ]; + static int notfirstcall=FALSE, have_dirname, dirnamelen; + struct dirent *file; + + /* Even when we're just returning wildspec, we *always* do so in + * matchname[]--calling routine is allowed to append four characters + * to the returned string, and wildspec may be a pointer to argv[]. + */ + if (!notfirstcall) { /* first call: must initialize everything */ + notfirstcall = TRUE; + + /* break the wildspec into a directory part and a wildcard filename */ + if ((wildname = (ZCONST char *)strrchr(wildspec, '.')) == + (ZCONST char *)NULL) + { + dirname = "."; + dirnamelen = 1; + have_dirname = FALSE; + wildname = wildspec; + } else { + ++wildname; /* point at character after '/' */ + dirnamelen = wildname - wildspec; + if ((dirname = (char *)malloc(dirnamelen+1)) == (char *)NULL) { + Info(slide, 0x201, ((char *)slide, + "warning: cannot allocate wildcard buffers\n")); + strncpy(matchname, wildspec, FILNAMSIZ); + matchname[FILNAMSIZ-1] = '\0'; + return matchname; /* but maybe filespec was not a wildcard */ + } + strncpy(dirname, wildspec, dirnamelen); + dirname[dirnamelen] = '\0'; /* terminate for strcpy below */ + have_dirname = TRUE; + } + + if ((wild_dir = opendir(dirname)) != (DIR *)NULL) { + while ((file = readdir(wild_dir)) != (struct dirent *)NULL) { + if (file->d_name[0] == '/' && wildname[0] != '/') + continue; /* Unix: '*' and '?' do not match leading dot */ + if (match(file->d_name, wildname, 0 WESEP)) { /* 0=case sens.*/ + if (have_dirname) { + strcpy(matchname, dirname); + strcpy(matchname+dirnamelen, file->d_name); + } else + strcpy(matchname, file->d_name); + return matchname; + } + } + /* if we get to here directory is exhausted, so close it */ + closedir(wild_dir); + wild_dir = (DIR *)NULL; + } + + /* return the raw wildspec in case that works (e.g., directory not + * searchable, but filespec was not wild and file is readable) */ + strncpy(matchname, wildspec, FILNAMSIZ); + matchname[FILNAMSIZ-1] = '\0'; + return matchname; + } + + /* last time through, might have failed opendir but returned raw wildspec */ + if (wild_dir == (DIR *)NULL) { + notfirstcall = FALSE; /* nothing left to try--reset for new wildspec */ + if (have_dirname) + free(dirname); + return (char *)NULL; + } + + /* If we've gotten this far, we've read and matched at least one entry + * successfully (in a previous call), so dirname has been copied into + * matchname already. + */ + while ((file = readdir(wild_dir)) != (struct dirent *)NULL) + if (match(file->d_name, wildname, 0 WESEP)) { /* 0 == case sens. */ + if (have_dirname) { + /* strcpy(matchname, dirname); */ + strcpy(matchname+dirnamelen, file->d_name); + } else + strcpy(matchname, file->d_name); + return matchname; + } + + closedir(wild_dir); /* have read at least one dir entry; nothing left */ + wild_dir = (DIR *)NULL; + notfirstcall = FALSE; /* reset for new wildspec */ + if (have_dirname) + free(dirname); + return (char *)NULL; + +} /* end function do_wild() */ + +#endif /* !SFX */ + + + +/**************************/ +/* Function has_NFS_ext() */ +/**************************/ + +static int has_NFS_ext(const char* name) +{ + int i = strlen(name) - 4; + + return (i >= 0 && name[i] == ',' && (i > 0 || name[i-1]=='/') && + isxdigit(name[i+1]) && isxdigit(name[i+2]) && isxdigit(name[i+3])); +} /* end function has_NFS_ext() */ + + + +/**********************/ +/* Function mapattr() */ +/**********************/ + +int mapattr(__G) + __GDEF +{ + ulg tmp = G.crec.external_file_attributes; + + switch (G.pInfo->hostnum) { + case AMIGA_: + tmp = (unsigned)(tmp>>17 & 7); /* Amiga RWE bits */ + G.pInfo->file_attr = (unsigned)(tmp<<6 | tmp<<3 | tmp); + break; + case THEOS_: + tmp &= 0xF1FFFFFFL; + if ((tmp & 0xF0000000L) != 0x40000000L) + tmp &= 0x01FFFFFFL; /* not a dir, mask all ftype bits */ + else + tmp &= 0x41FFFFFFL; /* leave directory bit as set */ + /* fall through! */ + case ACORN_: + case UNIX_: + case VMS_: + case ATARI_: + case ATHEOS_: + case BEOS_: + case QDOS_: + case TANDEM_: + G.pInfo->file_attr = (unsigned)(tmp >> 16); + if (G.pInfo->file_attr != 0 || !G.extra_field) { + break; + } else { + /* Some (non-Info-ZIP) implementations of Zip for Unix and + VMS (and probably others ??) leave 0 in the upper 16-bit + part of the external_file_attributes field. Instead, they + store file permission attributes in some extra field. + As a work-around, we search for the presence of one of + these extra fields and fall back to the MSDOS compatible + part of external_file_attributes if one of the known + e.f. types has been detected. + Later, we might implement extraction of the permission + bits from the VMS extra field. But for now, the work-around + should be sufficient to provide "readable" extracted files. + (For ASI Unix e.f., an experimental remap of the e.f. + mode value IS already provided!) + */ + ush ebID; + unsigned ebLen; + uch *ef = G.extra_field; + unsigned ef_len = G.crec.extra_field_length; + int r = FALSE; + + while (!r && ef_len >= EB_HEADSIZE) { + ebID = makeword(ef); + ebLen = (unsigned)makeword(ef+EB_LEN); + if (ebLen > (ef_len - EB_HEADSIZE)) + /* discoverd some e.f. inconsistency! */ + break; + switch (ebID) { + case EF_ASIUNIX: + if (ebLen >= (EB_ASI_MODE+2)) { + G.pInfo->file_attr = + (unsigned)makeword(ef+(EB_HEADSIZE+EB_ASI_MODE)); + /* force stop of loop: */ + ef_len = (ebLen + EB_HEADSIZE); + break; + } + /* else: fall through! */ + case EF_PKVMS: + /* "found nondecypherable e.f. with perm. attr" */ + r = TRUE; + default: + break; + } + ef_len -= (ebLen + EB_HEADSIZE); + ef += (ebLen + EB_HEADSIZE); + } + if (!r) + break; + } + /* fall through! */ + /* all remaining cases: expand MSDOS read-only bit into write perms */ + case FS_FAT_: + /* PKWARE's PKZip for Unix marks entries as FS_FAT_, but stores the + * Unix attributes in the upper 16 bits of the external attributes + * field, just like Info-ZIP's Zip for Unix. We try to use that + * value, after a check for consistency with the MSDOS attribute + * bits (see below). + */ + G.pInfo->file_attr = (unsigned)(tmp >> 16); + /* fall through! */ + case FS_HPFS_: + case FS_NTFS_: + case MAC_: + case TOPS20_: + default: + /* Ensure that DOS subdir bit is set when the entry's name ends + * in a '/'. Some third-party Zip programs fail to set the subdir + * bit for directory entries. + */ + if ((tmp & 0x10) == 0) { + extent fnlen = strlen(G.filename); + if (fnlen > 0 && G.filename[fnlen-1] == '/') + tmp |= 0x10; + } + /* read-only bit --> write perms; subdir bit --> dir exec bit */ + tmp = !(tmp & 1) << 1 | (tmp & 0x10) >> 4; + if ((G.pInfo->file_attr & 0700) == (unsigned)(0400 | tmp<<6)) + /* keep previous G.pInfo->file_attr setting, when its "owner" + * part appears to be consistent with DOS attribute flags! + */ + break; + G.pInfo->file_attr = (unsigned)(0444 | tmp<<6 | tmp<<3 | tmp); + break; + } /* end switch (host-OS-created-by) */ + + G.pInfo->file_attr&=0xFFFF; + + G.pInfo->file_attr|=(0xFFDu<<20); + + if (has_NFS_ext(G.filename)) { + int ftype=strtol(G.filename+strlen(G.filename)-3,NULL,16)&0xFFF; + + G.pInfo->file_attr = (G.pInfo->file_attr & 0x000FFFFF) | (ftype<<20); + } else { + int type = mimemap(G.filename); + if (type == -1) + type = (G.crec.internal_file_attributes & 1) ? 0xFFF : 0xFFD; + G.pInfo->file_attr = (G.pInfo->file_attr & 0x000FFFFF) | (type<<20); + } + + return 0; + +} /* end function mapattr() */ + + + +/************************/ +/* Function mimemap() */ +/************************/ + +static int mimemap(const char *name) +{ + const char *ext = name; + int type; + + if (has_mimemap < 0) + has_mimemap = + !(SWI_OS_CLI("%RMEnsure MimeMap 0.05 RMLoad System:Modules.Network.MimeMap") + || SWI_OS_CLI("%RMEnsure MimeMap 0.05")); + + if (!has_mimemap) + return -1; /* no MimeMap module; fall back on text flag test */ + + do { + while (*ext && *ext!='.') + ext++; + if (!*ext) + return -1; /* no suitable extension; fallback */ + type = SWI_MimeMap_Translate(ext++); + } while (type == -1); + + return type; +} + + + +/************************/ +/* Function mapname() */ +/************************/ + +int mapname(__G__ renamed) + __GDEF + int renamed; +/* + * returns: + * MPN_OK - no problem detected + * MPN_INF_TRUNC - caution (truncated filename) + * MPN_INF_SKIP - info "skip entry" (dir doesn't exist) + * MPN_ERR_SKIP - error -> skip entry + * MPN_ERR_TOOLONG - error -> path is too long + * MPN_NOMEM - error (memory allocation failed) -> skip entry + * [also MPN_VOL_LABEL, MPN_CREATED_DIR] + */ +{ + char pathcomp[FILNAMSIZ]; /* path-component buffer */ + char *pp, *cp=(char *)NULL; /* character pointers */ + char *lastsemi=(char *)NULL; /* pointer to last semi-colon in pathcomp */ + int error = MPN_OK; + register unsigned workch; /* hold the character being tested */ + char *checkswap=NULL; /* pointer the the extension to check */ + + +/*--------------------------------------------------------------------------- + Initialize various pointers and counters and stuff. + ---------------------------------------------------------------------------*/ + + if (G.pInfo->vollabel) + return MPN_VOL_LABEL; /* can't set disk volume labels in RISCOS */ + + /* can create path as long as not just freshening, or if user told us */ + G.create_dirs = (!uO.fflag || renamed); + + created_dir = FALSE; /* not yet */ + + /* user gave full pathname: don't prepend rootpath */ + renamed_fullpath = (renamed && (*G.filename == '/')); + + if (checkdir(__G__ (char *)NULL, INIT) == MPN_NOMEM) + return MPN_NOMEM; /* initialize path buffer, unless no memory */ + + *pathcomp = '\0'; /* initialize translation buffer */ + pp = pathcomp; /* point to translation buffer */ + if (uO.jflag) /* junking directories */ + cp = (char *)strrchr(G.filename, '/'); + if (cp == (char *)NULL) /* no '/' or not junking dirs */ + cp = G.filename; /* point to internal zipfile-member pathname */ + else + ++cp; /* point to start of last component of path */ + +/*--------------------------------------------------------------------------- + Begin main loop through characters in filename. + ---------------------------------------------------------------------------*/ + + while ((workch = (uch)*cp++) != 0) { + + switch (workch) { + case '/': /* can assume -j flag not given */ + *pp = '\0'; + if (((error = checkdir(__G__ pathcomp, APPEND_DIR)) + & MPN_MASK) > MPN_INF_TRUNC) + return error; + pp = pathcomp; /* reset conversion buffer for next piece */ + lastsemi = (char *)NULL; /* leave direct. semi-colons alone */ + checkswap=NULL; /* reset checking at start of new leafname */ + break; + + case '.': + *pp++ = '/'; + checkswap=pp; + break; + + case ';': /* VMS version (or DEC-20 attrib?) */ + lastsemi = pp; + *pp++ = ';'; /* keep for now; remove VMS ";##" */ + break; /* later, if requested */ + + case ' ': /* change spaces to hard-spaces */ + *pp++ = 160; /* (ISO 8859-1 Latin-1 codepage) */ + break; + + /* The following substitutions, unless stated otherwise, follow + * those for DOSFS. They translate special symbols into other + * characters which have no special meaning to RISC OS. */ + case '#': *pp++ = '?'; break; /* single-char wildcard */ + case '&': *pp++ = '+'; break; + case '@': *pp++ = '='; break; + case '%': *pp++ = ';'; break; + case '$': *pp++ = '<'; break; + case '^': *pp++ = '>'; break; /* parent-dir reference */ + + /* The following substitutions deal with the remaining special + * symbols. ('.' is handled above.) */ + case '*': *pp++ = 0xD7; break; /* Latin-1 'multiply' */ + case '"': *pp++ = '~'; break; + case ':': *pp++ = ';'; break; + case '\\': *pp++ = '/'; break; + case '|': *pp++ = 0xA6; break; /* Latin-1 'broken bar' */ + + default: + /* allow European characters in filenames: */ + if (isprint(workch) || (128 <= workch && workch <= 254)) + *pp++ = (char)workch; + } /* end switch */ + + } /* end while loop */ + +/*--------------------------------------------------------------------------- + Report if directory was created (and no file to create: filename ended + in '/'), check name to be sure it exists, and combine path and name be- + fore exiting. + ---------------------------------------------------------------------------*/ + + if (G.filename[strlen(G.filename) - 1] == '/') { + checkdir(__G__ G.filename, GETPATH); + if (created_dir) { + if (QCOND2) { + Info(slide, 0, ((char *)slide, " creating: %s\n", + FnFilter1(G.filename))); + } + /* set dir time (note trailing '/') */ + return (error & ~MPN_MASK) | MPN_CREATED_DIR; + } + /* dir existed already; don't look for data to extract */ + return (error & ~MPN_MASK) | MPN_INF_SKIP; + } + + *pp = '\0'; /* done with pathcomp: terminate it */ + + /* if not saving them, remove VMS version numbers (appended ";###") */ + if (!uO.V_flag && lastsemi) { + pp = lastsemi + 1; + while (isdigit((uch)(*pp))) + ++pp; + if (*pp == '\0') /* only digits between ';' and end: nuke */ + *lastsemi = '\0'; + } + + if (*pathcomp == '\0') { + Info(slide, 1, ((char *)slide, "mapname: conversion of %s failed\n", + FnFilter1(G.filename))); + return (error & ~MPN_MASK) | MPN_ERR_SKIP; + } + + if (checkswap!=NULL) { + if (checkext(checkswap)) { + if ((error = checkdir(__G__ checkswap, APPEND_DIR)) > 1) + return error; + *(checkswap-1)=0; /* remove extension from pathcomp */ + } + } + + if (!uO.acorn_nfs_ext && has_NFS_ext(pathcomp)) { + /* remove the filetype extension unless requested otherwise */ + /* the filetype should be already set by mapattr() */ + pathcomp[strlen(pathcomp)-4]=0; + } + + checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */ + checkdir(__G__ G.filename, GETPATH); + + return error; + +} /* end function mapname() */ + + + + +/***********************/ +/* Function checkdir() */ +/***********************/ + +int checkdir(__G__ pathcomp, flag) + __GDEF + char *pathcomp; + int flag; +/* + * returns: + * MPN_OK - no problem detected + * MPN_INF_TRUNC - (on APPEND_NAME) truncated filename + * MPN_INF_SKIP - path doesn't exist, not allowed to create + * MPN_ERR_SKIP - path doesn't exist, tried to create and failed; or path + * exists and is not a directory, but is supposed to be + * MPN_ERR_TOOLONG - path is too long + * MPN_NOMEM - can't allocate memory for filename buffers + */ +{ + static int rootlen = 0; /* length of rootpath */ + static char *rootpath; /* user's "extract-to" directory */ + static char *buildpath; /* full path (so far) to extracted file */ + static char *end; /* pointer to end of buildpath ('\0') */ + +# define FN_MASK 7 +# define FUNCTION (flag & FN_MASK) + + +/*--------------------------------------------------------------------------- + APPEND_DIR: append the path component to the path being built and check + for its existence. If doesn't exist and we are creating directories, do + so for this one; else signal success or error as appropriate. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_DIR) { + int too_long = FALSE; +#ifdef SHORT_NAMES + char *old_end = end; +#endif + + Trace((stderr, "appending dir segment [%s]\n", FnFilter1(pathcomp))); + while ((*end = *pathcomp++) != '\0') + ++end; +#ifdef SHORT_NAMES /* path components restricted to 14 chars, typically */ + if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ + *(end = old_end + FILENAME_MAX) = '\0'; +#endif + + /* GRR: could do better check, see if overrunning buffer as we go: + * check end-buildpath after each append, set warning variable if + * within 20 of FILNAMSIZ; then if var set, do careful check when + * appending. Clear variable when begin new path. */ + + /* next check: need to append '/', at least one-char name, '\0' */ + if ((end-buildpath) > FILNAMSIZ-3) + too_long = TRUE; /* check if extracting dir? */ + if (stat(buildpath, &G.statbuf)) { /* path doesn't exist */ + if (!G.create_dirs) { /* told not to create (freshening) */ + free(buildpath); + return MPN_INF_SKIP; /* path doesn't exist: nothing to do */ + } + if (too_long) { + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", + FnFilter1(buildpath))); + fflush(stderr); + free(buildpath); + /* no room for filenames: fatal */ + return MPN_ERR_TOOLONG; + } + if (mkdir(buildpath, 0777) == -1) { /* create the directory */ + Info(slide, 1, ((char *)slide, + "checkdir error: cannot create %s\n\ + unable to process %s.\n", + FnFilter2(buildpath), FnFilter1(G.filename))); + free(buildpath); + /* path didn't exist, tried to create, failed */ + return MPN_ERR_SKIP; + } + created_dir = TRUE; + } else if (!S_ISDIR(G.statbuf.st_mode)) { + Info(slide, 1, ((char *)slide, + "checkdir error: %s exists but is not directory\n\ + unable to process %s.\n", + FnFilter2(buildpath), FnFilter1(G.filename))); + free(buildpath); + /* path existed but wasn't dir */ + return MPN_ERR_SKIP; + } + if (too_long) { + Info(slide, 1, ((char *)slide, + "checkdir error: path too long: %s\n", FnFilter1(buildpath))); + free(buildpath); + /* no room for filenames: fatal */ + return MPN_ERR_TOOLONG; + } + *end++ = '.'; /************* was '/' *************/ + *end = '\0'; + Trace((stderr, "buildpath now = [%s]\n", FnFilter1(buildpath))); + return MPN_OK; + + } /* end if (FUNCTION == APPEND_DIR) */ + +/*--------------------------------------------------------------------------- + GETPATH: copy full path to the string pointed at by pathcomp, and free + buildpath. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == GETPATH) { + strcpy(pathcomp, buildpath); + Trace((stderr, "getting and freeing path [%s]\n", + FnFilter1(pathcomp))); + free(buildpath); + buildpath = end = (char *)NULL; + return MPN_OK; + } + +/*--------------------------------------------------------------------------- + APPEND_NAME: assume the path component is the filename; append it and + return without checking for existence. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == APPEND_NAME) { +#ifdef SHORT_NAMES + char *old_end = end; +#endif + + Trace((stderr, "appending filename [%s]\n", FnFilter1(pathcomp))); + while ((*end = *pathcomp++) != '\0') { + ++end; +#ifdef SHORT_NAMES /* truncate name at 14 characters, typically */ + if ((end-old_end) > FILENAME_MAX) /* GRR: proper constant? */ + *(end = old_end + FILENAME_MAX) = '\0'; +#endif + if ((end-buildpath) >= FILNAMSIZ) { + *--end = '\0'; + Info(slide, 0x201, ((char *)slide, + "checkdir warning: path too long; truncating\n\ + %s\n -> %s\n", + FnFilter1(G.filename), FnFilter2(buildpath))); + return MPN_INF_TRUNC; /* filename truncated */ + } + } + Trace((stderr, "buildpath now = [%s]\n", FnFilter1(buildpath))); + /* could check for existence here, prompt for new name... */ + return MPN_OK; + } + +/*--------------------------------------------------------------------------- + INIT: allocate and initialize buffer space for the file currently being + extracted. If file was renamed with an absolute path, don't prepend the + extract-to path. + ---------------------------------------------------------------------------*/ + +/* GRR: for VMS and TOPS-20, add up to 13 to strlen */ + + if (FUNCTION == INIT) { + Trace((stderr, "initializing buildpath to ")); + if ((buildpath = (char *)malloc(strlen(G.filename)+rootlen+1)) + == (char *)NULL) + return MPN_NOMEM; + if ((rootlen > 0) && !renamed_fullpath) { + strcpy(buildpath, rootpath); + end = buildpath + rootlen; + } else { + *buildpath = '\0'; + end = buildpath; + } + Trace((stderr, "[%s]\n", FnFilter1(buildpath))); + return MPN_OK; + } + +/*--------------------------------------------------------------------------- + ROOT: if appropriate, store the path in rootpath and create it if + necessary; else assume it's a zipfile member and return. This path + segment gets used in extracting all members from every zipfile specified + on the command line. + ---------------------------------------------------------------------------*/ + +#if (!defined(SFX) || defined(SFX_EXDIR)) + if (FUNCTION == ROOT) { + Trace((stderr, "initializing root path to [%s]\n", + FnFilter1(pathcomp))); + if (pathcomp == (char *)NULL) { + rootlen = 0; + return MPN_OK; + } + if (rootlen > 0) /* rootpath was already set, nothing to do */ + return MPN_OK; + if ((rootlen = strlen(pathcomp)) > 0) { + char *tmproot; + + if ((tmproot = (char *)malloc(rootlen+2)) == (char *)NULL) { + rootlen = 0; + return MPN_NOMEM; + } + strcpy(tmproot, pathcomp); + if (tmproot[rootlen-1] == '.') { /****** was '/' ********/ + tmproot[--rootlen] = '\0'; + } + if (rootlen > 0 && (SSTAT(tmproot, &G.statbuf) || + !S_ISDIR(G.statbuf.st_mode))) + { /* path does not exist */ + if (!G.create_dirs /* || isshexp(tmproot) */ ) { + free(tmproot); + rootlen = 0; + /* skip (or treat as stored file) */ + return MPN_INF_SKIP; + } + /* create the directory (could add loop here scanning tmproot + * to create more than one level, but why really necessary?) */ + if (mkdir(tmproot, 0777) == -1) { + Info(slide, 1, ((char *)slide, + "checkdir: cannot create extraction directory: %s\n", + FnFilter1(tmproot))); + free(tmproot); + rootlen = 0; + /* path didn't exist, tried to create, and failed: */ + /* file exists, or 2+ subdir levels required */ + return MPN_ERR_SKIP; + } + } + tmproot[rootlen++] = '.'; /*********** was '/' *************/ + tmproot[rootlen] = '\0'; + if ((rootpath = (char *)realloc(tmproot, rootlen+1)) == NULL) { + free(tmproot); + rootlen = 0; + return MPN_NOMEM; + } + Trace((stderr, "rootpath now = [%s]\n", FnFilter1(rootpath))); + } + return MPN_OK; + } +#endif /* !SFX || SFX_EXDIR */ + +/*--------------------------------------------------------------------------- + END: free rootpath, immediately prior to program exit. + ---------------------------------------------------------------------------*/ + + if (FUNCTION == END) { + Trace((stderr, "freeing rootpath\n")); + if (rootlen > 0) { + free(rootpath); + rootlen = 0; + } + return MPN_OK; + } + + return MPN_INVALID; /* should never reach */ + +} /* end function checkdir() */ + + + + + +/********************/ +/* Function mkdir() */ +/********************/ + +int mkdir(path, mode) + const char *path; + int mode; /* ignored */ +/* + * returns: 0 - successful + * -1 - failed (errno not set, however) + */ +{ + return (SWI_OS_File_8((char *)path) == NULL)? 0 : -1; +} + + + + +/*********************************/ +/* extra_field-related functions */ +/*********************************/ + +static void setRISCOSexfield(ZCONST char *path, ZCONST void *ef_spark) +{ + if (ef_spark!=NULL) { + extra_block *block=(extra_block *)ef_spark; + SWI_OS_File_1((char *)path,block->loadaddr,block->execaddr,block->attr); + } +} + +#ifdef DEBUG +static void printRISCOSexfield(int isdir, ZCONST void *extra_field) +{ + extra_block *block=(extra_block *)extra_field; + printf("\n This file has RISC OS file informations in the local extra field.\n"); + + if (isdir) { +/* I prefer not to print this string... should change later... */ +/* printf(" The file is a directory.\n");*/ + } else if ((block->loadaddr & 0xFFF00000) != 0xFFF00000) { + printf(" Load address: %.8X\n",block->loadaddr); + printf(" Exec address: %.8X\n",block->execaddr); + } else { + /************* should change this to use OS_FSControl 18 to get filetype string ************/ + char tmpstr[16]; + char ftypestr[32]; + int flen; + sprintf(tmpstr,"File$Type_%03x",(block->loadaddr & 0x000FFF00) >> 8); + if (SWI_OS_ReadVarVal(tmpstr,ftypestr,32,&flen)==NULL) { + ftypestr[flen]=0; + printf(" Filetype: %s (&%.3X)\n",ftypestr,(block->loadaddr & 0x000FFF00) >> 8); + } else { + printf(" Filetype: &%.3X\n",(block->loadaddr & 0x000FFF00) >> 8); + } + } + printf(" Access: "); + if (block->attr & (1<<3)) + printf("L"); + if (block->attr & (1<<0)) + printf("W"); + if (block->attr & (1<<1)) + printf("R"); + printf("/"); + if (block->attr & (1<<4)) + printf("w"); + if (block->attr & (1<<5)) + printf("r"); + printf("\n\n"); +} +#endif /* DEBUG */ + + +/**********************************************/ +/* internal help function for time conversion */ +/**********************************************/ +static int uxtime2acornftime(unsigned *pexadr, unsigned *pldadr, time_t ut) +{ + unsigned timlo; /* 3 lower bytes of acorn file-time plus carry byte */ + unsigned timhi; /* 2 high bytes of acorn file-time */ + + timlo = ((unsigned)ut & 0x00ffffffU) * 100 + 0x00996a00U; + timhi = ((unsigned)ut >> 24); + timhi = timhi * 100 + 0x0000336eU + (timlo >> 24); + if (timhi & 0xffff0000U) + return 1; /* calculation overflow, do not change time */ + + /* insert the five time bytes into loadaddr and execaddr variables */ + *pexadr = (timlo & 0x00ffffffU) | ((timhi & 0x000000ffU) << 24); + *pldadr = (*pldadr & 0xffffff00U) | ((timhi >> 8) & 0x000000ffU); + + return 0; /* subject to future extension to signal overflow */ +} + + +/****************************/ +/* Function close_outfile() */ +/****************************/ + +void close_outfile(__G) + __GDEF +{ + zvoid *spark_ef; + + fclose(G.outfile); + + if ((spark_ef = getRISCOSexfield(G.extra_field, G.lrec.extra_field_length)) + != NULL) { + setRISCOSexfield(G.filename, spark_ef); + } else { + unsigned int loadaddr, execaddr; + int attr; + int mode=G.pInfo->file_attr&0xffff; /* chmod equivalent mode */ + + time_t m_time; +#ifdef USE_EF_UT_TIME + iztimes z_utime; +#endif + + /* skip restoring time stamps on user's request */ + if (uO.D_flag <= 1) { +#ifdef USE_EF_UT_TIME + if (G.extra_field && +#ifdef IZ_CHECK_TZ + G.tz_is_valid && +#endif + (ef_scan_for_izux(G.extra_field, G.lrec.extra_field_length, 0, + G.lrec.last_mod_dos_datetime, &z_utime, NULL) + & EB_UT_FL_MTIME)) + { + TTrace((stderr, "close_outfile: Unix e.f. modif. time = %ld\n", + z_utime.mtime)); + m_time = z_utime.mtime; + } else +#endif /* USE_EF_UT_TIME */ + m_time = dos_to_unix_time(G.lrec.last_mod_dos_datetime); + } + + /* set the file's time-stamp and attributes */ + SWI_OS_File_5(G.filename, NULL, &loadaddr, NULL, NULL, &attr); + + if (uO.D_flag <= 1) + /* set the file's modification time */ + uxtime2acornftime(&execaddr, &loadaddr, m_time); + + loadaddr = (loadaddr & 0xfff000ffU) | + ((G.pInfo->file_attr&0xfff00000) >> 12); + + attr=(attr&0xffffff00) | ((mode&0400) >> 8) | ((mode&0200) >> 6) | + ((mode&0004) << 2) | ((mode&0002) << 4); + + SWI_OS_File_1(G.filename, loadaddr, execaddr, attr); + } + +} /* end function close_outfile() */ + + + + +#ifdef TIMESTAMP + +/***************************/ +/* Function stamp_file() */ +/***************************/ + +int stamp_file(fname, modtime) + ZCONST char *fname; + time_t modtime; +{ + unsigned int loadaddr, execaddr; + int attr; + + /* set the file's modification time */ + if (SWI_OS_File_5((char *)fname, NULL, &loadaddr, NULL, NULL, &attr) + != NULL) + return -1; + + if (uxtime2acornftime(&execaddr, &loadaddr, modtime) != 0) + return -1; + + return (SWI_OS_File_1((char *)fname, loadaddr, execaddr, attr) == NULL) ? + 0 : -1; + +} /* end function stamp_file() */ + +#endif /* TIMESTAMP */ + + + + +#ifndef SFX + +/************************/ +/* Function version() */ +/************************/ + +void version(__G) + __GDEF +{ + sprintf((char *)slide, LoadFarString(CompiledWith), +#ifdef __GNUC__ + "gcc ", __VERSION__, +#else +# ifdef __CC_NORCROFT + "Norcroft ", "cc", +# else + "cc", "", +# endif +#endif + + "RISC OS", + + " (Acorn Computers Ltd)", + +#ifdef __DATE__ + " on ", __DATE__ +#else + "", "" +#endif + ); + + (*G.message)((zvoid *)&G, slide, (ulg)strlen((char *)slide), 0); + +} /* end function version() */ + +#endif /* !SFX */ diff --git a/acorn/makefile b/acorn/makefile new file mode 100644 index 0000000..bdda29d --- /dev/null +++ b/acorn/makefile @@ -0,0 +1,128 @@ +# Makefile for UnZip, UnZipSFX, ZipInfo and fUnZip (5.53 or later) +# last modified: 25 Dec 2006 + +# add -g to CC to debug +# add -d to BIND to debug +CC = cc +BIND = link +AS = $(CC) -c +ASM = objasm +SQUEEZE = squeeze -v +E = + +# flags +# CFLAGS flags for C compile +# LFLAGS1 flags after output file spec, before obj file list +# LFLAGS2 flags after obj file list (libraries, etc) +# +LIB = +CBASE = -throwback -wn -DNO_STRNICMP +CFLAGS = $(CBASE) -IC:,@. +ASMFLAGS = -Throwback -Stamp -NoCache -CloseExec -quit +LFLAGS1 = +LFLAGS2 = $(LIB) C:o.Stubs + +# object file lists +OBJS1 = unzip.o crc32.o crypt.o envargs.o explode.o +OBJS2 = extract.o fileio.o globals.o inflate.o list.o match.o +OBJS3 = process.o ttyio.o ubz2err.o unreduce.o unshrink.o zipinfo.o +OBJS = $(OBJS1) $(OBJS2) $(OBJS3) riscos.o swiven.o acorn.o +OBJF = funzip.o crc32.o cryptf.o globalsf.o inflatef.o ttyiof.o \ + riscos.o swiven.o +OBJX = unzipsfx.o crc32.o crypt_.o extract_.o fileio_.o globals.o \ + inflate.o match.o process_.o ttyio.o ubz2err_.o \ + acorn_.o swiven.o riscos_.o + +UNZIP_H = unzip.h unzpriv.h globals.h acorn/riscos.h acorn/swiven.h + +all: unzip funzip unzipsfx + + +install: unzip funzip unzipsfx + $(SQUEEZE) unzip %.unzip + $(SQUEEZE) funzip %.funzip + $(SQUEEZE) unzipsfx unzipsfx + copy %.unzip %.zipinfo ~CVF + +# suffix rules +.SUFFIXES: .o .c +.c.o: + $(CC) $(CFLAGS) -c $< +.s.o: + $(ASM) $(ASMFLAGS) -from @*.s -to @*.o + +# rules for unzip and funzip +crc32.o: crc32.c $(UNZIP_H) zip.h crc32.h +crypt.o: crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h +envargs.o: envargs.c $(UNZIP_H) +explode.o: explode.c $(UNZIP_H) +extract.o: extract.c $(UNZIP_H) crc32.h crypt.h +fileio.o: fileio.c $(UNZIP_H) crc32.h crypt.h ttyio.h ebcdic.h +funzip.o: funzip.c $(UNZIP_H) crc32.h crypt.h ttyio.h +globals.o: globals.c $(UNZIP_H) +inflate.o: inflate.c inflate.h $(UNZIP_H) +list.o: list.c $(UNZIP_H) +match.o: match.c $(UNZIP_H) +process.o: process.c $(UNZIP_H) crc32.h +ttyio.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h +ubz2err.o: ubz2err.c $(UNZIP_H) +unreduce.o: unreduce.c $(UNZIP_H) +unshrink.o: unshrink.c $(UNZIP_H) +unzip.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h +zipinfo.o: zipinfo.c $(UNZIP_H) + +crypt_.o: crypt.c $(UNZIP_H) zip.h crypt.h crc32.h ttyio.h + $(CC) $(CFLAGS) -DSFX -c c.crypt -o o.crypt_ +extract_.o: extract.c $(UNZIP_H) crc32.h crypt.h + $(CC) $(CFLAGS) -DSFX -c c.extract -o o.extract_ +fileio_.o: fileio.c $(UNZIP_H) crc32.h crypt.h + $(CC) $(CFLAGS) -DSFX -c c.fileio -o o.fileio_ +globals_.o: globals.c $(UNZIP_H) + $(CC) $(CFLAGS) -DFUNZIP -c c.globals -o o.globals_ +inflate_.o: inflate.c inflate.h $(UNZIP_H) crypt.h + $(CC) $(CFLAGS) -DFUNZIP -c c.inflate -o o.inflate_ +process_.o: process.c $(UNZIP_H) crc32.h + $(CC) $(CFLAGS) -DSFX -c c.process -o o.process_ +ttyio_.o: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h + $(CC) $(CFLAGS) -DFUNZIP -c c.ttyio -o o.ttyio_ +ubz2err_.o: ubz2err.c $(UNZIP_H) + $(CC) $(CFLAGS) -DSFX -c c.ubz2err -o o.ubz2err_ + +unzipsfx.o: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h + $(CC) $(CFLAGS) -DSFX -c c.unzip -o o.unzipsfx + +o.cryptf: c.crypt $(UNZIP_H) h.zip h.crypt h.crc32 h.ttyio + $(CC) $(CFLAGS) -DFUNZIP -c c.crypt -o o.cryptf +o.globalsf: c.globals $(UNZIP_H) + $(CC) $(CFLAGS) -DFUNZIP -c c.globals -o o.globalsf +o.inflatef: c.inflate h.inflate $(UNZIP_H) h.crypt + $(CC) $(CFLAGS) -DFUNZIP -c c.inflate -o o.inflatef +o.ttyiof: c.ttyio $(UNZIP_H) h.zip h.crypt h.ttyio + $(CC) $(CFLAGS) -DFUNZIP -c c.ttyio -o o.ttyiof + +acorn.o: acorn/acorn.c $(UNZIP_H) + $(CC) $(CFLAGS) -c acorn/acorn.c +acorn_.o: acorn/acorn.c $(UNZIP_H) + $(CC) $(CFLAGS) -c -DSFX -DSFX_EXDIR -o acorn_.o acorn/acorn.c + +riscos.o: acorn/riscos.c $(UNZIP_H) + $(CC) $(CFLAGS) -c acorn/riscos.c +riscos_.o: acorn/riscos.c $(UNZIP_H) + $(CC) $(CFLAGS) -c -DSFX -DSFX_EXDIR -o riscos_.o acorn/riscos.c + +swiven.o: acorn/swiven.s + $(ASM) $(ASMFLAGS) -from acorn.s.swiven -to o.swiven + +unzip: $(OBJS) + $(BIND) -o unzip$(E) $(LFLAGS1) $(OBJS) $(LFLAGS2) +funzip: $(OBJF) + $(BIND) -o funzip$(E) $(LFLAGS1) $(OBJF) $(LFLAGS2) +unzipsfx: $(OBJX) + $(BIND) -o unzipsfx$(E) $(LFLAGS1) $(OBJX) $(LFLAGS2) + +clean: ;remove unzip; remove funzip; + remove zipinfo; remove unzipsfx; + create o.!fake! 0 + wipe o.* ~cf + +# end of Makefile diff --git a/acorn/riscos.c b/acorn/riscos.c new file mode 100644 index 0000000..c640083 --- /dev/null +++ b/acorn/riscos.c @@ -0,0 +1,364 @@ +/* + Copyright (c) 1990-2002 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2000-Apr-09 or later + (the contents of which are also included in unzip.h) for terms of use. + If, for some reason, all these files are missing, the Info-ZIP license + also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html +*/ +/* riscos.c */ + +#include +#include +#include + +/* #define NO_UNZIPH_STUFF */ +#define UNZIP_INTERNAL +#include "unzip.h" +#include "riscos.h" + +#define MAXEXT 16 + +char *exts2swap = NULL; /* Extensions to swap (actually, directory names) */ + +int stat(char *filename,struct stat *res) +{ + int attr; /* object attributes */ + unsigned int load; /* load address */ + unsigned int exec; /* exec address */ + int type; /* type: 0 not found, 1 file, 2 dir, 3 image */ + + if (!res) + return -1; + + if (SWI_OS_File_5(filename,&type,&load,&exec,(int *)&res->st_size,&attr)!=NULL) + return -1; + + if (type==0) + return -1; + + res->st_dev=0; + res->st_ino=0; + res->st_nlink=0; + res->st_uid=1; + res->st_gid=1; + res->st_rdev=0; + res->st_blksize=1024; + + res->st_mode = ((attr & 0001) << 8) | ((attr & 0002) << 6) | + ((attr & 0020) >> 2) | ((attr & 0040) >> 4); + + switch (type) { + case 1: /* File */ + res->st_mode |= S_IFREG; + break; + case 2: /* Directory */ + res->st_mode |= S_IFDIR | 0700; + break; + case 3: /* Image file */ + if (uO.scanimage) + res->st_mode |= S_IFDIR | 0700; + else + res->st_mode |= S_IFREG; + break; + } + + if ((((unsigned int) load) >> 20) == 0xfff) { /* date stamped file */ + register unsigned int t1, t2, tc; + + t1 = (unsigned int) (exec); + t2 = (unsigned int) (load & 0xff); + + tc = 0x6e996a00U; + if (t1 < tc) + t2--; + t1 -= tc; + t2 -= 0x33; /* 00:00:00 Jan. 1 1970 = 0x336e996a00 */ + + t1 = (t1 / 100) + (t2 * 42949673U); /* 0x100000000 / 100 = 42949672.96 */ + t1 -= (t2 / 25); /* compensate for .04 error */ + + res->st_atime = res->st_mtime = res->st_ctime = t1; + } + else + res->st_atime = res->st_mtime = res->st_ctime = 0; + + return 0; +} + +#ifndef SFX + +DIR *opendir(char *dirname) +{ + DIR *thisdir; + int type; + int attr; + os_error *er; + + thisdir=(DIR *)malloc(sizeof(DIR)); + if (thisdir==NULL) + return NULL; + + thisdir->dirname=(char *)malloc(strlen(dirname)+1); + if (thisdir->dirname==NULL) { + free(thisdir); + return NULL; + } + + strcpy(thisdir->dirname,dirname); + if (thisdir->dirname[strlen(thisdir->dirname)-1]=='.') + thisdir->dirname[strlen(thisdir->dirname)-1]=0; + + if (er=SWI_OS_File_5(thisdir->dirname,&type,NULL,NULL,NULL,&attr),er!=NULL || + type<=1 || (type==3 && !uO.scanimage)) + { + free(thisdir->dirname); + free(thisdir); + return NULL; + } + + thisdir->buf=malloc(DIR_BUFSIZE); + if (thisdir->buf==NULL) { + free(thisdir->dirname); + free(thisdir); + return NULL; + } + + thisdir->size=DIR_BUFSIZE; + thisdir->offset=0; + thisdir->read=0; + + return thisdir; +} + +struct dirent *readdir(DIR *d) +{ + static struct dirent dent; + + if (d->read==0) { /* no more objects read in the buffer */ + if (d->offset==-1) { /* no more objects to read */ + return NULL; + } + + d->read=255; + if (SWI_OS_GBPB_9(d->dirname,d->buf,&d->read,&d->offset,DIR_BUFSIZE,NULL)!=NULL) + return NULL; + + if (d->read==0) { + d->offset=-1; + return NULL; + } + d->read--; + d->act=(char *)d->buf; + } + else { /* some object is ready in buffer */ + d->read--; + d->act=(char *)(d->act+strlen(d->act)+1); + } + + strcpy(dent.d_name,d->act); + dent.d_namlen=strlen(dent.d_name); + + /* If we're returning the last item, check if there are any more. + * If there are, nothing will happen; if not, then d->offset = -1 */ + if (!d->read) + SWI_OS_GBPB_9(d->dirname,d->buf,&d->read,&d->offset,0,NULL); + + return &dent; +} + +void closedir(DIR *d) +{ + if (d->buf!=NULL) + free(d->buf); + if (d->dirname!=NULL) + free(d->dirname); + free(d); +} + +int unlink(f) +char *f; /* file to delete */ +/* Delete the file *f, returning non-zero on failure. */ +{ + os_error *er; + char canon[256]; + int size=255; + + er=SWI_OS_FSControl_37(f,canon,&size); + if (er==NULL) { + er=SWI_OS_FSControl_27(canon,0x100); + } + else { + er=SWI_OS_FSControl_27(f,0x100); + } + return (int)er; +} + +int rmdir(char *d) +{ + int objtype; + char *s; + int len; + + len = strlen(d); + if ((s = malloc(len + 1)) == NULL) + return -1; + + strcpy(s,d); + if (s[len-1]=='.') + s[len-1]=0; + + if (SWI_OS_File_5(s,&objtype,NULL,NULL,NULL,NULL)!=NULL) { + free(s); + return -1; + } + if (objtype<2 || (!uO.scanimage && objtype==3)) { +/* this is a file or it doesn't exist */ + free(s); + return -1; + } + if (SWI_OS_File_6(s)!=NULL) { + free(s); + return -1; + } + free(s); + return 0; +} + +#endif /* !SFX */ + +int chmod(char *file, int mode) +{ +/*************** NOT YET IMPLEMENTED!!!!!! ******************/ +/* I don't know if this will be needed or not... */ + file=file; + mode=mode; + return 0; +} + +void setfiletype(char *fname,int ftype) +{ + char str[256]; + sprintf(str,"SetType %s &%3.3X",fname,ftype); + SWI_OS_CLI(str); +} + +void getRISCOSexts(char *envstr) +{ + char *envptr; /* value returned by getenv */ + + envptr = getenv(envstr); + if (envptr == NULL || *envptr == 0) return; + + exts2swap=malloc(1+strlen(envptr)); + if (exts2swap == NULL) + return; + + strcpy(exts2swap, envptr); +} + +int checkext(char *suff) +{ + register char *extptr = exts2swap ? exts2swap : ""; + register char *suffptr; + register int e,s; + + while(*extptr) { + suffptr=suff; + e=*extptr; s=*suffptr; + while (e && e!=':' && s && s!='.' && s!='/' && e==s) { + e=*++extptr; s=*++suffptr; + } + if (e==':') e=0; + if (s=='.' || s=='/') s=0; + if (!e && !s) { + return 1; + } + while(*extptr!=':' && *extptr!='\0') /* skip to next extension */ + extptr++; + if (*extptr!='\0') + extptr++; + } + return 0; +} + +void swapext(char *name, char *exptr) +{ + char ext[MAXEXT]; + register char *p1=exptr+1; + register char *p2=ext; + int extchar=*exptr; + + while(*p1 && *p1!='.' && *p1!='/') + *p2++=*p1++; + *p2=0; + p2=exptr-1; + p1--; + while(p2 >= name) + *p1--=*p2--; + p1=name; + p2=ext; + while(*p2) + *p1++=*p2++; + *p1=(extchar=='/'?'.':'/'); +} + +void remove_prefix(void) +{ + SWI_DDEUtils_Prefix(NULL); +} + +void set_prefix(void) +{ + char *pref; + int size=0; + + if (SWI_OS_FSControl_37("@",pref,&size)!=NULL) + return; + + size=1-size; + + if (pref=malloc(size),pref!=NULL) { + if (SWI_OS_FSControl_37("@",pref,&size)!=NULL) { + free(pref); + return; + } + + if (SWI_DDEUtils_Prefix(pref)==NULL) { + atexit(remove_prefix); + } + + free(pref); + } +} + +#ifdef localtime +# undef localtime +#endif + +#ifdef gmtime +# undef gmtime +#endif + +/* Acorn's implementation of localtime() and gmtime() + * doesn't consider the timezone offset, so we have to + * add it before calling the library functions + */ + +struct tm *riscos_localtime(const time_t *timer) +{ + time_t localt=*timer; + + localt+=SWI_Read_Timezone()/100; + + return localtime(&localt); +} + +struct tm *riscos_gmtime(const time_t *timer) +{ + time_t localt=*timer; + + localt+=SWI_Read_Timezone()/100; + + return gmtime(&localt); +} diff --git a/acorn/riscos.h b/acorn/riscos.h new file mode 100644 index 0000000..6aa8c33 --- /dev/null +++ b/acorn/riscos.h @@ -0,0 +1,136 @@ +/* + Copyright (c) 1990-2001 Info-ZIP. All rights reserved. + + See the accompanying file LICENSE, version 2000-Apr-09 or later + (the contents of which are also included in unzip.h) for terms of use. + If, for some reason, all these files are missing, the Info-ZIP license + also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html +*/ +/* riscos.h */ + +#ifndef __riscos_h +#define __riscos_h + +#include + +typedef struct { + int errnum; + char errmess[252]; +} os_error; + +#ifndef __swiven_h +# include "swiven.h" +#endif + +#define MAXPATHLEN 256 +#define MAXFILENAMELEN 64 /* should be 11 for ADFS, 13 for DOS, 64 seems a sensible value... */ +#define DIR_BUFSIZE 1024 /* this should be enough to read a whole E-Format directory */ + +struct stat { + unsigned int st_dev; + int st_ino; + unsigned int st_mode; + int st_nlink; + unsigned short st_uid; + unsigned short st_gid; + unsigned int st_rdev; + unsigned int st_size; + unsigned int st_blksize; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; +}; + +typedef struct { + char *dirname; + void *buf; + int size; + char *act; + int offset; + int read; +} DIR; + + +struct dirent { + unsigned int d_off; /* offset of next disk directory entry */ + int d_fileno; /* file number of entry */ + size_t d_reclen; /* length of this record */ + size_t d_namlen; /* length of d_name */ + char d_name[MAXFILENAMELEN]; /* name */ +}; + +typedef struct { + unsigned int load_addr; + unsigned int exec_addr; + int lenght; + int attrib; + int objtype; + char name[13]; +} riscos_direntry; + +typedef struct { + short ID; + short size; + int ID_2; + unsigned int loadaddr; + unsigned int execaddr; + int attr; + int zero; +} extra_block; + + +#define S_IFMT 0770000 + +#define S_IFDIR 0040000 +#define S_IFREG 0100000 /* 0200000 in UnixLib !?!?!?!? */ + +#ifndef S_IEXEC +# define S_IEXEC 0000100 +# define S_IWRITE 0000200 +# define S_IREAD 0000400 +#endif + +#ifndef NO_UNZIPH_STUFF +# include +# if (!defined(HAVE_STRNICMP) & !defined(NO_STRNICMP)) +# define NO_STRNICMP +# endif +# ifndef DATE_FORMAT +# define DATE_FORMAT DF_DMY +# endif +# define lenEOL 1 +# define PutNativeEOL *q++ = native(LF); +# define USE_STRM_INPUT +# define USE_FWRITE +# define PIPE_ERROR (errno == 9999) /* always false */ +# define isatty(x) (TRUE) /* used in funzip.c to find if stdin redirected: + should find a better way, now just work as if stdin never redirected */ +# define USE_EF_UT_TIME +# if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP)) +# define TIMESTAMP +# endif +# define localtime riscos_localtime +# define gmtime riscos_gmtime +#endif /* !NO_UNZIPH_STUFF */ + +#define _raw_getc() SWI_OS_ReadC() + +extern char *exts2swap; /* Extensions to swap */ + +int stat(char *filename,struct stat *res); +DIR *opendir(char *dirname); +struct dirent *readdir(DIR *d); +void closedir(DIR *d); +int unlink(char *f); +int rmdir(char *d); +int chmod(char *file, int mode); +void setfiletype(char *fname,int ftype); +void getRISCOSexts(char *envstr); +int checkext(char *suff); +void swapext(char *name, char *exptr); +void remove_prefix(void); +void set_prefix(void); +struct tm *riscos_localtime(const time_t *timer); +struct tm *riscos_gmtime(const time_t *timer); + +#endif /* !__riscos_h */ diff --git a/acorn/srcrename b/acorn/srcrename new file mode 100644 index 0000000000000000000000000000000000000000..936a408e0960a4cc0168820e575b91afeee58726 GIT binary patch literal 4719 zcmeHLc~lg~y8misWV2^s5s@h3uDDHHP%sI&#tqbf8xETo&7Y>S&UXg z42hbgt8`{q)R}6RiEHAD5n~b+hsC&XRRk3jq+bns-+A}k^ZtB)ymM}!>aO~}`qp24 z)qT3u8mIv%sBqsG)llOLaIZQ5AV&xPdSyQ&ga4Jwse%f8cbah1c~ftr(W%_eE$Y+7-h z9Qu<5Ey%lc1V4C;OLpTVmE#o;SsqKrOmU1$W^YBa$rI)AN5!$n#f7pMwFu7|D6T#( z9;hMx7vZp@Vq`!3K^8qYmder6;*Ab@0xkPka>tNP2QMbET}ga4VO1>7F3O|n+;p6o zi&wlRjTlEr1UnwVCT56HpOEjn(_s!;|8CyaKk%ia?nr);a6HA63MS8{pN}T{O4$88 zQWZf)+T{^r$<8lW2aP<^E^Z!A_Wr~^zDp9uvl}A0;v)G6Xy4bx4Wp&d&8%bx%M51< z!IimN%kVZE_O#(Y>T%Up%*n#dSXG2G%UF6U8?unZb|LlekUhiM;0$r^)kxo3_c6?ZI@=5}cYz_^N~sA;o(M{ecz#$ciLZNSJjuv)I_ILbh{7URQ=4 z-ZvU?%Ts*X1K+8|vWS0E;pudB^`FT;X2tC z-@bs)V+{ADFMP!PU*c{D@xw>>YBT=zTYT*V_VSVLd5Wpt(!vZncnO)-nJk||>Ke%G z)8fm0aj%DDRE+$=e(}{cY?@s>GoE&jl_nn&2Rg+i6CC}17KabPhsQ`m`{Af?ykk4F zPohgdapeC4@2bFcpJUY?Ty~VMmgI52h^v02o96n5^|f|DElNqHp)bsq(l6(*)qTl;C#>C@>_}HSC&jHkBNGo;C8ycN zviGE%mGp~vwmR&&jH3r#{*g4|Q}SU1du0qc7Qy=1#mt$Gv}eWNk!+eH`}AQGm>Bgg zxfxFE@6!dZIHI4|y-3`+y-o+eMdE|W)YnMVaxy%d zPFPD{8co(kuv9bUFRTtjNM^b?qAw1QB;lXZ&nlU{oUDw%3&PpF)|jUSk+;&tm-^zI zO4iFRhG$6O8)@nrZr%1n2!97uj*#r1(Da`8jRiF8P29ULJ_7FcI>irVw6f&%FGA=gYytraHo}YkEU1Ekm9Z3Ss4Ws?~(C>!RbCGnJ5zn7Zs?X(> zCXn|7$igXdK`e<}PG9|ll%1kO_4LAP^hA=J_@^WO1KIQ~iD+>Y_k^HCqA0eP_6nzD(6|jG9y8s;M4ckNT-)+P;PjCnCfBX9X zhw=Xw0Rj2-?h*aEO`kLDBi(|!x!N?HE_t4*IWar!X3}YsQ>W7<{V^!8XJWe~&y4YV zj=y!jf8ZXMj}@Tkk?Ka+umk>F>(7IJ4D3`CfK2094M1rELW23JfDD%Uu_W_uM`5@LU2`45P-2C0_EIZ*auVXVAvZ}VSaG-!9g%=%~M0|%pKqxY%plG zC{Tb;xy#O|T_+()GBulifaOg*g!Hstn&OwVR!zhFX2;Q%<4u>H@g0&Mni`8V9);Rw z>r+q5^@fzwvuuq|EZ$0bo#oC$Yg;IMa6h#pG+p>X(?L|^;>QrX`!PUsOe18d>-H3X zF-hL@Gql9)20%r_5JWYpG~j&gG~AA5g`KabzLmIJKn-~ofsKy^_d z*q$iX+M%G=*t}e>GU(JJG#JX%b?UIk(rU=aEf0ttzJQR5`RQ&IO2EJQqr| z4>OvJn(B+L_*g^lgS?-rWPnPTYKv19@4jC$)_ZPCv5E(IzzS*d+&E|&(*$+(j~$0l zVT?yn@jV#p-2f?v;qfjTa7}=bQK)3fA^1Dy5rD3#8TR-z!k6VQ_J(Qa?gCgteG$wk zP4>S`W{rGtwW%GnmQNIJ8I86aS8M>h6#*RP3~L5hwkn*M=V5!&a16l}sIzi3bSiCk zo#}ToLP5G7$b8-}&|owjN>`_}ywJ-OpRp!c$>e)8LzU9P^G6nC(HV7CCdblt`l)^u zSRe~fRt*&MB?GvluH6$*S9JPb;?eo*<_bC0&YL$+Jw3<&EjQNkUCi^hfwK@oE#T74 zNVDnQp3EP%=1aPj%{DM_0~|Fk=f*}0)arERMysK;@PXpDvf0w8SfC&ubZO08$9m2rHtO@?062NH=d55{1tn0L2`3Q8n~w^4 zVR+o%f-(V?*Q!yWi?0iuEr_}c(I{eK;Hh;t4tZ_mHIaBuJXUgiL({_y+ z*Htk1BLV6B4F-e1p`BK1@DB(yO^?=f6jXxH(JvsRBZ}0H76MFbAncL?Yo_b<+HN7y z{3Q%(YlWf<@)!2b@<6cq@k3tPwOs+0@=rSA#eZJq-cbNQ@w-V=P!;8Wwn_u&dOw&_ z2~oK>eF~yo-nkQ9UfCO58y0P<^nw``UMU5If?=Zzy|v!uGnJnqL>E+fg!10#szSCo zm3;shGF+_ofoYZg00dxKl@CBLf{WE|KGI}YwDw-v{QM!lijOr&$VOoNz@;&+ufD_2 z2as)&3)wbSBI5^@ZXPmBbDtZW{F~32xIHdw3f?Vo>If(2Vah00k_;m!l`d`|K?73T#_-BcOF^Y)D9=N+);rXGI0 z=>gL#cq~j)TTr3R-Qdz>kFWHGgo>d6f1#8W*Y!pZPRCWMTVq;rz18Q){2Ltl+bYg) z^FR40?*=k(nK5fCy!gC2+E&4H@jzv2|?@aJf|+3onk#;