zlib 1.2.3.8
authorMark Adler <madler@alumni.caltech.edu>
Sat, 10 Sep 2011 06:27:17 +0000 (23:27 -0700)
committerMark Adler <madler@alumni.caltech.edu>
Sat, 10 Sep 2011 06:27:17 +0000 (23:27 -0700)
87 files changed:
ChangeLog
INDEX
Makefile.in
README
as400/zlib.inc
configure
contrib/contrib/minizip/ioapi.h [new file with mode: 0644]
contrib/contrib/minizip/iowin32.c [new file with mode: 0644]
contrib/contrib/minizip/iowin32.h [new file with mode: 0644]
contrib/contrib/minizip/miniunz.c [new file with mode: 0644]
contrib/contrib/minizip/minizip.c [new file with mode: 0644]
contrib/contrib/vstudio/vc7/zlibvc.def [new file with mode: 0644]
contrib/contrib/vstudio/vc8/zlibstat.vcproj [new file with mode: 0644]
contrib/contrib/vstudio/vc8/zlibvc.def [new file with mode: 0644]
contrib/contrib/vstudio/vc8/zlibvc.vcproj [new file with mode: 0644]
contrib/dotzlib/DotZLib.build
contrib/dotzlib/DotZLib.chm
contrib/dotzlib/DotZLib/AssemblyInfo.cs
contrib/dotzlib/DotZLib/ChecksumImpl.cs
contrib/dotzlib/DotZLib/CircularBuffer.cs
contrib/dotzlib/DotZLib/CodecBase.cs
contrib/dotzlib/DotZLib/Deflater.cs
contrib/dotzlib/DotZLib/DotZLib.cs
contrib/dotzlib/DotZLib/GZipStream.cs
contrib/dotzlib/DotZLib/Inflater.cs
contrib/dotzlib/DotZLib/UnitTests.cs
contrib/dotzlib/readme.txt
contrib/infback9/inftree9.c
contrib/masmx64/gvmat64.asm
contrib/masmx64/gvmat64.obj [deleted file]
contrib/masmx64/inffas8664.c
contrib/masmx64/inffasx64.asm
contrib/masmx64/inffasx64.obj [deleted file]
contrib/masmx64/readme.txt
contrib/masmx86/bld_ml32.bat
contrib/masmx86/gvmat32.asm
contrib/masmx86/gvmat32.obj [deleted file]
contrib/masmx86/inffas32.asm
contrib/masmx86/inffas32.obj [deleted file]
contrib/minizip/Makefile
contrib/minizip/MiniZip64_Changes.txt
contrib/minizip/MiniZip64_info.txt
contrib/minizip/crypt.h
contrib/minizip/ioapi.c
contrib/minizip/ioapi.h
contrib/minizip/iowin32.c
contrib/minizip/iowin32.h
contrib/minizip/make_vms.com
contrib/minizip/miniunz.c
contrib/minizip/minizip.c
contrib/minizip/mztools.c
contrib/minizip/mztools.h
contrib/minizip/unzip.c
contrib/minizip/unzip.h
contrib/minizip/zconf.h [deleted file]
contrib/minizip/zconf.in.h [deleted file]
contrib/minizip/zip.c
contrib/minizip/zip.h
contrib/puff/puff [deleted file]
contrib/testzlib/testzlib.c
contrib/vstudio/readme.txt
contrib/vstudio/vc7/zlib.rc
deflate.c
examples/enough.c
examples/gzlog.c
gzguts.h
gzio.c
gzlib.c
gzread.c
gzwrite.c
inftrees.c
make_vms.com
minigzip.c
projects/visualc6/example.dsp
projects/visualc6/minigzip.dsp
projects/visualc6/zlib.dsp
qnx/package.qpg
treebuild.xml
watcom/watcom_f.mak
watcom/watcom_l.mak
zconf.h
zconf.in.h
zlib.3
zlib.h
zlib.map
zlib.pc.in
zlib2ansi

index 68305b4d5b80e8710821902691c3faa9125fb4a2..4834321024d657e65c6ef48e63a3aff1d0443f1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,21 @@
 
                 ChangeLog file for zlib
 
+Changes in 1.2.3.8 (13 Feb 2010)
+- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer]
+- Use z_off64_t in gz_zero() and gz_skip() to match state->skip
+- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t)
+- Revert to Makefile.in from 1.2.3.6 (live with the clutter)
+- Fix missing error return in gzflush(), add zlib.h note
+- Add *64 functions to zlib.map [Levin]
+- Fix signed/unsigned comparison in gz_comp()
+- Use SFLAGS when testing shared linking in configure
+- Add --64 option to ./configure to use -m64 with gcc
+- Fix ./configure --help to correctly name options
+- Have make fail if a test fails [Levin]
+- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson]
+- Remove assembler object files from contrib
+
 Changes in 1.2.3.7 (24 Jan 2010)
 - Always gzopen() with O_LARGEFILE if available
 - Fix gzdirect() to work immediately after gzopen() or gzdopen()
@@ -191,7 +206,7 @@ Changes in 1.2.3.1 (16 August 2006)
 - Synchronize FAQ with website
 - Fix compressBound(), was low for some pathological cases [Fearnley]
 - Take into account wrapper variations in deflateBound()
-- Set examples/zpipe.c input and output to binary mode for Windows 
+- Set examples/zpipe.c input and output to binary mode for Windows
 - Update examples/zlib_how.html with new zpipe.c (also web site)
 - Fix some warnings in examples/gzlog.c and examples/zran.c (it seems
   that gcc became pickier in 4.0)
diff --git a/INDEX b/INDEX
index e4c213342de6f0ae49b18091e55b18c6dff7472f..704ded48859d88737639d0a99e0c356485e40918 100644 (file)
--- a/INDEX
+++ b/INDEX
@@ -5,26 +5,26 @@ INDEX           this file
 Makefile.in     template for Unix Makefile
 README          guess what
 configure       configure script for Unix
-make_vms.com   makefile for VMS
-treebuild.xml  XML description of source file dependencies
-zconf.in.h     zconf.h template for configure
-zlib.3         Man page for zlib
-zlib.map       Linux symbol information
-zlib.pc.in     Template for pkg-config descriptor
-zlib2ansi      perl script to convert source files for C++ compilation
+make_vms.com    makefile for VMS
+treebuild.xml   XML description of source file dependencies
+zconf.in.h      zconf.h template for configure
+zlib.3          Man page for zlib
+zlib.map        Linux symbol information
+zlib.pc.in      Template for pkg-config descriptor
+zlib2ansi       perl script to convert source files for C++ compilation
 
 amiga/          makefiles for Amiga SAS C
 as400/          makefiles for IBM AS/400
-doc/           documentation for formats and algorithms
+doc/            documentation for formats and algorithms
 msdos/          makefiles for MSDOS
-nintendods/    makefile for Nintendo DS
-objs/          destination for object files
+nintendods/     makefile for Nintendo DS
+objs/           destination for object files
 old/            makefiles for various architectures and zlib documentation
                 files that have not yet been updated for zlib 1.2.x
-pics/          destination for position-independent-code object files
+pics/           destination for position-independent-code object files
 projects/       projects for various Integrated Development Environments
 qnx/            makefiles for QNX
-watcom/                makefiles for OpenWatcom
+watcom/         makefiles for OpenWatcom
 win32/          makefiles for Windows
 
                 zlib public header files (required for library use):
index 99945a84d0b2ea9e493ff9717a6fc92f62dd00c0..a8d10ba4c9a0f8f61a61acc0c97a1055e8128060 100644 (file)
@@ -32,7 +32,7 @@ CPP=$(CC) -E
 
 STATICLIB=libz.a
 SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.3.7
+SHAREDLIBV=libz.so.1.2.3.8
 SHAREDLIBM=libz.so.1
 LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)
 
@@ -53,15 +53,16 @@ pkgconfigdir = ${libdir}/pkgconfig
 OBJC = adler32.o compress.o crc32.o deflate.o gzclose.o gzio.o gzlib.o gzread.o \
        gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
 
-# to use the asm code: make OBJA=match.o
-OBJA =
+PIC_OBJC = adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzio.lo gzlib.lo gzread.lo \
+       gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo
 
-objdir = objs/
-picdir = pics/
+# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
+OBJA =
+PIC_OBJA =
 
-OBJS = $(addprefix $(objdir), $(OBJC) $(OBJA))
+OBJS = $(OBJC) $(OBJA)
 
-PIC_OBJS = $(addprefix $(picdir), $(OBJC) $(OBJA))
+PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA)
 
 all: static shared
 
@@ -76,12 +77,10 @@ check: test
 test: all teststatic testshared
 
 teststatic: static
-       @echo hello world | ./minigzip | ./minigzip -d || \
-         echo '                *** minigzip test FAILED ***' ; \
-       if ./example; then \
+       @if echo hello world | ./minigzip | ./minigzip -d && ./example; then \
          echo '                *** zlib test OK ***'; \
        else \
-         echo '                *** zlib test FAILED ***'; \
+         echo '                *** zlib test FAILED ***'; false; \
        fi
        -@rm -f foo.gz
 
@@ -90,22 +89,18 @@ testshared: shared
        LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
        DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
        SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
-       echo hello world | ./minigzipsh | ./minigzipsh -d || \
-         echo '                *** minigzip shared test FAILED ***' ; \
-       if ./examplesh; then \
+       if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh; then \
          echo '                *** zlib shared test OK ***'; \
        else \
-         echo '                *** zlib shared test FAILED ***'; \
+         echo '                *** zlib shared test FAILED ***'; false; \
        fi
        -@rm -f foo.gz
 
 test64: all64
-       @echo hello world | ./minigzip64 | ./minigzip64 -d || \
-         echo '                *** minigzip 64-bit test FAILED ***' ; \
-       if ./example64; then \
+       @if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64; then \
          echo '                *** zlib 64-bit test OK ***'; \
        else \
-         echo '                *** zlib 64-bit test FAILED ***'; \
+         echo '                *** zlib 64-bit test FAILED ***'; false; \
        fi
        -@rm -f foo.gz
 
@@ -113,51 +108,55 @@ libz.a: $(OBJS)
        $(AR) $@ $(OBJS)
        -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
 
-objs/match.o: match.S
+match.o: match.S
        $(CPP) match.S > _match.s
-       $(CC) -c -o $@ _match.s
+       $(CC) -c _match.s
+       mv _match.o match.o
        rm -f _match.s
 
-pics/match.o: match.S
+match.lo: match.S
        $(CPP) match.S > _match.s
-       $(CC) -c -o $@ -fPIC _match.s
+       $(CC) -c -fPIC _match.s
+       mv _match.o match.lo
        rm -f _match.s
 
-objs/example64.o: example.c zlib.h zconf.h
+example64.o: example.c zlib.h zconf.h
        $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ example.c
 
-objs/minigzip64.o: minigzip.c zlib.h zconf.h
+minigzip64.o: minigzip.c zlib.h zconf.h
        $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ minigzip.c
 
-$(objdir)%.o: %.c
-       $(CC) $(CFLAGS) -c -o $@ $<
+.SUFFIXES: .lo
 
-$(picdir)%.o: %.c
-       $(CC) $(SFLAGS) -DPIC -c -o $@ $<
+.c.lo:
+       -@if [ ! -d objs ]; then mkdir objs; fi
+       $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $<
+       -@mv objs/$*.o $@
 
 $(SHAREDLIBV): $(PIC_OBJS)
        $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc
        rm -f $(SHAREDLIB) $(SHAREDLIBM)
        ln -s $@ $(SHAREDLIB)
        ln -s $@ $(SHAREDLIBM)
+       -@rmdir objs
 
-example$(EXE): objs/example.o $(STATICLIB)
-       $(CC) $(CFLAGS) -o $@ objs/example.o $(LDFLAGS)
+example$(EXE): example.o $(STATICLIB)
+       $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
 
-minigzip$(EXE): objs/minigzip.o $(STATICLIB)
-       $(CC) $(CFLAGS) -o $@ objs/minigzip.o $(LDFLAGS)
+minigzip$(EXE): minigzip.o $(STATICLIB)
+       $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
 
-examplesh$(EXE): objs/example.o $(SHAREDLIBV)
-       $(CC) $(CFLAGS) -o $@ objs/example.o -L. $(SHAREDLIBV)
+examplesh$(EXE): example.o $(SHAREDLIBV)
+       $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
 
-minigzipsh$(EXE): objs/minigzip.o $(SHAREDLIBV)
-       $(CC) $(CFLAGS) -o $@ objs/minigzip.o -L. $(SHAREDLIBV)
+minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
+       $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
 
-example64$(EXE): objs/example64.o $(STATICLIB)
-       $(CC) $(CFLAGS) -o $@ objs/example64.o $(LDFLAGS)
+example64$(EXE): example64.o $(STATICLIB)
+       $(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS)
 
-minigzip64$(EXE): objs/minigzip64.o $(STATICLIB)
-       $(CC) $(CFLAGS) -o $@ objs/minigzip64.o $(LDFLAGS)
+minigzip64$(EXE): minigzip64.o $(STATICLIB)
+       $(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS)
 
 install-libs: $(LIBS)
        -@if [ ! -d $(DESTDIR)$(exec_prefix)  ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
@@ -196,18 +195,19 @@ uninstall:
 
 mostlyclean: clean
 clean:
-       rm -f $(objdir)* $(picdir)* *~ \
+       rm -f *.o *.lo *~ \
           example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
           example64$(EXE) minigzip64$(EXE) \
           libz.* foo.gz so_locations \
           _match.s maketree contrib/infback9/*.o
+       rm -rf objs
 
 maintainer-clean: distclean
 distclean: clean
        cp -p zconf.in.h zconf.h
        rm -f zlib.pc .DS_Store
        -@printf 'all:\n\t-@echo "Use ./configure first.  Thank you."\n' > Makefile
-       -@ touch -r Makefile.in Makefile objs pics
+       -@touch -r Makefile.in Makefile
 
 tags:
        etags *.[ch]
@@ -226,3 +226,13 @@ infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffi
 inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
 inftrees.o: zutil.h zlib.h zconf.h inftrees.h
 trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
+
+adler32.lo gzio.lo zutil.lo: zutil.h zlib.h zconf.h
+gzclose.lo gzlib.lo gzread.lo gzwrite.lo: zlib.h zconf.h gzguts.h
+compress.lo example.lo minigzip.lo uncompr.lo: zlib.h zconf.h
+crc32.lo: zutil.h zlib.h zconf.h crc32.h
+deflate.lo: deflate.h zutil.h zlib.h zconf.h
+infback.lo inflate.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h
+inffast.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
+inftrees.lo: zutil.h zlib.h zconf.h inftrees.h
+trees.lo: deflate.h zutil.h zlib.h zconf.h trees.h
diff --git a/README b/README
index f8f37f5efdab7f2b67bf26946385f2eed2b30f56..f72a1a4b33d65759741237a8f841038176462ca9 100644 (file)
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
 ZLIB DATA COMPRESSION LIBRARY
 
-zlib 1.2.3.7 is a general purpose data compression library.  All the code is
+zlib 1.2.3.8 is a general purpose data compression library.  All the code is
 thread safe.  The data format used by the zlib library is described by RFCs
 (Request for Comments) 1950 to 1952 in the files
 http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
@@ -33,7 +33,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
 issue of  Dr. Dobb's Journal; a copy of the article is available in
 http://dogma.net/markn/articles/zlibtool/zlibtool.htm
 
-The changes made in version 1.2.3.7 are documented in the file ChangeLog.
+The changes made in version 1.2.3.8 are documented in the file ChangeLog.
 
 Unsupported third party contributions are provided in directory "contrib".
 
index cfcbfc864e6a001a7d3a2cdd4c7166919b2b3031..b5e673b67a90c8b203a3212a9cfa1a5bf5caa0bc 100644 (file)
@@ -1,7 +1,7 @@
       *  ZLIB.INC - Interface to the general purpose compression library
       *
       *  ILE RPG400 version by Patrick Monnerat, DATASPHERE.
-      *  Version 1.2.3.7
+      *  Version 1.2.3.8
       *
       *
       *  WARNING:
@@ -22,8 +22,8 @@
       *
       *  Versioning information.
       *
-     D ZLIB_VERSION    C                   '1.2.3.7'
-     D ZLIB_VERNUM     C                   X'1237'
+     D ZLIB_VERSION    C                   '1.2.3.8'
+     D ZLIB_VERNUM     C                   X'1238'
       *
       *  Other equates.
       *
index 5f0ed6ec1cd620f05cad55d3b824d18cecbe2d83..66ccbbbc1899082796d8be171774c4c785b1b1f1 100755 (executable)
--- a/configure
+++ b/configure
@@ -30,6 +30,7 @@ mandir=${mandir-'${prefix}/share/man'}
 shared_ext='.so'
 shared=1
 zprefix=0
+build64=0
 gcc=0
 old_cc="$CC"
 old_cflags="$CFLAGS"
@@ -39,8 +40,8 @@ do
 case "$1" in
     -h* | --help)
       echo 'usage:'
-      echo '  configure [--shared] [--prefix=PREFIX]  [--exec_prefix=EXPREFIX]'
-      echo '     [--libdir=LIBDIR] [--includedir=INCLUDEDIR] [--zprefix]'
+      echo '  configure [--zprefix] [--prefix=PREFIX]  [--eprefix=EXPREFIX]'
+      echo '    [--static] [--64] [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
         exit 0 ;;
     -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
     -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift ;;
@@ -54,6 +55,7 @@ case "$1" in
     -s* | --shared | --enable-shared) shared=1; shift ;;
     -t | --static) shared=0; shift ;;
     -z* | --zprefix) zprefix=1; shift ;;
+    -6* | --64) build64=1; shift ;;
     --sysconfdir=*) echo "ignored option: --sysconfdir"; shift ;;
     --localstatedir=*) echo "ignored option: --localstatedir"; shift ;;
     *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1 ;;
@@ -78,6 +80,10 @@ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
   CC="$cc"
   SFLAGS="${CFLAGS-"-O3"} -fPIC"
   CFLAGS="${CFLAGS-"-O3"}"
+  if test $build64 -eq 1; then
+    CFLAGS="${CFLAGS} -m64"
+    SFLAGS="${SFLAGS} -m64"
+  fi
   if test "${ZLIBGCCWARN}" = "YES"; then
     CFLAGS="${CFLAGS} -Wall -Wextra -pedantic"
   fi
@@ -191,7 +197,7 @@ if test $shared -eq 1; then
   echo Checking for shared library support...
   # we must test in two steps (cc then ld), required at least on SunOS 4.x
   if test "`($CC -w -c $SFLAGS $test.c) 2>&1`" = "" &&
-     test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
+     test "`($LDSHARED $SFLAGS -o $test$shared_ext $test.o) 2>&1`" = ""; then
     echo Building shared library $SHAREDLIBV with $CC.
   elif test -z "$old_cc" -a -z "$old_cflags"; then
     echo No shared library support.
@@ -199,8 +205,8 @@ if test $shared -eq 1; then
   else
     echo Tested $CC -w -c $SFLAGS $test.c
     $CC -w -c $SFLAGS $test.c
-    echo Tested $LDSHARED -o $test$shared_ext $test.o
-    $LDSHARED -o $test$shared_ext $test.o
+    echo Tested $LDSHARED $SFLAGS -o $test$shared_ext $test.o
+    $LDSHARED $SFLAGS -o $test$shared_ext $test.o
     echo 'No shared library support; try without defining CC and CFLAGS'
     shared=0;
   fi
diff --git a/contrib/contrib/minizip/ioapi.h b/contrib/contrib/minizip/ioapi.h
new file mode 100644 (file)
index 0000000..e0e78ce
--- /dev/null
@@ -0,0 +1,196 @@
+/* ioapi.h -- IO base function header for compress/uncompress .zip
+   part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Modifications for Zip64 support 
+        Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+        For more info read MiniZip_info.txt
+
+        Changes
+
+    Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this)
+    Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux.
+               More if/def section may be needed to support other platforms
+    Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. 
+                         (but you should use iowin32.c for windows instead)
+
+*/
+
+#ifndef _ZLIBIOAPI64_H
+#define _ZLIBIOAPI64_H
+
+#include "zlib.h"
+
+#ifndef _WIN32 
+
+  // Linux needs this to support file operation on files larger then 4+GB
+  // But might need better if/def to select just the platforms that needs them.
+
+       #ifndef __USE_FILE_OFFSET64
+               #define __USE_FILE_OFFSET64
+       #endif
+       #ifndef __USE_LARGEFILE64
+               #define __USE_LARGEFILE64
+       #endif
+       #ifndef _LARGEFILE64_SOURCE
+               #define _LARGEFILE64_SOURCE
+       #endif
+       #ifndef _FILE_OFFSET_BIT
+               #define _FILE_OFFSET_BIT 64
+       #endif
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+
+#ifdef _MSC_VER
+ #define fopen64 fopen
+ #if _MSC_VER >= 1400
+  #define ftello64 _ftelli64
+  #define fseeko64 _fseeki64
+ #else // old MSC
+  #define ftello64 ftell
+  #define fseeko64 fseek
+ #endif
+#endif
+
+/*
+#ifndef ZPOS64_T
+  #ifdef _WIN32
+               #define ZPOS64_T fpos_t
+  #else
+    #include <stdint.h>        
+    #define ZPOS64_T uint64_t
+  #endif
+#endif
+*/
+
+#ifdef HAVE_MINIZIP64_CONF_H
+#include "mz64conf.h"
+#endif
+
+/* a type choosen by DEFINE */
+#ifdef HAVE_64BIT_INT_CUSTOM
+typedef  64BIT_INT_CUSTOM_TYPE ZPOS64_T;
+#else
+#ifdef HAS_STDINT_H
+#include "stdint.h"
+typedef uint64_t ZPOS64_T;
+#else
+
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+typedef unsigned __int64 ZPOS64_T;
+#else
+typedef unsigned long long int ZPOS64_T;
+#endif
+#endif
+#endif
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define ZLIB_FILEFUNC_SEEK_CUR (1)
+#define ZLIB_FILEFUNC_SEEK_END (2)
+#define ZLIB_FILEFUNC_SEEK_SET (0)
+
+#define ZLIB_FILEFUNC_MODE_READ      (1)
+#define ZLIB_FILEFUNC_MODE_WRITE     (2)
+#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
+
+#define ZLIB_FILEFUNC_MODE_EXISTING (4)
+#define ZLIB_FILEFUNC_MODE_CREATE   (8)
+
+
+#ifndef ZCALLBACK
+ #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK)
+   #define ZCALLBACK CALLBACK
+ #else
+   #define ZCALLBACK
+ #endif
+#endif
+
+
+
+
+typedef voidpf   (ZCALLBACK *open_file_func)      OF((voidpf opaque, const char* filename, int mode));
+typedef uLong    (ZCALLBACK *read_file_func)      OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+typedef uLong    (ZCALLBACK *write_file_func)     OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+typedef int      (ZCALLBACK *close_file_func)     OF((voidpf opaque, voidpf stream));
+typedef int      (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream));
+
+typedef long     (ZCALLBACK *tell_file_func)      OF((voidpf opaque, voidpf stream));
+typedef long     (ZCALLBACK *seek_file_func)      OF((voidpf opaque, voidpf stream, uLong offset, int origin));
+
+
+/* here is the "old" 32 bits structure structure */
+typedef struct zlib_filefunc_def_s
+{
+    open_file_func      zopen_file;
+    read_file_func      zread_file;
+    write_file_func     zwrite_file;
+    tell_file_func      ztell_file;
+    seek_file_func      zseek_file;
+    close_file_func     zclose_file;
+    testerror_file_func zerror_file;
+    voidpf              opaque;
+} zlib_filefunc_def;
+
+typedef ZPOS64_T (ZCALLBACK *tell64_file_func)    OF((voidpf opaque, voidpf stream));
+typedef long     (ZCALLBACK *seek64_file_func)    OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
+typedef voidpf   (ZCALLBACK *open64_file_func)    OF((voidpf opaque, const void* filename, int mode));
+
+typedef struct zlib_filefunc64_def_s
+{
+    open64_file_func    zopen64_file;
+    read_file_func      zread_file;
+    write_file_func     zwrite_file;
+    tell64_file_func    ztell64_file;
+    seek64_file_func    zseek64_file;
+    close_file_func     zclose_file;
+    testerror_file_func zerror_file;
+    voidpf              opaque;
+} zlib_filefunc64_def;
+
+void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def));
+void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+
+/* now internal definition, only for zip.c and unzip.h */
+typedef struct zlib_filefunc64_32_def_s
+{
+    zlib_filefunc64_def zfile_func64;
+    open_file_func      zopen32_file;
+    tell_file_func      ztell32_file;
+    seek_file_func      zseek32_file;
+} zlib_filefunc64_32_def;
+
+
+#define ZREAD64(filefunc,filestream,buf,size)     ((*((filefunc).zfile_func64.zread_file))   ((filefunc).zfile_func64.opaque,filestream,buf,size))
+#define ZWRITE64(filefunc,filestream,buf,size)    ((*((filefunc).zfile_func64.zwrite_file))  ((filefunc).zfile_func64.opaque,filestream,buf,size))
+//#define ZTELL64(filefunc,filestream)            ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream))
+//#define ZSEEK64(filefunc,filestream,pos,mode)   ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode))
+#define ZCLOSE64(filefunc,filestream)             ((*((filefunc).zfile_func64.zclose_file))  ((filefunc).zfile_func64.opaque,filestream))
+#define ZERROR64(filefunc,filestream)             ((*((filefunc).zfile_func64.zerror_file))  ((filefunc).zfile_func64.opaque,filestream))
+
+voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode));
+long    call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin));
+ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream));
+
+void    fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32);
+
+#define ZOPEN64(filefunc,filename,mode)         (call_zopen64((&(filefunc)),(filename),(mode)))
+#define ZTELL64(filefunc,filestream)            (call_ztell64((&(filefunc)),(filestream)))
+#define ZSEEK64(filefunc,filestream,pos,mode)   (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/contrib/contrib/minizip/iowin32.c b/contrib/contrib/minizip/iowin32.c
new file mode 100644 (file)
index 0000000..2b69466
--- /dev/null
@@ -0,0 +1,389 @@
+/* iowin32.c -- IO base function header for compress/uncompress .zip
+     Version 1.1, January 7th, 2010
+     part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Modifications for Zip64 support 
+        Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+     For more info read MiniZip_info.txt
+
+*/
+
+#include <stdlib.h>
+
+#include "zlib.h"
+#include "ioapi.h"
+#include "iowin32.h"
+
+#ifndef INVALID_HANDLE_VALUE
+#define INVALID_HANDLE_VALUE (0xFFFFFFFF)
+#endif
+
+#ifndef INVALID_SET_FILE_POINTER
+#define INVALID_SET_FILE_POINTER ((DWORD)-1)
+#endif
+
+voidpf  ZCALLBACK win32_open_file_func  OF((voidpf opaque, const char* filename, int mode));
+uLong   ZCALLBACK win32_read_file_func  OF((voidpf opaque, voidpf stream, void* buf, uLong size));
+uLong   ZCALLBACK win32_write_file_func OF((voidpf opaque, voidpf stream, const void* buf, uLong size));
+ZPOS64_T ZCALLBACK win32_tell64_file_func  OF((voidpf opaque, voidpf stream));
+long    ZCALLBACK win32_seek64_file_func  OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
+int     ZCALLBACK win32_close_file_func OF((voidpf opaque, voidpf stream));
+int     ZCALLBACK win32_error_file_func OF((voidpf opaque, voidpf stream));
+
+typedef struct
+{
+    HANDLE hf;
+    int error;
+} WIN32FILE_IOWIN;
+
+
+static void win32_translate_open_mode(int mode,
+                                      DWORD* lpdwDesiredAccess,
+                                      DWORD* lpdwCreationDisposition,
+                                      DWORD* lpdwShareMode,
+                                      DWORD* lpdwFlagsAndAttributes)
+{
+    *lpdwDesiredAccess = *lpdwShareMode = *lpdwFlagsAndAttributes = *lpdwCreationDisposition = 0;
+
+    if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
+    {
+        *lpdwDesiredAccess = GENERIC_READ;
+        *lpdwCreationDisposition = OPEN_EXISTING;
+        *lpdwShareMode = FILE_SHARE_READ;
+    }
+    else if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
+    {
+        *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
+        *lpdwCreationDisposition = OPEN_EXISTING;
+    }
+    else if (mode & ZLIB_FILEFUNC_MODE_CREATE)
+    {
+        *lpdwDesiredAccess = GENERIC_WRITE | GENERIC_READ;
+        *lpdwCreationDisposition = CREATE_ALWAYS;
+    }
+}
+
+static voidpf win32_build_iowin(HANDLE hFile)
+{
+    voidpf ret=NULL;
+
+    if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE))
+    {
+        WIN32FILE_IOWIN w32fiow;
+        w32fiow.hf = hFile;
+        w32fiow.error = 0;
+        ret = malloc(sizeof(WIN32FILE_IOWIN));
+
+        if (ret==NULL)
+            CloseHandle(hFile);
+        else
+            *((WIN32FILE_IOWIN*)ret) = w32fiow;
+    }
+    return ret;
+}
+
+voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int mode)
+{
+    const char* mode_fopen = NULL;
+    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+    HANDLE hFile = NULL;
+
+    win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+    if ((filename!=NULL) && (dwDesiredAccess != 0))
+        hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+    return win32_build_iowin(hFile);
+}
+
+
+voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int mode)
+{
+    const char* mode_fopen = NULL;
+    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+    HANDLE hFile = NULL;
+
+    win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+    if ((filename!=NULL) && (dwDesiredAccess != 0))
+        hFile = CreateFileA((LPCSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+    return win32_build_iowin(hFile);
+}
+
+
+voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int mode)
+{
+    const char* mode_fopen = NULL;
+    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+    HANDLE hFile = NULL;
+
+    win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+    if ((filename!=NULL) && (dwDesiredAccess != 0))
+        hFile = CreateFileW((LPCWSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+    return win32_build_iowin(hFile);
+}
+
+
+voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mode)
+{
+    const char* mode_fopen = NULL;
+    DWORD dwDesiredAccess,dwCreationDisposition,dwShareMode,dwFlagsAndAttributes ;
+    HANDLE hFile = NULL;
+
+    win32_translate_open_mode(mode,&dwDesiredAccess,&dwCreationDisposition,&dwShareMode,&dwFlagsAndAttributes);
+
+    if ((filename!=NULL) && (dwDesiredAccess != 0))
+        hFile = CreateFile((LPCTSTR)filename, dwDesiredAccess, dwShareMode, NULL, dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+    return win32_build_iowin(hFile);
+}
+
+
+uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uLong size)
+{
+    uLong ret=0;
+    HANDLE hFile = NULL;
+    if (stream!=NULL)
+        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+
+    if (hFile != NULL)
+    {
+        if (!ReadFile(hFile, buf, size, &ret, NULL))
+        {
+            DWORD dwErr = GetLastError();
+            if (dwErr == ERROR_HANDLE_EOF)
+                dwErr = 0;
+            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+        }
+    }
+
+    return ret;
+}
+
+
+uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* buf,uLong size)
+{
+    uLong ret=0;
+    HANDLE hFile = NULL;
+    if (stream!=NULL)
+        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+
+    if (hFile != NULL)
+    {
+        if (!WriteFile(hFile, buf, size, &ret, NULL))
+        {
+            DWORD dwErr = GetLastError();
+            if (dwErr == ERROR_HANDLE_EOF)
+                dwErr = 0;
+            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+        }
+    }
+
+    return ret;
+}
+
+long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream)
+{
+    long ret=-1;
+    HANDLE hFile = NULL;
+    if (stream!=NULL)
+        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+    if (hFile != NULL)
+    {
+        DWORD dwSet = SetFilePointer(hFile, 0, NULL, FILE_CURRENT);
+        if (dwSet == INVALID_SET_FILE_POINTER)
+        {
+            DWORD dwErr = GetLastError();
+            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+            ret = -1;
+        }
+        else
+            ret=(long)dwSet;
+    }
+    return ret;
+}
+
+ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream)
+{
+    ZPOS64_T ret= (ZPOS64_T)-1;
+    HANDLE hFile = NULL;
+    if (stream!=NULL)
+        hFile = ((WIN32FILE_IOWIN*)stream)->hf;
+
+    if (hFile)
+    {
+        LARGE_INTEGER li;
+        li.QuadPart = 0;
+        li.u.LowPart = SetFilePointer(hFile, li.u.LowPart, &li.u.HighPart, FILE_CURRENT);
+        if ( (li.LowPart == 0xFFFFFFFF) && (GetLastError() != NO_ERROR))
+        {
+            DWORD dwErr = GetLastError();
+            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+            ret = (ZPOS64_T)-1;
+        }
+        else
+            ret=li.QuadPart;
+    }
+    return ret;
+}
+
+
+long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,int origin)
+{
+    DWORD dwMoveMethod=0xFFFFFFFF;
+    HANDLE hFile = NULL;
+
+    long ret=-1;
+    if (stream!=NULL)
+        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+    switch (origin)
+    {
+    case ZLIB_FILEFUNC_SEEK_CUR :
+        dwMoveMethod = FILE_CURRENT;
+        break;
+    case ZLIB_FILEFUNC_SEEK_END :
+        dwMoveMethod = FILE_END;
+        break;
+    case ZLIB_FILEFUNC_SEEK_SET :
+        dwMoveMethod = FILE_BEGIN;
+        break;
+    default: return -1;
+    }
+
+    if (hFile != NULL)
+    {
+        DWORD dwSet = SetFilePointer(hFile, offset, NULL, dwMoveMethod);
+        if (dwSet == INVALID_SET_FILE_POINTER)
+        {
+            DWORD dwErr = GetLastError();
+            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+            ret = -1;
+        }
+        else
+            ret=0;
+    }
+    return ret;
+}
+
+long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T offset,int origin)
+{
+    DWORD dwMoveMethod=0xFFFFFFFF;
+    HANDLE hFile = NULL;
+    long ret=-1;
+
+    if (stream!=NULL)
+        hFile = ((WIN32FILE_IOWIN*)stream)->hf;
+
+    switch (origin)
+    {
+        case ZLIB_FILEFUNC_SEEK_CUR :
+            dwMoveMethod = FILE_CURRENT;
+            break;
+        case ZLIB_FILEFUNC_SEEK_END :
+            dwMoveMethod = FILE_END;
+            break;
+        case ZLIB_FILEFUNC_SEEK_SET :
+            dwMoveMethod = FILE_BEGIN;
+            break;
+        default: return -1;
+    }
+
+    if (hFile)
+    {
+        LARGE_INTEGER* li = (LARGE_INTEGER*)&offset;
+        DWORD dwSet = SetFilePointer(hFile, li->u.LowPart, &li->u.HighPart, dwMoveMethod);
+        if (dwSet == INVALID_SET_FILE_POINTER)
+        {
+            DWORD dwErr = GetLastError();
+            ((WIN32FILE_IOWIN*)stream) -> error=(int)dwErr;
+            ret = -1;
+        }
+        else
+            ret=0;
+    }
+    return ret;
+}
+
+int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream)
+{
+    int ret=-1;
+
+    if (stream!=NULL)
+    {
+        HANDLE hFile;
+        hFile = ((WIN32FILE_IOWIN*)stream) -> hf;
+        if (hFile != NULL)
+        {
+            CloseHandle(hFile);
+            ret=0;
+        }
+        free(stream);
+    }
+    return ret;
+}
+
+int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream)
+{
+    int ret=-1;
+    if (stream!=NULL)
+    {
+        ret = ((WIN32FILE_IOWIN*)stream) -> error;
+    }
+    return ret;
+}
+
+extern void ZEXPORT fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def)
+{
+    pzlib_filefunc_def->zopen_file = win32_open_file_func;
+    pzlib_filefunc_def->zread_file = win32_read_file_func;
+    pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+    pzlib_filefunc_def->ztell_file = win32_tell_file_func;
+    pzlib_filefunc_def->zseek_file = win32_seek_file_func;
+    pzlib_filefunc_def->zclose_file = win32_close_file_func;
+    pzlib_filefunc_def->zerror_file = win32_error_file_func;
+    pzlib_filefunc_def->opaque = NULL;
+}
+
+extern void ZEXPORT fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def)
+{
+    pzlib_filefunc_def->zopen64_file = win32_open64_file_func;
+    pzlib_filefunc_def->zread_file = win32_read_file_func;
+    pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+    pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
+    pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
+    pzlib_filefunc_def->zclose_file = win32_close_file_func;
+    pzlib_filefunc_def->zerror_file = win32_error_file_func;
+    pzlib_filefunc_def->opaque = NULL;
+}
+
+
+extern void ZEXPORT fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def)
+{
+    pzlib_filefunc_def->zopen64_file = win32_open64_file_funcA;
+    pzlib_filefunc_def->zread_file = win32_read_file_func;
+    pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+    pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
+    pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
+    pzlib_filefunc_def->zclose_file = win32_close_file_func;
+    pzlib_filefunc_def->zerror_file = win32_error_file_func;
+    pzlib_filefunc_def->opaque = NULL;
+}
+
+
+extern void ZEXPORT fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def)
+{
+    pzlib_filefunc_def->zopen64_file = win32_open64_file_funcW;
+    pzlib_filefunc_def->zread_file = win32_read_file_func;
+    pzlib_filefunc_def->zwrite_file = win32_write_file_func;
+    pzlib_filefunc_def->ztell64_file = win32_tell64_file_func;
+    pzlib_filefunc_def->zseek64_file = win32_seek64_file_func;
+    pzlib_filefunc_def->zclose_file = win32_close_file_func;
+    pzlib_filefunc_def->zerror_file = win32_error_file_func;
+    pzlib_filefunc_def->opaque = NULL;
+}
diff --git a/contrib/contrib/minizip/iowin32.h b/contrib/contrib/minizip/iowin32.h
new file mode 100644 (file)
index 0000000..3d5827f
--- /dev/null
@@ -0,0 +1,28 @@
+/* iowin32.h -- IO base function header for compress/uncompress .zip
+     Version 1.1, January 7th, 2010
+     part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Modifications for Zip64 support 
+        Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+
+        For more info read MiniZip_info.txt
+
+*/
+
+#include <windows.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern void ZEXPORT fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
+extern void ZEXPORT fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def));
+extern void ZEXPORT fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def));
+extern void ZEXPORT fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def));
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/contrib/contrib/minizip/miniunz.c b/contrib/contrib/minizip/miniunz.c
new file mode 100644 (file)
index 0000000..6b03e1f
--- /dev/null
@@ -0,0 +1,649 @@
+/*
+   miniunz.c
+   Version 1.1, January 7th, 2010
+   sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Modifications of Unzip for Zip64
+        Copyright (C) 2007-2008 Even Rouault
+
+        Modifications for Zip64 support on both zip and unzip
+        Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+*/
+
+#include "unzip.h"
+
+#ifndef _WIN32 
+       #ifndef __USE_FILE_OFFSET64
+               #define __USE_FILE_OFFSET64
+       #endif
+       #ifndef __USE_LARGEFILE64
+               #define __USE_LARGEFILE64
+       #endif
+       #ifndef _LARGEFILE64_SOURCE
+               #define _LARGEFILE64_SOURCE
+       #endif
+       #ifndef _FILE_OFFSET_BIT
+               #define _FILE_OFFSET_BIT 64
+       #endif
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#ifdef unix
+# include <unistd.h>
+# include <utime.h>
+#else
+# include <direct.h>
+# include <io.h>
+#endif
+
+
+#define CASESENSITIVITY (0)
+#define WRITEBUFFERSIZE (8192)
+#define MAXFILENAME (256)
+
+#ifdef _WIN32
+#define USEWIN32IOAPI
+#include "iowin32.h"
+#endif
+/*
+  mini unzip, demo of unzip package
+
+  usage :
+  Usage : miniunz [-exvlo] file.zip [file_to_extract] [-d extractdir]
+
+  list the file in the zipfile, and print the content of FILE_ID.ZIP or README.TXT
+    if it exists
+*/
+
+
+/* change_file_date : change the date/time of a file
+    filename : the filename of the file where date/time must be modified
+    dosdate : the new date at the MSDos format (4 bytes)
+    tmu_date : the SAME new date at the tm_unz format */
+void change_file_date(filename,dosdate,tmu_date)
+    const char *filename;
+    uLong dosdate;
+    tm_unz tmu_date;
+{
+#ifdef _WIN32
+  HANDLE hFile;
+  FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite;
+
+  hFile = CreateFileA(filename,GENERIC_READ | GENERIC_WRITE,
+                      0,NULL,OPEN_EXISTING,0,NULL);
+  GetFileTime(hFile,&ftCreate,&ftLastAcc,&ftLastWrite);
+  DosDateTimeToFileTime((WORD)(dosdate>>16),(WORD)dosdate,&ftLocal);
+  LocalFileTimeToFileTime(&ftLocal,&ftm);
+  SetFileTime(hFile,&ftm,&ftLastAcc,&ftm);
+  CloseHandle(hFile);
+#else
+#ifdef unix
+  struct utimbuf ut;
+  struct tm newdate;
+  newdate.tm_sec = tmu_date.tm_sec;
+  newdate.tm_min=tmu_date.tm_min;
+  newdate.tm_hour=tmu_date.tm_hour;
+  newdate.tm_mday=tmu_date.tm_mday;
+  newdate.tm_mon=tmu_date.tm_mon;
+  if (tmu_date.tm_year > 1900)
+      newdate.tm_year=tmu_date.tm_year - 1900;
+  else
+      newdate.tm_year=tmu_date.tm_year ;
+  newdate.tm_isdst=-1;
+
+  ut.actime=ut.modtime=mktime(&newdate);
+  utime(filename,&ut);
+#endif
+#endif
+}
+
+
+/* mymkdir and change_file_date are not 100 % portable
+   As I don't know well Unix, I wait feedback for the unix portion */
+
+int mymkdir(dirname)
+    const char* dirname;
+{
+    int ret=0;
+#ifdef _WIN32
+    ret = _mkdir(dirname);
+#else
+#ifdef unix
+    ret = mkdir (dirname,0775);
+#endif
+#endif
+    return ret;
+}
+
+int makedir (newdir)
+    char *newdir;
+{
+  char *buffer ;
+  char *p;
+  int  len = (int)strlen(newdir);
+
+  if (len <= 0)
+    return 0;
+
+  buffer = (char*)malloc(len+1);
+       if (buffer==NULL)
+       {
+               printf("Error allocating memory\n");
+               return UNZ_INTERNALERROR;
+       }
+  strcpy(buffer,newdir);
+
+  if (buffer[len-1] == '/') {
+    buffer[len-1] = '\0';
+  }
+  if (mymkdir(buffer) == 0)
+    {
+      free(buffer);
+      return 1;
+    }
+
+  p = buffer+1;
+  while (1)
+    {
+      char hold;
+
+      while(*p && *p != '\\' && *p != '/')
+        p++;
+      hold = *p;
+      *p = 0;
+      if ((mymkdir(buffer) == -1) && (errno == ENOENT))
+        {
+          printf("couldn't create directory %s\n",buffer);
+          free(buffer);
+          return 0;
+        }
+      if (hold == 0)
+        break;
+      *p++ = hold;
+    }
+  free(buffer);
+  return 1;
+}
+
+void do_banner()
+{
+    printf("MiniUnz 1.01b, demo of zLib + Unz package written by Gilles Vollant\n");
+    printf("more info at http://www.winimage.com/zLibDll/unzip.html\n\n");
+}
+
+void do_help()
+{
+    printf("Usage : miniunz [-e] [-x] [-v] [-l] [-o] [-p password] file.zip [file_to_extr.] [-d extractdir]\n\n" \
+           "  -e  Extract without pathname (junk paths)\n" \
+           "  -x  Extract with pathname\n" \
+           "  -v  list files\n" \
+           "  -l  list files\n" \
+           "  -d  directory to extract into\n" \
+           "  -o  overwrite files without prompting\n" \
+           "  -p  extract crypted file using password\n\n");
+}
+
+void Display64BitsSize(ZPOS64_T n, int size_char)
+{
+  /* to avoid compatibility problem , we do here the conversion */
+  char number[21];
+  int offset=19;
+  int pos_string = 19;
+  number[20]=0;
+  for (;;) {
+      number[offset]=(char)((n%10)+'0');
+      if (number[offset] != '0')
+          pos_string=offset;
+      n/=10;
+      if (offset==0)
+          break;
+      offset--;
+  }
+  {
+      int size_display_string = 19-pos_string;
+      while (size_char > size_display_string)
+      {
+          size_char--;
+          printf(" ");
+      }
+  }
+
+  printf("%s",&number[pos_string]);
+}
+
+int do_list(uf)
+    unzFile uf;
+{
+    uLong i;
+    unz_global_info64 gi;
+    int err;
+
+    err = unzGetGlobalInfo64(uf,&gi);
+    if (err!=UNZ_OK)
+        printf("error %d with zipfile in unzGetGlobalInfo \n",err);
+    printf("  Length  Method     Size Ratio   Date    Time   CRC-32     Name\n");
+    printf("  ------  ------     ---- -----   ----    ----   ------     ----\n");
+    for (i=0;i<gi.number_entry;i++)
+    {
+        char filename_inzip[256];
+        unz_file_info64 file_info;
+        uLong ratio=0;
+        const char *string_method;
+        char charCrypt=' ';
+        err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
+        if (err!=UNZ_OK)
+        {
+            printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
+            break;
+        }
+        if (file_info.uncompressed_size>0)
+            ratio = (uLong)((file_info.compressed_size*100)/file_info.uncompressed_size);
+
+        /* display a '*' if the file is crypted */
+        if ((file_info.flag & 1) != 0)
+            charCrypt='*';
+
+        if (file_info.compression_method==0)
+            string_method="Stored";
+        else
+        if (file_info.compression_method==Z_DEFLATED)
+        {
+            uInt iLevel=(uInt)((file_info.flag & 0x6)/2);
+            if (iLevel==0)
+              string_method="Defl:N";
+            else if (iLevel==1)
+              string_method="Defl:X";
+            else if ((iLevel==2) || (iLevel==3))
+              string_method="Defl:F"; /* 2:fast , 3 : extra fast*/
+        }
+        else
+        if (file_info.compression_method==Z_BZIP2ED)
+        {
+              string_method="BZip2 ";
+        }
+        else
+            string_method="Unkn. ";
+
+        Display64BitsSize(file_info.uncompressed_size,7);
+        printf("  %6s%c",string_method,charCrypt);
+        Display64BitsSize(file_info.compressed_size,7);
+        printf(" %3lu%%  %2.2lu-%2.2lu-%2.2lu  %2.2lu:%2.2lu  %8.8lx   %s\n",
+                ratio,
+                (uLong)file_info.tmu_date.tm_mon + 1,
+                (uLong)file_info.tmu_date.tm_mday,
+                (uLong)file_info.tmu_date.tm_year % 100,
+                (uLong)file_info.tmu_date.tm_hour,(uLong)file_info.tmu_date.tm_min,
+                (uLong)file_info.crc,filename_inzip);
+        if ((i+1)<gi.number_entry)
+        {
+            err = unzGoToNextFile(uf);
+            if (err!=UNZ_OK)
+            {
+                printf("error %d with zipfile in unzGoToNextFile\n",err);
+                break;
+            }
+        }
+    }
+
+    return 0;
+}
+
+
+int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
+    unzFile uf;
+    const int* popt_extract_without_path;
+    int* popt_overwrite;
+    const char* password;
+{
+    char filename_inzip[256];
+    char* filename_withoutpath;
+    char* p;
+    int err=UNZ_OK;
+    FILE *fout=NULL;
+    void* buf;
+    uInt size_buf;
+
+    unz_file_info64 file_info;
+    uLong ratio=0;
+    err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
+
+    if (err!=UNZ_OK)
+    {
+        printf("error %d with zipfile in unzGetCurrentFileInfo\n",err);
+        return err;
+    }
+
+    size_buf = WRITEBUFFERSIZE;
+    buf = (void*)malloc(size_buf);
+    if (buf==NULL)
+    {
+        printf("Error allocating memory\n");
+        return UNZ_INTERNALERROR;
+    }
+
+    p = filename_withoutpath = filename_inzip;
+    while ((*p) != '\0')
+    {
+        if (((*p)=='/') || ((*p)=='\\'))
+            filename_withoutpath = p+1;
+        p++;
+    }
+
+    if ((*filename_withoutpath)=='\0')
+    {
+        if ((*popt_extract_without_path)==0)
+        {
+            printf("creating directory: %s\n",filename_inzip);
+            mymkdir(filename_inzip);
+        }
+    }
+    else
+    {
+        const char* write_filename;
+        int skip=0;
+
+        if ((*popt_extract_without_path)==0)
+            write_filename = filename_inzip;
+        else
+            write_filename = filename_withoutpath;
+
+        err = unzOpenCurrentFilePassword(uf,password);
+        if (err!=UNZ_OK)
+        {
+            printf("error %d with zipfile in unzOpenCurrentFilePassword\n",err);
+        }
+
+        if (((*popt_overwrite)==0) && (err==UNZ_OK))
+        {
+            char rep=0;
+            FILE* ftestexist;
+            ftestexist = fopen64(write_filename,"rb");
+            if (ftestexist!=NULL)
+            {
+                fclose(ftestexist);
+                do
+                {
+                    char answer[128];
+                    int ret;
+
+                    printf("The file %s exists. Overwrite ? [y]es, [n]o, [A]ll: ",write_filename);
+                    ret = scanf("%1s",answer);
+                    if (ret != 1) 
+                    {
+                       exit(EXIT_FAILURE);
+                    }
+                    rep = answer[0] ;
+                    if ((rep>='a') && (rep<='z'))
+                        rep -= 0x20;
+                }
+                while ((rep!='Y') && (rep!='N') && (rep!='A'));
+            }
+
+            if (rep == 'N')
+                skip = 1;
+
+            if (rep == 'A')
+                *popt_overwrite=1;
+        }
+
+        if ((skip==0) && (err==UNZ_OK))
+        {
+            fout=fopen64(write_filename,"wb");
+
+            /* some zipfile don't contain directory alone before file */
+            if ((fout==NULL) && ((*popt_extract_without_path)==0) &&
+                                (filename_withoutpath!=(char*)filename_inzip))
+            {
+                char c=*(filename_withoutpath-1);
+                *(filename_withoutpath-1)='\0';
+                makedir(write_filename);
+                *(filename_withoutpath-1)=c;
+                fout=fopen64(write_filename,"wb");
+            }
+
+            if (fout==NULL)
+            {
+                printf("error opening %s\n",write_filename);
+            }
+        }
+
+        if (fout!=NULL)
+        {
+            printf(" extracting: %s\n",write_filename);
+
+            do
+            {
+                err = unzReadCurrentFile(uf,buf,size_buf);
+                if (err<0)
+                {
+                    printf("error %d with zipfile in unzReadCurrentFile\n",err);
+                    break;
+                }
+                if (err>0)
+                    if (fwrite(buf,err,1,fout)!=1)
+                    {
+                        printf("error in writing extracted file\n");
+                        err=UNZ_ERRNO;
+                        break;
+                    }
+            }
+            while (err>0);
+            if (fout)
+                    fclose(fout);
+
+            if (err==0)
+                change_file_date(write_filename,file_info.dosDate,
+                                 file_info.tmu_date);
+        }
+
+        if (err==UNZ_OK)
+        {
+            err = unzCloseCurrentFile (uf);
+            if (err!=UNZ_OK)
+            {
+                printf("error %d with zipfile in unzCloseCurrentFile\n",err);
+            }
+        }
+        else
+            unzCloseCurrentFile(uf); /* don't lose the error */
+    }
+
+    free(buf);
+    return err;
+}
+
+
+int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
+    unzFile uf;
+    int opt_extract_without_path;
+    int opt_overwrite;
+    const char* password;
+{
+    uLong i;
+    unz_global_info64 gi;
+    int err;
+    FILE* fout=NULL;
+
+    err = unzGetGlobalInfo64(uf,&gi);
+    if (err!=UNZ_OK)
+        printf("error %d with zipfile in unzGetGlobalInfo \n",err);
+
+    for (i=0;i<gi.number_entry;i++)
+    {
+        if (do_extract_currentfile(uf,&opt_extract_without_path,
+                                      &opt_overwrite,
+                                      password) != UNZ_OK)
+            break;
+
+        if ((i+1)<gi.number_entry)
+        {
+            err = unzGoToNextFile(uf);
+            if (err!=UNZ_OK)
+            {
+                printf("error %d with zipfile in unzGoToNextFile\n",err);
+                break;
+            }
+        }
+    }
+
+    return 0;
+}
+
+int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite,password)
+    unzFile uf;
+    const char* filename;
+    int opt_extract_without_path;
+    int opt_overwrite;
+    const char* password;
+{
+    int err = UNZ_OK;
+    if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK)
+    {
+        printf("file %s not found in the zipfile\n",filename);
+        return 2;
+    }
+
+    if (do_extract_currentfile(uf,&opt_extract_without_path,
+                                      &opt_overwrite,
+                                      password) == UNZ_OK)
+        return 0;
+    else
+        return 1;
+}
+
+
+int main(argc,argv)
+    int argc;
+    char *argv[];
+{
+    const char *zipfilename=NULL;
+    const char *filename_to_extract=NULL;
+    const char *password=NULL;
+    char filename_try[MAXFILENAME+16] = "";
+    int i;
+    int ret_value=0;
+    int opt_do_list=0;
+    int opt_do_extract=1;
+    int opt_do_extract_withoutpath=0;
+    int opt_overwrite=0;
+    int opt_extractdir=0;
+    const char *dirname=NULL;
+    unzFile uf=NULL;
+
+    do_banner();
+    if (argc==1)
+    {
+        do_help();
+        return 0;
+    }
+    else
+    {
+        for (i=1;i<argc;i++)
+        {
+            if ((*argv[i])=='-')
+            {
+                const char *p=argv[i]+1;
+
+                while ((*p)!='\0')
+                {
+                    char c=*(p++);;
+                    if ((c=='l') || (c=='L'))
+                        opt_do_list = 1;
+                    if ((c=='v') || (c=='V'))
+                        opt_do_list = 1;
+                    if ((c=='x') || (c=='X'))
+                        opt_do_extract = 1;
+                    if ((c=='e') || (c=='E'))
+                        opt_do_extract = opt_do_extract_withoutpath = 1;
+                    if ((c=='o') || (c=='O'))
+                        opt_overwrite=1;
+                    if ((c=='d') || (c=='D'))
+                    {
+                        opt_extractdir=1;
+                        dirname=argv[i+1];
+                    }
+
+                    if (((c=='p') || (c=='P')) && (i+1<argc))
+                    {
+                        password=argv[i+1];
+                        i++;
+                    }
+                }
+            }
+            else
+            {
+                if (zipfilename == NULL)
+                    zipfilename = argv[i];
+                else if ((filename_to_extract==NULL) && (!opt_extractdir))
+                        filename_to_extract = argv[i] ;
+            }
+        }
+    }
+
+    if (zipfilename!=NULL)
+    {
+
+#        ifdef USEWIN32IOAPI
+        zlib_filefunc64_def ffunc;
+#        endif
+
+        strncpy(filename_try, zipfilename,MAXFILENAME-1);
+        /* strncpy doesnt append the trailing NULL, of the string is too long. */
+        filename_try[ MAXFILENAME ] = '\0';
+
+#        ifdef USEWIN32IOAPI
+        fill_win32_filefunc64A(&ffunc);
+        uf = unzOpen2_64(zipfilename,&ffunc);
+#        else
+        uf = unzOpen64(zipfilename);
+#        endif
+        if (uf==NULL)
+        {
+            strcat(filename_try,".zip");
+#            ifdef USEWIN32IOAPI
+            uf = unzOpen2_64(filename_try,&ffunc);
+#            else
+            uf = unzOpen64(filename_try);
+#            endif
+        }
+    }
+
+    if (uf==NULL)
+    {
+        printf("Cannot open %s or %s.zip\n",zipfilename,zipfilename);
+        return 1;
+    }
+    printf("%s opened\n",filename_try);
+
+    if (opt_do_list==1)
+        ret_value = do_list(uf);
+    else if (opt_do_extract==1)
+    {
+#ifdef _WIN32
+        if (opt_extractdir && _chdir(dirname)) 
+#else
+        if (opt_extractdir && chdir(dirname)) 
+#endif
+        {
+          printf("Error changing into %s, aborting\n", dirname);
+          exit(-1);
+        }
+
+        if (filename_to_extract == NULL)
+            ret_value = do_extract(uf, opt_do_extract_withoutpath, opt_overwrite, password);
+        else
+            ret_value = do_extract_onefile(uf, filename_to_extract, opt_do_extract_withoutpath, opt_overwrite, password);
+    }
+
+    unzClose(uf);
+
+    return ret_value;
+}
diff --git a/contrib/contrib/minizip/minizip.c b/contrib/contrib/minizip/minizip.c
new file mode 100644 (file)
index 0000000..9e310e8
--- /dev/null
@@ -0,0 +1,508 @@
+/*
+   minizip.c
+   Version 1.1, January 7th, 2010
+   sample part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
+
+        Modifications of Unzip for Zip64
+        Copyright (C) 2007-2008 Even Rouault
+
+        Modifications for Zip64 support on both zip and unzip
+        Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
+*/
+
+#include "zip.h"
+
+#ifndef _WIN32 
+       #ifndef __USE_FILE_OFFSET64
+               #define __USE_FILE_OFFSET64
+       #endif
+       #ifndef __USE_LARGEFILE64
+               #define __USE_LARGEFILE64
+       #endif
+       #ifndef _LARGEFILE64_SOURCE
+               #define _LARGEFILE64_SOURCE
+       #endif
+       #ifndef _FILE_OFFSET_BIT
+               #define _FILE_OFFSET_BIT 64
+       #endif
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#ifdef unix
+# include <unistd.h>
+# include <utime.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+#else
+# include <direct.h>
+# include <io.h>
+#endif
+
+
+#ifdef _WIN32
+       #define USEWIN32IOAPI
+       #include "iowin32.h"
+#endif
+
+
+
+#define WRITEBUFFERSIZE (16384)
+#define MAXFILENAME (256)
+
+#ifdef _WIN32
+uLong filetime(f, tmzip, dt)
+    char *f;                /* name of file to get info on */
+    tm_zip *tmzip;             /* return value: access, modific. and creation times */
+    uLong *dt;             /* dostime */
+{
+  int ret = 0;
+  {
+      FILETIME ftLocal;
+      HANDLE hFind;
+      WIN32_FIND_DATAA ff32;
+
+      hFind = FindFirstFileA(f,&ff32);
+      if (hFind != INVALID_HANDLE_VALUE)
+      {
+        FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal);
+        FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0);
+        FindClose(hFind);
+        ret = 1;
+      }
+  }
+  return ret;
+}
+#else
+#ifdef unix
+uLong filetime(f, tmzip, dt)
+    char *f;               /* name of file to get info on */
+    tm_zip *tmzip;         /* return value: access, modific. and creation times */
+    uLong *dt;             /* dostime */
+{
+  int ret=0;
+  struct stat s;        /* results of stat() */
+  struct tm* filedate;
+  time_t tm_t=0;
+
+  if (strcmp(f,"-")!=0)
+  {
+    char name[MAXFILENAME+1];
+    int len = strlen(f);
+    if (len > MAXFILENAME)
+      len = MAXFILENAME;
+
+    strncpy(name, f,MAXFILENAME-1);
+    /* strncpy doesnt append the trailing NULL, of the string is too long. */
+    name[ MAXFILENAME ] = '\0';
+
+    if (name[len - 1] == '/')
+      name[len - 1] = '\0';
+    /* not all systems allow stat'ing a file with / appended */
+    if (stat(name,&s)==0)
+    {
+      tm_t = s.st_mtime;
+      ret = 1;
+    }
+  }
+  filedate = localtime(&tm_t);
+
+  tmzip->tm_sec  = filedate->tm_sec;
+  tmzip->tm_min  = filedate->tm_min;
+  tmzip->tm_hour = filedate->tm_hour;
+  tmzip->tm_mday = filedate->tm_mday;
+  tmzip->tm_mon  = filedate->tm_mon ;
+  tmzip->tm_year = filedate->tm_year;
+
+  return ret;
+}
+#else
+uLong filetime(f, tmzip, dt)
+    char *f;                /* name of file to get info on */
+    tm_zip *tmzip;             /* return value: access, modific. and creation times */
+    uLong *dt;             /* dostime */
+{
+    return 0;
+}
+#endif
+#endif
+
+
+
+
+int check_exist_file(filename)
+    const char* filename;
+{
+    FILE* ftestexist;
+    int ret = 1;
+    ftestexist = fopen64(filename,"rb");
+    if (ftestexist==NULL)
+        ret = 0;
+    else
+        fclose(ftestexist);
+    return ret;
+}
+
+void do_banner()
+{
+    printf("MiniZip64 1.0, demo of zLib + MiniZip64 package, written by Gilles Vollant\n");
+    printf("more info on MiniZip at http://www.winimage.com/zLibDll/minizip.html\n\n");
+    printf("more info on MiniZip64 at http://result42.com/projects/MiniZip64\n\n");
+}
+
+void do_help()
+{
+    printf("Usage : minizip [-o] [-a] [-0 to -9] [-p password] [-j] file.zip [files_to_add]\n\n" \
+           "  -o  Overwrite existing file.zip\n" \
+           "  -a  Append to existing file.zip\n" \
+           "  -0  Store only\n" \
+           "  -1  Compress faster\n" \
+           "  -9  Compress better\n\n" \
+           "  -j  exclude path. store only the file name.\n\n");
+}
+
+/* calculate the CRC32 of a file,
+   because to encrypt a file, we need known the CRC32 of the file before */
+int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
+{
+   unsigned long calculate_crc=0;
+   int err=ZIP_OK;
+   FILE * fin = fopen64(filenameinzip,"rb");
+   unsigned long size_read = 0;
+   unsigned long total_read = 0;
+   if (fin==NULL)
+   {
+       err = ZIP_ERRNO;
+   }
+
+    if (err == ZIP_OK)
+        do
+        {
+            err = ZIP_OK;
+            size_read = (int)fread(buf,1,size_buf,fin);
+            if (size_read < size_buf)
+                if (feof(fin)==0)
+            {
+                printf("error in reading %s\n",filenameinzip);
+                err = ZIP_ERRNO;
+            }
+
+            if (size_read>0)
+                calculate_crc = crc32(calculate_crc,buf,size_read);
+            total_read += size_read;
+
+        } while ((err == ZIP_OK) && (size_read>0));
+
+    if (fin)
+        fclose(fin);
+
+    *result_crc=calculate_crc;
+    printf("file %s crc %lx\n", filenameinzip, calculate_crc);
+    return err;
+}
+
+int isLargeFile(const char* filename)
+{
+  int largeFile = 0;
+  ZPOS64_T pos = 0;
+  FILE* pFile = fopen64(filename, "rb");
+
+  if(pFile != NULL)
+  {
+    int n = fseeko64(pFile, 0, SEEK_END);
+
+    pos = ftello64(pFile);
+    
+               printf("File : %s is %lld bytes\n", filename, pos);
+    
+    if(pos >= 0xffffffff)
+     largeFile = 1;
+
+               fclose(pFile);
+  }
+  
+ return largeFile;
+}
+
+int main(argc,argv)
+    int argc;
+    char *argv[];
+{
+    int i;
+    int opt_overwrite=0;
+    int opt_compress_level=Z_DEFAULT_COMPRESSION;
+    int opt_exclude_path=0;
+    int zipfilenamearg = 0;
+    char filename_try[MAXFILENAME+16];
+    int zipok;
+    int err=0;
+    int size_buf=0;
+    void* buf=NULL;
+    const char* password=NULL;
+
+
+    do_banner();
+    if (argc==1)
+    {
+        do_help();
+        return 0;
+    }
+    else
+    {
+        for (i=1;i<argc;i++)
+        {
+            if ((*argv[i])=='-')
+            {
+                const char *p=argv[i]+1;
+
+                while ((*p)!='\0')
+                {
+                    char c=*(p++);;
+                    if ((c=='o') || (c=='O'))
+                        opt_overwrite = 1;
+                    if ((c=='a') || (c=='A'))
+                        opt_overwrite = 2;
+                    if ((c>='0') && (c<='9'))
+                        opt_compress_level = c-'0';
+                    if ((c=='j') || (c=='J'))
+                        opt_exclude_path = 1;
+
+                    if (((c=='p') || (c=='P')) && (i+1<argc))
+                    {
+                        password=argv[i+1];
+                        i++;
+                    }
+                }
+            }
+            else
+            {
+                if (zipfilenamearg == 0)
+                {
+                    zipfilenamearg = i ;
+                }
+            }
+        }
+    }
+
+    size_buf = WRITEBUFFERSIZE;
+    buf = (void*)malloc(size_buf);
+    if (buf==NULL)
+    {
+        printf("Error allocating memory\n");
+        return ZIP_INTERNALERROR;
+    }
+
+    if (zipfilenamearg==0)
+    {
+        zipok=0;
+    }
+    else
+    {
+        int i,len;
+        int dot_found=0;
+
+        zipok = 1 ;
+        strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1);
+        /* strncpy doesnt append the trailing NULL, of the string is too long. */
+        filename_try[ MAXFILENAME ] = '\0';
+
+        len=(int)strlen(filename_try);
+        for (i=0;i<len;i++)
+            if (filename_try[i]=='.')
+                dot_found=1;
+
+        if (dot_found==0)
+            strcat(filename_try,".zip");
+
+        if (opt_overwrite==2)
+        {
+            /* if the file don't exist, we not append file */
+            if (check_exist_file(filename_try)==0)
+                opt_overwrite=1;
+        }
+        else
+        if (opt_overwrite==0)
+            if (check_exist_file(filename_try)!=0)
+            {
+                char rep=0;
+                do
+                {
+                    char answer[128];
+                    int ret;
+                    printf("The file %s exists. Overwrite ? [y]es, [n]o, [a]ppend : ",filename_try);
+                    ret = scanf("%1s",answer);
+                    if (ret != 1)
+                    {
+                       exit(EXIT_FAILURE);
+                    }
+                    rep = answer[0] ;
+                    if ((rep>='a') && (rep<='z'))
+                        rep -= 0x20;
+                }
+                while ((rep!='Y') && (rep!='N') && (rep!='A'));
+                if (rep=='N')
+                    zipok = 0;
+                if (rep=='A')
+                    opt_overwrite = 2;
+            }
+    }
+
+    if (zipok==1)
+    {
+        zipFile zf;
+        int errclose;
+#        ifdef USEWIN32IOAPI
+        zlib_filefunc64_def ffunc;
+        fill_win32_filefunc64A(&ffunc);
+        zf = zipOpen2_64(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc);
+#        else
+        zf = zipOpen64(filename_try,(opt_overwrite==2) ? 2 : 0);
+#        endif
+
+        if (zf == NULL)
+        {
+            printf("error opening %s\n",filename_try);
+            err= ZIP_ERRNO;
+        }
+        else
+            printf("creating %s\n",filename_try);
+
+        for (i=zipfilenamearg+1;(i<argc) && (err==ZIP_OK);i++)
+        {
+            if (!((((*(argv[i]))=='-') || ((*(argv[i]))=='/')) &&
+                  ((argv[i][1]=='o') || (argv[i][1]=='O') ||
+                   (argv[i][1]=='a') || (argv[i][1]=='A') ||
+                   (argv[i][1]=='p') || (argv[i][1]=='P') ||
+                   ((argv[i][1]>='0') || (argv[i][1]<='9'))) &&
+                  (strlen(argv[i]) == 2)))
+            {
+                FILE * fin;
+                int size_read;
+                const char* filenameinzip = argv[i];
+                const char *savefilenameinzip;
+                zip_fileinfo zi;
+                unsigned long crcFile=0;
+                int zip64 = 0;
+
+                zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour =
+                zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0;
+                zi.dosDate = 0;
+                zi.internal_fa = 0;
+                zi.external_fa = 0;
+                filetime(filenameinzip,&zi.tmz_date,&zi.dosDate);
+
+/*
+                err = zipOpenNewFileInZip(zf,filenameinzip,&zi,
+                                 NULL,0,NULL,0,NULL / * comment * /,
+                                 (opt_compress_level != 0) ? Z_DEFLATED : 0,
+                                 opt_compress_level);
+*/
+                if ((password != NULL) && (err==ZIP_OK))
+                    err = getFileCrc(filenameinzip,buf,size_buf,&crcFile);
+                zip64 = isLargeFile(filenameinzip);
+
+                                                        /* The path name saved, should not include a leading slash. */
+               /*if it did, windows/xp and dynazip couldn't read the zip file. */
+                 savefilenameinzip = filenameinzip;
+                 while( savefilenameinzip[0] == '\\' || savefilenameinzip[0] == '/' )
+                 {
+                     savefilenameinzip++;
+                 }
+
+                 /*should the zip file contain any path at all?*/
+                 if( opt_exclude_path )
+                 {
+                     const char *tmpptr;
+                     const char *lastslash = 0;
+                     for( tmpptr = savefilenameinzip; *tmpptr; tmpptr++)
+                     {
+                         if( *tmpptr == '\\' || *tmpptr == '/')
+                         {
+                             lastslash = tmpptr;
+                         }
+                     }
+                     if( lastslash != NULL )
+                     {
+                         savefilenameinzip = lastslash+1; // base filename follows last slash.
+                     }
+                 }
+
+                 /**/
+                err = zipOpenNewFileInZip3_64(zf,savefilenameinzip,&zi,
+                                 NULL,0,NULL,0,NULL /* comment*/,
+                                 (opt_compress_level != 0) ? Z_DEFLATED : 0,
+                                 opt_compress_level,0,
+                                 /* -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, */
+                                 -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
+                                 password,crcFile, zip64);
+
+                if (err != ZIP_OK)
+                    printf("error in opening %s in zipfile\n",filenameinzip);
+                else
+                {
+                    fin = fopen64(filenameinzip,"rb");
+                    if (fin==NULL)
+                    {
+                        err=ZIP_ERRNO;
+                        printf("error in opening %s for reading\n",filenameinzip);
+                    }
+                }
+
+                if (err == ZIP_OK)
+                    do
+                    {
+                        err = ZIP_OK;
+                        size_read = (int)fread(buf,1,size_buf,fin);
+                        if (size_read < size_buf)
+                            if (feof(fin)==0)
+                        {
+                            printf("error in reading %s\n",filenameinzip);
+                            err = ZIP_ERRNO;
+                        }
+
+                        if (size_read>0)
+                        {
+                            err = zipWriteInFileInZip (zf,buf,size_read);
+                            if (err<0)
+                            {
+                                printf("error in writing %s in the zipfile\n",
+                                                 filenameinzip);
+                            }
+
+                        }
+                    } while ((err == ZIP_OK) && (size_read>0));
+
+                if (fin)
+                    fclose(fin);
+
+                if (err<0)
+                    err=ZIP_ERRNO;
+                else
+                {
+                    err = zipCloseFileInZip(zf);
+                    if (err!=ZIP_OK)
+                        printf("error in closing %s in the zipfile\n",
+                                    filenameinzip);
+                }
+            }
+        }
+        errclose = zipClose(zf,NULL);
+        if (errclose != ZIP_OK)
+            printf("error in closing %s\n",filename_try);
+    }
+    else
+    {
+       do_help();
+    }
+
+    free(buf);
+    return 0;
+}
diff --git a/contrib/contrib/vstudio/vc7/zlibvc.def b/contrib/contrib/vstudio/vc7/zlibvc.def
new file mode 100644 (file)
index 0000000..de70122
--- /dev/null
@@ -0,0 +1,95 @@
+\r
+VERSION                1.23\r
+\r
+HEAPSIZE       1048576,8192\r
+\r
+EXPORTS\r
+        adler32                                  @1\r
+        compress                                 @2\r
+        crc32                                    @3\r
+        deflate                                  @4\r
+        deflateCopy                              @5\r
+        deflateEnd                               @6\r
+        deflateInit2_                            @7\r
+        deflateInit_                             @8\r
+        deflateParams                            @9\r
+        deflateReset                             @10\r
+        deflateSetDictionary                     @11\r
+        gzclose                                  @12\r
+        gzdopen                                  @13\r
+        gzerror                                  @14\r
+        gzflush                                  @15\r
+        gzopen                                   @16\r
+        gzread                                   @17\r
+        gzwrite                                  @18\r
+        inflate                                  @19\r
+        inflateEnd                               @20\r
+        inflateInit2_                            @21\r
+        inflateInit_                             @22\r
+        inflateReset                             @23\r
+        inflateSetDictionary                     @24\r
+        inflateSync                              @25\r
+        uncompress                               @26\r
+        zlibVersion                              @27\r
+        gzprintf                                 @28\r
+        gzputc                                   @29\r
+        gzgetc                                   @30\r
+        gzseek                                   @31\r
+        gzrewind                                 @32\r
+        gztell                                   @33\r
+        gzeof                                    @34\r
+        gzsetparams                              @35\r
+        zError                                   @36\r
+        inflateSyncPoint                         @37\r
+        get_crc_table                            @38\r
+        compress2                                @39\r
+        gzputs                                   @40\r
+        gzgets                                   @41\r
+        inflateCopy                              @42\r
+        inflateBackInit_                         @43\r
+        inflateBack                              @44\r
+        inflateBackEnd                           @45\r
+        compressBound                            @46\r
+        deflateBound                             @47\r
+        gzclearerr                               @48\r
+        gzungetc                                 @49\r
+        zlibCompileFlags                         @50\r
+        deflatePrime                             @51\r
+\r
+        unzOpen                                  @61\r
+        unzClose                                 @62\r
+        unzGetGlobalInfo                         @63\r
+        unzGetCurrentFileInfo                    @64\r
+        unzGoToFirstFile                         @65\r
+        unzGoToNextFile                          @66\r
+        unzOpenCurrentFile                       @67\r
+        unzReadCurrentFile                       @68\r
+        unzOpenCurrentFile3                      @69\r
+        unztell                                  @70\r
+        unzeof                                   @71\r
+        unzCloseCurrentFile                      @72\r
+        unzGetGlobalComment                      @73\r
+        unzStringFileNameCompare                 @74\r
+        unzLocateFile                            @75\r
+        unzGetLocalExtrafield                    @76\r
+        unzOpen2                                 @77\r
+        unzOpenCurrentFile2                      @78\r
+        unzOpenCurrentFilePassword               @79\r
+\r
+        zipOpen                                  @80\r
+        zipOpenNewFileInZip                      @81\r
+        zipWriteInFileInZip                      @82\r
+        zipCloseFileInZip                        @83\r
+        zipClose                                 @84\r
+        zipOpenNewFileInZip2                     @86\r
+        zipCloseFileInZipRaw                     @87\r
+        zipOpen2                                 @88\r
+        zipOpenNewFileInZip3                     @89\r
+\r
+        unzGetFilePos                            @100\r
+        unzGoToFilePos                           @101\r
+\r
+        fill_win32_filefunc                      @110\r
+        fill_win32_filefunc64                    @111\r
+        fill_win32_filefunc64A                   @112\r
+        fill_win32_filefunc64W                   @113\r
diff --git a/contrib/contrib/vstudio/vc8/zlibstat.vcproj b/contrib/contrib/vstudio/vc8/zlibstat.vcproj
new file mode 100644 (file)
index 0000000..2763eec
--- /dev/null
@@ -0,0 +1,881 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8,00"\r
+       Name="zlibstat"\r
+       ProjectGUID="{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+               <Platform\r
+                       Name="Itanium"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="x86\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NO_snprintf;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="1"\r
+                               BufferSecurityCheck="false"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"\r
+                               OutputFile="$(OutDir)\zlibstat.lib"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="x64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;NO_snprintf;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="false"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"\r
+                               OutputFile="$(OutDir)\zlibstat.lib"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|Itanium"\r
+                       OutputDirectory="ia64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;NO_snprintf;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="false"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"\r
+                               OutputFile="$(OutDir)\zlibstat.lib"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="x86\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NO_snprintf;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ASMV;ASMINF"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="0"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"\r
+                               AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "\r
+                               OutputFile="$(OutDir)\zlibstat.lib"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="x64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;NO_snprintf;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ASMV;ASMINF;WIN64"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"\r
+                               AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "\r
+                               OutputFile="$(OutDir)\zlibstat.lib"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Itanium"\r
+                       OutputDirectory="ia64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;NO_snprintf;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"\r
+                               OutputFile="$(OutDir)\zlibstat.lib"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="ReleaseWithoutAsm|Win32"\r
+                       OutputDirectory="x86\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NO_snprintf;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="0"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"\r
+                               OutputFile="$(OutDir)\zlibstat.lib"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="ReleaseWithoutAsm|x64"\r
+                       OutputDirectory="x64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;NO_snprintf;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"\r
+                               OutputFile="$(OutDir)\zlibstat.lib"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="ReleaseWithoutAsm|Itanium"\r
+                       OutputDirectory="ia64\ZlibStat$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="4"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TargetEnvironment="2"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="ZLIB_WINAPI;NO_snprintf;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLibrarianTool"\r
+                               AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"\r
+                               OutputFile="$(OutDir)\zlibstat.lib"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\..\adler32.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\compress.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\crc32.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\deflate.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\masmx86\gvmat32c.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Debug|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="ReleaseWithoutAsm|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="ReleaseWithoutAsm|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzclose.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzio.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzlib.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzread.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzwrite.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\infback.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\masmx64\inffas8664.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Debug|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="ReleaseWithoutAsm|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="ReleaseWithoutAsm|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\inffast.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\inflate.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\inftrees.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\minizip\ioapi.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\trees.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\uncompr.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\minizip\unzip.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\minizip\zip.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\zlib.rc"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\zlibvc.def"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\zutil.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/contrib/contrib/vstudio/vc8/zlibvc.def b/contrib/contrib/vstudio/vc8/zlibvc.def
new file mode 100644 (file)
index 0000000..de70122
--- /dev/null
@@ -0,0 +1,95 @@
+\r
+VERSION                1.23\r
+\r
+HEAPSIZE       1048576,8192\r
+\r
+EXPORTS\r
+        adler32                                  @1\r
+        compress                                 @2\r
+        crc32                                    @3\r
+        deflate                                  @4\r
+        deflateCopy                              @5\r
+        deflateEnd                               @6\r
+        deflateInit2_                            @7\r
+        deflateInit_                             @8\r
+        deflateParams                            @9\r
+        deflateReset                             @10\r
+        deflateSetDictionary                     @11\r
+        gzclose                                  @12\r
+        gzdopen                                  @13\r
+        gzerror                                  @14\r
+        gzflush                                  @15\r
+        gzopen                                   @16\r
+        gzread                                   @17\r
+        gzwrite                                  @18\r
+        inflate                                  @19\r
+        inflateEnd                               @20\r
+        inflateInit2_                            @21\r
+        inflateInit_                             @22\r
+        inflateReset                             @23\r
+        inflateSetDictionary                     @24\r
+        inflateSync                              @25\r
+        uncompress                               @26\r
+        zlibVersion                              @27\r
+        gzprintf                                 @28\r
+        gzputc                                   @29\r
+        gzgetc                                   @30\r
+        gzseek                                   @31\r
+        gzrewind                                 @32\r
+        gztell                                   @33\r
+        gzeof                                    @34\r
+        gzsetparams                              @35\r
+        zError                                   @36\r
+        inflateSyncPoint                         @37\r
+        get_crc_table                            @38\r
+        compress2                                @39\r
+        gzputs                                   @40\r
+        gzgets                                   @41\r
+        inflateCopy                              @42\r
+        inflateBackInit_                         @43\r
+        inflateBack                              @44\r
+        inflateBackEnd                           @45\r
+        compressBound                            @46\r
+        deflateBound                             @47\r
+        gzclearerr                               @48\r
+        gzungetc                                 @49\r
+        zlibCompileFlags                         @50\r
+        deflatePrime                             @51\r
+\r
+        unzOpen                                  @61\r
+        unzClose                                 @62\r
+        unzGetGlobalInfo                         @63\r
+        unzGetCurrentFileInfo                    @64\r
+        unzGoToFirstFile                         @65\r
+        unzGoToNextFile                          @66\r
+        unzOpenCurrentFile                       @67\r
+        unzReadCurrentFile                       @68\r
+        unzOpenCurrentFile3                      @69\r
+        unztell                                  @70\r
+        unzeof                                   @71\r
+        unzCloseCurrentFile                      @72\r
+        unzGetGlobalComment                      @73\r
+        unzStringFileNameCompare                 @74\r
+        unzLocateFile                            @75\r
+        unzGetLocalExtrafield                    @76\r
+        unzOpen2                                 @77\r
+        unzOpenCurrentFile2                      @78\r
+        unzOpenCurrentFilePassword               @79\r
+\r
+        zipOpen                                  @80\r
+        zipOpenNewFileInZip                      @81\r
+        zipWriteInFileInZip                      @82\r
+        zipCloseFileInZip                        @83\r
+        zipClose                                 @84\r
+        zipOpenNewFileInZip2                     @86\r
+        zipCloseFileInZipRaw                     @87\r
+        zipOpen2                                 @88\r
+        zipOpenNewFileInZip3                     @89\r
+\r
+        unzGetFilePos                            @100\r
+        unzGoToFilePos                           @101\r
+\r
+        fill_win32_filefunc                      @110\r
+        fill_win32_filefunc64                    @111\r
+        fill_win32_filefunc64A                   @112\r
+        fill_win32_filefunc64W                   @113\r
diff --git a/contrib/contrib/vstudio/vc8/zlibvc.vcproj b/contrib/contrib/vstudio/vc8/zlibvc.vcproj
new file mode 100644 (file)
index 0000000..91e966d
--- /dev/null
@@ -0,0 +1,1230 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8,00"\r
+       Name="zlibvc"\r
+       ProjectGUID="{8FD826F8-3739-44E6-8CC8-997122E53B8D}"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+               <Platform\r
+                       Name="x64"\r
+               />\r
+               <Platform\r
+                       Name="Itanium"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="x86\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="1"\r
+                               TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI;NO_snprintf,ASMV,ASMINF"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="1"\r
+                               BufferSecurityCheck="false"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               BrowseInformation="0"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/MACHINE:I386"\r
+                               AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"\r
+                               OutputFile="$(OutDir)\zlibwapi.dll"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               GenerateManifest="false"\r
+                               ModuleDefinitionFile=".\zlibvc.def"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
+                               GenerateMapFile="true"\r
+                               MapFileName="$(OutDir)/zlibwapi.map"\r
+                               SubSystem="2"\r
+                               ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|x64"\r
+                       OutputDirectory="x64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI;NO_snprintf,ASMV,ASMINF;WIN64"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="false"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               BrowseInformation="0"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "\r
+                               OutputFile="$(OutDir)\zlibwapi.dll"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               GenerateManifest="false"\r
+                               ModuleDefinitionFile=".\zlibvc.def"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
+                               GenerateMapFile="true"\r
+                               MapFileName="$(OutDir)/zlibwapi.map"\r
+                               SubSystem="2"\r
+                               ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Debug|Itanium"\r
+                       OutputDirectory="ia64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="2"\r
+                               TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NO_snprintf;WIN64"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="3"\r
+                               BufferSecurityCheck="false"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               BrowseInformation="0"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\zlibwapi.dll"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               GenerateManifest="false"\r
+                               ModuleDefinitionFile=".\zlibvc.def"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
+                               GenerateMapFile="true"\r
+                               MapFileName="$(OutDir)/zlibwapi.map"\r
+                               SubSystem="2"\r
+                               ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                               TargetMachine="5"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="ReleaseWithoutAsm|Win32"\r
+                       OutputDirectory="x86\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="1"\r
+                               TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI;NO_snprintf"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerOutput="2"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               BrowseInformation="0"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/MACHINE:I386"\r
+                               OutputFile="$(OutDir)\zlibwapi.dll"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               GenerateManifest="false"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               ModuleDefinitionFile=".\zlibvc.def"\r
+                               ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
+                               GenerateMapFile="true"\r
+                               MapFileName="$(OutDir)/zlibwapi.map"\r
+                               SubSystem="2"\r
+                               OptimizeForWindows98="1"\r
+                               ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="ReleaseWithoutAsm|x64"\r
+                       OutputDirectory="x64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI;NO_snprintf;WIN64"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerOutput="2"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               BrowseInformation="0"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\zlibwapi.dll"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               GenerateManifest="false"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               ModuleDefinitionFile=".\zlibvc.def"\r
+                               ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
+                               GenerateMapFile="true"\r
+                               MapFileName="$(OutDir)/zlibwapi.map"\r
+                               SubSystem="2"\r
+                               OptimizeForWindows98="1"\r
+                               ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="ReleaseWithoutAsm|Itanium"\r
+                       OutputDirectory="ia64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="2"\r
+                               TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32,_CRT_SECURE_NO_DEPRECATE,ZLIB_WINAPI;NO_snprintf;WIN64"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerOutput="2"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               BrowseInformation="0"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\zlibwapi.dll"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               GenerateManifest="false"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               ModuleDefinitionFile=".\zlibvc.def"\r
+                               ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
+                               GenerateMapFile="true"\r
+                               MapFileName="$(OutDir)/zlibwapi.map"\r
+                               SubSystem="2"\r
+                               OptimizeForWindows98="1"\r
+                               ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                               TargetMachine="5"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="x86\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x86\ZlibDll$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="1"\r
+                               TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="WIN32;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NO_snprintf;ASMV;ASMINF"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerOutput="2"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               BrowseInformation="0"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/MACHINE:I386"\r
+                               AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "\r
+                               OutputFile="$(OutDir)\zlibwapi.dll"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               GenerateManifest="false"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               ModuleDefinitionFile=".\zlibvc.def"\r
+                               ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
+                               GenerateMapFile="true"\r
+                               MapFileName="$(OutDir)/zlibwapi.map"\r
+                               SubSystem="2"\r
+                               OptimizeForWindows98="1"\r
+                               ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|x64"\r
+                       OutputDirectory="x64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="x64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="3"\r
+                               TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NO_snprintf;ASMV;ASMINF;WIN64"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerOutput="2"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               BrowseInformation="0"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "\r
+                               OutputFile="$(OutDir)\zlibwapi.dll"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               GenerateManifest="false"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               ModuleDefinitionFile=".\zlibvc.def"\r
+                               ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
+                               GenerateMapFile="true"\r
+                               MapFileName="$(OutDir)/zlibwapi.map"\r
+                               SubSystem="2"\r
+                               OptimizeForWindows98="1"\r
+                               ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                               TargetMachine="17"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Itanium"\r
+                       OutputDirectory="ia64\ZlibDll$(ConfigurationName)"\r
+                       IntermediateDirectory="ia64\ZlibDll$(ConfigurationName)\Tmp"\r
+                       ConfigurationType="2"\r
+                       InheritedPropertySheets="UpgradeFromVC70.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               MkTypLibCompatible="true"\r
+                               SuppressStartupBanner="true"\r
+                               TargetEnvironment="2"\r
+                               TypeLibraryName="$(OutDir)/zlibvc.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"\r
+                               PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NO_snprintf;WIN64"\r
+                               StringPooling="true"\r
+                               ExceptionHandling="0"\r
+                               RuntimeLibrary="2"\r
+                               BufferSecurityCheck="false"\r
+                               EnableFunctionLevelLinking="true"\r
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"\r
+                               AssemblerOutput="2"\r
+                               AssemblerListingLocation="$(IntDir)\"\r
+                               ObjectFile="$(IntDir)\"\r
+                               ProgramDataBaseFileName="$(OutDir)\"\r
+                               BrowseInformation="0"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="1036"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\zlibwapi.dll"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               GenerateManifest="false"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               ModuleDefinitionFile=".\zlibvc.def"\r
+                               ProgramDatabaseFile="$(OutDir)/zlibwapi.pdb"\r
+                               GenerateMapFile="true"\r
+                               MapFileName="$(OutDir)/zlibwapi.map"\r
+                               SubSystem="2"\r
+                               OptimizeForWindows98="1"\r
+                               ImportLibrary="$(OutDir)/zlibwapi.lib"\r
+                               TargetMachine="5"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\..\adler32.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\compress.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\crc32.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\deflate.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\masmx86\gvmat32c.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Debug|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="ReleaseWithoutAsm|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="ReleaseWithoutAsm|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="ReleaseWithoutAsm|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|x64"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzclose.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzio.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzlib.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzread.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\gzwrite.c">\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\infback.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\masmx64\inffas8664.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Debug|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="ReleaseWithoutAsm|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="ReleaseWithoutAsm|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Itanium"\r
+                                       ExcludedFromBuild="true"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\inffast.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\inflate.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\inftrees.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\minizip\ioapi.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\minizip\iowin32.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\trees.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\uncompr.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\minizip\unzip.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions="ZLIB_INTERNAL"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions="ZLIB_INTERNAL"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Itanium"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions="ZLIB_INTERNAL"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\minizip\zip.c"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions="ZLIB_INTERNAL"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|x64"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions="ZLIB_INTERNAL"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Itanium"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCLCompilerTool"\r
+                                               AdditionalIncludeDirectories=""\r
+                                               PreprocessorDefinitions="ZLIB_INTERNAL"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\zlib.rc"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\zlibvc.def"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\zutil.c"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;fi;fd"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\..\deflate.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\infblock.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\infcodes.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\inffast.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\inftrees.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\infutil.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\zconf.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\zlib.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\zutil.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
index ed19cc9dcd9feb29bfd2ba3e5ac8b471222da9e2..7f90d6bc7c49c73c40ccc1fcd4c144bc5f5c72b8 100644 (file)
@@ -4,7 +4,7 @@
 \r
        <property name="nunit.location" value="c:/program files/NUnit V2.1/bin" />\r
        <property name="build.root" value="bin" />\r
-       \r
+\r
        <property name="debug" value="true" />\r
        <property name="nunit" value="true" />\r
 \r
@@ -16,7 +16,7 @@
        </target>\r
 \r
        <target name="build" description="compiles the source code">\r
-               \r
+\r
                <mkdir dir="${build.folder}" />\r
                <csc target="library" output="${build.folder}DotZLib.dll" debug="${debug}">\r
                        <references basedir="${nunit.location}">\r
index 0bc7df76e407dcc69094483a6e9507240fe257ab..f214a444aebb20950fb3e8499b36731e1f12be95 100644 (file)
Binary files a/contrib/dotzlib/DotZLib.chm and b/contrib/dotzlib/DotZLib.chm differ
index 6fc0fdcc24ece4144a29443e1631d238b6e59b3c..0491bfc2b036f179f9d3a2f37fd61d9b3b8dd779 100644 (file)
@@ -2,7 +2,7 @@ using System.Reflection;
 using System.Runtime.CompilerServices;\r
 \r
 //\r
-// General Information about an assembly is controlled through the following \r
+// General Information about an assembly is controlled through the following\r
 // set of attributes. Change these attribute values to modify the information\r
 // associated with an assembly.\r
 //\r
@@ -13,42 +13,42 @@ using System.Runtime.CompilerServices;
 [assembly: AssemblyProduct("")]\r
 [assembly: AssemblyCopyright("(c) 2004 by Henrik Ravn")]\r
 [assembly: AssemblyTrademark("")]\r
-[assembly: AssemblyCulture("")]                \r
+[assembly: AssemblyCulture("")]\r
 \r
 //\r
 // Version information for an assembly consists of the following four values:\r
 //\r
 //      Major Version\r
-//      Minor Version \r
+//      Minor Version\r
 //      Build Number\r
 //      Revision\r
 //\r
-// You can specify all the values or you can default the Revision and Build Numbers \r
+// You can specify all the values or you can default the Revision and Build Numbers\r
 // by using the '*' as shown below:\r
 \r
 [assembly: AssemblyVersion("1.0.*")]\r
 \r
 //\r
-// In order to sign your assembly you must specify a key to use. Refer to the \r
+// In order to sign your assembly you must specify a key to use. Refer to the\r
 // Microsoft .NET Framework documentation for more information on assembly signing.\r
 //\r
-// Use the attributes below to control which key is used for signing. \r
+// Use the attributes below to control which key is used for signing.\r
 //\r
-// Notes: \r
+// Notes:\r
 //   (*) If no key is specified, the assembly is not signed.\r
 //   (*) KeyName refers to a key that has been installed in the Crypto Service\r
 //       Provider (CSP) on your machine. KeyFile refers to a file which contains\r
 //       a key.\r
-//   (*) If the KeyFile and the KeyName values are both specified, the \r
+//   (*) If the KeyFile and the KeyName values are both specified, the\r
 //       following processing occurs:\r
 //       (1) If the KeyName can be found in the CSP, that key is used.\r
-//       (2) If the KeyName does not exist and the KeyFile does exist, the key \r
+//       (2) If the KeyName does not exist and the KeyFile does exist, the key\r
 //           in the KeyFile is installed into the CSP and used.\r
 //   (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.\r
 //       When specifying the KeyFile, the location of the KeyFile should be\r
 //       relative to the project output directory which is\r
 //       %Project Directory%\obj\<configuration>. For example, if your KeyFile is\r
-//       located in the project directory, you would specify the AssemblyKeyFile \r
+//       located in the project directory, you would specify the AssemblyKeyFile\r
 //       attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]\r
 //   (*) Delay Signing is an advanced option - see the Microsoft .NET Framework\r
 //       documentation for more information on this.\r
index dfe7e90a8a1e040bf89ce9d01eda9ea53dafa6ce..788b2fcecedb07801588b0e7f6be89b66e4e1e72 100644 (file)
@@ -1,7 +1,7 @@
 //\r
 // Â© Copyright Henrik Ravn 2004\r
 //\r
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. \r
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.\r
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
 //\r
 \r
@@ -25,7 +25,7 @@ namespace DotZLib
         protected uint _current;\r
 \r
         /// <summary>\r
-        /// Initializes a new instance of the checksum generator base - the current checksum is \r
+        /// Initializes a new instance of the checksum generator base - the current checksum is\r
         /// set to zero\r
         /// </summary>\r
         public ChecksumGeneratorBase()\r
@@ -61,7 +61,7 @@ namespace DotZLib
         /// <exception cref="ArgumentException">The sum of offset and count is larger than the length of <c>data</c></exception>\r
         /// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>\r
         /// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>\r
-        /// <remarks>All the other <c>Update</c> methods are implmeneted in terms of this one. \r
+        /// <remarks>All the other <c>Update</c> methods are implmeneted in terms of this one.\r
         /// This is therefore the only method a derived class has to implement</remarks>\r
         public abstract void Update(byte[] data, int offset, int count);\r
 \r
@@ -101,7 +101,7 @@ namespace DotZLib
     /// <summary>\r
     /// Implements a CRC32 checksum generator\r
     /// </summary>\r
-    public sealed class CRC32Checksum : ChecksumGeneratorBase    \r
+    public sealed class CRC32Checksum : ChecksumGeneratorBase\r
     {\r
         #region DLL imports\r
 \r
@@ -152,7 +152,7 @@ namespace DotZLib
     /// <summary>\r
     /// Implements a checksum generator that computes the Adler checksum on data\r
     /// </summary>\r
-    public sealed class AdlerChecksum : ChecksumGeneratorBase    \r
+    public sealed class AdlerChecksum : ChecksumGeneratorBase\r
     {\r
         #region DLL imports\r
 \r
index 16997e906b681080f3c2a83085930d8988639d57..c1cab3a02c60973bc9676f6af9bea25801a33c9a 100644 (file)
@@ -1,7 +1,7 @@
 //\r
 // Â© Copyright Henrik Ravn 2004\r
 //\r
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. \r
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.\r
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
 //\r
 \r
@@ -25,7 +25,7 @@ namespace DotZLib
         #endregion\r
 \r
         public CircularBuffer(int capacity)\r
-        {    \r
+        {\r
             Debug.Assert( capacity > 0 );\r
             _buffer = new byte[capacity];\r
             _capacity = capacity;\r
index 954db7db05f0ef1a11012dc22573b2027b9548c4..42e6da3a5652fe2e96cdecf3c8c45a63a4cd0798 100644 (file)
@@ -1,7 +1,7 @@
 //\r
 // Â© Copyright Henrik Ravn 2004\r
 //\r
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. \r
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.\r
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
 //\r
 \r
@@ -19,7 +19,7 @@ namespace DotZLib
         #region Data members\r
 \r
         /// <summary>\r
-        /// Instance of the internal zlib buffer structure that is \r
+        /// Instance of the internal zlib buffer structure that is\r
         /// passed to all functions in the zlib dll\r
         /// </summary>\r
         internal ZStream _ztream = new ZStream();\r
@@ -45,7 +45,7 @@ namespace DotZLib
         #endregion\r
 \r
         /// <summary>\r
-        /// Initializes a new instance of the <c>CodeBase</c> class. \r
+        /// Initializes a new instance of the <c>CodeBase</c> class.\r
         /// </summary>\r
                public CodecBase()\r
                {\r
@@ -77,7 +77,7 @@ namespace DotZLib
             if (_ztream.total_out > 0)\r
             {\r
                 if (DataAvailable != null)\r
-                    DataAvailable( _outBuffer, 0, (int)_ztream.total_out); \r
+                    DataAvailable( _outBuffer, 0, (int)_ztream.total_out);\r
                 resetOutput();\r
             }\r
         }\r
index d7b8dcccac623a9a60f24931ef422632cfb2bde3..c2477925b626610a1737447cc6422a11fc35f0ed 100644 (file)
@@ -1,7 +1,7 @@
 //\r
 // Â© Copyright Henrik Ravn 2004\r
 //\r
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. \r
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.\r
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
 //\r
 \r
@@ -56,7 +56,7 @@ namespace DotZLib
             if (data == null) throw new ArgumentNullException();\r
             if (offset < 0 || count < 0) throw new ArgumentOutOfRangeException();\r
             if ((offset+count) > data.Length) throw new ArgumentException();\r
-            \r
+\r
             int total = count;\r
             int inputIndex = offset;\r
             int err = 0;\r
@@ -86,7 +86,7 @@ namespace DotZLib
         public override void Finish()\r
         {\r
             int err;\r
-            do \r
+            do\r
             {\r
                 err = deflate(ref _ztream, (int)FlushTypes.Finish);\r
                 OnDataAvailable();\r
index 410deb08851e94f87026fb5de0c0d6f8cb92b066..be184b4c71b47fef4ad94e93a6836591d5788ac0 100644 (file)
@@ -1,7 +1,7 @@
 //\r
 // Â© Copyright Henrik Ravn 2004\r
 //\r
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. \r
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.\r
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
 //\r
 \r
@@ -19,7 +19,7 @@ namespace DotZLib
     /// <summary>\r
     /// Defines constants for the various flush types used with zlib\r
     /// </summary>\r
-    internal enum FlushTypes \r
+    internal enum FlushTypes\r
     {\r
         None,  Partial,  Sync,  Full,  Finish,  Block\r
     }\r
@@ -38,7 +38,7 @@ namespace DotZLib
         public uint total_out;\r
 \r
         [MarshalAs(UnmanagedType.LPStr)]\r
-        string msg; \r
+        string msg;\r
         uint state;\r
 \r
         uint zalloc;\r
@@ -51,7 +51,7 @@ namespace DotZLib
     }\r
 \r
     #endregion\r
-    \r
+\r
     #endregion\r
 \r
     #region Public enums\r
@@ -63,7 +63,7 @@ namespace DotZLib
         /// <summary>\r
         /// The default compression level with a reasonable compromise between compression and speed\r
         /// </summary>\r
-        Default = -1,   \r
+        Default = -1,\r
         /// <summary>\r
         /// No compression at all. The data are passed straight through.\r
         /// </summary>\r
@@ -71,7 +71,7 @@ namespace DotZLib
         /// <summary>\r
         /// The maximum compression rate available.\r
         /// </summary>\r
-        Best = 9,   \r
+        Best = 9,\r
         /// <summary>\r
         /// The fastest available compression level.\r
         /// </summary>\r
@@ -86,7 +86,7 @@ namespace DotZLib
     public class ZLibException : ApplicationException\r
     {\r
         /// <summary>\r
-        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified \r
+        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified\r
         /// error message and error code\r
         /// </summary>\r
         /// <param name="errorCode">The zlib error code that caused the exception</param>\r
@@ -96,7 +96,7 @@ namespace DotZLib
         }\r
 \r
         /// <summary>\r
-        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified \r
+        /// Initializes a new instance of the <see cref="ZLibException"/> class with a specified\r
         /// error code\r
         /// </summary>\r
         /// <param name="errorCode">The zlib error code that caused the exception</param>\r
@@ -109,7 +109,7 @@ namespace DotZLib
     #region Interfaces\r
 \r
     /// <summary>\r
-    /// Declares methods and properties that enables a running checksum to be calculated \r
+    /// Declares methods and properties that enables a running checksum to be calculated\r
     /// </summary>\r
     public interface ChecksumGenerator\r
     {\r
@@ -163,7 +163,7 @@ namespace DotZLib
     /// <paramref name="data">The byte array containing the processed data</paramref>\r
     /// <paramref name="startIndex">The index of the first processed byte in <c>data</c></paramref>\r
     /// <paramref name="count">The number of processed bytes available</paramref>\r
-    /// <remarks>On return from this method, the data may be overwritten, so grab it while you can. \r
+    /// <remarks>On return from this method, the data may be overwritten, so grab it while you can.\r
     /// You cannot assume that startIndex will be zero.\r
     /// </remarks>\r
     public delegate void DataAvailableHandler(byte[] data, int startIndex, int count);\r
index f861675b518ff730019e08af9869ace8d475a768..b161300b185919abba6e22dfee577a74dbaeb1a7 100644 (file)
@@ -1,7 +1,7 @@
 //\r
 // Â© Copyright Henrik Ravn 2004\r
 //\r
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. \r
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.\r
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
 //\r
 \r
@@ -84,7 +84,7 @@ namespace DotZLib
                 return !_isWriting;\r
             }\r
         }\r
-    \r
+\r
 \r
         /// <summary>\r
         /// Returns false.\r
@@ -96,7 +96,7 @@ namespace DotZLib
                 return false;\r
             }\r
         }\r
-    \r
+\r
         /// <summary>\r
         /// Returns true if this tsream is writeable, false otherwise\r
         /// </summary>\r
@@ -108,7 +108,7 @@ namespace DotZLib
             }\r
         }\r
         #endregion\r
-    \r
+\r
         #region Destructor & IDispose stuff\r
 \r
         /// <summary>\r
@@ -137,7 +137,7 @@ namespace DotZLib
             }\r
         }\r
         #endregion\r
-    \r
+\r
         #region Basic reading and writing\r
         /// <summary>\r
         /// Attempts to read a number of bytes from the stream.\r
@@ -244,7 +244,7 @@ namespace DotZLib
         {\r
             throw new NotSupportedException();\r
         }\r
-    \r
+\r
         /// <summary>\r
         ///  Not suppported.\r
         /// </summary>\r
@@ -256,7 +256,7 @@ namespace DotZLib
         {\r
             throw new NotSupportedException();\r
         }\r
-    \r
+\r
         /// <summary>\r
         /// Flushes the <c>GZipStream</c>.\r
         /// </summary>\r
@@ -266,7 +266,7 @@ namespace DotZLib
         {\r
             // left empty on purpose\r
         }\r
-    \r
+\r
         /// <summary>\r
         /// Gets/sets the current position in the <c>GZipStream</c>. Not suppported.\r
         /// </summary>\r
@@ -283,7 +283,7 @@ namespace DotZLib
                 throw new NotSupportedException();\r
             }\r
         }\r
-    \r
+\r
         /// <summary>\r
         /// Gets the size of the stream. Not suppported.\r
         /// </summary>\r
index 4e60cda078b5ab212c1f682fe3005aaacea6c491..8ed5451d664204ecb9c73fc9d7beae5a976087f3 100644 (file)
@@ -1,7 +1,7 @@
 //\r
 // Â© Copyright Henrik Ravn 2004\r
 //\r
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. \r
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.\r
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
 //\r
 \r
@@ -11,7 +11,7 @@ using System.Runtime.InteropServices;
 \r
 namespace DotZLib\r
 {\r
-    \r
+\r
     /// <summary>\r
     /// Implements a data decompressor, using the inflate algorithm in the ZLib dll\r
     /// </summary>\r
@@ -84,7 +84,7 @@ namespace DotZLib
         public override void Finish()\r
         {\r
             int err;\r
-            do \r
+            do\r
             {\r
                 err = inflate(ref _ztream, (int)FlushTypes.Finish);\r
                 OnDataAvailable();\r
index 8dc00db92dde21d3547fbe67016791f36a5d9e7f..eb751bbbddeab6bf5e0d6966a48af0b4f7c91719 100644 (file)
@@ -1,7 +1,7 @@
 //\r
 // Â© Copyright Henrik Ravn 2004\r
 //\r
-// Use, modification and distribution are subject to the Boost Software License, Version 1.0. \r
+// Use, modification and distribution are subject to the Boost Software License, Version 1.0.\r
 // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
 //\r
 \r
@@ -225,7 +225,7 @@ namespace DotZLibTests
 \r
         [Test]\r
         public void Inflate_Expand()\r
-        { \r
+        {\r
             uncompressedData.Clear();\r
 \r
             using (Inflater inf = new Inflater())\r
index 210f4b00192684ae2e1f051d7f50306ea79e7719..b2395720d4c5693213001c449ed09869be9bd944 100644 (file)
@@ -1,6 +1,6 @@
 This directory contains a .Net wrapper class library for the ZLib1.dll\r
 \r
-The wrapper includes support for inflating/deflating memory buffers, \r
+The wrapper includes support for inflating/deflating memory buffers,\r
 .Net streaming wrappers for the gz streams part of zlib, and wrappers\r
 for the checksum parts of zlib. See DotZLib/UnitTests.cs for examples.\r
 \r
@@ -26,11 +26,11 @@ Build instructions:
 \r
 1. Using Visual Studio.Net 2003:\r
    Open DotZLib.sln in VS.Net and build from there. Output file (DotZLib.dll)\r
-   will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on \r
-   you are building the release or debug version of the library. Check \r
+   will be found ./DotZLib/bin/release or ./DotZLib/bin/debug, depending on\r
+   you are building the release or debug version of the library. Check\r
    DotZLib/UnitTests.cs for instructions on how to include unit tests in the\r
    build.\r
-   \r
+\r
 2. Using NAnt:\r
    Open a command prompt with access to the build environment and run nant\r
    in the same directory as the DotZLib.build file.\r
@@ -38,15 +38,15 @@ Build instructions:
    debug={true|false} to toggle between release/debug builds (default=true).\r
    nunit={true|false} to include or esclude unit tests (default=true).\r
    Also the target clean will remove binaries.\r
-   Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release \r
-   or ./DotZLib/bin/debug, depending on whether you are building the release \r
+   Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release\r
+   or ./DotZLib/bin/debug, depending on whether you are building the release\r
    or debug version of the library.\r
 \r
-   Examples: \r
+   Examples:\r
      nant -D:debug=false -D:nunit=false\r
        will build a release mode version of the library without unit tests.\r
      nant\r
-       will build a debug version of the library with unit tests \r
+       will build a debug version of the library with unit tests\r
      nant clean\r
        will remove all previously built files.\r
 \r
@@ -54,5 +54,5 @@ Build instructions:
 ---------------------------------\r
 Copyright (c) Henrik Ravn 2004\r
 \r
-Use, modification and distribution are subject to the Boost Software License, Version 1.0. \r
+Use, modification and distribution are subject to the Boost Software License, Version 1.0.\r
 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
index 2018e4d2cbb55796b1b29d64b870108e71b7ee49..256c5d514566e8a0147f98dd88d23319f359bbbc 100644 (file)
@@ -9,7 +9,7 @@
 #define MAXBITS 15
 
 const char inflate9_copyright[] =
-   " inflate9 1.2.3.7 Copyright 1995-2010 Mark Adler ";
+   " inflate9 1.2.3.8 Copyright 1995-2010 Mark Adler ";
 /*
   If you use the zlib library in a product, an acknowledgment is welcome
   in the documentation of your product. If for some reason you cannot
@@ -64,7 +64,7 @@ unsigned short FAR *work;
     static const unsigned short lext[31] = { /* Length codes 257..285 extra */
         128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
         130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
-        133, 133, 133, 133, 144, 72, 193};
+        133, 133, 133, 133, 144, 78, 75};
     static const unsigned short dbase[32] = { /* Distance codes 0..31 base */
         1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49,
         65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073,
index 790d65554a187a321bde709c97b1d0122d732bff..d2790cc1018f83a47806b9e85fbf9ccc943e052a 100644 (file)
@@ -406,7 +406,8 @@ LoopCmps:
 \r
         add rdx,8+8+8\r
 \r
-        jmp short LoopCmps\r
+        jnz short LoopCmps\r
+        jmp short LenMaximum\r
 LeaveLoopCmps16: add rdx,8\r
 LeaveLoopCmps8: add rdx,8\r
 LeaveLoopCmps:\r
diff --git a/contrib/masmx64/gvmat64.obj b/contrib/masmx64/gvmat64.obj
deleted file mode 100644 (file)
index a49ca02..0000000
Binary files a/contrib/masmx64/gvmat64.obj and /dev/null differ
index 3af764de9c8e6fb454043b6bc2bc3638bcd9a5b6..2263d7741b282cf226f7f44e1280f8997a37ff3a 100644 (file)
@@ -111,11 +111,11 @@ unsigned start;         /* inflate()'s starting value for strm->avail_out */
     type_ar ar;\r
     void inffas8664fnc(struct inffast_ar * par);\r
 \r
-    \r
+\r
 \r
 #if (defined( __GNUC__ ) && defined( __amd64__ ) && ! defined( __i386 )) || (defined(_MSC_VER) && defined(_M_AMD64))\r
 #define PAD_AVAIL_IN 6\r
-#define PAD_AVAIL_OUT 258    \r
+#define PAD_AVAIL_OUT 258\r
 #else\r
 #define PAD_AVAIL_IN 5\r
 #define PAD_AVAIL_OUT 257\r
index b5d93a272abc46d4676b4a0f5ced980bbbd2bbfd..c2ba03f5ba68d2983b3bff1f673ad3484285264c 100644 (file)
@@ -11,7 +11,7 @@
 ;\r
 ;   ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK\r
 ;\r
-;   (you can get Windows 2003 server DDK with ml64 and cl.exe for AMD64 from \r
+;   (you can get Windows 2003 server DDK with ml64 and cl.exe for AMD64 from\r
 ;      http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)\r
 ;\r
 \r
@@ -379,7 +379,7 @@ L_break_loop_with_status:
        mov r14,[rsp-40]\r
        mov r15,[rsp-48]\r
        mov rbx,[rsp-56]\r
-       \r
+\r
     ret 0\r
 ;          :\r
 ;          : "m" (ar)\r
diff --git a/contrib/masmx64/inffasx64.obj b/contrib/masmx64/inffasx64.obj
deleted file mode 100644 (file)
index 8df5d82..0000000
Binary files a/contrib/masmx64/inffasx64.obj and /dev/null differ
index ee03115c5a78b0a9e6f17bcb84ac17e00e5ef2b8..cd697c41a82d382b62493901be9dde3c372432a1 100644 (file)
@@ -24,5 +24,5 @@ run bld_64.bat with Microsoft Macro Assembler (x64) for AMD64 (ml64.exe)
 \r
 ml64.exe is given with Visual Studio 2005, Windows 2003 server DDK\r
 \r
-You can get Windows 2003 server DDK with ml64 and cl for AMD64 from \r
+You can get Windows 2003 server DDK with ml64 and cl for AMD64 from\r
   http://www.microsoft.com/whdc/devtools/ddk/default.mspx for low price)\r
index 99144d07af04ecb6189190e755d238c11445eb64..36962e100c1f40b8b95f992165b2583e9c92c511 100644 (file)
@@ -1,2 +1,2 @@
-ml /coff /Zi /c /Flgvmat32.lst  gvmat32.asm \r
-ml /coff /Zi /c /Flinffas32.lst inffas32.asm \r
+ml /coff /Zi /c /Flgvmat32.lst  gvmat32.asm\r
+ml /coff /Zi /c /Flinffas32.lst inffas32.asm\r
index 874bb2d482beb9794956cb376190be1b7a29bc42..81116165bcddaedad030ba731064d8bcfe24522f 100644 (file)
@@ -14,7 +14,7 @@
 ;\r
 ; this file contain two implementation of longest_match\r
 ;\r
-;  longest_match_7fff : written 1996 by Gilles Vollant optimized for \r
+;  longest_match_7fff : written 1996 by Gilles Vollant optimized for\r
 ;            first Pentium. Assume s->w_mask == 0x7fff\r
 ;  longest_match_686 : written by Brian raiter (1998), optimized for Pentium Pro\r
 ;\r
@@ -39,7 +39,7 @@
 ;\r
 ;    compile the asm file running\r
 ;           ml /coff /Zi /c /Flgvmat32.lst /DNOOLDPENTIUMCODE gvmat32.asm\r
-;    and do not include gvmat32c.c in your project (ou define also \r
+;    and do not include gvmat32c.c in your project (ou define also\r
 ;              NOOLDPENTIUMCODE)\r
 ;\r
 ; note : as I known, longest_match_686 is very faster than longest_match_7fff\r
@@ -113,7 +113,7 @@ IFDEF NOUNDERLINE
    IFDEF NOOLDPENTIUMCODE\r
             public  longest_match\r
             public  match_init\r
-   ELSE            \r
+   ELSE\r
             public  longest_match_7fff\r
             public  cpudetect32\r
             public  longest_match_686\r
@@ -959,7 +959,7 @@ IFDEF NOOLDPENTIUMCODE
     _match_init     proc near\r
                     ret\r
     _match_init     endp\r
-    ENDIF    \r
+    ENDIF\r
 ELSE\r
     IFDEF NOUNDERLINE\r
     longest_match_686   endp\r
diff --git a/contrib/masmx86/gvmat32.obj b/contrib/masmx86/gvmat32.obj
deleted file mode 100644 (file)
index ebb3262..0000000
Binary files a/contrib/masmx86/gvmat32.obj and /dev/null differ
index 05c46dd55a311b657a0604eb5331213efbab58f8..92ac22ad9d904b5328adf6f00d9da9a2ff4bdf7f 100644 (file)
@@ -16,7 +16,7 @@
 ; * enabled.  I will attempt to merge the MMX code into this version.  Newer\r
 ; * versions of this and inffast.S can be found at\r
 ; * http://www.eetbeetee.com/zlib/ and http://www.charm.net/~christop/zlib/\r
-; * \r
+; *\r
 ; * 2005 : modification by Gilles Vollant\r
 ; */\r
 ; For Visual C++ 4.x and higher and ML 6.x and higher\r
@@ -33,7 +33,7 @@
 \r
 \r
 ; zlib122sup is 0 fort zlib 1.2.2.1 and lower\r
-; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head \r
+; zlib122sup is 8 fort zlib 1.2.2.2 and more (with addition of dmax and head\r
 ;        in inflate_state in inflate.h)\r
 zlib1222sup      equ    8\r
 \r
diff --git a/contrib/masmx86/inffas32.obj b/contrib/masmx86/inffas32.obj
deleted file mode 100644 (file)
index bd6664d..0000000
Binary files a/contrib/masmx86/inffas32.obj and /dev/null differ
index fbba3ac95aa468de57b46736e6885cf40784b907..84eaad20d4fb19b00965268dd75d7e9b66c8cc21 100644 (file)
@@ -1,25 +1,25 @@
-CC=cc\r
-CFLAGS=-O -I../..\r
-\r
-UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a\r
-ZIP_OBJS = minizip.o zip.o   ioapi.o ../../libz.a\r
-\r
-.c.o:\r
-       $(CC) -c $(CFLAGS) $*.c\r
-\r
-all: miniunz minizip\r
-\r
-miniunz:  $(UNZ_OBJS)\r
-       $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)\r
-\r
-minizip:  $(ZIP_OBJS)\r
-       $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)\r
-\r
-test:  miniunz minizip\r
-       ./minizip test readme.txt\r
-       ./miniunz -l test.zip\r
-       mv readme.txt readme.old\r
-       ./miniunz test.zip\r
-\r
-clean:\r
-       /bin/rm -f *.o *~ minizip miniunz\r
+CC=cc
+CFLAGS=-O -I../..
+
+UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
+ZIP_OBJS = minizip.o zip.o   ioapi.o ../../libz.a
+
+.c.o:
+       $(CC) -c $(CFLAGS) $*.c
+
+all: miniunz minizip
+
+miniunz:  $(UNZ_OBJS)
+       $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
+
+minizip:  $(ZIP_OBJS)
+       $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
+
+test:  miniunz minizip
+       ./minizip test readme.txt
+       ./miniunz -l test.zip
+       mv readme.txt readme.old
+       ./miniunz test.zip
+
+clean:
+       /bin/rm -f *.o *~ minizip miniunz
index 9d370df9af97fb69ad2f8af24840328aa95442c2..436d8b3c2025e0ac866ca0923ab36984c7c989ac 100644 (file)
@@ -1,7 +1,6 @@
-\r
-MiniZip64 was derrived from MiniZip at version 1.01f\r
-\r
-Change in 1.0 (Okt 2009)\r
- - **TODO - Add history**\r
\r
\ No newline at end of file
+
+MiniZip64 was derrived from MiniZip at version 1.01f
+
+Change in 1.0 (Okt 2009)
+ - **TODO - Add history**
+
index f4eef25750ff784df5df056c9ccf0448db89eb6d..334b0f05e11e176291e5e66e1e2735f5f20d6a07 100644 (file)
@@ -1,79 +1,79 @@
-MiniZip64 - Copyright (c) 2009-2010 - Mathias Svensson - Built from MiniZip by Gilles Vollant\r
-\r
-Introduction\r
----------------------\r
-MiniZip64 is built from MiniZip by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html )\r
-\r
-When adding ZIP64 support into minizip it would result into breaking compatibility with current minizip.\r
-And since breaking compatibility in minizip is not wanted. I decided to create a fork of minizip \r
-and create minizip64.\r
-\r
-Even though MiniZip64 is build from MiniZip, all functions and struct's have changed name so that it \r
-would not collide with each other.\r
-\r
-\r
-Background\r
----------------------\r
-When adding ZIP64 support I found that Even Rouault have added ZIP64 support for unzip.c into minizip \r
-for a open source project called gdal ( http://www.gdal.org/ )\r
-\r
-That was used as a starting point. And after that ZIP64 support was added to zip.c\r
-some refactoring and code cleanup was also done.\r
-\r
-\r
-Changed from MiniZip to MiniZip64\r
--------------------------------------\r
-* Filenames has got a '64' at the end of them . eg unzip.c is now called unzip64.c\r
-* Added ZIP64 support for unzip ( by Even Rouault )\r
-* Added ZIP64 support for zip ( by Mathias Svensson )\r
-* Reverted some changed that Even Rouault did.\r
-* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users.\r
-* Added unzip patch for BZIP Compression method (patch create by Daniel Borca)\r
-* Added BZIP Compress method for zip\r
-* Did some refactoring and code cleanup\r
-\r
-\r
-Credits \r
-\r
- Gilles Vollant    - Original MiniZip author\r
- Even Rouault      - ZIP64 unzip Support\r
- Daniel Borca      - BZip Compression method support in unzip\r
- Mathias Svensson  - ZIP64 zip support\r
- Mathias Svensson  - BZip Compression method support in zip\r
\r
- Resources \r
\r
- ZipLayout   http://result42.com/projects/ZipFileLayout\r
-             Command line tool for Windows that shows the layout and information of the headers in a zip archive.\r
-             Used when debugging and validating the creation of zip files using MiniZip64\r
-                        \r
-                        \r
- ZIP App Note  http://www.pkware.com/documents/casestudies/APPNOTE.TXT\r
-               Zip File specification\r
-        \r
-\r
-Notes.\r
- * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined.\r
-\r
-License\r
-----------------------------------------------------------\r
-   Condition of use and distribution are the same than zlib :\r
-\r
-  This software is provided 'as-is', without any express or implied\r
-  warranty.  In no event will the authors be held liable for any damages\r
-  arising from the use of this software.\r
-\r
-  Permission is granted to anyone to use this software for any purpose,\r
-  including commercial applications, and to alter it and redistribute it\r
-  freely, subject to the following restrictions:\r
-\r
-  1. The origin of this software must not be misrepresented; you must not\r
-     claim that you wrote the original software. If you use this software\r
-     in a product, an acknowledgment in the product documentation would be\r
-     appreciated but is not required.\r
-  2. Altered source versions must be plainly marked as such, and must not be\r
-     misrepresented as being the original software.\r
-  3. This notice may not be removed or altered from any source distribution.\r
-\r
-----------------------------------------------------------\r
-\r
+MiniZip64 - Copyright (c) 2009-2010 - Mathias Svensson - Built from MiniZip by Gilles Vollant
+
+Introduction
+---------------------
+MiniZip64 is built from MiniZip by Gilles Vollant ( http://www.winimage.com/zLibDll/minizip.html )
+
+When adding ZIP64 support into minizip it would result into breaking compatibility with current minizip.
+And since breaking compatibility in minizip is not wanted. I decided to create a fork of minizip
+and create minizip64.
+
+Even though MiniZip64 is build from MiniZip, all functions and struct's have changed name so that it
+would not collide with each other.
+
+
+Background
+---------------------
+When adding ZIP64 support I found that Even Rouault have added ZIP64 support for unzip.c into minizip
+for a open source project called gdal ( http://www.gdal.org/ )
+
+That was used as a starting point. And after that ZIP64 support was added to zip.c
+some refactoring and code cleanup was also done.
+
+
+Changed from MiniZip to MiniZip64
+-------------------------------------
+* Filenames has got a '64' at the end of them . eg unzip.c is now called unzip64.c
+* Added ZIP64 support for unzip ( by Even Rouault )
+* Added ZIP64 support for zip ( by Mathias Svensson )
+* Reverted some changed that Even Rouault did.
+* Bunch of patches received from Gulles Vollant that he received for MiniZip from various users.
+* Added unzip patch for BZIP Compression method (patch create by Daniel Borca)
+* Added BZIP Compress method for zip
+* Did some refactoring and code cleanup
+
+
+Credits
+
+ Gilles Vollant    - Original MiniZip author
+ Even Rouault      - ZIP64 unzip Support
+ Daniel Borca      - BZip Compression method support in unzip
+ Mathias Svensson  - ZIP64 zip support
+ Mathias Svensson  - BZip Compression method support in zip
+
+ Resources
+
+ ZipLayout   http://result42.com/projects/ZipFileLayout
+             Command line tool for Windows that shows the layout and information of the headers in a zip archive.
+             Used when debugging and validating the creation of zip files using MiniZip64
+
+
+ ZIP App Note  http://www.pkware.com/documents/casestudies/APPNOTE.TXT
+               Zip File specification
+
+
+Notes.
+ * To be able to use BZip compression method in zip64.c or unzip64.c the BZIP2 lib is needed and HAVE_BZIP2 need to be defined.
+
+License
+----------------------------------------------------------
+   Condition of use and distribution are the same than zlib :
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of 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 following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+----------------------------------------------------------
+
index 679e2a1e9c3c0e9ea13ea8a86400415c9c9d8595..a01d08d932852ed4612183cda59d19df97d2ad54 100644 (file)
@@ -91,7 +91,7 @@ static int crypthead(const char* passwd,      /* password string */
                      unsigned char* buf,      /* where to write header */
                      int bufSize,
                      unsigned long* pkeys,
-                     const unsigned long* pcrc_32_tab, 
+                     const unsigned long* pcrc_32_tab,
                      unsigned long crcForCrypting)
 {
     int n;                       /* index in random header */
index 36ed0e04eebbd3827a4000d50984db870c772980..a5f1e0b1daedb58a72beb8d241515e04032cbb8a 100644 (file)
@@ -3,7 +3,7 @@
 
         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
-        Modifications for Zip64 support 
+        Modifications for Zip64 support
         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 
         For more info read MiniZip_info.txt
index f443d82b413fa8bfc1fa3003c520c0a54c6772ac..1c7feb0c3562a053e1d3a0af791e61b3494a4698 100644 (file)
@@ -3,7 +3,7 @@
 
         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
-        Modifications for Zip64 support 
+        Modifications for Zip64 support
         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 
         For more info read MiniZip_info.txt
@@ -13,7 +13,7 @@
     Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this)
     Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux.
                More if/def section may be needed to support other platforms
-    Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. 
+    Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows.
                          (but you should use iowin32.c for windows instead)
 
 */
@@ -21,7 +21,7 @@
 #ifndef _ZLIBIOAPI64_H
 #define _ZLIBIOAPI64_H
 
-#ifndef _WIN32 
+#ifndef _WIN32
 
   // Linux needs this to support file operation on files larger then 4+GB
   // But might need better if/def to select just the platforms that needs them.
@@ -60,7 +60,7 @@
   #ifdef _WIN32
                #define ZPOS64_T fpos_t
   #else
-    #include <stdint.h>        
+    #include <stdint.h>
     #define ZPOS64_T uint64_t
   #endif
 #endif
index 92b93520d7cd09a8e9dec0a770d5f3b2d124a397..43a5715eb6f649a1b39036328fdac8adbfc1d607 100644 (file)
@@ -4,7 +4,7 @@
 
         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
-        Modifications for Zip64 support 
+        Modifications for Zip64 support
         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 
      For more info read MiniZip_info.txt
index cc77ec46bea3ab96b4889e70a1dffb0c619d156b..1b6c533a113e418c4bd3e4dfa7a12ac61623e348 100644 (file)
@@ -4,7 +4,7 @@
 
         Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
 
-        Modifications for Zip64 support 
+        Modifications for Zip64 support
         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 
         For more info read MiniZip_info.txt
index 548ee29ede5ff6714bd17c2bb7a0f7cd1c2e5d4e..23e1a3a2b398d836367c224f6d842b64963c2b9a 100644 (file)
@@ -12,7 +12,7 @@ $ close zdef
 $ copy vmsdefs.h,ioapi.h_orig ioapi.h
 $ cc/include=[--]/prefix=all ioapi.c
 $ cc/include=[--]/prefix=all miniunz.c
-$ cc/include=[--]/prefix=all unzip.c 
+$ cc/include=[--]/prefix=all unzip.c
 $ cc/include=[--]/prefix=all minizip.c
 $ cc/include=[--]/prefix=all zip.c
 $ link miniunz,unzip,ioapi,[--]libz.olb/lib
index c0a07ab90ceb97bcd840ef681177be85ff921876..cad8ae27d628ddcfe2c20af49e3e6a9c37b85597 100644 (file)
@@ -12,7 +12,7 @@
         Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
 */
 
-#ifndef _WIN32 
+#ifndef _WIN32
        #ifndef __USE_FILE_OFFSET64
                #define __USE_FILE_OFFSET64
        #endif
@@ -375,7 +375,7 @@ int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,password)
 
                     printf("The file %s exists. Overwrite ? [y]es, [n]o, [A]ll: ",write_filename);
                     ret = scanf("%1s",answer);
-                    if (ret != 1) 
+                    if (ret != 1)
                     {
                        exit(EXIT_FAILURE);
                     }
@@ -627,9 +627,9 @@ int main(argc,argv)
     else if (opt_do_extract==1)
     {
 #ifdef _WIN32
-        if (opt_extractdir && _chdir(dirname)) 
+        if (opt_extractdir && _chdir(dirname))
 #else
-        if (opt_extractdir && chdir(dirname)) 
+        if (opt_extractdir && chdir(dirname))
 #endif
         {
           printf("Error changing into %s, aborting\n", dirname);
index 4ce33aff8ce9cf9ca3893b884e20f8e8ffab34ae..ca26091c8cf9c825ced0fb939ffa3a905672f45f 100644 (file)
@@ -13,7 +13,7 @@
 */
 
 
-#ifndef _WIN32 
+#ifndef _WIN32
        #ifndef __USE_FILE_OFFSET64
                #define __USE_FILE_OFFSET64
        #endif
@@ -219,15 +219,15 @@ int isLargeFile(const char* filename)
     int n = fseeko64(pFile, 0, SEEK_END);
 
     pos = ftello64(pFile);
-    
+
                printf("File : %s is %lld bytes\n", filename, pos);
-    
+
     if(pos >= 0xffffffff)
      largeFile = 1;
 
                fclose(pFile);
   }
-  
+
  return largeFile;
 }
 
@@ -406,7 +406,7 @@ int main(argc,argv)
 */
                 if ((password != NULL) && (err==ZIP_OK))
                     err = getFileCrc(filenameinzip,buf,size_buf,&crcFile);
+
                 zip64 = isLargeFile(filenameinzip);
 
                                                         /* The path name saved, should not include a leading slash. */
index bc5c7982ddbf37ccfdf31cc3047d8aa3fb7099ad..f9092e65ae6c5f19813c57d808a9c684a6b0d4fc 100644 (file)
-/*\r
-  Additional tools for Minizip\r
-  Code: Xavier Roche '2004\r
-  License: Same as ZLIB (www.gzip.org)\r
-*/\r
-\r
-/* Code */\r
-#include <stdio.h>\r
-#include <stdlib.h>\r
-#include <string.h>\r
-#include "zlib.h"\r
-#include "unzip.h"\r
-\r
-#define READ_8(adr)  ((unsigned char)*(adr))\r
-#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) )\r
-#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) )\r
-\r
-#define WRITE_8(buff, n) do { \\r
-  *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \\r
-} while(0)\r
-#define WRITE_16(buff, n) do { \\r
-  WRITE_8((unsigned char*)(buff), n); \\r
-  WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \\r
-} while(0)\r
-#define WRITE_32(buff, n) do { \\r
-  WRITE_16((unsigned char*)(buff), (n) & 0xffff); \\r
-  WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \\r
-} while(0)\r
-\r
-extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered)\r
-const char* file;\r
-const char* fileOut;\r
-const char* fileOutTmp;\r
-uLong* nRecovered;\r
-uLong* bytesRecovered;\r
-{\r
-  int err = Z_OK;\r
-  FILE* fpZip = fopen(file, "rb");\r
-  FILE* fpOut = fopen(fileOut, "wb");\r
-  FILE* fpOutCD = fopen(fileOutTmp, "wb");\r
-  if (fpZip != NULL &&  fpOut != NULL) {\r
-    int entries = 0;\r
-    uLong totalBytes = 0;\r
-    char header[30];\r
-    char filename[256];\r
-    char extra[1024];\r
-    int offset = 0;\r
-    int offsetCD = 0;\r
-    while ( fread(header, 1, 30, fpZip) == 30 ) {\r
-      int currentOffset = offset;\r
-\r
-      /* File entry */\r
-      if (READ_32(header) == 0x04034b50) {\r
-        unsigned int version = READ_16(header + 4);\r
-        unsigned int gpflag = READ_16(header + 6);\r
-        unsigned int method = READ_16(header + 8);\r
-        unsigned int filetime = READ_16(header + 10);\r
-        unsigned int filedate = READ_16(header + 12);\r
-        unsigned int crc = READ_32(header + 14); /* crc */\r
-        unsigned int cpsize = READ_32(header + 18); /* compressed size */\r
-        unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */\r
-        unsigned int fnsize = READ_16(header + 26); /* file name length */\r
-        unsigned int extsize = READ_16(header + 28); /* extra field length */\r
-        filename[0] = extra[0] = '\0';\r
-        \r
-        /* Header */\r
-        if (fwrite(header, 1, 30, fpOut) == 30) {\r
-          offset += 30;\r
-        } else {\r
-          err = Z_ERRNO;\r
-          break;\r
-        }\r
-        \r
-        /* Filename */\r
-        if (fnsize > 0) {\r
-          if (fread(filename, 1, fnsize, fpZip) == fnsize) {\r
-            if (fwrite(filename, 1, fnsize, fpOut) == fnsize) {\r
-              offset += fnsize;\r
-            } else {\r
-              err = Z_ERRNO;\r
-              break;\r
-            }\r
-          } else {\r
-            err = Z_ERRNO;\r
-            break;\r
-          }\r
-        } else {\r
-          err = Z_STREAM_ERROR;\r
-          break;\r
-        }\r
-\r
-        /* Extra field */\r
-        if (extsize > 0) {\r
-          if (fread(extra, 1, extsize, fpZip) == extsize) {\r
-            if (fwrite(extra, 1, extsize, fpOut) == extsize) {\r
-              offset += extsize;\r
-            } else {\r
-              err = Z_ERRNO;\r
-              break;\r
-            }\r
-          } else {\r
-            err = Z_ERRNO;\r
-            break;\r
-          }\r
-        }\r
-        \r
-        /* Data */\r
-        {\r
-          int dataSize = cpsize;\r
-          if (dataSize == 0) {\r
-            dataSize = uncpsize;\r
-          }\r
-          if (dataSize > 0) {\r
-            char* data = malloc(dataSize);\r
-            if (data != NULL) {\r
-              if ((int)fread(data, 1, dataSize, fpZip) == dataSize) {\r
-                if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) {\r
-                  offset += dataSize;\r
-                  totalBytes += dataSize;\r
-                } else {\r
-                  err = Z_ERRNO;\r
-                }\r
-              } else {\r
-                err = Z_ERRNO;\r
-              }\r
-              free(data);\r
-              if (err != Z_OK) {\r
-                break;\r
-              }\r
-            } else {\r
-              err = Z_MEM_ERROR;\r
-              break;\r
-            }\r
-          }\r
-        }\r
-        \r
-        /* Central directory entry */\r
-        {\r
-          char header[46];\r
-          char* comment = "";\r
-          int comsize = (int) strlen(comment);\r
-          WRITE_32(header, 0x02014b50);\r
-          WRITE_16(header + 4, version);\r
-          WRITE_16(header + 6, version);\r
-          WRITE_16(header + 8, gpflag);\r
-          WRITE_16(header + 10, method);\r
-          WRITE_16(header + 12, filetime);\r
-          WRITE_16(header + 14, filedate);\r
-          WRITE_32(header + 16, crc);\r
-          WRITE_32(header + 20, cpsize);\r
-          WRITE_32(header + 24, uncpsize);\r
-          WRITE_16(header + 28, fnsize);\r
-          WRITE_16(header + 30, extsize);\r
-          WRITE_16(header + 32, comsize);\r
-          WRITE_16(header + 34, 0);     /* disk # */\r
-          WRITE_16(header + 36, 0);     /* int attrb */\r
-          WRITE_32(header + 38, 0);     /* ext attrb */\r
-          WRITE_32(header + 42, currentOffset);\r
-          /* Header */\r
-          if (fwrite(header, 1, 46, fpOutCD) == 46) {\r
-            offsetCD += 46;\r
-            \r
-            /* Filename */\r
-            if (fnsize > 0) {\r
-              if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) {\r
-                offsetCD += fnsize;\r
-              } else {\r
-                err = Z_ERRNO;\r
-                break;\r
-              }\r
-            } else {\r
-              err = Z_STREAM_ERROR;\r
-              break;\r
-            }\r
-            \r
-            /* Extra field */\r
-            if (extsize > 0) {\r
-              if (fwrite(extra, 1, extsize, fpOutCD) == extsize) {\r
-                offsetCD += extsize;\r
-              } else {\r
-                err = Z_ERRNO;\r
-                break;\r
-              }\r
-            }\r
-            \r
-            /* Comment field */\r
-            if (comsize > 0) {\r
-              if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) {\r
-                offsetCD += comsize;\r
-              } else {\r
-                err = Z_ERRNO;\r
-                break;\r
-              }\r
-            }\r
-            \r
-            \r
-          } else {\r
-            err = Z_ERRNO;\r
-            break;\r
-          }\r
-        }\r
-\r
-        /* Success */\r
-        entries++;\r
-\r
-      } else {\r
-        break;\r
-      }\r
-    }\r
-\r
-    /* Final central directory  */\r
-    {\r
-      int entriesZip = entries;\r
-      char header[22];\r
-      char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools";\r
-      int comsize = (int) strlen(comment);\r
-      if (entriesZip > 0xffff) {\r
-        entriesZip = 0xffff;\r
-      }\r
-      WRITE_32(header, 0x06054b50);\r
-      WRITE_16(header + 4, 0);    /* disk # */\r
-      WRITE_16(header + 6, 0);    /* disk # */\r
-      WRITE_16(header + 8, entriesZip);   /* hack */\r
-      WRITE_16(header + 10, entriesZip);  /* hack */\r
-      WRITE_32(header + 12, offsetCD);    /* size of CD */\r
-      WRITE_32(header + 16, offset);      /* offset to CD */\r
-      WRITE_16(header + 20, comsize);     /* comment */\r
-      \r
-      /* Header */\r
-      if (fwrite(header, 1, 22, fpOutCD) == 22) {\r
-        \r
-        /* Comment field */\r
-        if (comsize > 0) {\r
-          if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) {\r
-            err = Z_ERRNO;\r
-          }\r
-        }\r
-        \r
-      } else {\r
-        err = Z_ERRNO;\r
-      }\r
-    }\r
-\r
-    /* Final merge (file + central directory) */\r
-    fclose(fpOutCD);\r
-    if (err == Z_OK) {\r
-      fpOutCD = fopen(fileOutTmp, "rb");\r
-      if (fpOutCD != NULL) {\r
-        int nRead;\r
-        char buffer[8192];\r
-        while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) {\r
-          if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) {\r
-            err = Z_ERRNO;\r
-            break;\r
-          }\r
-        }\r
-        fclose(fpOutCD);\r
-      }\r
-    }\r
-    \r
-    /* Close */\r
-    fclose(fpZip);\r
-    fclose(fpOut);\r
-    \r
-    /* Wipe temporary file */\r
-    (void)remove(fileOutTmp);\r
-    \r
-    /* Number of recovered entries */\r
-    if (err == Z_OK) {\r
-      if (nRecovered != NULL) {\r
-        *nRecovered = entries;\r
-      }\r
-      if (bytesRecovered != NULL) {\r
-        *bytesRecovered = totalBytes;\r
-      }\r
-    }\r
-  } else {\r
-    err = Z_STREAM_ERROR;\r
-  }\r
-  return err;\r
-}\r
+/*
+  Additional tools for Minizip
+  Code: Xavier Roche '2004
+  License: Same as ZLIB (www.gzip.org)
+*/
+
+/* Code */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "zlib.h"
+#include "unzip.h"
+
+#define READ_8(adr)  ((unsigned char)*(adr))
+#define READ_16(adr) ( READ_8(adr) | (READ_8(adr+1) << 8) )
+#define READ_32(adr) ( READ_16(adr) | (READ_16((adr)+2) << 16) )
+
+#define WRITE_8(buff, n) do { \
+  *((unsigned char*)(buff)) = (unsigned char) ((n) & 0xff); \
+} while(0)
+#define WRITE_16(buff, n) do { \
+  WRITE_8((unsigned char*)(buff), n); \
+  WRITE_8(((unsigned char*)(buff)) + 1, (n) >> 8); \
+} while(0)
+#define WRITE_32(buff, n) do { \
+  WRITE_16((unsigned char*)(buff), (n) & 0xffff); \
+  WRITE_16((unsigned char*)(buff) + 2, (n) >> 16); \
+} while(0)
+
+extern int ZEXPORT unzRepair(file, fileOut, fileOutTmp, nRecovered, bytesRecovered)
+const char* file;
+const char* fileOut;
+const char* fileOutTmp;
+uLong* nRecovered;
+uLong* bytesRecovered;
+{
+  int err = Z_OK;
+  FILE* fpZip = fopen(file, "rb");
+  FILE* fpOut = fopen(fileOut, "wb");
+  FILE* fpOutCD = fopen(fileOutTmp, "wb");
+  if (fpZip != NULL &&  fpOut != NULL) {
+    int entries = 0;
+    uLong totalBytes = 0;
+    char header[30];
+    char filename[256];
+    char extra[1024];
+    int offset = 0;
+    int offsetCD = 0;
+    while ( fread(header, 1, 30, fpZip) == 30 ) {
+      int currentOffset = offset;
+
+      /* File entry */
+      if (READ_32(header) == 0x04034b50) {
+        unsigned int version = READ_16(header + 4);
+        unsigned int gpflag = READ_16(header + 6);
+        unsigned int method = READ_16(header + 8);
+        unsigned int filetime = READ_16(header + 10);
+        unsigned int filedate = READ_16(header + 12);
+        unsigned int crc = READ_32(header + 14); /* crc */
+        unsigned int cpsize = READ_32(header + 18); /* compressed size */
+        unsigned int uncpsize = READ_32(header + 22); /* uncompressed sz */
+        unsigned int fnsize = READ_16(header + 26); /* file name length */
+        unsigned int extsize = READ_16(header + 28); /* extra field length */
+        filename[0] = extra[0] = '\0';
+
+        /* Header */
+        if (fwrite(header, 1, 30, fpOut) == 30) {
+          offset += 30;
+        } else {
+          err = Z_ERRNO;
+          break;
+        }
+
+        /* Filename */
+        if (fnsize > 0) {
+          if (fread(filename, 1, fnsize, fpZip) == fnsize) {
+            if (fwrite(filename, 1, fnsize, fpOut) == fnsize) {
+              offset += fnsize;
+            } else {
+              err = Z_ERRNO;
+              break;
+            }
+          } else {
+            err = Z_ERRNO;
+            break;
+          }
+        } else {
+          err = Z_STREAM_ERROR;
+          break;
+        }
+
+        /* Extra field */
+        if (extsize > 0) {
+          if (fread(extra, 1, extsize, fpZip) == extsize) {
+            if (fwrite(extra, 1, extsize, fpOut) == extsize) {
+              offset += extsize;
+            } else {
+              err = Z_ERRNO;
+              break;
+            }
+          } else {
+            err = Z_ERRNO;
+            break;
+          }
+        }
+
+        /* Data */
+        {
+          int dataSize = cpsize;
+          if (dataSize == 0) {
+            dataSize = uncpsize;
+          }
+          if (dataSize > 0) {
+            char* data = malloc(dataSize);
+            if (data != NULL) {
+              if ((int)fread(data, 1, dataSize, fpZip) == dataSize) {
+                if ((int)fwrite(data, 1, dataSize, fpOut) == dataSize) {
+                  offset += dataSize;
+                  totalBytes += dataSize;
+                } else {
+                  err = Z_ERRNO;
+                }
+              } else {
+                err = Z_ERRNO;
+              }
+              free(data);
+              if (err != Z_OK) {
+                break;
+              }
+            } else {
+              err = Z_MEM_ERROR;
+              break;
+            }
+          }
+        }
+
+        /* Central directory entry */
+        {
+          char header[46];
+          char* comment = "";
+          int comsize = (int) strlen(comment);
+          WRITE_32(header, 0x02014b50);
+          WRITE_16(header + 4, version);
+          WRITE_16(header + 6, version);
+          WRITE_16(header + 8, gpflag);
+          WRITE_16(header + 10, method);
+          WRITE_16(header + 12, filetime);
+          WRITE_16(header + 14, filedate);
+          WRITE_32(header + 16, crc);
+          WRITE_32(header + 20, cpsize);
+          WRITE_32(header + 24, uncpsize);
+          WRITE_16(header + 28, fnsize);
+          WRITE_16(header + 30, extsize);
+          WRITE_16(header + 32, comsize);
+          WRITE_16(header + 34, 0);     /* disk # */
+          WRITE_16(header + 36, 0);     /* int attrb */
+          WRITE_32(header + 38, 0);     /* ext attrb */
+          WRITE_32(header + 42, currentOffset);
+          /* Header */
+          if (fwrite(header, 1, 46, fpOutCD) == 46) {
+            offsetCD += 46;
+
+            /* Filename */
+            if (fnsize > 0) {
+              if (fwrite(filename, 1, fnsize, fpOutCD) == fnsize) {
+                offsetCD += fnsize;
+              } else {
+                err = Z_ERRNO;
+                break;
+              }
+            } else {
+              err = Z_STREAM_ERROR;
+              break;
+            }
+
+            /* Extra field */
+            if (extsize > 0) {
+              if (fwrite(extra, 1, extsize, fpOutCD) == extsize) {
+                offsetCD += extsize;
+              } else {
+                err = Z_ERRNO;
+                break;
+              }
+            }
+
+            /* Comment field */
+            if (comsize > 0) {
+              if ((int)fwrite(comment, 1, comsize, fpOutCD) == comsize) {
+                offsetCD += comsize;
+              } else {
+                err = Z_ERRNO;
+                break;
+              }
+            }
+
+
+          } else {
+            err = Z_ERRNO;
+            break;
+          }
+        }
+
+        /* Success */
+        entries++;
+
+      } else {
+        break;
+      }
+    }
+
+    /* Final central directory  */
+    {
+      int entriesZip = entries;
+      char header[22];
+      char* comment = ""; // "ZIP File recovered by zlib/minizip/mztools";
+      int comsize = (int) strlen(comment);
+      if (entriesZip > 0xffff) {
+        entriesZip = 0xffff;
+      }
+      WRITE_32(header, 0x06054b50);
+      WRITE_16(header + 4, 0);    /* disk # */
+      WRITE_16(header + 6, 0);    /* disk # */
+      WRITE_16(header + 8, entriesZip);   /* hack */
+      WRITE_16(header + 10, entriesZip);  /* hack */
+      WRITE_32(header + 12, offsetCD);    /* size of CD */
+      WRITE_32(header + 16, offset);      /* offset to CD */
+      WRITE_16(header + 20, comsize);     /* comment */
+
+      /* Header */
+      if (fwrite(header, 1, 22, fpOutCD) == 22) {
+
+        /* Comment field */
+        if (comsize > 0) {
+          if ((int)fwrite(comment, 1, comsize, fpOutCD) != comsize) {
+            err = Z_ERRNO;
+          }
+        }
+
+      } else {
+        err = Z_ERRNO;
+      }
+    }
+
+    /* Final merge (file + central directory) */
+    fclose(fpOutCD);
+    if (err == Z_OK) {
+      fpOutCD = fopen(fileOutTmp, "rb");
+      if (fpOutCD != NULL) {
+        int nRead;
+        char buffer[8192];
+        while ( (nRead = (int)fread(buffer, 1, sizeof(buffer), fpOutCD)) > 0) {
+          if ((int)fwrite(buffer, 1, nRead, fpOut) != nRead) {
+            err = Z_ERRNO;
+            break;
+          }
+        }
+        fclose(fpOutCD);
+      }
+    }
+
+    /* Close */
+    fclose(fpZip);
+    fclose(fpOut);
+
+    /* Wipe temporary file */
+    (void)remove(fileOutTmp);
+
+    /* Number of recovered entries */
+    if (err == Z_OK) {
+      if (nRecovered != NULL) {
+        *nRecovered = entries;
+      }
+      if (bytesRecovered != NULL) {
+        *bytesRecovered = totalBytes;
+      }
+    }
+  } else {
+    err = Z_STREAM_ERROR;
+  }
+  return err;
+}
index 82d1597ad704ef142b7bba292bcf936e08fa6bbe..88b34592bf5ce021640c242c727264e6287edcd7 100644 (file)
@@ -1,31 +1,31 @@
-/*\r
-  Additional tools for Minizip\r
-  Code: Xavier Roche '2004\r
-  License: Same as ZLIB (www.gzip.org)\r
-*/\r
-\r
-#ifndef _zip_tools_H\r
-#define _zip_tools_H\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-#ifndef _ZLIB_H\r
-#include "zlib.h"\r
-#endif\r
-\r
-#include "unzip.h"\r
-\r
-/* Repair a ZIP file (missing central directory) \r
-   file: file to recover\r
-   fileOut: output file after recovery\r
-   fileOutTmp: temporary file name used for recovery\r
-*/\r
-extern int ZEXPORT unzRepair(const char* file, \r
-                             const char* fileOut, \r
-                             const char* fileOutTmp, \r
-                             uLong* nRecovered,\r
-                             uLong* bytesRecovered);\r
-\r
-#endif\r
+/*
+  Additional tools for Minizip
+  Code: Xavier Roche '2004
+  License: Same as ZLIB (www.gzip.org)
+*/
+
+#ifndef _zip_tools_H
+#define _zip_tools_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _ZLIB_H
+#include "zlib.h"
+#endif
+
+#include "unzip.h"
+
+/* Repair a ZIP file (missing central directory)
+   file: file to recover
+   fileOut: output file after recovery
+   fileOutTmp: temporary file name used for recovery
+*/
+extern int ZEXPORT unzRepair(const char* file,
+                             const char* fileOut,
+                             const char* fileOutTmp,
+                             uLong* nRecovered,
+                             uLong* bytesRecovered);
+
+#endif
index 050d5060845b90651251d252625ec80c16327dde..6a4d1045abebc3bc7ce5fc2ad113d67ef5795e41 100644 (file)
@@ -15,7 +15,7 @@
 
   ------------------------------------------------------------------------------------
   Decryption code comes from crypt.c by Info-ZIP but has been greatly reduced in terms of
-  compatibility with older software. The following is from the original crypt.c. 
+  compatibility with older software. The following is from the original crypt.c.
   Code woven in by Terry Thorsen 1/2003.
 
   Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.
   2007-2008 - Even Rouault - Decoration of symbol names unz* -> cpl_unz*
   2007-2008 - Even Rouault - Remove old C style function prototypes
   2007-2008 - Even Rouault - Add unzip support for ZIP64
-       
+
        Copyright (C) 2007-2008 Even Rouault
 
 
        Okt-2009 - Mathias Svensson - Removed cpl_* from symbol names (Even Rouault added them but since this is now moved to a new project (minizip64) I renamed them again).
   Okt-2009 - Mathias Svensson - Fixed problem if uncompressed size was > 4G and compressed size was <4G
-                                should only read the compressed/uncompressed size from the Zip64 format if 
+                                should only read the compressed/uncompressed size from the Zip64 format if
                                 the size from normal header was 0xFFFFFFFF
   Okt-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant
        Okt-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required)
@@ -1010,7 +1010,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
     if ((err==UNZ_OK) && (file_info.size_file_extra != 0))
     {
                                uLong acc = 0;
-        
+
         // since lSeek now points to after the extra field we need to move back
         lSeek -= file_info.size_file_extra;
 
@@ -1826,7 +1826,7 @@ extern int ZEXPORT unzReadCurrentFile  (unzFile file, voidp buf, unsigned len)
             pfile_in_zip_read_info->stream.next_out  = (Bytef*)pfile_in_zip_read_info->bstream.next_out;
             pfile_in_zip_read_info->stream.avail_out = pfile_in_zip_read_info->bstream.avail_out;
             pfile_in_zip_read_info->stream.total_out = pfile_in_zip_read_info->bstream.total_out_lo32;
-            
+
             if (err==BZ_STREAM_END)
               return (iRead==0) ? UNZ_EOF : iRead;
             if (err!=BZ_OK)
index a2e698f1a365dbcb366ba469b004eab82d0b6155..da7fb616d452198be98e4271bf6916ecef341b70 100644 (file)
@@ -13,7 +13,7 @@
         For more info read MiniZip_info.txt
 
         ---------------------------------------------------------------------------------
+
        Condition of use and distribution are the same than zlib :
 
   This software is provided 'as-is', without any express or implied
@@ -36,7 +36,7 @@
 
        Changes
 
-       See header of unzip64.c 
+       See header of unzip64.c
 
 */
 
diff --git a/contrib/minizip/zconf.h b/contrib/minizip/zconf.h
deleted file mode 100644 (file)
index 03a9431..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_          z_deflateInit_
-#  define deflate               z_deflate
-#  define deflateEnd            z_deflateEnd
-#  define inflateInit_          z_inflateInit_
-#  define inflate               z_inflate
-#  define inflateEnd            z_inflateEnd
-#  define deflateInit2_         z_deflateInit2_
-#  define deflateSetDictionary  z_deflateSetDictionary
-#  define deflateCopy           z_deflateCopy
-#  define deflateReset          z_deflateReset
-#  define deflateParams         z_deflateParams
-#  define deflateBound          z_deflateBound
-#  define deflatePrime          z_deflatePrime
-#  define inflateInit2_         z_inflateInit2_
-#  define inflateSetDictionary  z_inflateSetDictionary
-#  define inflateSync           z_inflateSync
-#  define inflateSyncPoint      z_inflateSyncPoint
-#  define inflateCopy           z_inflateCopy
-#  define inflateReset          z_inflateReset
-#  define inflateBack           z_inflateBack
-#  define inflateBackEnd        z_inflateBackEnd
-#  define compress              z_compress
-#  define compress2             z_compress2
-#  define compressBound         z_compressBound
-#  define uncompress            z_uncompress
-#  define adler32               z_adler32
-#  define crc32                 z_crc32
-#  define get_crc_table         z_get_crc_table
-#  define zError                z_zError
-
-#  define alloc_func            z_alloc_func
-#  define free_func             z_free_func
-#  define in_func               z_in_func
-#  define out_func              z_out_func
-#  define Byte                  z_Byte
-#  define uInt                  z_uInt
-#  define uLong                 z_uLong
-#  define Bytef                 z_Bytef
-#  define charf                 z_charf
-#  define intf                  z_intf
-#  define uIntf                 z_uIntf
-#  define uLongf                z_uLongf
-#  define voidpf                z_voidpf
-#  define voidp                 z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>   /* for off_t */
-#  endif
-#  define z_off_t off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if defined(__OS400__)
-#  define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#  ifdef FAR
-#    undef FAR
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(deflateBound,"DEBND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(compressBound,"CMBND")
-#   pragma map(inflate_table,"INTABL")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
diff --git a/contrib/minizip/zconf.in.h b/contrib/minizip/zconf.in.h
deleted file mode 100644 (file)
index 03a9431..0000000
+++ /dev/null
@@ -1,332 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- */
-
-/* @(#) $Id$ */
-
-#ifndef ZCONF_H
-#define ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_          z_deflateInit_
-#  define deflate               z_deflate
-#  define deflateEnd            z_deflateEnd
-#  define inflateInit_          z_inflateInit_
-#  define inflate               z_inflate
-#  define inflateEnd            z_inflateEnd
-#  define deflateInit2_         z_deflateInit2_
-#  define deflateSetDictionary  z_deflateSetDictionary
-#  define deflateCopy           z_deflateCopy
-#  define deflateReset          z_deflateReset
-#  define deflateParams         z_deflateParams
-#  define deflateBound          z_deflateBound
-#  define deflatePrime          z_deflatePrime
-#  define inflateInit2_         z_inflateInit2_
-#  define inflateSetDictionary  z_inflateSetDictionary
-#  define inflateSync           z_inflateSync
-#  define inflateSyncPoint      z_inflateSyncPoint
-#  define inflateCopy           z_inflateCopy
-#  define inflateReset          z_inflateReset
-#  define inflateBack           z_inflateBack
-#  define inflateBackEnd        z_inflateBackEnd
-#  define compress              z_compress
-#  define compress2             z_compress2
-#  define compressBound         z_compressBound
-#  define uncompress            z_uncompress
-#  define adler32               z_adler32
-#  define crc32                 z_crc32
-#  define get_crc_table         z_get_crc_table
-#  define zError                z_zError
-
-#  define alloc_func            z_alloc_func
-#  define free_func             z_free_func
-#  define in_func               z_in_func
-#  define out_func              z_out_func
-#  define Byte                  z_Byte
-#  define uInt                  z_uInt
-#  define uLong                 z_uLong
-#  define Bytef                 z_Bytef
-#  define charf                 z_charf
-#  define intf                  z_intf
-#  define uIntf                 z_uIntf
-#  define uLongf                z_uLongf
-#  define voidpf                z_voidpf
-#  define voidp                 z_voidp
-#endif
-
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
-#  define OS2
-#endif
-#if defined(_WINDOWS) && !defined(WINDOWS)
-#  define WINDOWS
-#endif
-#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
-#  ifndef WIN32
-#    define WIN32
-#  endif
-#endif
-#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
-#  if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
-#    ifndef SYS16BIT
-#      define SYS16BIT
-#    endif
-#  endif
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#ifdef SYS16BIT
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#ifdef __STDC_VERSION__
-#  ifndef STDC
-#    define STDC
-#  endif
-#  if __STDC_VERSION__ >= 199901L
-#    ifndef STDC99
-#      define STDC99
-#    endif
-#  endif
-#endif
-#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
-#  define STDC
-#endif
-#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
-#  define STDC
-#endif
-
-#if defined(__OS400__) && !defined(STDC)    /* iSeries (formerly AS/400). */
-#  define STDC
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const       /* note: need a more gentle solution here */
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#ifdef SYS16BIT
-#  if defined(M_I86SM) || defined(M_I86MM)
-     /* MSC small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef _MSC_VER
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#  if (defined(__SMALL__) || defined(__MEDIUM__))
-     /* Turbo C small or medium model */
-#    define SMALL_MEDIUM
-#    ifdef __BORLANDC__
-#      define FAR _far
-#    else
-#      define FAR far
-#    endif
-#  endif
-#endif
-
-#if defined(WINDOWS) || defined(WIN32)
-   /* If building or using zlib as a DLL, define ZLIB_DLL.
-    * This is not mandatory, but it offers a little performance increase.
-    */
-#  ifdef ZLIB_DLL
-#    if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
-#      ifdef ZLIB_INTERNAL
-#        define ZEXTERN extern __declspec(dllexport)
-#      else
-#        define ZEXTERN extern __declspec(dllimport)
-#      endif
-#    endif
-#  endif  /* ZLIB_DLL */
-   /* If building or using zlib with the WINAPI/WINAPIV calling convention,
-    * define ZLIB_WINAPI.
-    * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
-    */
-#  ifdef ZLIB_WINAPI
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-     /* No need for _export, use ZLIB.DEF instead. */
-     /* For complete Windows compatibility, use WINAPI, not __stdcall. */
-#    define ZEXPORT WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA WINAPIV
-#    else
-#      define ZEXPORTVA FAR CDECL
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  ifdef ZLIB_DLL
-#    ifdef ZLIB_INTERNAL
-#      define ZEXPORT   __declspec(dllexport)
-#      define ZEXPORTVA __declspec(dllexport)
-#    else
-#      define ZEXPORT   __declspec(dllimport)
-#      define ZEXPORTVA __declspec(dllimport)
-#    endif
-#  endif
-#endif
-
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-
-#ifndef FAR
-#  define FAR
-#endif
-
-#if !defined(__MACTYPES__)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void const *voidpc;
-   typedef void FAR   *voidpf;
-   typedef void       *voidp;
-#else
-   typedef Byte const *voidpc;
-   typedef Byte FAR   *voidpf;
-   typedef Byte       *voidp;
-#endif
-
-#if 0           /* HAVE_UNISTD_H -- this line is updated by ./configure */
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  ifdef VMS
-#    include <unixio.h>   /* for off_t */
-#  endif
-#  define z_off_t off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define z_off_t long
-#endif
-
-#if defined(__OS400__)
-#  define NO_vsnprintf
-#endif
-
-#if defined(__MVS__)
-#  define NO_vsnprintf
-#  ifdef FAR
-#    undef FAR
-#  endif
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(deflateBound,"DEBND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(compressBound,"CMBND")
-#   pragma map(inflate_table,"INTABL")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_copyright,"INCOPY")
-#endif
-
-#endif /* ZCONF_H */
index e12da4cceb704c9bfb3a2789b39baef4365b9a73..698dcecdfbc8d381bdf9e35432396ff8fa4c5d8e 100644 (file)
@@ -73,7 +73,7 @@
 
 
 // NOT sure that this work on ALL platform
-#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32)) 
+#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32))
 
 #ifndef SEEK_CUR
 #define SEEK_CUR    1
@@ -759,7 +759,7 @@ int LoadCentralDirectoryRecord(zip64_internal* pziinit)
     number_entry_CD = 0;
     if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK)
       err=ZIP_ERRNO;
-    else 
+    else
       number_entry_CD = uL;
 
     if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0))
@@ -1021,7 +1021,7 @@ int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_ex
       err = ZIP_ERRNO;
   }
 
-  
+
   if ((err==ZIP_OK) && (zi->ci.zip64))
   {
       // write the Zip64 extended info
@@ -1035,7 +1035,7 @@ int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_ex
 
       err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2);
       err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2);
-      
+
       err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8);
       err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8);
   }
@@ -1044,11 +1044,11 @@ int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_ex
 }
 
 /*
- NOTE. 
+ NOTE.
  When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped
  before calling this function it can be done with zipRemoveExtraInfoBlock
 
- It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize 
+ It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize
  unnecessary allocations.
  */
 extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi,
@@ -1106,7 +1106,7 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename,
     {
         if (zipfi->dosDate != 0)
             zi->ci.dosDate = zipfi->dosDate;
-        else 
+        else
           zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date);
     }
 
@@ -1305,7 +1305,7 @@ extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, c
                                  windowBits, memLevel, strategy,
                                  password, crcForCrypting, VERSIONMADEBY, 0, zip64);
 }
-                                         
+
 extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi,
                                         const void* extrafield_local, uInt size_extrafield_local,
                                         const void* extrafield_global, uInt size_extrafield_global,
@@ -1393,7 +1393,7 @@ local int zip64FlushWriteBuffer(zip64_internal* zi)
 
 
     zi->ci.pos_in_buffered_data = 0;
-    
+
     return err;
 }
 
@@ -1581,7 +1581,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_s
     if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw))
     {
         int tmp_err = deflateEnd(&zi->ci.stream);
-        if (err == ZIP_OK) 
+        if (err == ZIP_OK)
             err = tmp_err;
         zi->ci.stream_initialised = 0;
     }
@@ -1589,7 +1589,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_s
     else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw))
     {
       int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream);
-                       if (err==ZIP_OK) 
+                       if (err==ZIP_OK)
                                err = tmperr;
                        zi->ci.stream_initialised = 0;
     }
@@ -1662,7 +1662,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_s
       p += 2;
       zip64local_putValue_inmemory(p, datasize, 2); // DataSize
       p += 2;
-      
+
       if(uncompressed_size >= 0xffffffff)
       {
         zip64local_putValue_inmemory(p, uncompressed_size, 8);
@@ -1680,7 +1680,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_s
         zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8);
         p += 8;
       }
-      
+
       // Update how much extra free space we got in the memory buffer
       // and increase the centralheader size so the new ZIP64 fields are included
       // ( 4 below is the size of HeaderID and DataSize field )
@@ -1691,7 +1691,7 @@ extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_s
       zi->ci.size_centralExtra += datasize + 4;
       zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2);
     }
-    
+
     if (err==ZIP_OK)
         err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader);
 
@@ -1752,9 +1752,9 @@ int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eo
 {
   int err = ZIP_OK;
   ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writting_offset;
-  
+
   err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4);
-  
+
   /*num disks*/
     if (err==ZIP_OK) /* number of the disk with the start of the central directory */
       err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4);
@@ -1807,12 +1807,12 @@ int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centra
     ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset;
     err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8);
   }
-  return err;  
+  return err;
 }
 int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
 {
   int err = ZIP_OK;
-  
+
   /*signature*/
   err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4);
 
@@ -1861,7 +1861,7 @@ int Write_GlobalComment(zip64_internal* zi, const char* global_comment)
 {
   int err = ZIP_OK;
   uInt size_global_comment = 0;
-  
+
   if(global_comment != NULL)
     size_global_comment = (uInt)strlen(global_comment);
 
@@ -1897,7 +1897,7 @@ extern int ZEXPORT zipClose (zipFile file, const char* global_comment)
     if (global_comment==NULL)
         global_comment = zi->globalcomment;
 #endif
-  
+
     centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream);
 
     if (err==ZIP_OK)
@@ -1922,7 +1922,7 @@ extern int ZEXPORT zipClose (zipFile file, const char* global_comment)
     {
       ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream);
       Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip);
-      
+
       Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos);
     }
 
@@ -1977,7 +1977,7 @@ extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHe
       p += dataSize + 4;
       size += dataSize + 4;
     }
-        
+
   }
 
   if(size < *dataLen)
index a33a52dcf4dbbd1fb98d68d6ce67f9e6ead9c3bf..5e3a46cb2b071535bbb4fa4c3be33680c86dfc2f 100644 (file)
@@ -31,7 +31,7 @@
 
        ---------------------------------------------------------------------------
 
-       Changes 
+       Changes
 
        See header of zip.h
 
@@ -338,13 +338,13 @@ extern int ZEXPORT zipClose OF((zipFile file,
 
 
 extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader));
-/* 
-  zipRemoveExtraInfoBlock -  Added by Mathias Svensson 
-  
+/*
+  zipRemoveExtraInfoBlock -  Added by Mathias Svensson
+
   Remove extra information block from a extra information data for the local file header or central directory header
 
   It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode.
-  
+
   0x0001 is the signature header for the ZIP64 extra information blocks
 
   usage.
diff --git a/contrib/puff/puff b/contrib/puff/puff
deleted file mode 100755 (executable)
index bedac26..0000000
Binary files a/contrib/puff/puff and /dev/null differ
index e5574f45e7f80225c96cfe3b3cdae74a4689247a..135888eb10f16587d7d6cad9cb2b97493ec73b20 100644 (file)
@@ -103,12 +103,12 @@ DWORD GetMsecSincePerfCounter(LARGE_INTEGER beginTime64,BOOL fComputeTimeQueryPe
         MyDoMinus64(&ticks,endTime64,beginTime64);\r
         QueryPerformanceFrequency(&ticksPerSecond);\r
 \r
-    \r
+\r
         {\r
             ticksShifted = Int64ShrlMod32(*(DWORDLONG*)&ticks,dwLog);\r
             tickSecShifted = Int64ShrlMod32(*(DWORDLONG*)&ticksPerSecond,dwLog);\r
-        \r
-        } \r
+\r
+        }\r
 \r
         dwRet = (DWORD)((((DWORD)ticksShifted)*1000)/(DWORD)(tickSecShifted));\r
         dwRet *=1;\r
index 16159f9cd0d1c57c0be8f42b5f718b8e98c5e2f9..416fc4932e6deeff087299888682f246c86e9ac2 100644 (file)
@@ -30,9 +30,9 @@ Build instructions for Visual Studio 2005 (32 bits or 64 bits)
 \r
 Build instructions for Visual Studio 2005 64 bits, PSDK compiler\r
 ----------------------------------------------------------------\r
-at the time of writing this text file, Visual Studio 2005 (and \r
+at the time of writing this text file, Visual Studio 2005 (and\r
   Microsoft Visual C++ 8.0) is on the beta 2 stage.\r
-Using you can get the free 64 bits compiler from Platform SDK, \r
+Using you can get the free 64 bits compiler from Platform SDK,\r
   which is NOT a beta, and compile using the Visual studio 2005 IDE\r
 see http://www.winimage.com/misc/sdk64onvs2005/ for instruction\r
 \r
index 68cb9cb7daa285f246b3e2fb5056f479267ac066..266fb8396f958694eb93d5dab0046db916785066 100644 (file)
@@ -2,8 +2,8 @@
 \r
 #define IDR_VERSION1  1\r
 IDR_VERSION1   VERSIONINFO     MOVEABLE IMPURE LOADONCALL DISCARDABLE\r
-  FILEVERSION   1,2,3,7\r
-  PRODUCTVERSION 1,2,3,7\r
+  FILEVERSION   1,2,3,8\r
+  PRODUCTVERSION 1,2,3,8\r
   FILEFLAGSMASK        VS_FFI_FILEFLAGSMASK\r
   FILEFLAGS    0\r
   FILEOS       VOS_DOS_WINDOWS32\r
@@ -17,7 +17,7 @@ BEGIN
 \r
     BEGIN\r
       VALUE "FileDescription", "zlib data compression library\0"\r
-      VALUE "FileVersion",     "1.2.3.7\0"\r
+      VALUE "FileVersion",     "1.2.3.8\0"\r
       VALUE "InternalName",    "zlib\0"\r
       VALUE "OriginalFilename",        "zlib.dll\0"\r
       VALUE "ProductName",     "ZLib.DLL\0"\r
index 990fe029543514b736427e2a95ca83f71ac11206..55ebbbf106c402578a6263221b09906b44db98a9 100644 (file)
--- a/deflate.c
+++ b/deflate.c
@@ -52,7 +52,7 @@
 #include "deflate.h"
 
 const char deflate_copyright[] =
-   " deflate 1.2.3.7 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
+   " deflate 1.2.3.8 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
 /*
   If you use the zlib library in a product, an acknowledgment is welcome
   in the documentation of your product. If for some reason you cannot
index b570707bf4daeb9ec59397544e8ed654543e0659..c40410badef7d1210d8bcd5d5fd451ddd6a4891a 100644 (file)
@@ -141,7 +141,7 @@ struct tab {                        /* type for been here check */
    For the deflate example of 286 symbols limited to 15-bit codes, the array
    has 284,284 entries, taking up 2.17 MB for an 8-byte big_t.  More than
    half of the space allocated for saved results is actually used -- not all
-   possible triplets are reached in the generation of valid Huffman codes.  
+   possible triplets are reached in the generation of valid Huffman codes.
  */
 
 /* The array for tracking visited states, done[], is itself indexed identically
@@ -466,19 +466,19 @@ int main(int argc, char **argv)
 
     /* get arguments -- default to the deflate literal/length code */
     syms = 286;
-       root = 9;
+        root = 9;
     max = 15;
     if (argc > 1) {
         syms = atoi(argv[1]);
         if (argc > 2) {
             root = atoi(argv[2]);
-                       if (argc > 3)
-                               max = atoi(argv[3]);
-               }
+                        if (argc > 3)
+                                max = atoi(argv[3]);
+                }
     }
     if (argc > 4 || syms < 2 || root < 1 || max < 1) {
         fputs("invalid arguments, need: [sym >= 2 [root >= 1 [max >= 1]]]\n",
-                         stderr);
+                          stderr);
         return 1;
     }
 
@@ -556,8 +556,8 @@ int main(int argc, char **argv)
     }
 
     /* find and show maximum inflate table usage */
-       if (root > max)                 /* reduce root to max length */
-               root = max;
+        if (root > max)                 /* reduce root to max length */
+                root = max;
     if (syms < ((code_t)1 << (root + 1)))
         enough(syms);
     else
index 4daf1c2b3324438683cd72311d73e44a56e8b73f..d70aacabaebbf57db6b999fda1c17af6b0e8c243 100644 (file)
@@ -62,7 +62,7 @@
    compressed data, and contains both the crc and length of just the compressed
    data and of the complete set of data including the contents of the foo.add
    file.
-   
+
    Again, the foo.add file is maintained during the compress operation in case
    of an interruption.  If in the unlikely event the foo.add file with the data
    to be compressed is missing due to some external force, a gzip file with
index 26791b0a0a7f53885a7b7403a8ed366354eeed93..84a979780c3e2180f8fd90f4cea8f8382b8a183c 100644 (file)
--- a/gzguts.h
+++ b/gzguts.h
@@ -19,6 +19,7 @@
 #ifdef STDC
 #  include <string.h>
 #  include <stdlib.h>
+#  include <limits.h>
 #endif
 #include <fcntl.h>
 
@@ -119,3 +120,13 @@ ZEXTERN void ZEXPORT gz_error OF((gz_statep, int, const char *));
 #if defined UNDER_CE && defined NO_ERRNO_H
 ZEXTERN char ZEXPORT *gz_strwinerror OF((DWORD error));
 #endif
+
+/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
+   value -- needed when comparing unsigned to z_off64_t, which is signed
+   (possible z_off64_t types off_t, off64_t, and long are all signed) */
+#ifdef INT_MAX
+#  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
+#else
+ZEXTERN unsigned ZEXPORT gz_intmax OF((void));
+#  define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
+#endif
diff --git a/gzio.c b/gzio.c
index 72b6287b338e1c88078964ec6169101beaed0c2b..38b3c0322cd1348de13585b9b9ced31c4b7fd9ce 100644 (file)
--- a/gzio.c
+++ b/gzio.c
@@ -61,13 +61,13 @@ local char *strwinerror (error)
     wchar_t *msgbuf;
     DWORD lasterr = GetLastError();
     DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
-       | FORMAT_MESSAGE_ALLOCATE_BUFFER,
-       NULL,
-       error,
-       0, /* Default language */
-       (LPVOID)&msgbuf,
-       0,
-       NULL);
+        | FORMAT_MESSAGE_ALLOCATE_BUFFER,
+        NULL,
+        error,
+        0, /* Default language */
+        (LPVOID)&msgbuf,
+        0,
+        NULL);
     if (chars != 0) {
         /* If there is an \r\n appended, zap it.  */
         if (chars >= 2
diff --git a/gzlib.c b/gzlib.c
index e637e8306872bc16c11038164c776fb86aba0faf..fec283ff1bb3514b1a0996dc4b655df25fb20d9f 100644 (file)
--- a/gzlib.c
+++ b/gzlib.c
@@ -36,13 +36,13 @@ char ZEXPORT *gz_strwinerror (error)
     wchar_t *msgbuf;
     DWORD lasterr = GetLastError();
     DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
-       | FORMAT_MESSAGE_ALLOCATE_BUFFER,
-       NULL,
-       error,
-       0, /* Default language */
-       (LPVOID)&msgbuf,
-       0,
-       NULL);
+        | FORMAT_MESSAGE_ALLOCATE_BUFFER,
+        NULL,
+        error,
+        0, /* Default language */
+        (LPVOID)&msgbuf,
+        0,
+        NULL);
     if (chars != 0) {
         /* If there is an \r\n appended, zap it.  */
         if (chars >= 2
@@ -330,7 +330,8 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
 
     /* if reading, skip what's in output buffer (one less gzgetc() check) */
     if (state->mode == GZ_READ) {
-        n = state->have > offset ? (unsigned)offset : state->have;
+        n = GT_OFF(state->have) || (z_off64_t)state->have > offset ?
+            (unsigned)offset : state->have;
         state->have -= n;
         state->next += n;
         state->pos += n;
@@ -513,4 +514,23 @@ void ZEXPORT gz_error(state, err, msg)
     return;
 }
 
+#ifndef INT_MAX
+/* portably return maximum value for an int (when limits.h presumed not
+   available) -- we need to do this to cover cases where 2's complement not
+   used, since C standard permits 1's complement and sign-bit representations,
+   otherwise we could just use ((unsigned)-1) >> 1 */
+unsigned ZEXPORT gz_intmax()
+{
+    unsigned p, q;
+
+    p = 1;
+    do {
+        q = p;
+        p <<= 1;
+        p++;
+    } while (p > q);
+    return q >> 1;
+}
+#endif
+
 #endif /* !OLD_GZIO */
index 74322ca067b44200318c47d0e2e470f58aeaca9c..a560c1665a43e1a8618d3034a9e47f26f9856d27 100644 (file)
--- a/gzread.c
+++ b/gzread.c
@@ -14,7 +14,7 @@ local int gz_next4 OF((gz_statep, unsigned long *));
 local int gz_head OF((gz_statep));
 local int gz_decomp OF((gz_statep));
 local int gz_make OF((gz_statep));
-local int gz_skip OF((gz_statep, z_off_t));
+local int gz_skip OF((gz_statep, z_off64_t));
 
 /* Use read() to load a buffer -- return -1 on error, otherwise 0.  Read from
    state->fd, and update state->eof, state->err, and state->msg as appropriate.
@@ -330,7 +330,7 @@ local int gz_make(state)
 /* Skip len uncompressed bytes of output.  Return -1 on error, 0 on success. */
 local int gz_skip(state, len)
     gz_statep state;
-    z_off_t len;
+    z_off64_t len;
 {
     unsigned n;
 
@@ -338,7 +338,8 @@ local int gz_skip(state, len)
     while (len)
         /* skip over whatever is in output buffer */
         if (state->have) {
-            n = state->have > len ? (unsigned)len : state->have;
+            n = GT_OFF(state->have) || (z_off64_t)state->have > len ?
+                (unsigned)len : state->have;
             state->have -= n;
             state->next += n;
             state->pos += n;
index f4a0a8095331c2dfaf14351af125e601bc2aefc6..50b1a7c4a6325a504e3bf8aac9cba392db37c08a 100644 (file)
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -10,7 +10,7 @@
 /* Local functions */
 local int gz_init OF((gz_statep));
 local int gz_comp OF((gz_statep, int));
-local int gz_zero OF((gz_statep, z_off_t));
+local int gz_zero OF((gz_statep, z_off64_t));
 
 /* Initialize state for writing a gzip file.  Mark initialization by setting
    state->size to non-zero.  Return -1 on failure or 0 on success. */
@@ -62,7 +62,7 @@ local int gz_comp(state, flush)
     gz_statep state;
     int flush;
 {
-    int ret;
+    int ret, got;
     unsigned have;
     z_streamp strm = &(state->strm);
 
@@ -78,7 +78,8 @@ local int gz_comp(state, flush)
         if (strm->avail_out == 0 || (flush != Z_NO_FLUSH &&
             (flush != Z_FINISH || ret == Z_STREAM_END))) {
             have = strm->next_out - state->next;
-            if (have && write(state->fd, state->next, have) != have) {
+            if (have && ((got = write(state->fd, state->next, have)) < 0 ||
+                         (unsigned)got != have)) {
                 gz_error(state, Z_ERRNO, zstrerror());
                 return -1;
             }
@@ -111,7 +112,7 @@ local int gz_comp(state, flush)
 /* Compress len zeros to output.  Return -1 on error, 0 on success. */
 local int gz_zero(state, len)
     gz_statep state;
-    z_off_t len;
+    z_off64_t len;
 {
     int first;
     unsigned n;
@@ -121,10 +122,11 @@ local int gz_zero(state, len)
     if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
         return -1;
 
-    /* compress len zeros */
+    /* compress len zeros (len guaranteed > 0) */
     first = 1;
     while (len) {
-        n = len < state->size ? (unsigned)len : state->size;
+        n = GT_OFF(state->size) || (z_off64_t)state->size > len ?
+            (unsigned)len : state->size;
         if (first) {
             memset(state->in, 0, n);
             first = 0;
@@ -435,7 +437,8 @@ int ZEXPORT gzflush(file, flush)
     state = (gz_statep)file;
 
     /* check that we're writing and that there's no error */
-    if (state->mode != GZ_WRITE|| state->err != Z_OK)
+    if (state->mode != GZ_WRITE || state->err != Z_OK)
+        return Z_STREAM_ERROR;
 
     /* check flush parameter */
     if (flush < 0 || flush > Z_FINISH)
index d24b8d436bc9d88108474862472967ee05dec4d0..5a6ef813793ca89eb8fcd02a93b2ceac88a1b781 100644 (file)
@@ -9,7 +9,7 @@
 #define MAXBITS 15
 
 const char inflate_copyright[] =
-   " inflate 1.2.3.7 Copyright 1995-2010 Mark Adler ";
+   " inflate 1.2.3.8 Copyright 1995-2010 Mark Adler ";
 /*
   If you use the zlib library in a product, an acknowledgment is welcome
   in the documentation of your product. If for some reason you cannot
@@ -62,7 +62,7 @@ unsigned short FAR *work;
         35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
     static const unsigned short lext[31] = { /* Length codes 257..285 extra */
         16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
-        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 193};
+        19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 78, 75};
     static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
         1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
         257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
index 8e5b7b50b89f33acb41a51f854b426cb247ca836..c7c309e8c685dd5320dda5898ffde46a01898ff9 100644 (file)
@@ -42,7 +42,7 @@ $ aconf_in_file = "config.hin"
 $ conf_check_string = ""
 $ linkonly = false
 $ optfile  = name + ".opt"
-$ libdefs  = "" 
+$ libdefs  = ""
 $ axp      = f$getsyi("HW_MODEL").ge.1024 .and. f$getsyi("HW_MODEL").lt.4096
 $!
 $ whoami = f$parse(f$enviornment("Procedure"),,,,"NO_CONCEAL")
@@ -87,7 +87,7 @@ $ then
 $    if f$trnlnm("SYS").eqs."" then define sys sys$library:
 $ endif
 $!
-$! Build a fake configure input header 
+$! Build a fake configure input header
 $!
 $ open/write conf_hin config.hin
 $ write conf_hin "#undef _LARGEFILE64_SOURCE"
@@ -99,7 +99,7 @@ $FIND_ACONF:
 $ fname = f$element(i,"#",aconf_in_file)
 $ if fname .eqs. "#" then goto AMISS_ERR
 $ if f$search(fname) .eqs. ""
-$ then 
+$ then
 $   i = i + 1
 $   goto find_aconf
 $ endif
@@ -396,7 +396,7 @@ $ deck
 # written by Martin P.J. Zinser
 # <zinser@zinser.no-ip.info or zinser@sysdev.deutsche-boerse.com>
 
-OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzio.obj, gzlib.obj\ 
+OBJS = adler32.obj, compress.obj, crc32.obj, gzclose.obj, gzio.obj, gzlib.obj\
        gzread.obj, gzwrite.obj, uncompr.obj, infback.obj\
        deflate.obj, trees.obj, zutil.obj, inflate.obj, \
        inftrees.obj, inffast.obj
@@ -521,7 +521,7 @@ $ else
 $   if (f$type('cdef') .eqs. "INTEGER")
 $   then
 $     write aconf "#define ''cdef' ", 'cdef'
-$   else 
+$   else
 $     if (f$type('cdef') .eqs. "STRING")
 $     then
 $       write aconf "#define ''cdef' ", """", '''cdef'', """"
@@ -587,7 +587,7 @@ $ set message/fac/ident/sever/text
 $ on error then goto err_exit
 $ delete/nolog 'tmpnam'.*;*/exclude='th'
 $ if (cc_prop .and. .not. is_need) .or. -
-     (.not. cc_prop .and. is_need) 
+     (.not. cc_prop .and. is_need)
 $ then
 $   write sys$output "Checking for ''cdef'... yes"
 $   if f$type('cdef_val'_yes) .nes. ""
@@ -599,10 +599,10 @@ $     if f$type('cdef_val'_yes) .eqs. "STRING" -
 $   else
 $     call write_config f$fao("#define !AS 1",cdef)
 $   endif
-$   if (cdef .eqs. "HAVE_FSEEKO") .or. (cdef .eqs. "_LARGE_FILES") .or. - 
-       (cdef .eqs. "_LARGEFILE64_SOURCE") then - 
+$   if (cdef .eqs. "HAVE_FSEEKO") .or. (cdef .eqs. "_LARGE_FILES") .or. -
+       (cdef .eqs. "_LARGEFILE64_SOURCE") then -
       call write_config f$string("#define _LARGEFILE 1")
-$ else 
+$ else
 $   write sys$output "Checking for ''cdef'... no"
 $   if (comm_h)
 $   then
@@ -645,7 +645,7 @@ $   if .not. ($status)  then cc_prop = false
 $   set message/fac/ident/sever/text
 $   on error then goto err_exit
 $   delete/nolog 'tmpnam'_'i'.*;*
-$   if (cc_prop) 
+$   if (cc_prop)
 $   then
 $     write sys$output "Checking for ''cdef'... ", mdef_'i'
 $     if f$type(mdef_'i') .eqs. "INTEGER" -
@@ -670,7 +670,7 @@ $ endif
 $ return
 $!------------------------------------------------------------------------------
 $!
-$! Analyze Object files for OpenVMS AXP to extract Procedure and Data 
+$! Analyze Object files for OpenVMS AXP to extract Procedure and Data
 $! information to build a symbol vector for a shareable image
 $! All the "brains" of this logic was suggested by Hartmut Becker
 $! (Hartmut.Becker@compaq.com). All the bugs were introduced by me
@@ -683,10 +683,10 @@ $! 0.02 20041109 Fix option file for shareable images with case_sensitive=YES
 $! 0.03 20050107 Skip over Identification labels in option file
 $! 0.04 20060117 Add uppercase alias to code compiled with /name=as_is
 $!
-$ ANAL_OBJ_AXP: Subroutine   
+$ ANAL_OBJ_AXP: Subroutine
 $ V = 'F$Verify(0)
 $ SAY := "WRITE_ SYS$OUTPUT"
-$ 
+$
 $ IF F$SEARCH("''P1'") .EQS. ""
 $ THEN
 $    SAY "ANAL_OBJ_AXP-E-NOSUCHFILE:  Error, inputfile ''p1' not available"
@@ -765,15 +765,15 @@ $ if f$locate("=PROCEDURE)",raw_element) .lt. f$length(raw_element)
 $ then
 $     name = f$element(1,"=",raw_element) - "("
 $     if f$edit(name,"UPCASE") .nes. name then -
-          write case_vector f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)", - 
-                                 f$edit(name,"UPCASE"), name) 
+          write case_vector f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)", -
+                                 f$edit(name,"UPCASE"), name)
 $ endif
 $ if f$locate("=DATA)",raw_element) .lt. f$length(raw_element)
 $ then
 $     name = f$element(1,"=",raw_element) - "("
 $     if f$edit(name,"UPCASE") .nes. name then -
-          write case_vector f$fao(" symbol_vector=(!AS/!AS=DATA)", - 
-                                 f$edit(name,"UPCASE"), name) 
+          write case_vector f$fao(" symbol_vector=(!AS/!AS=DATA)", -
+                                 f$edit(name,"UPCASE"), name)
 $ endif
 $ goto rawloop
 $ END_RAWLOOP:
@@ -785,7 +785,7 @@ $ if f$search("x.tmp") .nes. "" -
 $!
 $ EXIT_AA:
 $ if V then set verify
-$ endsubroutine 
+$ endsubroutine
 $!------------------------------------------------------------------------------
 $!
 $! Write configuration to both permanent and temporary config file
index e74d672e7dcb476c8b73dedb0385fae9725eed34..9d18266e241866b68aaa2e6c9470845a8494cf41 100644 (file)
@@ -76,13 +76,13 @@ static char *strwinerror (error)
     wchar_t *msgbuf;
     DWORD lasterr = GetLastError();
     DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
-       | FORMAT_MESSAGE_ALLOCATE_BUFFER,
-       NULL,
-       error,
-       0, /* Default language */
-       (LPVOID)&msgbuf,
-       0,
-       NULL);
+        | FORMAT_MESSAGE_ALLOCATE_BUFFER,
+        NULL,
+        error,
+        0, /* Default language */
+        (LPVOID)&msgbuf,
+        0,
+        NULL);
     if (chars != 0) {
         /* If there is an \r\n appended, zap it.  */
         if (chars >= 2
index f713efd988222f994fc8a37853990e8b8d6ef464..d3580525bd4e1d453d1f62d920237273672f8aea 100644 (file)
@@ -7,16 +7,16 @@
 CFG=example - Win32 LIB Debug\r
 !MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
 !MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE NMAKE /f "example.mak".\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE You can specify a configuration when running NMAKE\r
 !MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug"\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")\r
 !MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")\r
 !MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application")\r
@@ -25,7 +25,7 @@ CFG=example - Win32 LIB Debug
 !MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")\r
 !MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application")\r
 !MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
+!MESSAGE\r
 \r
 # Begin Project\r
 # PROP AllowPerConfigDependencies 0\r
@@ -242,7 +242,7 @@ LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
 # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
 \r
-!ENDIF \r
+!ENDIF\r
 \r
 # Begin Target\r
 \r
index c50b4885cc283f34d32469652e1dd9031b26bbf2..71034684d820b2fb01b843e13b03dc54fcf62a8e 100644 (file)
@@ -7,16 +7,16 @@
 CFG=minigzip - Win32 LIB Debug\r
 !MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
 !MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE NMAKE /f "minigzip.mak".\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE You can specify a configuration when running NMAKE\r
 !MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug"\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")\r
 !MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")\r
 !MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application")\r
@@ -25,7 +25,7 @@ CFG=minigzip - Win32 LIB Debug
 !MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")\r
 !MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application")\r
 !MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
+!MESSAGE\r
 \r
 # Begin Project\r
 # PROP AllowPerConfigDependencies 0\r
@@ -242,7 +242,7 @@ LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
 # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
 \r
-!ENDIF \r
+!ENDIF\r
 \r
 # Begin Target\r
 \r
index 3e98f3d21f89e66585472f00a978e7cc2a9c2727..d8b3dff882172257f2b896960d1f37a0650a7db5 100644 (file)
@@ -8,16 +8,16 @@
 CFG=zlib - Win32 LIB Debug\r
 !MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
 !MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE NMAKE /f "zlib.mak".\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE You can specify a configuration when running NMAKE\r
 !MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug"\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
+!MESSAGE\r
 !MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library")\r
 !MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library")\r
 !MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")\r
@@ -26,7 +26,7 @@ CFG=zlib - Win32 LIB Debug
 !MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library")\r
 !MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library")\r
 !MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library")\r
-!MESSAGE \r
+!MESSAGE\r
 \r
 # Begin Project\r
 # PROP AllowPerConfigDependencies 0\r
@@ -265,7 +265,7 @@ LIB32=link.exe -lib
 # ADD BASE LIB32 /nologo\r
 # ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib"\r
 \r
-!ENDIF \r
+!ENDIF\r
 \r
 # Begin Target\r
 \r
@@ -368,7 +368,7 @@ SOURCE=..\..\win32\zlib.def
 \r
 # PROP Exclude_From_Build 1\r
 \r
-!ENDIF \r
+!ENDIF\r
 \r
 # End Source File\r
 # Begin Source File\r
@@ -499,7 +499,7 @@ InputName=gvmat32
 \r
 # PROP Exclude_From_Build 1\r
 \r
-!ENDIF \r
+!ENDIF\r
 \r
 # End Source File\r
 # Begin Source File\r
@@ -542,7 +542,7 @@ SOURCE=..\..\contrib\masmx86\gvmat32c.c
 # PROP Exclude_From_Build 1\r
 # ADD CPP /I "..\.."\r
 \r
-!ENDIF \r
+!ENDIF\r
 \r
 # End Source File\r
 # Begin Source File\r
@@ -613,7 +613,7 @@ InputName=inffas32
 \r
 # PROP Exclude_From_Build 1\r
 \r
-!ENDIF \r
+!ENDIF\r
 \r
 # End Source File\r
 # End Group\r
index 74bdb216045bc4e8702d1036561b16bf96b0b78f..e805463eec0b6cbb805a4c755034cd4c89318c60 100644 (file)
       <QPG:Files>
          <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/>
          <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/>
-         <QPG:Add file="../libz.so.1.2.3.7" install="/opt/lib/" user="root:bin" permission="644"/>
-         <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.3.7"/>
+         <QPG:Add file="../libz.so.1.2.3.8" install="/opt/lib/" user="root:bin" permission="644"/>
+         <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.3.8"/>
          <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.3.6"/>
-         <QPG:Add file="../libz.so.1.2.3.7" install="/opt/lib/" component="slib"/>
+         <QPG:Add file="../libz.so.1.2.3.8" install="/opt/lib/" component="slib"/>
       </QPG:Files>
 
       <QPG:PackageFilter>
@@ -63,7 +63,7 @@
             </QPM:ProductDescription>
 
             <QPM:ReleaseDescription>
-               <QPM:ReleaseVersion>1.2.3.7</QPM:ReleaseVersion>
+               <QPM:ReleaseVersion>1.2.3.8</QPM:ReleaseVersion>
                <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency>
                <QPM:ReleaseStability>Stable</QPM:ReleaseStability>
                <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor>
index 387336e7b46778a464d66ff24ffea862934f8163..3423e6b78ce9a006c7fc71f9f3cccf04ae30c931 100644 (file)
@@ -3,7 +3,7 @@
     <library name="zlib" dlversion="1.2.3" dlname="z">
        <property name="description"> zip compression library </property>
        <property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
-       
+
        <!-- fixme: not implemented yet -->
        <property name="compiler/c/inline" value="yes" />
 
        <include-file name="zconf.h" scope="public" mode="644" />
 
        <source name="adler32.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
        </source>
        <source name="compress.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
        </source>
        <source name="crc32.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
            <depend name="crc32.h" />
        </source>
        <source name="gzclose.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="gzguts.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="gzguts.h" />
        </source>
        <source name="gzio.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="zutil.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="zutil.h" />
        </source>
        <source name="gzlib.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="gzguts.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="gzguts.h" />
        </source>
        <source name="gzread.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="gzguts.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="gzguts.h" />
        </source>
        <source name="gzwrite.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="gzguts.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="gzguts.h" />
        </source>
        <source name="uncompr.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
        </source>
        <source name="deflate.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="zutil.h" /> 
-           <depend name="deflate.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="zutil.h" />
+           <depend name="deflate.h" />
        </source>
        <source name="trees.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="zutil.h" /> 
-           <depend name="deflate.h" /> 
-           <depend name="trees.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="zutil.h" />
+           <depend name="deflate.h" />
+           <depend name="trees.h" />
        </source>
        <source name="zutil.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="zutil.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="zutil.h" />
        </source>
        <source name="inflate.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="zutil.h" /> 
-           <depend name="inftrees.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="zutil.h" />
+           <depend name="inftrees.h" />
            <depend name="inflate.h" />
            <depend name="inffast.h" />
        </source>
        <source name="infback.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="zutil.h" /> 
-           <depend name="inftrees.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="zutil.h" />
+           <depend name="inftrees.h" />
            <depend name="inflate.h" />
            <depend name="inffast.h" />
        </source>
        <source name="inftrees.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="zutil.h" /> 
-           <depend name="inftrees.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="zutil.h" />
+           <depend name="inftrees.h" />
        </source>
        <source name="inffast.c">
-           <depend name="zlib.h" /> 
-           <depend name="zconf.h" /> 
-           <depend name="zutil.h" /> 
-           <depend name="inftrees.h" /> 
+           <depend name="zlib.h" />
+           <depend name="zconf.h" />
+           <depend name="zutil.h" />
+           <depend name="inftrees.h" />
            <depend name="inflate.h" />
            <depend name="inffast.h" />
        </source>
@@ -112,7 +112,7 @@ CFLAGS=-O
 
 # OBJA =
 # to use the asm code: make OBJA=match.o
-# 
+#
 match.o: match.S
        $(CPP) match.S > _match.s
        $(CC) -c _match.s
index ace6bcfc500f652cf513a7a7873ba1d1cea45ab1..273440ab64e22b9198738c3fc804d3837282fe6f 100644 (file)
@@ -19,7 +19,7 @@ LINKER   = wcl386
 CFLAGS   = -zq -mf -3r -fp3 -s -bt=dos -oilrtfm -fr=nul -wx
 ZLIB_LIB = zlib_f.lib
 
-.C.OBJ:        
+.C.OBJ:
         $(CC) $(CFLAGS) $[@
 
 all: $(ZLIB_LIB) example.exe minigzip.exe
index d8a106f902f3ede51baf0ac535698e23ca83d8db..8e0f4d12d71372206cb786de61292d58b2b81c14 100644 (file)
@@ -19,7 +19,7 @@ LINKER   = wcl
 CFLAGS   = -zq -ml -s -bt=dos -oilrtfm -fr=nul -wx
 ZLIB_LIB = zlib_l.lib
 
-.C.OBJ:        
+.C.OBJ:
         $(CC) $(CFLAGS) $[@
 
 all: $(ZLIB_LIB) example.exe minigzip.exe
diff --git a/zconf.h b/zconf.h
index df2475972e97f3957695a023adfc14ef528ee7c6..71a41ad76f7fa1a496b6e3029a5f170c75610a9a 100644 (file)
--- a/zconf.h
+++ b/zconf.h
@@ -48,6 +48,7 @@
 #  define deflate_copyright     z_deflate_copyright
 #  define get_crc_table         z_get_crc_table
 #  define gz_error              z_gz_error
+#  define gz_intmax             z_gz_intmax
 #  define gz_strwinerror        z_gz_strwinerror
 #  define gzbuffer              z_gzbuffer
 #  define gzclearerr            z_gzclearerr
index df2475972e97f3957695a023adfc14ef528ee7c6..71a41ad76f7fa1a496b6e3029a5f170c75610a9a 100644 (file)
@@ -48,6 +48,7 @@
 #  define deflate_copyright     z_deflate_copyright
 #  define get_crc_table         z_get_crc_table
 #  define gz_error              z_gz_error
+#  define gz_intmax             z_gz_intmax
 #  define gz_strwinerror        z_gz_strwinerror
 #  define gzbuffer              z_gzbuffer
 #  define gzclearerr            z_gzclearerr
diff --git a/zlib.3 b/zlib.3
index b96d9598d8f700173516f30de2ce6410cc174e0f..f2171aea33c4f033edcba85511c57b61e7bd5519 100644 (file)
--- a/zlib.3
+++ b/zlib.3
@@ -1,4 +1,4 @@
-.TH ZLIB 3 "24 January 2010"
+.TH ZLIB 3 "13 February 2010"
 .SH NAME
 zlib \- compression/decompression library
 .SH SYNOPSIS
@@ -132,7 +132,7 @@ before asking for help.
 Send questions and/or comments to zlib@gzip.org,
 or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
 .SH AUTHORS
-Version 1.2.3.7
+Version 1.2.3.8
 Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
 and Mark Adler (madler@alumni.caltech.edu).
 .LP
diff --git a/zlib.h b/zlib.h
index 86a67f89a29b1aac25cec8ec5b8498e7fc660056..0bd83e9fbf26e8c26b9bd8fb3f169b5942c30fec 100644 (file)
--- a/zlib.h
+++ b/zlib.h
@@ -1,5 +1,5 @@
 /* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.2.3.7, Jan 24th, 2010
+  version 1.2.3.8, Feb 13th, 2010
 
   Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
 
@@ -37,8 +37,8 @@
 extern "C" {
 #endif
 
-#define ZLIB_VERSION "1.2.3.7"
-#define ZLIB_VERNUM 0x1237
+#define ZLIB_VERSION "1.2.3.8"
+#define ZLIB_VERNUM 0x1238
 #define ZLIB_VER_MAJOR 1
 #define ZLIB_VER_MINOR 2
 #define ZLIB_VER_REVISION 3
@@ -1316,7 +1316,7 @@ ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
 /*
      Flushes all pending output into the compressed file.  The parameter flush
    is as in the deflate() function.  The return value is the zlib error number
-   (see function gzerror below).
+   (see function gzerror below).  gzflush is only permitted when writing.
 
      If the flush parameter is Z_FINISH, the remaining data is written and the
    gzip stream is completed in the output.  If gzwrite() is called again, a new
index c99e973892bfc0ebd50bb74e6b80d596156d13b7..3b443c71493fb3c96ddf9ccd683df138612b82d7 100644 (file)
--- a/zlib.map
+++ b/zlib.map
@@ -15,6 +15,7 @@ ZLIB_1.2.0 {
     zcfree;
     z_errmsg;
     gz_error;
+    gz_intmax;
     gzio_old;
     _*;
 };
@@ -46,6 +47,11 @@ ZLIB_1.2.2.4 {
 } ZLIB_1.2.2.3;
 
 ZLIB_1.2.3.3 {
+    adler32_combine64;
+    crc32_combine64;
+    gzopen64;
+    gzseek64;
+    gztell64;
     inflateUndermine;
 } ZLIB_1.2.2.4;
 
index 3e355aa2a76d1930dbc52f3aa39a39b20609f703..b4f98e5e613168009e813af1297dc990ae3778c4 100644 (file)
@@ -7,6 +7,6 @@ Name: zlib
 Description: zlib compression library
 Version: @VERSION@
 
-Requires: 
+Requires:
 Libs: -L${libdir} -lz
 Cflags: -I${includedir}
index 0695f6b1bfe5009e11db36c1f3c68b636b057e53..15e3e165f37decb7c403a892438650de80f3b928 100755 (executable)
--- a/zlib2ansi
+++ b/zlib2ansi
@@ -25,7 +25,7 @@ my $decl  = qr{ $sp (?: \w+ $sp )+ $d1 }xo ;
 my $dList = qr{ $sp $decl (?: $sp , $d1 )* $sp ; $sp }xo ;
 
 
-while (s/^ 
+while (s/^
             (                  # Start $1
                 (              #   Start $2
                     .*?        #     Minimal eat content
@@ -57,7 +57,7 @@ while (s/^
     my $i = 0 ;
     my %pList = map { $_ => $i++ }
                 split /\s*,\s*/, $param_list;
-    my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ;            
+    my $pMatch = '(\b' . join('|', keys %pList) . '\b)\W*$' ;
 
     my @params = split /\s*;\s*/, $params;
     my @outParams = ();
@@ -80,16 +80,16 @@ while (s/^
         }
     }
 
-    
-    my %tmp = map { /$pMatch/;  $_ => $pList{$1}  } 
+
+    my %tmp = map { /$pMatch/;  $_ => $pList{$1}  }
               @outParams ;
 
-    @outParams = map  { "    $_" }  
-                 sort { $tmp{$a} <=> $tmp{$b} } 
+    @outParams = map  { "    $_" }
+                 sort { $tmp{$a} <=> $tmp{$b} }
                  @outParams ;
 
     print $prefix ;
-    print "(\n" . join(",\n", @outParams) . ")\n";             
+    print "(\n" . join(",\n", @outParams) . ")\n";
     print "{" ;
 
 }
@@ -116,13 +116,13 @@ sub StripComments
        )*          ##  0-or-more things which don't start with /
                    ##    but do end with '*'
        /           ##  End of /* ... */ comment
+
      |         ##     OR  C++ Comment
-       //          ## Start of C++ comment // 
+       //          ## Start of C++ comment //
        [^\n]*      ## followed by 0-or-more non end of line characters
 
      |         ##     OR  various things which aren't comments:
+
        (
          "           ##  Start of " ... " string
          (
@@ -131,9 +131,9 @@ sub StripComments
            [^"\\]        ##  Non "\
          )*
          "           ##  End of " ... " string
+
        |         ##     OR
+
          '           ##  Start of ' ... ' string
          (
            \\.           ##  Escaped char
@@ -141,9 +141,9 @@ sub StripComments
            [^'\\]        ##  Non '\
          )*
          '           ##  End of ' ... ' string
+
        |         ##     OR
+
          .           ##  Anything other char
          [^/"'\\]*   ##  Chars which doesn't start a comment, string or escape
        )