mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
3rdparty/zlib: Updated to 1.3.0.
This commit is contained in:
parent
d2c4286eca
commit
12590d6ad8
44
3rdparty/zlib/CMakeLists.txt
vendored
44
3rdparty/zlib/CMakeLists.txt
vendored
@ -1,12 +1,9 @@
|
||||
cmake_minimum_required(VERSION 2.4.4)
|
||||
cmake_minimum_required(VERSION 2.4.4...3.15.0)
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
|
||||
|
||||
project(zlib C)
|
||||
|
||||
set(VERSION "1.2.12")
|
||||
|
||||
option(ASM686 "Enable building i686 assembly implementation")
|
||||
option(AMD64 "Enable building amd64 assembly implementation")
|
||||
set(VERSION "1.3")
|
||||
|
||||
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
|
||||
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
|
||||
@ -129,39 +126,6 @@ if(NOT MINGW)
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(ASM686)
|
||||
set(ZLIB_ASMS contrib/asm686/match.S)
|
||||
elseif (AMD64)
|
||||
set(ZLIB_ASMS contrib/amd64/amd64-match.S)
|
||||
endif ()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV)
|
||||
set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
if(ASM686)
|
||||
ENABLE_LANGUAGE(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx86/inffas32.asm
|
||||
contrib/masmx86/match686.asm
|
||||
)
|
||||
elseif (AMD64)
|
||||
ENABLE_LANGUAGE(ASM_MASM)
|
||||
set(ZLIB_ASMS
|
||||
contrib/masmx64/gvmat64.asm
|
||||
contrib/masmx64/inffasx64.asm
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ZLIB_ASMS)
|
||||
add_definitions(-DASMV -DASMINF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
|
||||
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
|
||||
string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*"
|
||||
@ -183,8 +147,8 @@ if(MINGW)
|
||||
set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
|
||||
endif(MINGW)
|
||||
|
||||
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
|
||||
set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
|
||||
set_target_properties(zlib PROPERTIES SOVERSION 1)
|
||||
|
||||
|
44
3rdparty/zlib/ChangeLog
vendored
44
3rdparty/zlib/ChangeLog
vendored
@ -1,6 +1,36 @@
|
||||
|
||||
ChangeLog file for zlib
|
||||
|
||||
Changes in 1.3 (18 Aug 2023)
|
||||
- Remove K&R function definitions and zlib2ansi
|
||||
- Fix bug in deflateBound() for level 0 and memLevel 9
|
||||
- Fix bug when gzungetc() is used immediately after gzopen()
|
||||
- Fix bug when using gzflush() with a very small buffer
|
||||
- Fix crash when gzsetparams() attempted for transparent write
|
||||
- Fix test/example.c to work with FORCE_STORED
|
||||
- Rewrite of zran in examples (see zran.c version history)
|
||||
- Fix minizip to allow it to open an empty zip file
|
||||
- Fix reading disk number start on zip64 files in minizip
|
||||
- Fix logic error in minizip argument processing
|
||||
- Add minizip testing to Makefile
|
||||
- Read multiple bytes instead of byte-by-byte in minizip unzip.c
|
||||
- Add memory sanitizer to configure (--memory)
|
||||
- Various portability improvements
|
||||
- Various documentation improvements
|
||||
- Various spelling and typo corrections
|
||||
|
||||
Changes in 1.2.13 (13 Oct 2022)
|
||||
- Fix configure issue that discarded provided CC definition
|
||||
- Correct incorrect inputs provided to the CRC functions
|
||||
- Repair prototypes and exporting of new CRC functions
|
||||
- Fix inflateBack to detect invalid input with distances too far
|
||||
- Have infback() deliver all of the available output up to any error
|
||||
- Fix a bug when getting a gzip header extra field with inflate()
|
||||
- Fix bug in block type selection when Z_FIXED used
|
||||
- Tighten deflateBound bounds
|
||||
- Remove deleted assembler code references
|
||||
- Various portability and appearance improvements
|
||||
|
||||
Changes in 1.2.12 (27 Mar 2022)
|
||||
- Cygwin does not have _wopen(), so do not create gzopen_w() there
|
||||
- Permit a deflateParams() parameter change as soon as possible
|
||||
@ -159,7 +189,7 @@ Changes in 1.2.7.1 (24 Mar 2013)
|
||||
- Fix types in contrib/minizip to match result of get_crc_table()
|
||||
- Simplify contrib/vstudio/vc10 with 'd' suffix
|
||||
- Add TOP support to win32/Makefile.msc
|
||||
- Suport i686 and amd64 assembler builds in CMakeLists.txt
|
||||
- Support i686 and amd64 assembler builds in CMakeLists.txt
|
||||
- Fix typos in the use of _LARGEFILE64_SOURCE in zconf.h
|
||||
- Add vc11 and vc12 build files to contrib/vstudio
|
||||
- Add gzvprintf() as an undocumented function in zlib
|
||||
@ -359,14 +389,14 @@ Changes in 1.2.5.1 (10 Sep 2011)
|
||||
- Use u4 type for crc_table to avoid conversion warnings
|
||||
- Apply casts in zlib.h to avoid conversion warnings
|
||||
- Add OF to prototypes for adler32_combine_ and crc32_combine_ [Miller]
|
||||
- Improve inflateSync() documentation to note indeterminancy
|
||||
- Improve inflateSync() documentation to note indeterminacy
|
||||
- Add deflatePending() function to return the amount of pending output
|
||||
- Correct the spelling of "specification" in FAQ [Randers-Pehrson]
|
||||
- Add a check in configure for stdarg.h, use for gzprintf()
|
||||
- Check that pointers fit in ints when gzprint() compiled old style
|
||||
- Add dummy name before $(SHAREDLIBV) in Makefile [Bar-Lev, Bowler]
|
||||
- Delete line in configure that adds -L. libz.a to LDFLAGS [Weigelt]
|
||||
- Add debug records in assmebler code [Londer]
|
||||
- Add debug records in assembler code [Londer]
|
||||
- Update RFC references to use http://tools.ietf.org/html/... [Li]
|
||||
- Add --archs option, use of libtool to configure for Mac OS X [Borstel]
|
||||
|
||||
@ -1033,7 +1063,7 @@ Changes in 1.2.0.1 (17 March 2003)
|
||||
- Include additional header file on VMS for off_t typedef
|
||||
- Try to use _vsnprintf where it supplants vsprintf [Vollant]
|
||||
- Add some casts in inffast.c
|
||||
- Enchance comments in zlib.h on what happens if gzprintf() tries to
|
||||
- Enhance comments in zlib.h on what happens if gzprintf() tries to
|
||||
write more than 4095 bytes before compression
|
||||
- Remove unused state from inflateBackEnd()
|
||||
- Remove exit(0) from minigzip.c, example.c
|
||||
@ -1211,7 +1241,7 @@ Changes in 1.0.9 (17 Feb 1998)
|
||||
- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8
|
||||
- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi)
|
||||
- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with
|
||||
the declaration of FAR (Gilles VOllant)
|
||||
the declaration of FAR (Gilles Vollant)
|
||||
- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann)
|
||||
- read_buf buf parameter of type Bytef* instead of charf*
|
||||
- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout)
|
||||
@ -1433,7 +1463,7 @@ Changes in 0.99 (27 Jan 96)
|
||||
- fix typo in Make_vms.com (f$trnlnm -> f$getsyi)
|
||||
- in fcalloc, normalize pointer if size > 65520 bytes
|
||||
- don't use special fcalloc for 32 bit Borland C++
|
||||
- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc...
|
||||
- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc.
|
||||
- use Z_BINARY instead of BINARY
|
||||
- document that gzclose after gzdopen will close the file
|
||||
- allow "a" as mode in gzopen
|
||||
@ -1567,7 +1597,7 @@ Changes in 0.4:
|
||||
- renamed deflateOptions as deflateInit2, call one or the other but not both
|
||||
- added the method parameter for deflateInit2
|
||||
- added inflateInit2
|
||||
- simplied considerably deflateInit and inflateInit by not supporting
|
||||
- simplified considerably deflateInit and inflateInit by not supporting
|
||||
user-provided history buffer. This is supported only in deflateInit2
|
||||
and inflateInit2
|
||||
|
||||
|
2
3rdparty/zlib/FAQ
vendored
2
3rdparty/zlib/FAQ
vendored
@ -4,7 +4,7 @@
|
||||
|
||||
If your question is not there, please check the zlib home page
|
||||
http://zlib.net/ which may have more recent information.
|
||||
The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
|
||||
The latest zlib FAQ is at http://zlib.net/zlib_faq.html
|
||||
|
||||
|
||||
1. Is zlib Y2K-compliant?
|
||||
|
22
3rdparty/zlib/LICENSE
vendored
Normal file
22
3rdparty/zlib/LICENSE
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
Copyright notice:
|
||||
|
||||
(C) 1995-2022 Jean-loup Gailly and Mark Adler
|
||||
|
||||
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.
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
28
3rdparty/zlib/Makefile.in
vendored
28
3rdparty/zlib/Makefile.in
vendored
@ -7,10 +7,6 @@
|
||||
# Normally configure builds both a static and a shared library.
|
||||
# If you want to build just a static library, use: ./configure --static
|
||||
|
||||
# To use the asm code, type:
|
||||
# cp contrib/asm?86/match.S ./match.S
|
||||
# make LOC=-DASMV OBJA=match.o
|
||||
|
||||
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
|
||||
# make install
|
||||
# To install in $HOME instead of /usr/local, use:
|
||||
@ -26,13 +22,13 @@ CFLAGS=-O
|
||||
|
||||
SFLAGS=-O
|
||||
LDFLAGS=
|
||||
TEST_LDFLAGS=-L. libz.a
|
||||
TEST_LDFLAGS=$(LDFLAGS) -L. libz.a
|
||||
LDSHARED=$(CC)
|
||||
CPP=$(CC) -E
|
||||
|
||||
STATICLIB=libz.a
|
||||
SHAREDLIB=libz.so
|
||||
SHAREDLIBV=libz.so.1.2.12
|
||||
SHAREDLIBV=libz.so.1.3
|
||||
SHAREDLIBM=libz.so.1
|
||||
LIBS=$(STATICLIB) $(SHAREDLIBV)
|
||||
|
||||
@ -87,7 +83,7 @@ test: all teststatic testshared
|
||||
|
||||
teststatic: static
|
||||
@TMPST=tmpst_$$; \
|
||||
if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
|
||||
if echo hello world | ${QEMU_RUN} ./minigzip | ${QEMU_RUN} ./minigzip -d && ${QEMU_RUN} ./example $$TMPST ; then \
|
||||
echo ' *** zlib test OK ***'; \
|
||||
else \
|
||||
echo ' *** zlib test FAILED ***'; false; \
|
||||
@ -100,7 +96,7 @@ testshared: shared
|
||||
DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
|
||||
SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
|
||||
TMPSH=tmpsh_$$; \
|
||||
if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \
|
||||
if echo hello world | ${QEMU_RUN} ./minigzipsh | ${QEMU_RUN} ./minigzipsh -d && ${QEMU_RUN} ./examplesh $$TMPSH; then \
|
||||
echo ' *** zlib shared test OK ***'; \
|
||||
else \
|
||||
echo ' *** zlib shared test FAILED ***'; false; \
|
||||
@ -109,7 +105,7 @@ testshared: shared
|
||||
|
||||
test64: all64
|
||||
@TMP64=tmp64_$$; \
|
||||
if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
|
||||
if echo hello world | ${QEMU_RUN} ./minigzip64 | ${QEMU_RUN} ./minigzip64 -d && ${QEMU_RUN} ./example64 $$TMP64; then \
|
||||
echo ' *** zlib 64-bit test OK ***'; \
|
||||
else \
|
||||
echo ' *** zlib 64-bit test FAILED ***'; false; \
|
||||
@ -124,7 +120,7 @@ infcover: infcover.o libz.a
|
||||
|
||||
cover: infcover
|
||||
rm -f *.gcda
|
||||
./infcover
|
||||
${QEMU_RUN} ./infcover
|
||||
gcov inf*.c
|
||||
|
||||
libz.a: $(OBJS)
|
||||
@ -292,10 +288,10 @@ minigzip$(EXE): minigzip.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
|
||||
|
||||
examplesh$(EXE): example.o $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV)
|
||||
|
||||
minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
|
||||
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV)
|
||||
|
||||
example64$(EXE): example64.o $(STATICLIB)
|
||||
$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
|
||||
@ -363,8 +359,14 @@ zconf.h.cmakein: $(SRCDIR)zconf.h.in
|
||||
zconf: $(SRCDIR)zconf.h.in
|
||||
cp -p $(SRCDIR)zconf.h.in zconf.h
|
||||
|
||||
minizip-test: static
|
||||
cd contrib/minizip && { CFLAGS="$(CFLAGS)" $(MAKE) test ; cd ../.. ; }
|
||||
|
||||
minizip-clean:
|
||||
cd contrib/minizip && { $(MAKE) clean ; cd ../.. ; }
|
||||
|
||||
mostlyclean: clean
|
||||
clean:
|
||||
clean: minizip-clean
|
||||
rm -f *.o *.lo *~ \
|
||||
example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
|
||||
example64$(EXE) minigzip64$(EXE) \
|
||||
|
19
3rdparty/zlib/README
vendored
19
3rdparty/zlib/README
vendored
@ -1,6 +1,6 @@
|
||||
ZLIB DATA COMPRESSION LIBRARY
|
||||
|
||||
zlib 1.2.12 is a general purpose data compression library. All the code is
|
||||
zlib 1.3 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://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
|
||||
@ -29,18 +29,17 @@ PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.
|
||||
|
||||
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 at
|
||||
http://marknelson.us/1997/01/01/zlib-engine/ .
|
||||
https://marknelson.us/posts/1997/01/01/zlib-engine.html .
|
||||
|
||||
The changes made in version 1.2.12 are documented in the file ChangeLog.
|
||||
The changes made in version 1.3 are documented in the file ChangeLog.
|
||||
|
||||
Unsupported third party contributions are provided in directory contrib/ .
|
||||
|
||||
zlib is available in Java using the java.util.zip package, documented at
|
||||
http://java.sun.com/developer/technicalArticles/Programming/compression/ .
|
||||
zlib is available in Java using the java.util.zip package. Follow the API
|
||||
Documentation link at: https://docs.oracle.com/search/?q=java.util.zip .
|
||||
|
||||
A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is available
|
||||
at CPAN (Comprehensive Perl Archive Network) sites, including
|
||||
http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
|
||||
A Perl interface to zlib and bzip2 written by Paul Marquess <pmqs@cpan.org>
|
||||
can be found at https://github.com/pmqs/IO-Compress .
|
||||
|
||||
A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
|
||||
available in Python 1.5 and later versions, see
|
||||
@ -64,7 +63,7 @@ Notes for some targets:
|
||||
- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
|
||||
when compiled with cc.
|
||||
|
||||
- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
|
||||
- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is
|
||||
necessary to get gzprintf working correctly. This is done by configure.
|
||||
|
||||
- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
|
||||
@ -84,7 +83,7 @@ Acknowledgments:
|
||||
|
||||
Copyright notice:
|
||||
|
||||
(C) 1995-2022 Jean-loup Gailly and Mark Adler
|
||||
(C) 1995-2023 Jean-loup Gailly and Mark Adler
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
|
32
3rdparty/zlib/adler32.c
vendored
32
3rdparty/zlib/adler32.c
vendored
@ -7,8 +7,6 @@
|
||||
|
||||
#include "zutil.h"
|
||||
|
||||
local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
|
||||
|
||||
#define BASE 65521U /* largest prime smaller than 65536 */
|
||||
#define NMAX 5552
|
||||
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
|
||||
@ -60,11 +58,7 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
|
||||
#endif
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT adler32_z(adler, buf, len)
|
||||
uLong adler;
|
||||
const Bytef *buf;
|
||||
z_size_t len;
|
||||
{
|
||||
uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
|
||||
unsigned long sum2;
|
||||
unsigned n;
|
||||
|
||||
@ -131,20 +125,12 @@ uLong ZEXPORT adler32_z(adler, buf, len)
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT adler32(adler, buf, len)
|
||||
uLong adler;
|
||||
const Bytef *buf;
|
||||
uInt len;
|
||||
{
|
||||
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
|
||||
return adler32_z(adler, buf, len);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
local uLong adler32_combine_(adler1, adler2, len2)
|
||||
uLong adler1;
|
||||
uLong adler2;
|
||||
z_off64_t len2;
|
||||
{
|
||||
local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
|
||||
unsigned long sum1;
|
||||
unsigned long sum2;
|
||||
unsigned rem;
|
||||
@ -169,18 +155,10 @@ local uLong adler32_combine_(adler1, adler2, len2)
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT adler32_combine(adler1, adler2, len2)
|
||||
uLong adler1;
|
||||
uLong adler2;
|
||||
z_off_t len2;
|
||||
{
|
||||
uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
|
||||
return adler32_combine_(adler1, adler2, len2);
|
||||
}
|
||||
|
||||
uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
|
||||
uLong adler1;
|
||||
uLong adler2;
|
||||
z_off64_t len2;
|
||||
{
|
||||
uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {
|
||||
return adler32_combine_(adler1, adler2, len2);
|
||||
}
|
||||
|
21
3rdparty/zlib/compress.c
vendored
21
3rdparty/zlib/compress.c
vendored
@ -19,13 +19,8 @@
|
||||
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
|
||||
Z_STREAM_ERROR if the level parameter is invalid.
|
||||
*/
|
||||
int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
|
||||
Bytef *dest;
|
||||
uLongf *destLen;
|
||||
const Bytef *source;
|
||||
uLong sourceLen;
|
||||
int level;
|
||||
{
|
||||
int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
|
||||
uLong sourceLen, int level) {
|
||||
z_stream stream;
|
||||
int err;
|
||||
const uInt max = (uInt)-1;
|
||||
@ -65,12 +60,8 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
|
||||
|
||||
/* ===========================================================================
|
||||
*/
|
||||
int ZEXPORT compress (dest, destLen, source, sourceLen)
|
||||
Bytef *dest;
|
||||
uLongf *destLen;
|
||||
const Bytef *source;
|
||||
uLong sourceLen;
|
||||
{
|
||||
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,
|
||||
uLong sourceLen) {
|
||||
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
|
||||
}
|
||||
|
||||
@ -78,9 +69,7 @@ int ZEXPORT compress (dest, destLen, source, sourceLen)
|
||||
If the default memLevel or windowBits for deflateInit() is changed, then
|
||||
this function needs to be updated.
|
||||
*/
|
||||
uLong ZEXPORT compressBound (sourceLen)
|
||||
uLong sourceLen;
|
||||
{
|
||||
uLong ZEXPORT compressBound(uLong sourceLen) {
|
||||
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
|
||||
(sourceLen >> 25) + 13;
|
||||
}
|
||||
|
117
3rdparty/zlib/configure
vendored
117
3rdparty/zlib/configure
vendored
@ -32,8 +32,11 @@ fi
|
||||
|
||||
# set command prefix for cross-compilation
|
||||
if [ -n "${CHOST}" ]; then
|
||||
uname="`echo "${CHOST}" | sed -e 's/^[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)$/\1/' -e 's/^[^-]*-[^-]*-\([^-]*\)-.*$/\1/'`"
|
||||
uname=${CHOST}
|
||||
mname=${CHOST}
|
||||
CROSS_PREFIX="${CHOST}-"
|
||||
else
|
||||
mname=`(uname -a || echo unknown) 2>/dev/null`
|
||||
fi
|
||||
|
||||
# destination name for static library
|
||||
@ -41,8 +44,6 @@ STATICLIB=libz.a
|
||||
|
||||
# extract zlib version numbers from zlib.h
|
||||
VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < ${SRCDIR}zlib.h`
|
||||
VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < ${SRCDIR}zlib.h`
|
||||
VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
|
||||
VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
|
||||
|
||||
# establish commands for library building
|
||||
@ -87,7 +88,8 @@ build64=0
|
||||
gcc=0
|
||||
warn=0
|
||||
debug=0
|
||||
sanitize=0
|
||||
address=0
|
||||
memory=0
|
||||
old_cc="$CC"
|
||||
old_cflags="$CFLAGS"
|
||||
OBJC='$(OBJZ) $(OBJG)'
|
||||
@ -99,7 +101,7 @@ leave()
|
||||
if test "$*" != "0"; then
|
||||
echo "** $0 aborting." | tee -a configure.log
|
||||
fi
|
||||
rm -f $test.[co] $test $test$shared_ext $test.gcno ./--version
|
||||
rm -rf $test.[co] $test $test$shared_ext $test.gcno $test.dSYM ./--version
|
||||
echo -------------------- >> configure.log
|
||||
echo >> configure.log
|
||||
echo >> configure.log
|
||||
@ -138,7 +140,9 @@ case "$1" in
|
||||
-c* | --const) zconst=1; shift ;;
|
||||
-w* | --warn) warn=1; shift ;;
|
||||
-d* | --debug) debug=1; shift ;;
|
||||
--sanitize) sanitize=1; shift ;;
|
||||
--sanitize) address=1; shift ;;
|
||||
--address) address=1; shift ;;
|
||||
--memory) memory=1; shift ;;
|
||||
*)
|
||||
echo "unknown option: $1" | tee -a configure.log
|
||||
echo "$0 --help for help" | tee -a configure.log
|
||||
@ -174,9 +178,10 @@ if test -z "$CC"; then
|
||||
else
|
||||
cc=${CROSS_PREFIX}cc
|
||||
fi
|
||||
else
|
||||
cc=${CC}
|
||||
fi
|
||||
cflags=${CFLAGS-"-O3"}
|
||||
# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
|
||||
|
||||
case "$cc" in
|
||||
*gcc*) gcc=1 ;;
|
||||
*clang*) gcc=1 ;;
|
||||
@ -202,13 +207,16 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
|
||||
fi
|
||||
if test "$warn" -eq 1; then
|
||||
if test "$zconst" -eq 1; then
|
||||
CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -pedantic -DZLIB_CONST"
|
||||
CFLAGS="${CFLAGS} -Wall -Wextra -Wcast-qual -DZLIB_CONST"
|
||||
else
|
||||
CFLAGS="${CFLAGS} -Wall -Wextra -pedantic"
|
||||
CFLAGS="${CFLAGS} -Wall -Wextra"
|
||||
fi
|
||||
fi
|
||||
if test $sanitize -eq 1; then
|
||||
CFLAGS="${CFLAGS} -fsanitize=address"
|
||||
if test $address -eq 1; then
|
||||
CFLAGS="${CFLAGS} -g -fsanitize=address -fno-omit-frame-pointer"
|
||||
fi
|
||||
if test $memory -eq 1; then
|
||||
CFLAGS="${CFLAGS} -g -fsanitize=memory -fno-omit-frame-pointer"
|
||||
fi
|
||||
if test $debug -eq 1; then
|
||||
CFLAGS="${CFLAGS} -DZLIB_DEBUG"
|
||||
@ -218,47 +226,54 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
|
||||
uname=`(uname -s || echo unknown) 2>/dev/null`
|
||||
fi
|
||||
case "$uname" in
|
||||
Linux* | linux* | GNU | GNU/* | solaris*)
|
||||
Linux* | linux* | *-linux* | GNU | GNU/* | solaris*)
|
||||
case "$mname" in
|
||||
*sparc*)
|
||||
LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;;
|
||||
esac
|
||||
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
|
||||
*BSD | *bsd* | DragonFly)
|
||||
LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
|
||||
LDCONFIG="ldconfig -m" ;;
|
||||
CYGWIN* | Cygwin* | cygwin* | OS/2*)
|
||||
CYGWIN* | Cygwin* | cygwin* | *-cygwin* | OS/2*)
|
||||
EXE='.exe' ;;
|
||||
MINGW* | mingw*)
|
||||
# temporary bypass
|
||||
MINGW* | mingw* | *-mingw*)
|
||||
rm -f $test.[co] $test $test$shared_ext
|
||||
echo "Please use win32/Makefile.gcc instead." | tee -a configure.log
|
||||
leave 1
|
||||
echo "If this doesn't work for you, try win32/Makefile.gcc." | tee -a configure.log
|
||||
LDSHARED=${LDSHARED-"$cc -shared"}
|
||||
LDSHAREDLIBC=""
|
||||
EXE='.exe' ;;
|
||||
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
|
||||
# (alain.bonnefoy@icbt.com)
|
||||
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
|
||||
QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
|
||||
# (alain.bonnefoy@icbt.com)
|
||||
LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"} ;;
|
||||
HP-UX*)
|
||||
LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
|
||||
case `(uname -m || echo unknown) 2>/dev/null` in
|
||||
ia64)
|
||||
shared_ext='.so'
|
||||
SHAREDLIB='libz.so' ;;
|
||||
*)
|
||||
shared_ext='.sl'
|
||||
SHAREDLIB='libz.sl' ;;
|
||||
esac ;;
|
||||
Darwin* | darwin*)
|
||||
shared_ext='.dylib'
|
||||
SHAREDLIB=libz$shared_ext
|
||||
SHAREDLIBV=libz.$VER$shared_ext
|
||||
SHAREDLIBM=libz.$VER1$shared_ext
|
||||
LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"}
|
||||
if libtool -V 2>&1 | grep Apple > /dev/null; then
|
||||
AR="libtool"
|
||||
else
|
||||
AR="/usr/bin/libtool"
|
||||
fi
|
||||
ARFLAGS="-o" ;;
|
||||
*) LDSHARED=${LDSHARED-"$cc -shared"} ;;
|
||||
LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
|
||||
case `(uname -m || echo unknown) 2>/dev/null` in
|
||||
ia64)
|
||||
shared_ext='.so'
|
||||
SHAREDLIB='libz.so' ;;
|
||||
*)
|
||||
shared_ext='.sl'
|
||||
SHAREDLIB='libz.sl' ;;
|
||||
esac ;;
|
||||
AIX*)
|
||||
LDFLAGS="${LDFLAGS} -Wl,-brtl" ;;
|
||||
Darwin* | darwin* | *-darwin*)
|
||||
shared_ext='.dylib'
|
||||
SHAREDLIB=libz$shared_ext
|
||||
SHAREDLIBV=libz.$VER$shared_ext
|
||||
SHAREDLIBM=libz.$VER1$shared_ext
|
||||
LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"}
|
||||
if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then
|
||||
AR="${CROSS_PREFIX}libtool"
|
||||
elif libtool -V 2>&1 | grep Apple > /dev/null; then
|
||||
AR="libtool"
|
||||
else
|
||||
AR="/usr/bin/libtool"
|
||||
fi
|
||||
ARFLAGS="-o" ;;
|
||||
*)
|
||||
LDSHARED=${LDSHARED-"$cc -shared"} ;;
|
||||
esac
|
||||
else
|
||||
# find system name and corresponding cc options
|
||||
@ -450,20 +465,6 @@ else
|
||||
TEST="all teststatic testshared"
|
||||
fi
|
||||
|
||||
# check for underscores in external names for use by assembler code
|
||||
CPP=${CPP-"$CC -E"}
|
||||
case $CFLAGS in
|
||||
*ASMV*)
|
||||
echo >> configure.log
|
||||
show "$NM $test.o | grep _hello"
|
||||
if test "`$NM $test.o | grep _hello | tee -a configure.log`" = ""; then
|
||||
CPP="$CPP -DNO_UNDERLINE"
|
||||
echo Checking for underline in external names... No. | tee -a configure.log
|
||||
else
|
||||
echo Checking for underline in external names... Yes. | tee -a configure.log
|
||||
fi ;;
|
||||
esac
|
||||
|
||||
echo >> configure.log
|
||||
|
||||
# check for size_t
|
||||
@ -865,7 +866,7 @@ echo prefix = $prefix >> configure.log
|
||||
echo sharedlibdir = $sharedlibdir >> configure.log
|
||||
echo uname = $uname >> configure.log
|
||||
|
||||
# udpate Makefile with the configure results
|
||||
# update Makefile with the configure results
|
||||
sed < ${SRCDIR}Makefile.in "
|
||||
/^CC *=/s#=.*#=$CC#
|
||||
/^CFLAGS *=/s#=.*#=$CFLAGS#
|
||||
|
2
3rdparty/zlib/contrib/README.contrib
vendored
2
3rdparty/zlib/contrib/README.contrib
vendored
@ -1,4 +1,4 @@
|
||||
All files under this contrib directory are UNSUPPORTED. There were
|
||||
All files under this contrib directory are UNSUPPORTED. They were
|
||||
provided by users of zlib and were not tested by the authors of zlib.
|
||||
Use at your own risk. Please contact the authors of the contributions
|
||||
for help about these, not the zlib authors. Thanks.
|
||||
|
4
3rdparty/zlib/contrib/ada/readme.txt
vendored
4
3rdparty/zlib/contrib/ada/readme.txt
vendored
@ -8,8 +8,8 @@ It provides Ada-style access to the ZLib C library.
|
||||
|
||||
Here are the main changes since ZLib.Ada 1.2:
|
||||
|
||||
- Attension: ZLib.Read generic routine have a initialization requirement
|
||||
for Read_Last parameter now. It is a bit incompartible with previous version,
|
||||
- Attention: ZLib.Read generic routine have a initialization requirement
|
||||
for Read_Last parameter now. It is a bit incompatible with previous version,
|
||||
but extends functionality, we could use new parameters Allow_Read_Some and
|
||||
Flush now.
|
||||
|
||||
|
4
3rdparty/zlib/contrib/ada/test.adb
vendored
4
3rdparty/zlib/contrib/ada/test.adb
vendored
@ -65,12 +65,12 @@ procedure Test is
|
||||
Time_Stamp : Ada.Calendar.Time;
|
||||
|
||||
procedure Generate_File;
|
||||
-- Generate file of spetsified size with some random data.
|
||||
-- Generate file of specified size with some random data.
|
||||
-- The random data is repeatable, for the good compression.
|
||||
|
||||
procedure Compare_Streams
|
||||
(Left, Right : in out Root_Stream_Type'Class);
|
||||
-- The procedure compearing data in 2 streams.
|
||||
-- The procedure comparing data in 2 streams.
|
||||
-- It is for compare data before and after compression/decompression.
|
||||
|
||||
procedure Compare_Files (Left, Right : String);
|
||||
|
2
3rdparty/zlib/contrib/ada/zlib-streams.ads
vendored
2
3rdparty/zlib/contrib/ada/zlib-streams.ads
vendored
@ -62,7 +62,7 @@ package ZLib.Streams is
|
||||
:= Default_Buffer_Size;
|
||||
Write_Buffer_Size : in Ada.Streams.Stream_Element_Offset
|
||||
:= Default_Buffer_Size);
|
||||
-- Create the Comression/Decompression stream.
|
||||
-- Create the Compression/Decompression stream.
|
||||
-- If mode is In_Stream then Write operation is disabled.
|
||||
-- If mode is Out_Stream then Read operation is disabled.
|
||||
|
||||
|
2
3rdparty/zlib/contrib/ada/zlib.adb
vendored
2
3rdparty/zlib/contrib/ada/zlib.adb
vendored
@ -204,7 +204,7 @@ package body ZLib is
|
||||
end if;
|
||||
|
||||
-- We allow ZLib to make header only in case of default header type.
|
||||
-- Otherwise we would either do header by ourselfs, or do not do
|
||||
-- Otherwise we would either do header by ourselves, or do not do
|
||||
-- header at all.
|
||||
|
||||
if Header = None or else Header = GZip then
|
||||
|
2
3rdparty/zlib/contrib/ada/zlib.ads
vendored
2
3rdparty/zlib/contrib/ada/zlib.ads
vendored
@ -114,7 +114,7 @@ package ZLib is
|
||||
-- Compression strategy constants --
|
||||
------------------------------------
|
||||
|
||||
-- RLE stategy could be used only in version 1.2.0 and later.
|
||||
-- RLE strategy could be used only in version 1.2.0 and later.
|
||||
|
||||
Filtered : constant Strategy_Type;
|
||||
Huffman_Only : constant Strategy_Type;
|
||||
|
2
3rdparty/zlib/contrib/delphi/ZLib.pas
vendored
2
3rdparty/zlib/contrib/delphi/ZLib.pas
vendored
@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
|
||||
const OutBuf: Pointer; BufSize: Integer);
|
||||
|
||||
const
|
||||
zlib_version = '1.2.12';
|
||||
zlib_version = '1.3.0';
|
||||
|
||||
type
|
||||
EZlibError = class(Exception);
|
||||
|
@ -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>
|
||||
/// <exception cref="NullReferenceException"><c>data</c> is a null reference</exception>
|
||||
/// <exception cref="ArgumentOutOfRangeException">Offset or count is negative.</exception>
|
||||
/// <remarks>All the other <c>Update</c> methods are implmeneted in terms of this one.
|
||||
/// <remarks>All the other <c>Update</c> methods are implemented in terms of this one.
|
||||
/// This is therefore the only method a derived class has to implement</remarks>
|
||||
public abstract void Update(byte[] data, int offset, int count);
|
||||
|
||||
|
@ -139,7 +139,7 @@ namespace DotZLib
|
||||
/// <remarks>This must be implemented by a derived class</remarks>
|
||||
protected abstract void CleanUp();
|
||||
|
||||
// performs the release of the handles and calls the dereived CleanUp()
|
||||
// performs the release of the handles and calls the derived CleanUp()
|
||||
private void CleanUp(bool isDisposing)
|
||||
{
|
||||
if (!_isDisposed)
|
||||
@ -160,7 +160,7 @@ namespace DotZLib
|
||||
#region Helper methods
|
||||
|
||||
/// <summary>
|
||||
/// Copies a number of bytes to the internal codec buffer - ready for proccesing
|
||||
/// Copies a number of bytes to the internal codec buffer - ready for processing
|
||||
/// </summary>
|
||||
/// <param name="data">The byte array that contains the data to copy</param>
|
||||
/// <param name="startIndex">The index of the first byte to copy</param>
|
||||
|
@ -246,7 +246,7 @@ namespace DotZLib
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Not suppported.
|
||||
/// Not supported.
|
||||
/// </summary>
|
||||
/// <param name="offset"></param>
|
||||
/// <param name="origin"></param>
|
||||
@ -268,7 +268,7 @@ namespace DotZLib
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets/sets the current position in the <c>GZipStream</c>. Not suppported.
|
||||
/// Gets/sets the current position in the <c>GZipStream</c>. Not supported.
|
||||
/// </summary>
|
||||
/// <remarks>In this implementation this property is not supported</remarks>
|
||||
/// <exception cref="NotSupportedException">Always thrown</exception>
|
||||
@ -285,7 +285,7 @@ namespace DotZLib
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the size of the stream. Not suppported.
|
||||
/// Gets the size of the stream. Not supported.
|
||||
/// </summary>
|
||||
/// <remarks>In this implementation this property is not supported</remarks>
|
||||
/// <exception cref="NotSupportedException">Always thrown</exception>
|
||||
|
@ -156,7 +156,7 @@ namespace DotZLibTests
|
||||
public void Info_Version()
|
||||
{
|
||||
Info info = new Info();
|
||||
Assert.AreEqual("1.2.12", Info.Version);
|
||||
Assert.AreEqual("1.3.0", Info.Version);
|
||||
Assert.AreEqual(32, info.SizeOfUInt);
|
||||
Assert.AreEqual(32, info.SizeOfULong);
|
||||
Assert.AreEqual(32, info.SizeOfPointer);
|
||||
|
2
3rdparty/zlib/contrib/dotzlib/readme.txt
vendored
2
3rdparty/zlib/contrib/dotzlib/readme.txt
vendored
@ -36,7 +36,7 @@ Build instructions:
|
||||
in the same directory as the DotZLib.build file.
|
||||
You can define 2 properties on the nant command-line to control the build:
|
||||
debug={true|false} to toggle between release/debug builds (default=true).
|
||||
nunit={true|false} to include or esclude unit tests (default=true).
|
||||
nunit={true|false} to include or exclude unit tests (default=true).
|
||||
Also the target clean will remove binaries.
|
||||
Output file (DotZLib.dll) will be found in either ./DotZLib/bin/release
|
||||
or ./DotZLib/bin/debug, depending on whether you are building the release
|
||||
|
24
3rdparty/zlib/contrib/infback9/infback9.c
vendored
24
3rdparty/zlib/contrib/infback9/infback9.c
vendored
@ -16,12 +16,8 @@
|
||||
|
||||
window is a user-supplied window and output buffer that is 64K bytes.
|
||||
*/
|
||||
int ZEXPORT inflateBack9Init_(strm, window, version, stream_size)
|
||||
z_stream FAR *strm;
|
||||
unsigned char FAR *window;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{
|
||||
int ZEXPORT inflateBack9Init_(z_stream FAR *strm, unsigned char FAR *window,
|
||||
const char *version, int stream_size) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
|
||||
@ -51,8 +47,7 @@ int stream_size;
|
||||
#ifdef MAKEFIXED
|
||||
#include <stdio.h>
|
||||
|
||||
void makefixed9(void)
|
||||
{
|
||||
void makefixed9(void) {
|
||||
unsigned sym, bits, low, size;
|
||||
code *next, *lenfix, *distfix;
|
||||
struct inflate_state state;
|
||||
@ -214,13 +209,8 @@ void makefixed9(void)
|
||||
inflateBack() can also return Z_STREAM_ERROR if the input parameters
|
||||
are not correct, i.e. strm is Z_NULL or the state was not initialized.
|
||||
*/
|
||||
int ZEXPORT inflateBack9(strm, in, in_desc, out, out_desc)
|
||||
z_stream FAR *strm;
|
||||
in_func in;
|
||||
void FAR *in_desc;
|
||||
out_func out;
|
||||
void FAR *out_desc;
|
||||
{
|
||||
int ZEXPORT inflateBack9(z_stream FAR *strm, in_func in, void FAR *in_desc,
|
||||
out_func out, void FAR *out_desc) {
|
||||
struct inflate_state FAR *state;
|
||||
z_const unsigned char FAR *next; /* next input */
|
||||
unsigned char FAR *put; /* next output */
|
||||
@ -603,9 +593,7 @@ void FAR *out_desc;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateBack9End(strm)
|
||||
z_stream FAR *strm;
|
||||
{
|
||||
int ZEXPORT inflateBack9End(z_stream FAR *strm) {
|
||||
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
|
||||
return Z_STREAM_ERROR;
|
||||
ZFREE(strm, strm->state);
|
||||
|
16
3rdparty/zlib/contrib/infback9/infback9.h
vendored
16
3rdparty/zlib/contrib/infback9/infback9.h
vendored
@ -20,14 +20,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
ZEXTERN int ZEXPORT inflateBack9 OF((z_stream FAR *strm,
|
||||
in_func in, void FAR *in_desc,
|
||||
out_func out, void FAR *out_desc));
|
||||
ZEXTERN int ZEXPORT inflateBack9End OF((z_stream FAR *strm));
|
||||
ZEXTERN int ZEXPORT inflateBack9Init_ OF((z_stream FAR *strm,
|
||||
unsigned char FAR *window,
|
||||
const char *version,
|
||||
int stream_size));
|
||||
ZEXTERN int ZEXPORT inflateBack9(z_stream FAR *strm,
|
||||
in_func in, void FAR *in_desc,
|
||||
out_func out, void FAR *out_desc);
|
||||
ZEXTERN int ZEXPORT inflateBack9End(z_stream FAR *strm);
|
||||
ZEXTERN int ZEXPORT inflateBack9Init_(z_stream FAR *strm,
|
||||
unsigned char FAR *window,
|
||||
const char *version,
|
||||
int stream_size);
|
||||
#define inflateBack9Init(strm, window) \
|
||||
inflateBack9Init_((strm), (window), \
|
||||
ZLIB_VERSION, sizeof(z_stream))
|
||||
|
17
3rdparty/zlib/contrib/infback9/inftree9.c
vendored
17
3rdparty/zlib/contrib/infback9/inftree9.c
vendored
@ -1,5 +1,5 @@
|
||||
/* inftree9.c -- generate Huffman trees for efficient decoding
|
||||
* Copyright (C) 1995-2022 Mark Adler
|
||||
* Copyright (C) 1995-2023 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
#define MAXBITS 15
|
||||
|
||||
const char inflate9_copyright[] =
|
||||
" inflate9 1.2.12 Copyright 1995-2022 Mark Adler ";
|
||||
" inflate9 1.3 Copyright 1995-2023 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
|
||||
@ -29,14 +29,9 @@ const char inflate9_copyright[] =
|
||||
table index bits. It will differ if the request is greater than the
|
||||
longest code or if it is less than the shortest code.
|
||||
*/
|
||||
int inflate_table9(type, lens, codes, table, bits, work)
|
||||
codetype type;
|
||||
unsigned short FAR *lens;
|
||||
unsigned codes;
|
||||
code FAR * FAR *table;
|
||||
unsigned FAR *bits;
|
||||
unsigned short FAR *work;
|
||||
{
|
||||
int inflate_table9(codetype type, unsigned short FAR *lens, unsigned codes,
|
||||
code FAR * FAR *table, unsigned FAR *bits,
|
||||
unsigned short FAR *work) {
|
||||
unsigned len; /* a code's length in bits */
|
||||
unsigned sym; /* index of code symbols */
|
||||
unsigned min, max; /* minimum and maximum code lengths */
|
||||
@ -64,7 +59,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, 199, 202};
|
||||
133, 133, 133, 133, 144, 198, 203};
|
||||
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,
|
||||
|
8
3rdparty/zlib/contrib/infback9/inftree9.h
vendored
8
3rdparty/zlib/contrib/infback9/inftree9.h
vendored
@ -38,7 +38,7 @@ typedef struct {
|
||||
/* Maximum size of the dynamic table. The maximum number of code structures is
|
||||
1446, which is the sum of 852 for literal/length codes and 594 for distance
|
||||
codes. These values were found by exhaustive searches using the program
|
||||
examples/enough.c found in the zlib distribtution. The arguments to that
|
||||
examples/enough.c found in the zlib distribution. The arguments to that
|
||||
program are the number of symbols, the initial root table size, and the
|
||||
maximum bit length of a code. "enough 286 9 15" for literal/length codes
|
||||
returns returns 852, and "enough 32 6 15" for distance codes returns 594.
|
||||
@ -56,6 +56,6 @@ typedef enum {
|
||||
DISTS
|
||||
} codetype;
|
||||
|
||||
extern int inflate_table9 OF((codetype type, unsigned short FAR *lens,
|
||||
unsigned codes, code FAR * FAR *table,
|
||||
unsigned FAR *bits, unsigned short FAR *work));
|
||||
extern int inflate_table9(codetype type, unsigned short FAR *lens,
|
||||
unsigned codes, code FAR * FAR *table,
|
||||
unsigned FAR *bits, unsigned short FAR *work);
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
MiniZip 1.1 was derrived from MiniZip at version 1.01f
|
||||
MiniZip 1.1 was derived from MiniZip at version 1.01f
|
||||
|
||||
Change in 1.0 (Okt 2009)
|
||||
- **TODO - Add history**
|
||||
|
2
3rdparty/zlib/contrib/minizip/configure.ac
vendored
2
3rdparty/zlib/contrib/minizip/configure.ac
vendored
@ -1,7 +1,7 @@
|
||||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT([minizip], [1.2.12], [bugzilla.redhat.com])
|
||||
AC_INIT([minizip], [1.3.0], [bugzilla.redhat.com])
|
||||
AC_CONFIG_SRCDIR([minizip.c])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
LT_INIT
|
||||
|
14
3rdparty/zlib/contrib/minizip/crypt.h
vendored
14
3rdparty/zlib/contrib/minizip/crypt.h
vendored
@ -32,8 +32,7 @@
|
||||
/***********************************************************************
|
||||
* Return the next byte in the pseudo-random sequence
|
||||
*/
|
||||
static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
|
||||
{
|
||||
static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) {
|
||||
unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
|
||||
* unpredictable manner on 16-bit systems; not a problem
|
||||
* with any known compiler so far, though */
|
||||
@ -46,8 +45,7 @@ static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
|
||||
/***********************************************************************
|
||||
* Update the encryption keys with the next byte of plain text
|
||||
*/
|
||||
static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
|
||||
{
|
||||
static int update_keys(unsigned long* pkeys, const z_crc_t* pcrc_32_tab, int c) {
|
||||
(*(pkeys+0)) = CRC32((*(pkeys+0)), c);
|
||||
(*(pkeys+1)) += (*(pkeys+0)) & 0xff;
|
||||
(*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
|
||||
@ -63,8 +61,7 @@ static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c)
|
||||
* Initialize the encryption keys and the random header according to
|
||||
* the given password.
|
||||
*/
|
||||
static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab)
|
||||
{
|
||||
static void init_keys(const char* passwd, unsigned long* pkeys, const z_crc_t* pcrc_32_tab) {
|
||||
*(pkeys+0) = 305419896L;
|
||||
*(pkeys+1) = 591751049L;
|
||||
*(pkeys+2) = 878082192L;
|
||||
@ -85,7 +82,7 @@ static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcr
|
||||
#define RAND_HEAD_LEN 12
|
||||
/* "last resort" source for second part of crypt seed pattern */
|
||||
# ifndef ZCR_SEED2
|
||||
# define ZCR_SEED2 3141592654L /* use PI as default pattern */
|
||||
# define ZCR_SEED2 3141592654UL /* use PI as default pattern */
|
||||
# endif
|
||||
|
||||
static unsigned crypthead(const char* passwd, /* password string */
|
||||
@ -93,8 +90,7 @@ static unsigned crypthead(const char* passwd, /* password string */
|
||||
int bufSize,
|
||||
unsigned long* pkeys,
|
||||
const z_crc_t* pcrc_32_tab,
|
||||
unsigned long crcForCrypting)
|
||||
{
|
||||
unsigned long crcForCrypting) {
|
||||
unsigned n; /* index in random header */
|
||||
int t; /* temporary */
|
||||
int c; /* random byte */
|
||||
|
82
3rdparty/zlib/contrib/minizip/ioapi.c
vendored
82
3rdparty/zlib/contrib/minizip/ioapi.c
vendored
@ -14,7 +14,7 @@
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__) || defined(IOAPI_NO_64)
|
||||
#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64)
|
||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||
#define FTELLO_FUNC(stream) ftello(stream)
|
||||
@ -28,8 +28,7 @@
|
||||
|
||||
#include "ioapi.h"
|
||||
|
||||
voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)
|
||||
{
|
||||
voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc, const void*filename, int mode) {
|
||||
if (pfilefunc->zfile_func64.zopen64_file != NULL)
|
||||
return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);
|
||||
else
|
||||
@ -38,8 +37,7 @@ voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename
|
||||
}
|
||||
}
|
||||
|
||||
long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)
|
||||
{
|
||||
long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin) {
|
||||
if (pfilefunc->zfile_func64.zseek64_file != NULL)
|
||||
return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin);
|
||||
else
|
||||
@ -52,8 +50,7 @@ long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZP
|
||||
}
|
||||
}
|
||||
|
||||
ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)
|
||||
{
|
||||
ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc, voidpf filestream) {
|
||||
if (pfilefunc->zfile_func64.zseek64_file != NULL)
|
||||
return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream);
|
||||
else
|
||||
@ -66,11 +63,9 @@ ZPOS64_T call_ztell64 (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)
|
||||
{
|
||||
void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32, const zlib_filefunc_def* p_filefunc32) {
|
||||
p_filefunc64_32->zfile_func64.zopen64_file = NULL;
|
||||
p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file;
|
||||
p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file;
|
||||
p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file;
|
||||
p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file;
|
||||
p_filefunc64_32->zfile_func64.ztell64_file = NULL;
|
||||
@ -84,19 +79,10 @@ void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filef
|
||||
|
||||
|
||||
|
||||
static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
|
||||
static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
|
||||
static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
|
||||
static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));
|
||||
static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin));
|
||||
static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));
|
||||
static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
|
||||
|
||||
static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
|
||||
{
|
||||
(void)opaque;
|
||||
static voidpf ZCALLBACK fopen_file_func(voidpf opaque, const char* filename, int mode) {
|
||||
FILE* file = NULL;
|
||||
const char* mode_fopen = NULL;
|
||||
(void)opaque;
|
||||
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
|
||||
mode_fopen = "rb";
|
||||
else
|
||||
@ -111,11 +97,10 @@ static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, in
|
||||
return file;
|
||||
}
|
||||
|
||||
static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)
|
||||
{
|
||||
(void)opaque;
|
||||
static voidpf ZCALLBACK fopen64_file_func(voidpf opaque, const void* filename, int mode) {
|
||||
FILE* file = NULL;
|
||||
const char* mode_fopen = NULL;
|
||||
(void)opaque;
|
||||
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
|
||||
mode_fopen = "rb";
|
||||
else
|
||||
@ -131,44 +116,39 @@ static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename,
|
||||
}
|
||||
|
||||
|
||||
static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size)
|
||||
{
|
||||
(void)opaque;
|
||||
static uLong ZCALLBACK fread_file_func(voidpf opaque, voidpf stream, void* buf, uLong size) {
|
||||
uLong ret;
|
||||
(void)opaque;
|
||||
ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size)
|
||||
{
|
||||
(void)opaque;
|
||||
static uLong ZCALLBACK fwrite_file_func(voidpf opaque, voidpf stream, const void* buf, uLong size) {
|
||||
uLong ret;
|
||||
(void)opaque;
|
||||
ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
(void)opaque;
|
||||
static long ZCALLBACK ftell_file_func(voidpf opaque, voidpf stream) {
|
||||
long ret;
|
||||
(void)opaque;
|
||||
ret = ftell((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
(void)opaque;
|
||||
static ZPOS64_T ZCALLBACK ftell64_file_func(voidpf opaque, voidpf stream) {
|
||||
ZPOS64_T ret;
|
||||
(void)opaque;
|
||||
ret = (ZPOS64_T)FTELLO_FUNC((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin)
|
||||
{
|
||||
(void)opaque;
|
||||
static long ZCALLBACK fseek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin) {
|
||||
int fseek_origin=0;
|
||||
long ret;
|
||||
(void)opaque;
|
||||
switch (origin)
|
||||
{
|
||||
case ZLIB_FILEFUNC_SEEK_CUR :
|
||||
@ -188,11 +168,10 @@ static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offs
|
||||
return ret;
|
||||
}
|
||||
|
||||
static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)
|
||||
{
|
||||
(void)opaque;
|
||||
static long ZCALLBACK fseek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) {
|
||||
int fseek_origin=0;
|
||||
long ret;
|
||||
(void)opaque;
|
||||
switch (origin)
|
||||
{
|
||||
case ZLIB_FILEFUNC_SEEK_CUR :
|
||||
@ -208,32 +187,28 @@ static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T
|
||||
}
|
||||
ret = 0;
|
||||
|
||||
if(FSEEKO_FUNC((FILE *)stream, (long)offset, fseek_origin) != 0)
|
||||
if(FSEEKO_FUNC((FILE *)stream, (z_off64_t)offset, fseek_origin) != 0)
|
||||
ret = -1;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
(void)opaque;
|
||||
static int ZCALLBACK fclose_file_func(voidpf opaque, voidpf stream) {
|
||||
int ret;
|
||||
(void)opaque;
|
||||
ret = fclose((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
(void)opaque;
|
||||
static int ZCALLBACK ferror_file_func(voidpf opaque, voidpf stream) {
|
||||
int ret;
|
||||
(void)opaque;
|
||||
ret = ferror((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fill_fopen_filefunc (pzlib_filefunc_def)
|
||||
zlib_filefunc_def* pzlib_filefunc_def;
|
||||
{
|
||||
void fill_fopen_filefunc(zlib_filefunc_def* pzlib_filefunc_def) {
|
||||
pzlib_filefunc_def->zopen_file = fopen_file_func;
|
||||
pzlib_filefunc_def->zread_file = fread_file_func;
|
||||
pzlib_filefunc_def->zwrite_file = fwrite_file_func;
|
||||
@ -244,8 +219,7 @@ void fill_fopen_filefunc (pzlib_filefunc_def)
|
||||
pzlib_filefunc_def->opaque = NULL;
|
||||
}
|
||||
|
||||
void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def)
|
||||
{
|
||||
void fill_fopen64_filefunc(zlib_filefunc64_def* pzlib_filefunc_def) {
|
||||
pzlib_filefunc_def->zopen64_file = fopen64_file_func;
|
||||
pzlib_filefunc_def->zread_file = fread_file_func;
|
||||
pzlib_filefunc_def->zwrite_file = fwrite_file_func;
|
||||
|
36
3rdparty/zlib/contrib/minizip/ioapi.h
vendored
36
3rdparty/zlib/contrib/minizip/ioapi.h
vendored
@ -50,7 +50,7 @@
|
||||
#define ftello64 ftell
|
||||
#define fseeko64 fseek
|
||||
#else
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64)
|
||||
#define fopen64 fopen
|
||||
#define ftello64 ftello
|
||||
#define fseeko64 fseeko
|
||||
@ -82,7 +82,7 @@
|
||||
#include "mz64conf.h"
|
||||
#endif
|
||||
|
||||
/* a type choosen by DEFINE */
|
||||
/* a type chosen by DEFINE */
|
||||
#ifdef HAVE_64BIT_INT_CUSTOM
|
||||
typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T;
|
||||
#else
|
||||
@ -134,14 +134,14 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
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 voidpf (ZCALLBACK *open_file_func) (voidpf opaque, const char* filename, int mode);
|
||||
typedef uLong (ZCALLBACK *read_file_func) (voidpf opaque, voidpf stream, void* buf, uLong size);
|
||||
typedef uLong (ZCALLBACK *write_file_func) (voidpf opaque, voidpf stream, const void* buf, uLong size);
|
||||
typedef int (ZCALLBACK *close_file_func) (voidpf opaque, voidpf stream);
|
||||
typedef int (ZCALLBACK *testerror_file_func) (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));
|
||||
typedef long (ZCALLBACK *tell_file_func) (voidpf opaque, voidpf stream);
|
||||
typedef long (ZCALLBACK *seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin);
|
||||
|
||||
|
||||
/* here is the "old" 32 bits structure structure */
|
||||
@ -157,9 +157,9 @@ typedef struct zlib_filefunc_def_s
|
||||
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 ZPOS64_T (ZCALLBACK *tell64_file_func) (voidpf opaque, voidpf stream);
|
||||
typedef long (ZCALLBACK *seek64_file_func) (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin);
|
||||
typedef voidpf (ZCALLBACK *open64_file_func) (voidpf opaque, const void* filename, int mode);
|
||||
|
||||
typedef struct zlib_filefunc64_def_s
|
||||
{
|
||||
@ -173,8 +173,8 @@ typedef struct zlib_filefunc64_def_s
|
||||
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));
|
||||
void fill_fopen64_filefunc(zlib_filefunc64_def* pzlib_filefunc_def);
|
||||
void fill_fopen_filefunc(zlib_filefunc_def* pzlib_filefunc_def);
|
||||
|
||||
/* now internal definition, only for zip.c and unzip.h */
|
||||
typedef struct zlib_filefunc64_32_def_s
|
||||
@ -193,11 +193,11 @@ typedef struct zlib_filefunc64_32_def_s
|
||||
#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));
|
||||
voidpf call_zopen64(const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode);
|
||||
long call_zseek64(const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin);
|
||||
ZPOS64_T call_ztell64(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);
|
||||
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)))
|
||||
|
70
3rdparty/zlib/contrib/minizip/iowin32.c
vendored
70
3rdparty/zlib/contrib/minizip/iowin32.c
vendored
@ -28,19 +28,16 @@
|
||||
|
||||
// see Include/shared/winapifamily.h in the Windows Kit
|
||||
#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API)))
|
||||
|
||||
#if !defined(WINAPI_FAMILY_ONE_PARTITION)
|
||||
#define WINAPI_FAMILY_ONE_PARTITION(PartitionSet, Partition) ((WINAPI_FAMILY & PartitionSet) == Partition)
|
||||
#endif
|
||||
|
||||
#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
|
||||
#define IOWIN32_USING_WINRT_API 1
|
||||
#endif
|
||||
#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;
|
||||
@ -52,8 +49,7 @@ static void win32_translate_open_mode(int mode,
|
||||
DWORD* lpdwDesiredAccess,
|
||||
DWORD* lpdwCreationDisposition,
|
||||
DWORD* lpdwShareMode,
|
||||
DWORD* lpdwFlagsAndAttributes)
|
||||
{
|
||||
DWORD* lpdwFlagsAndAttributes) {
|
||||
*lpdwDesiredAccess = *lpdwShareMode = *lpdwFlagsAndAttributes = *lpdwCreationDisposition = 0;
|
||||
|
||||
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
|
||||
@ -74,8 +70,7 @@ static void win32_translate_open_mode(int mode,
|
||||
}
|
||||
}
|
||||
|
||||
static voidpf win32_build_iowin(HANDLE hFile)
|
||||
{
|
||||
static voidpf win32_build_iowin(HANDLE hFile) {
|
||||
voidpf ret=NULL;
|
||||
|
||||
if ((hFile != NULL) && (hFile != INVALID_HANDLE_VALUE))
|
||||
@ -93,8 +88,7 @@ static voidpf win32_build_iowin(HANDLE hFile)
|
||||
return ret;
|
||||
}
|
||||
|
||||
voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int mode)
|
||||
{
|
||||
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;
|
||||
@ -122,8 +116,7 @@ voidpf ZCALLBACK win32_open64_file_func (voidpf opaque,const void* filename,int
|
||||
}
|
||||
|
||||
|
||||
voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int mode)
|
||||
{
|
||||
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;
|
||||
@ -146,8 +139,7 @@ voidpf ZCALLBACK win32_open64_file_funcA (voidpf opaque,const void* filename,int
|
||||
}
|
||||
|
||||
|
||||
voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int mode)
|
||||
{
|
||||
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;
|
||||
@ -166,8 +158,7 @@ voidpf ZCALLBACK win32_open64_file_funcW (voidpf opaque,const void* filename,int
|
||||
}
|
||||
|
||||
|
||||
voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mode)
|
||||
{
|
||||
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;
|
||||
@ -195,8 +186,7 @@ voidpf ZCALLBACK win32_open_file_func (voidpf opaque,const char* filename,int mo
|
||||
}
|
||||
|
||||
|
||||
uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uLong size)
|
||||
{
|
||||
uLong ZCALLBACK win32_read_file_func(voidpf opaque, voidpf stream, void* buf,uLong size) {
|
||||
uLong ret=0;
|
||||
HANDLE hFile = NULL;
|
||||
if (stream!=NULL)
|
||||
@ -217,8 +207,7 @@ uLong ZCALLBACK win32_read_file_func (voidpf opaque, voidpf stream, void* buf,uL
|
||||
}
|
||||
|
||||
|
||||
uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* buf,uLong size)
|
||||
{
|
||||
uLong ZCALLBACK win32_write_file_func(voidpf opaque, voidpf stream, const void* buf, uLong size) {
|
||||
uLong ret=0;
|
||||
HANDLE hFile = NULL;
|
||||
if (stream!=NULL)
|
||||
@ -238,8 +227,7 @@ uLong ZCALLBACK win32_write_file_func (voidpf opaque,voidpf stream,const void* b
|
||||
return ret;
|
||||
}
|
||||
|
||||
static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *newPos, DWORD dwMoveMethod)
|
||||
{
|
||||
static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *newPos, DWORD dwMoveMethod) {
|
||||
#ifdef IOWIN32_USING_WINRT_API
|
||||
return SetFilePointerEx(hFile, pos, newPos, dwMoveMethod);
|
||||
#else
|
||||
@ -258,8 +246,7 @@ static BOOL MySetFilePointerEx(HANDLE hFile, LARGE_INTEGER pos, LARGE_INTEGER *n
|
||||
#endif
|
||||
}
|
||||
|
||||
long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream)
|
||||
{
|
||||
long ZCALLBACK win32_tell_file_func(voidpf opaque, voidpf stream) {
|
||||
long ret=-1;
|
||||
HANDLE hFile = NULL;
|
||||
if (stream!=NULL)
|
||||
@ -281,8 +268,7 @@ long ZCALLBACK win32_tell_file_func (voidpf opaque,voidpf stream)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
ZPOS64_T ZCALLBACK win32_tell64_file_func(voidpf opaque, voidpf stream) {
|
||||
ZPOS64_T ret= (ZPOS64_T)-1;
|
||||
HANDLE hFile = NULL;
|
||||
if (stream!=NULL)
|
||||
@ -306,8 +292,7 @@ ZPOS64_T ZCALLBACK win32_tell64_file_func (voidpf opaque, voidpf stream)
|
||||
}
|
||||
|
||||
|
||||
long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,int origin)
|
||||
{
|
||||
long ZCALLBACK win32_seek_file_func(voidpf opaque, voidpf stream, uLong offset, int origin) {
|
||||
DWORD dwMoveMethod=0xFFFFFFFF;
|
||||
HANDLE hFile = NULL;
|
||||
|
||||
@ -344,8 +329,7 @@ long ZCALLBACK win32_seek_file_func (voidpf opaque,voidpf stream,uLong offset,in
|
||||
return ret;
|
||||
}
|
||||
|
||||
long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T offset,int origin)
|
||||
{
|
||||
long ZCALLBACK win32_seek64_file_func(voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) {
|
||||
DWORD dwMoveMethod=0xFFFFFFFF;
|
||||
HANDLE hFile = NULL;
|
||||
long ret=-1;
|
||||
@ -383,8 +367,7 @@ long ZCALLBACK win32_seek64_file_func (voidpf opaque, voidpf stream,ZPOS64_T off
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
int ZCALLBACK win32_close_file_func(voidpf opaque, voidpf stream) {
|
||||
int ret=-1;
|
||||
|
||||
if (stream!=NULL)
|
||||
@ -401,8 +384,7 @@ int ZCALLBACK win32_close_file_func (voidpf opaque, voidpf stream)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream)
|
||||
{
|
||||
int ZCALLBACK win32_error_file_func(voidpf opaque, voidpf stream) {
|
||||
int ret=-1;
|
||||
if (stream!=NULL)
|
||||
{
|
||||
@ -411,8 +393,7 @@ int ZCALLBACK win32_error_file_func (voidpf opaque,voidpf stream)
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def)
|
||||
{
|
||||
void 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;
|
||||
@ -423,8 +404,7 @@ void fill_win32_filefunc (zlib_filefunc_def* pzlib_filefunc_def)
|
||||
pzlib_filefunc_def->opaque = NULL;
|
||||
}
|
||||
|
||||
void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def)
|
||||
{
|
||||
void 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;
|
||||
@ -436,8 +416,7 @@ void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def)
|
||||
}
|
||||
|
||||
|
||||
void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def)
|
||||
{
|
||||
void 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;
|
||||
@ -449,8 +428,7 @@ void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def)
|
||||
}
|
||||
|
||||
|
||||
void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def)
|
||||
{
|
||||
void 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;
|
||||
|
8
3rdparty/zlib/contrib/minizip/iowin32.h
vendored
8
3rdparty/zlib/contrib/minizip/iowin32.h
vendored
@ -18,10 +18,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void fill_win32_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def));
|
||||
void fill_win32_filefunc64 OF((zlib_filefunc64_def* pzlib_filefunc_def));
|
||||
void fill_win32_filefunc64A OF((zlib_filefunc64_def* pzlib_filefunc_def));
|
||||
void fill_win32_filefunc64W OF((zlib_filefunc64_def* pzlib_filefunc_def));
|
||||
void fill_win32_filefunc(zlib_filefunc_def* pzlib_filefunc_def);
|
||||
void fill_win32_filefunc64(zlib_filefunc64_def* pzlib_filefunc_def);
|
||||
void fill_win32_filefunc64A(zlib_filefunc64_def* pzlib_filefunc_def);
|
||||
void fill_win32_filefunc64W(zlib_filefunc64_def* pzlib_filefunc_def);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
72
3rdparty/zlib/contrib/minizip/miniunz.c
vendored
72
3rdparty/zlib/contrib/minizip/miniunz.c
vendored
@ -27,7 +27,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64)
|
||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||
#define FTELLO_FUNC(stream) ftello(stream)
|
||||
@ -81,11 +81,7 @@
|
||||
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 */
|
||||
static void change_file_date(filename,dosdate,tmu_date)
|
||||
const char *filename;
|
||||
uLong dosdate;
|
||||
tm_unz tmu_date;
|
||||
{
|
||||
static void change_file_date(const char *filename, uLong dosdate, tm_unz tmu_date) {
|
||||
#ifdef _WIN32
|
||||
HANDLE hFile;
|
||||
FILETIME ftm,ftLocal,ftCreate,ftLastAcc,ftLastWrite;
|
||||
@ -115,6 +111,10 @@ static void change_file_date(filename,dosdate,tmu_date)
|
||||
|
||||
ut.actime=ut.modtime=mktime(&newdate);
|
||||
utime(filename,&ut);
|
||||
#else
|
||||
(void)filename;
|
||||
(void)dosdate;
|
||||
(void)tmu_date;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
@ -123,9 +123,7 @@ static void change_file_date(filename,dosdate,tmu_date)
|
||||
/* mymkdir and change_file_date are not 100 % portable
|
||||
As I don't know well Unix, I wait feedback for the unix portion */
|
||||
|
||||
static int mymkdir(dirname)
|
||||
const char* dirname;
|
||||
{
|
||||
static int mymkdir(const char* dirname) {
|
||||
int ret=0;
|
||||
#ifdef _WIN32
|
||||
ret = _mkdir(dirname);
|
||||
@ -133,13 +131,13 @@ static int mymkdir(dirname)
|
||||
ret = mkdir (dirname,0775);
|
||||
#elif __APPLE__
|
||||
ret = mkdir (dirname,0775);
|
||||
#else
|
||||
(void)dirname;
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int makedir (newdir)
|
||||
const char *newdir;
|
||||
{
|
||||
static int makedir(const char *newdir) {
|
||||
char *buffer ;
|
||||
char *p;
|
||||
size_t len = strlen(newdir);
|
||||
@ -187,14 +185,12 @@ static int makedir (newdir)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void do_banner()
|
||||
{
|
||||
static void do_banner(void) {
|
||||
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");
|
||||
}
|
||||
|
||||
static void do_help()
|
||||
{
|
||||
static void do_help(void) {
|
||||
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" \
|
||||
@ -202,11 +198,10 @@ static void do_help()
|
||||
" -l list files\n" \
|
||||
" -d directory to extract into\n" \
|
||||
" -o overwrite files without prompting\n" \
|
||||
" -p extract crypted file using password\n\n");
|
||||
" -p extract encrypted file using password\n\n");
|
||||
}
|
||||
|
||||
static void Display64BitsSize(ZPOS64_T n, int size_char)
|
||||
{
|
||||
static void Display64BitsSize(ZPOS64_T n, int size_char) {
|
||||
/* to avoid compatibility problem , we do here the conversion */
|
||||
char number[21];
|
||||
int offset=19;
|
||||
@ -233,9 +228,7 @@ static void Display64BitsSize(ZPOS64_T n, int size_char)
|
||||
printf("%s",&number[pos_string]);
|
||||
}
|
||||
|
||||
static int do_list(uf)
|
||||
unzFile uf;
|
||||
{
|
||||
static int do_list(unzFile uf) {
|
||||
uLong i;
|
||||
unz_global_info64 gi;
|
||||
int err;
|
||||
@ -250,7 +243,7 @@ static int do_list(uf)
|
||||
char filename_inzip[256];
|
||||
unz_file_info64 file_info;
|
||||
uLong ratio=0;
|
||||
const char *string_method;
|
||||
const char *string_method = "";
|
||||
char charCrypt=' ';
|
||||
err = unzGetCurrentFileInfo64(uf,&file_info,filename_inzip,sizeof(filename_inzip),NULL,0,NULL,0);
|
||||
if (err!=UNZ_OK)
|
||||
@ -261,7 +254,7 @@ static int do_list(uf)
|
||||
if (file_info.uncompressed_size>0)
|
||||
ratio = (uLong)((file_info.compressed_size*100)/file_info.uncompressed_size);
|
||||
|
||||
/* display a '*' if the file is crypted */
|
||||
/* display a '*' if the file is encrypted */
|
||||
if ((file_info.flag & 1) != 0)
|
||||
charCrypt='*';
|
||||
|
||||
@ -311,12 +304,7 @@ static int do_list(uf)
|
||||
}
|
||||
|
||||
|
||||
static 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;
|
||||
{
|
||||
static int do_extract_currentfile(unzFile uf, const int* popt_extract_without_path, int* popt_overwrite, const char* password) {
|
||||
char filename_inzip[256];
|
||||
char* filename_withoutpath;
|
||||
char* p;
|
||||
@ -473,12 +461,7 @@ static int do_extract_currentfile(uf,popt_extract_without_path,popt_overwrite,pa
|
||||
}
|
||||
|
||||
|
||||
static int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
|
||||
unzFile uf;
|
||||
int opt_extract_without_path;
|
||||
int opt_overwrite;
|
||||
const char* password;
|
||||
{
|
||||
static int do_extract(unzFile uf, int opt_extract_without_path, int opt_overwrite, const char* password) {
|
||||
uLong i;
|
||||
unz_global_info64 gi;
|
||||
int err;
|
||||
@ -508,13 +491,7 @@ static int do_extract(uf,opt_extract_without_path,opt_overwrite,password)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static 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;
|
||||
{
|
||||
static int do_extract_onefile(unzFile uf, const char* filename, int opt_extract_without_path, int opt_overwrite, const char* password) {
|
||||
if (unzLocateFile(uf,filename,CASESENSITIVITY)!=UNZ_OK)
|
||||
{
|
||||
printf("file %s not found in the zipfile\n",filename);
|
||||
@ -530,10 +507,7 @@ static int do_extract_onefile(uf,filename,opt_extract_without_path,opt_overwrite
|
||||
}
|
||||
|
||||
|
||||
int main(argc,argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
int main(int argc, char *argv[]) {
|
||||
const char *zipfilename=NULL;
|
||||
const char *filename_to_extract=NULL;
|
||||
const char *password=NULL;
|
||||
@ -564,7 +538,7 @@ int main(argc,argv)
|
||||
|
||||
while ((*p)!='\0')
|
||||
{
|
||||
char c=*(p++);;
|
||||
char c=*(p++);
|
||||
if ((c=='l') || (c=='L'))
|
||||
opt_do_list = 1;
|
||||
if ((c=='v') || (c=='V'))
|
||||
@ -606,7 +580,7 @@ int main(argc,argv)
|
||||
# endif
|
||||
|
||||
strncpy(filename_try, zipfilename,MAXFILENAME-1);
|
||||
/* strncpy doesnt append the trailing NULL, of the string is too long. */
|
||||
/* strncpy doesn't append the trailing NULL, of the string is too long. */
|
||||
filename_try[ MAXFILENAME ] = '\0';
|
||||
|
||||
# ifdef USEWIN32IOAPI
|
||||
|
66
3rdparty/zlib/contrib/minizip/minizip.c
vendored
66
3rdparty/zlib/contrib/minizip/minizip.c
vendored
@ -28,7 +28,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__HAIKU__) || defined(MINIZIP_FOPEN_NO_64)
|
||||
// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
|
||||
#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
|
||||
#define FTELLO_FUNC(stream) ftello(stream)
|
||||
@ -71,11 +71,9 @@
|
||||
#define MAXFILENAME (256)
|
||||
|
||||
#ifdef _WIN32
|
||||
static int filetime(f, tmzip, dt)
|
||||
const char *f; /* name of file to get info on */
|
||||
tm_zip *tmzip; /* return value: access, modific. and creation times */
|
||||
uLong *dt; /* dostime */
|
||||
{
|
||||
/* f: name of file to get info on, tmzip: return value: access,
|
||||
modification and creation times, dt: dostime */
|
||||
static int filetime(const char *f, tm_zip *tmzip, uLong *dt) {
|
||||
int ret = 0;
|
||||
{
|
||||
FILETIME ftLocal;
|
||||
@ -95,11 +93,9 @@ static int filetime(f, tmzip, dt)
|
||||
}
|
||||
#else
|
||||
#if defined(unix) || defined(__APPLE__)
|
||||
static int filetime(f, tmzip, dt)
|
||||
const char *f; /* name of file to get info on */
|
||||
tm_zip *tmzip; /* return value: access, modific. and creation times */
|
||||
uLong *dt; /* dostime */
|
||||
{
|
||||
/* f: name of file to get info on, tmzip: return value: access,
|
||||
modification and creation times, dt: dostime */
|
||||
static int filetime(const char *f, tm_zip *tmzip, uLong *dt) {
|
||||
(void)dt;
|
||||
int ret=0;
|
||||
struct stat s; /* results of stat() */
|
||||
@ -114,7 +110,7 @@ static int filetime(f, tmzip, dt)
|
||||
len = MAXFILENAME;
|
||||
|
||||
strncpy(name, f,MAXFILENAME-1);
|
||||
/* strncpy doesnt append the trailing NULL, of the string is too long. */
|
||||
/* strncpy doesn't append the trailing NULL, of the string is too long. */
|
||||
name[ MAXFILENAME ] = '\0';
|
||||
|
||||
if (name[len - 1] == '/')
|
||||
@ -138,11 +134,12 @@ static int filetime(f, tmzip, dt)
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
uLong filetime(f, tmzip, dt)
|
||||
const char *f; /* name of file to get info on */
|
||||
tm_zip *tmzip; /* return value: access, modific. and creation times */
|
||||
uLong *dt; /* dostime */
|
||||
{
|
||||
/* f: name of file to get info on, tmzip: return value: access,
|
||||
modification and creation times, dt: dostime */
|
||||
static int filetime(const char *f, tm_zip *tmzip, uLong *dt) {
|
||||
(void)f;
|
||||
(void)tmzip;
|
||||
(void)dt;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
@ -151,9 +148,7 @@ uLong filetime(f, tmzip, dt)
|
||||
|
||||
|
||||
|
||||
static int check_exist_file(filename)
|
||||
const char* filename;
|
||||
{
|
||||
static int check_exist_file(const char* filename) {
|
||||
FILE* ftestexist;
|
||||
int ret = 1;
|
||||
ftestexist = FOPEN_FUNC(filename,"rb");
|
||||
@ -164,14 +159,12 @@ static int check_exist_file(filename)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void do_banner()
|
||||
{
|
||||
static void do_banner(void) {
|
||||
printf("MiniZip 1.1, 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");
|
||||
}
|
||||
|
||||
static void do_help()
|
||||
{
|
||||
static void do_help(void) {
|
||||
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" \
|
||||
@ -183,14 +176,13 @@ static void do_help()
|
||||
|
||||
/* calculate the CRC32 of a file,
|
||||
because to encrypt a file, we need known the CRC32 of the file before */
|
||||
static int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
|
||||
{
|
||||
static 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 = FOPEN_FUNC(filenameinzip,"rb");
|
||||
|
||||
unsigned long size_read = 0;
|
||||
unsigned long total_read = 0;
|
||||
/* unsigned long total_read = 0; */
|
||||
if (fin==NULL)
|
||||
{
|
||||
err = ZIP_ERRNO;
|
||||
@ -210,7 +202,7 @@ static int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,
|
||||
|
||||
if (size_read>0)
|
||||
calculate_crc = crc32_z(calculate_crc,buf,size_read);
|
||||
total_read += size_read;
|
||||
/* total_read += size_read; */
|
||||
|
||||
} while ((err == ZIP_OK) && (size_read>0));
|
||||
|
||||
@ -222,8 +214,7 @@ static int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,
|
||||
return err;
|
||||
}
|
||||
|
||||
static int isLargeFile(const char* filename)
|
||||
{
|
||||
static int isLargeFile(const char* filename) {
|
||||
int largeFile = 0;
|
||||
ZPOS64_T pos = 0;
|
||||
FILE* pFile = FOPEN_FUNC(filename, "rb");
|
||||
@ -233,7 +224,7 @@ static int isLargeFile(const char* filename)
|
||||
FSEEKO_FUNC(pFile, 0, SEEK_END);
|
||||
pos = (ZPOS64_T)FTELLO_FUNC(pFile);
|
||||
|
||||
printf("File : %s is %lld bytes\n", filename, pos);
|
||||
printf("File : %s is %llu bytes\n", filename, pos);
|
||||
|
||||
if(pos >= 0xffffffff)
|
||||
largeFile = 1;
|
||||
@ -244,10 +235,7 @@ static int isLargeFile(const char* filename)
|
||||
return largeFile;
|
||||
}
|
||||
|
||||
int main(argc,argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
int main(int argc, char *argv[]) {
|
||||
int i;
|
||||
int opt_overwrite=0;
|
||||
int opt_compress_level=Z_DEFAULT_COMPRESSION;
|
||||
@ -277,7 +265,7 @@ int main(argc,argv)
|
||||
|
||||
while ((*p)!='\0')
|
||||
{
|
||||
char c=*(p++);;
|
||||
char c=*(p++);
|
||||
if ((c=='o') || (c=='O'))
|
||||
opt_overwrite = 1;
|
||||
if ((c=='a') || (c=='A'))
|
||||
@ -323,7 +311,7 @@ int main(argc,argv)
|
||||
|
||||
zipok = 1 ;
|
||||
strncpy(filename_try, argv[zipfilenamearg],MAXFILENAME-1);
|
||||
/* strncpy doesnt append the trailing NULL, of the string is too long. */
|
||||
/* strncpy doesn't append the trailing NULL, of the string is too long. */
|
||||
filename_try[ MAXFILENAME ] = '\0';
|
||||
|
||||
len=(int)strlen(filename_try);
|
||||
@ -393,10 +381,10 @@ int main(argc,argv)
|
||||
((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'))) &&
|
||||
((argv[i][1]>='0') && (argv[i][1]<='9'))) &&
|
||||
(strlen(argv[i]) == 2)))
|
||||
{
|
||||
FILE * fin;
|
||||
FILE * fin = NULL;
|
||||
size_t size_read;
|
||||
const char* filenameinzip = argv[i];
|
||||
const char *savefilenameinzip;
|
||||
|
8
3rdparty/zlib/contrib/minizip/mztools.c
vendored
8
3rdparty/zlib/contrib/minizip/mztools.c
vendored
@ -27,13 +27,7 @@
|
||||
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;
|
||||
{
|
||||
extern int ZEXPORT unzRepair(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");
|
||||
|
517
3rdparty/zlib/contrib/minizip/unzip.c
vendored
517
3rdparty/zlib/contrib/minizip/unzip.c
vendored
@ -49,12 +49,12 @@
|
||||
Copyright (C) 2007-2008 Even Rouault
|
||||
|
||||
|
||||
Oct-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).
|
||||
Oct-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).
|
||||
Oct-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
|
||||
the size from normal header was 0xFFFFFFFF
|
||||
Oct-2009 - Mathias Svensson - Applied some bug fixes from paches recived from Gilles Vollant
|
||||
Oct-2009 - Mathias Svensson - Applied support to unzip files with compression mathod BZIP2 (bzip2 lib is required)
|
||||
Oct-2009 - Mathias Svensson - Applied some bug fixes from patches received from Gilles Vollant
|
||||
Oct-2009 - Mathias Svensson - Applied support to unzip files with compression method BZIP2 (bzip2 lib is required)
|
||||
Patch created by Daniel Borca
|
||||
|
||||
Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer
|
||||
@ -77,8 +77,6 @@
|
||||
|
||||
#ifdef STDC
|
||||
# include <stddef.h>
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef NO_ERRNO_H
|
||||
extern int errno;
|
||||
@ -111,9 +109,6 @@
|
||||
#ifndef ALLOC
|
||||
# define ALLOC(size) (malloc(size))
|
||||
#endif
|
||||
#ifndef TRYFREE
|
||||
# define TRYFREE(p) {if (p) free(p);}
|
||||
#endif
|
||||
|
||||
#define SIZECENTRALDIRITEM (0x2e)
|
||||
#define SIZEZIPLOCALHEADER (0x1e)
|
||||
@ -153,7 +148,7 @@ typedef struct
|
||||
ZPOS64_T rest_read_compressed; /* number of byte to be decompressed */
|
||||
ZPOS64_T rest_read_uncompressed;/*number of byte to be obtained after decomp*/
|
||||
zlib_filefunc64_32_def z_filefunc;
|
||||
voidpf filestream; /* io structore of the zipfile */
|
||||
voidpf filestream; /* io structure of the zipfile */
|
||||
uLong compression_method; /* compression method (0==store) */
|
||||
ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
|
||||
int raw;
|
||||
@ -166,7 +161,7 @@ typedef struct
|
||||
{
|
||||
zlib_filefunc64_32_def z_filefunc;
|
||||
int is64bitOpenFunction;
|
||||
voidpf filestream; /* io structore of the zipfile */
|
||||
voidpf filestream; /* io structure of the zipfile */
|
||||
unz_global_info64 gi; /* public global information */
|
||||
ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
|
||||
ZPOS64_T num_file; /* number of the current file in the zipfile*/
|
||||
@ -197,29 +192,44 @@ typedef struct
|
||||
#include "crypt.h"
|
||||
#endif
|
||||
|
||||
|
||||
/* ===========================================================================
|
||||
Read a byte from a gz_stream; update next_in and avail_in. Return EOF
|
||||
for end of file.
|
||||
IN assertion: the stream s has been successfully opened for reading.
|
||||
Reads a long in LSB order from the given gz_stream. Sets
|
||||
*/
|
||||
|
||||
|
||||
local int unz64local_getByte OF((
|
||||
const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
int *pi));
|
||||
|
||||
local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)
|
||||
{
|
||||
unsigned char c;
|
||||
int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1);
|
||||
if (err==1)
|
||||
local int unz64local_getShort(const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
uLong *pX) {
|
||||
unsigned char c[2];
|
||||
int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,c,2);
|
||||
if (err==2)
|
||||
{
|
||||
*pi = (int)c;
|
||||
*pX = c[0] | ((uLong)c[1] << 8);
|
||||
return UNZ_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
*pX = 0;
|
||||
if (ZERROR64(*pzlib_filefunc_def,filestream))
|
||||
return UNZ_ERRNO;
|
||||
else
|
||||
return UNZ_EOF;
|
||||
}
|
||||
}
|
||||
|
||||
local int unz64local_getLong(const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
uLong *pX) {
|
||||
unsigned char c[4];
|
||||
int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,c,4);
|
||||
if (err==4)
|
||||
{
|
||||
*pX = c[0] | ((uLong)c[1] << 8) | ((uLong)c[2] << 16) | ((uLong)c[3] << 24);
|
||||
return UNZ_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
*pX = 0;
|
||||
if (ZERROR64(*pzlib_filefunc_def,filestream))
|
||||
return UNZ_ERRNO;
|
||||
else
|
||||
@ -228,126 +238,29 @@ local int unz64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, v
|
||||
}
|
||||
|
||||
|
||||
/* ===========================================================================
|
||||
Reads a long in LSB order from the given gz_stream. Sets
|
||||
*/
|
||||
local int unz64local_getShort OF((
|
||||
const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
uLong *pX));
|
||||
|
||||
local int unz64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
uLong *pX)
|
||||
{
|
||||
uLong x ;
|
||||
int i = 0;
|
||||
int err;
|
||||
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x = (uLong)i;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((uLong)i)<<8;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
*pX = x;
|
||||
local int unz64local_getLong64(const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
ZPOS64_T *pX) {
|
||||
unsigned char c[8];
|
||||
int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,c,8);
|
||||
if (err==8)
|
||||
{
|
||||
*pX = c[0] | ((ZPOS64_T)c[1] << 8) | ((ZPOS64_T)c[2] << 16) | ((ZPOS64_T)c[3] << 24)
|
||||
| ((ZPOS64_T)c[4] << 32) | ((ZPOS64_T)c[5] << 40) | ((ZPOS64_T)c[6] << 48) | ((ZPOS64_T)c[7] << 56);
|
||||
return UNZ_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
*pX = 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
local int unz64local_getLong OF((
|
||||
const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
uLong *pX));
|
||||
|
||||
local int unz64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
uLong *pX)
|
||||
{
|
||||
uLong x ;
|
||||
int i = 0;
|
||||
int err;
|
||||
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x = (uLong)i;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((uLong)i)<<8;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((uLong)i)<<16;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x += ((uLong)i)<<24;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
*pX = x;
|
||||
else
|
||||
*pX = 0;
|
||||
return err;
|
||||
}
|
||||
|
||||
local int unz64local_getLong64 OF((
|
||||
const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
ZPOS64_T *pX));
|
||||
|
||||
|
||||
local int unz64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream,
|
||||
ZPOS64_T *pX)
|
||||
{
|
||||
ZPOS64_T x ;
|
||||
int i = 0;
|
||||
int err;
|
||||
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x = (ZPOS64_T)i;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((ZPOS64_T)i)<<8;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((ZPOS64_T)i)<<16;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((ZPOS64_T)i)<<24;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((ZPOS64_T)i)<<32;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((ZPOS64_T)i)<<40;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((ZPOS64_T)i)<<48;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
err = unz64local_getByte(pzlib_filefunc_def,filestream,&i);
|
||||
x |= ((ZPOS64_T)i)<<56;
|
||||
|
||||
if (err==UNZ_OK)
|
||||
*pX = x;
|
||||
else
|
||||
*pX = 0;
|
||||
return err;
|
||||
if (ZERROR64(*pzlib_filefunc_def,filestream))
|
||||
return UNZ_ERRNO;
|
||||
else
|
||||
return UNZ_EOF;
|
||||
}
|
||||
}
|
||||
|
||||
/* My own strcmpi / strcasecmp */
|
||||
local int strcmpcasenosensitive_internal (const char* fileName1, const char* fileName2)
|
||||
{
|
||||
local int strcmpcasenosensitive_internal(const char* fileName1, const char* fileName2) {
|
||||
for (;;)
|
||||
{
|
||||
char c1=*(fileName1++);
|
||||
@ -379,19 +292,17 @@ local int strcmpcasenosensitive_internal (const char* fileName1, const char* fil
|
||||
#endif
|
||||
|
||||
/*
|
||||
Compare two filename (fileName1,fileName2).
|
||||
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
|
||||
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
|
||||
Compare two filenames (fileName1,fileName2).
|
||||
If iCaseSensitivity = 1, comparison is case sensitive (like strcmp)
|
||||
If iCaseSensitivity = 2, comparison is not case sensitive (like strcmpi
|
||||
or strcasecmp)
|
||||
If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
|
||||
If iCaseSensitivity = 0, case sensitivity is default of your operating system
|
||||
(like 1 on Unix, 2 on Windows)
|
||||
|
||||
*/
|
||||
extern int ZEXPORT unzStringFileNameCompare (const char* fileName1,
|
||||
const char* fileName2,
|
||||
int iCaseSensitivity)
|
||||
|
||||
{
|
||||
const char* fileName2,
|
||||
int iCaseSensitivity) {
|
||||
if (iCaseSensitivity==0)
|
||||
iCaseSensitivity=CASESENSITIVITYDEFAULTVALUE;
|
||||
|
||||
@ -405,21 +316,23 @@ extern int ZEXPORT unzStringFileNameCompare (const char* fileName1,
|
||||
#define BUFREADCOMMENT (0x400)
|
||||
#endif
|
||||
|
||||
#ifndef CENTRALDIRINVALID
|
||||
#define CENTRALDIRINVALID ((ZPOS64_T)(-1))
|
||||
#endif
|
||||
|
||||
/*
|
||||
Locate the Central directory of a zipfile (at the end, just before
|
||||
the global comment)
|
||||
*/
|
||||
local ZPOS64_T unz64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
|
||||
local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
|
||||
{
|
||||
local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) {
|
||||
unsigned char* buf;
|
||||
ZPOS64_T uSizeFile;
|
||||
ZPOS64_T uBackRead;
|
||||
ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
|
||||
ZPOS64_T uPosFound=0;
|
||||
ZPOS64_T uPosFound=CENTRALDIRINVALID;
|
||||
|
||||
if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
|
||||
uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
|
||||
@ -429,7 +342,7 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
|
||||
|
||||
buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
|
||||
if (buf==NULL)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
uBackRead = 4;
|
||||
while (uBackRead<uMaxBack)
|
||||
@ -459,10 +372,10 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
|
||||
break;
|
||||
}
|
||||
|
||||
if (uPosFound!=0)
|
||||
if (uPosFound!=CENTRALDIRINVALID)
|
||||
break;
|
||||
}
|
||||
TRYFREE(buf);
|
||||
free(buf);
|
||||
return uPosFound;
|
||||
}
|
||||
|
||||
@ -471,23 +384,18 @@ local ZPOS64_T unz64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
|
||||
Locate the Central directory 64 of a zipfile (at the end, just before
|
||||
the global comment)
|
||||
*/
|
||||
local ZPOS64_T unz64local_SearchCentralDir64 OF((
|
||||
const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream));
|
||||
|
||||
local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
voidpf filestream)
|
||||
{
|
||||
voidpf filestream) {
|
||||
unsigned char* buf;
|
||||
ZPOS64_T uSizeFile;
|
||||
ZPOS64_T uBackRead;
|
||||
ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */
|
||||
ZPOS64_T uPosFound=0;
|
||||
ZPOS64_T uPosFound=CENTRALDIRINVALID;
|
||||
uLong uL;
|
||||
ZPOS64_T relativeOffset;
|
||||
|
||||
if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
|
||||
uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream);
|
||||
@ -497,7 +405,7 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
||||
|
||||
buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4);
|
||||
if (buf==NULL)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
uBackRead = 4;
|
||||
while (uBackRead<uMaxBack)
|
||||
@ -527,47 +435,47 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
||||
break;
|
||||
}
|
||||
|
||||
if (uPosFound!=0)
|
||||
if (uPosFound!=CENTRALDIRINVALID)
|
||||
break;
|
||||
}
|
||||
TRYFREE(buf);
|
||||
if (uPosFound == 0)
|
||||
return 0;
|
||||
free(buf);
|
||||
if (uPosFound == CENTRALDIRINVALID)
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
/* Zip64 end of central directory locator */
|
||||
if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
/* the signature, already checked */
|
||||
if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
/* number of the disk with the start of the zip64 end of central directory */
|
||||
if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
if (uL != 0)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
/* relative offset of the zip64 end of central directory record */
|
||||
if (unz64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=UNZ_OK)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
/* total number of disks */
|
||||
if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
if (uL != 1)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
/* Goto end of central directory record */
|
||||
if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
/* the signature */
|
||||
if (unz64local_getLong(pzlib_filefunc_def,filestream,&uL)!=UNZ_OK)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
if (uL != 0x06064b50)
|
||||
return 0;
|
||||
return CENTRALDIRINVALID;
|
||||
|
||||
return relativeOffset;
|
||||
}
|
||||
@ -581,19 +489,18 @@ local ZPOS64_T unz64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
||||
Else, the return value is a unzFile Handle, usable with other function
|
||||
of this unzip package.
|
||||
*/
|
||||
local unzFile unzOpenInternal (const void *path,
|
||||
zlib_filefunc64_32_def* pzlib_filefunc64_32_def,
|
||||
int is64bitOpenFunction)
|
||||
{
|
||||
local unzFile unzOpenInternal(const void *path,
|
||||
zlib_filefunc64_32_def* pzlib_filefunc64_32_def,
|
||||
int is64bitOpenFunction) {
|
||||
unz64_s us;
|
||||
unz64_s *s;
|
||||
ZPOS64_T central_pos;
|
||||
uLong uL;
|
||||
|
||||
uLong number_disk; /* number of the current dist, used for
|
||||
spaning ZIP, unsupported, always 0*/
|
||||
spanning ZIP, unsupported, always 0*/
|
||||
uLong number_disk_with_CD; /* number the the disk with central dir, used
|
||||
for spaning ZIP, unsupported, always 0*/
|
||||
for spanning ZIP, unsupported, always 0*/
|
||||
ZPOS64_T number_entry_CD; /* total number of entries in
|
||||
the central dir
|
||||
(same than number_entry on nospan) */
|
||||
@ -621,7 +528,7 @@ local unzFile unzOpenInternal (const void *path,
|
||||
return NULL;
|
||||
|
||||
central_pos = unz64local_SearchCentralDir64(&us.z_filefunc,us.filestream);
|
||||
if (central_pos)
|
||||
if (central_pos!=CENTRALDIRINVALID)
|
||||
{
|
||||
uLong uS;
|
||||
ZPOS64_T uL64;
|
||||
@ -683,7 +590,7 @@ local unzFile unzOpenInternal (const void *path,
|
||||
else
|
||||
{
|
||||
central_pos = unz64local_SearchCentralDir(&us.z_filefunc,us.filestream);
|
||||
if (central_pos==0)
|
||||
if (central_pos==CENTRALDIRINVALID)
|
||||
err=UNZ_ERRNO;
|
||||
|
||||
us.isZip64 = 0;
|
||||
@ -762,9 +669,8 @@ local unzFile unzOpenInternal (const void *path,
|
||||
}
|
||||
|
||||
|
||||
extern unzFile ZEXPORT unzOpen2 (const char *path,
|
||||
zlib_filefunc_def* pzlib_filefunc32_def)
|
||||
{
|
||||
extern unzFile ZEXPORT unzOpen2(const char *path,
|
||||
zlib_filefunc_def* pzlib_filefunc32_def) {
|
||||
if (pzlib_filefunc32_def != NULL)
|
||||
{
|
||||
zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
|
||||
@ -775,9 +681,8 @@ extern unzFile ZEXPORT unzOpen2 (const char *path,
|
||||
return unzOpenInternal(path, NULL, 0);
|
||||
}
|
||||
|
||||
extern unzFile ZEXPORT unzOpen2_64 (const void *path,
|
||||
zlib_filefunc64_def* pzlib_filefunc_def)
|
||||
{
|
||||
extern unzFile ZEXPORT unzOpen2_64(const void *path,
|
||||
zlib_filefunc64_def* pzlib_filefunc_def) {
|
||||
if (pzlib_filefunc_def != NULL)
|
||||
{
|
||||
zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
|
||||
@ -790,13 +695,11 @@ extern unzFile ZEXPORT unzOpen2_64 (const void *path,
|
||||
return unzOpenInternal(path, NULL, 1);
|
||||
}
|
||||
|
||||
extern unzFile ZEXPORT unzOpen (const char *path)
|
||||
{
|
||||
extern unzFile ZEXPORT unzOpen(const char *path) {
|
||||
return unzOpenInternal(path, NULL, 0);
|
||||
}
|
||||
|
||||
extern unzFile ZEXPORT unzOpen64 (const void *path)
|
||||
{
|
||||
extern unzFile ZEXPORT unzOpen64(const void *path) {
|
||||
return unzOpenInternal(path, NULL, 1);
|
||||
}
|
||||
|
||||
@ -805,8 +708,7 @@ extern unzFile ZEXPORT unzOpen64 (const void *path)
|
||||
If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
|
||||
these files MUST be closed with unzCloseCurrentFile before call unzClose.
|
||||
return UNZ_OK if there is no problem. */
|
||||
extern int ZEXPORT unzClose (unzFile file)
|
||||
{
|
||||
extern int ZEXPORT unzClose(unzFile file) {
|
||||
unz64_s* s;
|
||||
if (file==NULL)
|
||||
return UNZ_PARAMERROR;
|
||||
@ -816,7 +718,7 @@ extern int ZEXPORT unzClose (unzFile file)
|
||||
unzCloseCurrentFile(file);
|
||||
|
||||
ZCLOSE64(s->z_filefunc, s->filestream);
|
||||
TRYFREE(s);
|
||||
free(s);
|
||||
return UNZ_OK;
|
||||
}
|
||||
|
||||
@ -825,8 +727,7 @@ extern int ZEXPORT unzClose (unzFile file)
|
||||
Write info about the ZipFile in the *pglobal_info structure.
|
||||
No preparation of the structure is needed
|
||||
return UNZ_OK if there is no problem. */
|
||||
extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_info)
|
||||
{
|
||||
extern int ZEXPORT unzGetGlobalInfo64(unzFile file, unz_global_info64* pglobal_info) {
|
||||
unz64_s* s;
|
||||
if (file==NULL)
|
||||
return UNZ_PARAMERROR;
|
||||
@ -835,8 +736,7 @@ extern int ZEXPORT unzGetGlobalInfo64 (unzFile file, unz_global_info64* pglobal_
|
||||
return UNZ_OK;
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info32)
|
||||
{
|
||||
extern int ZEXPORT unzGetGlobalInfo(unzFile file, unz_global_info* pglobal_info32) {
|
||||
unz64_s* s;
|
||||
if (file==NULL)
|
||||
return UNZ_PARAMERROR;
|
||||
@ -847,10 +747,9 @@ extern int ZEXPORT unzGetGlobalInfo (unzFile file, unz_global_info* pglobal_info
|
||||
return UNZ_OK;
|
||||
}
|
||||
/*
|
||||
Translate date/time from Dos format to tm_unz (readable more easilty)
|
||||
Translate date/time from Dos format to tm_unz (readable more easily)
|
||||
*/
|
||||
local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm)
|
||||
{
|
||||
local void unz64local_DosDateToTmuDate(ZPOS64_T ulDosDate, tm_unz* ptm) {
|
||||
ZPOS64_T uDate;
|
||||
uDate = (ZPOS64_T)(ulDosDate>>16);
|
||||
ptm->tm_mday = (int)(uDate&0x1f) ;
|
||||
@ -865,28 +764,16 @@ local void unz64local_DosDateToTmuDate (ZPOS64_T ulDosDate, tm_unz* ptm)
|
||||
/*
|
||||
Get Info about the current file in the zipfile, with internal only info
|
||||
*/
|
||||
local int unz64local_GetCurrentFileInfoInternal OF((unzFile file,
|
||||
unz_file_info64 *pfile_info,
|
||||
unz_file_info64_internal
|
||||
*pfile_info_internal,
|
||||
char *szFileName,
|
||||
uLong fileNameBufferSize,
|
||||
void *extraField,
|
||||
uLong extraFieldBufferSize,
|
||||
char *szComment,
|
||||
uLong commentBufferSize));
|
||||
|
||||
local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
||||
unz_file_info64 *pfile_info,
|
||||
unz_file_info64_internal
|
||||
*pfile_info_internal,
|
||||
char *szFileName,
|
||||
uLong fileNameBufferSize,
|
||||
void *extraField,
|
||||
uLong extraFieldBufferSize,
|
||||
char *szComment,
|
||||
uLong commentBufferSize)
|
||||
{
|
||||
local int unz64local_GetCurrentFileInfoInternal(unzFile file,
|
||||
unz_file_info64 *pfile_info,
|
||||
unz_file_info64_internal
|
||||
*pfile_info_internal,
|
||||
char *szFileName,
|
||||
uLong fileNameBufferSize,
|
||||
void *extraField,
|
||||
uLong extraFieldBufferSize,
|
||||
char *szComment,
|
||||
uLong commentBufferSize) {
|
||||
unz64_s* s;
|
||||
unz_file_info64 file_info;
|
||||
unz_file_info64_internal file_info_internal;
|
||||
@ -1038,33 +925,31 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
||||
/* ZIP64 extra fields */
|
||||
if (headerId == 0x0001)
|
||||
{
|
||||
uLong uL;
|
||||
if(file_info.uncompressed_size == MAXU32)
|
||||
{
|
||||
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
|
||||
if(file_info.uncompressed_size == MAXU32)
|
||||
{
|
||||
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.uncompressed_size) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
if(file_info.compressed_size == MAXU32)
|
||||
{
|
||||
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
|
||||
if(file_info.compressed_size == MAXU32)
|
||||
{
|
||||
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info.compressed_size) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
if(file_info_internal.offset_curfile == MAXU32)
|
||||
{
|
||||
/* Relative Header offset */
|
||||
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
|
||||
if(file_info_internal.offset_curfile == MAXU32)
|
||||
{
|
||||
/* Relative Header offset */
|
||||
if (unz64local_getLong64(&s->z_filefunc, s->filestream,&file_info_internal.offset_curfile) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
|
||||
if(file_info.disk_num_start == MAXU32)
|
||||
{
|
||||
/* Disk Start Number */
|
||||
if (unz64local_getLong(&s->z_filefunc, s->filestream,&uL) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
if(file_info.disk_num_start == 0xffff)
|
||||
{
|
||||
/* Disk Start Number */
|
||||
if (unz64local_getLong(&s->z_filefunc, s->filestream,&file_info.disk_num_start) != UNZ_OK)
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
@ -1121,24 +1006,22 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
||||
No preparation of the structure is needed
|
||||
return UNZ_OK if there is no problem.
|
||||
*/
|
||||
extern int ZEXPORT unzGetCurrentFileInfo64 (unzFile file,
|
||||
unz_file_info64 * pfile_info,
|
||||
char * szFileName, uLong fileNameBufferSize,
|
||||
void *extraField, uLong extraFieldBufferSize,
|
||||
char* szComment, uLong commentBufferSize)
|
||||
{
|
||||
extern int ZEXPORT unzGetCurrentFileInfo64(unzFile file,
|
||||
unz_file_info64 * pfile_info,
|
||||
char * szFileName, uLong fileNameBufferSize,
|
||||
void *extraField, uLong extraFieldBufferSize,
|
||||
char* szComment, uLong commentBufferSize) {
|
||||
return unz64local_GetCurrentFileInfoInternal(file,pfile_info,NULL,
|
||||
szFileName,fileNameBufferSize,
|
||||
extraField,extraFieldBufferSize,
|
||||
szComment,commentBufferSize);
|
||||
szFileName,fileNameBufferSize,
|
||||
extraField,extraFieldBufferSize,
|
||||
szComment,commentBufferSize);
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzGetCurrentFileInfo (unzFile file,
|
||||
unz_file_info * pfile_info,
|
||||
char * szFileName, uLong fileNameBufferSize,
|
||||
void *extraField, uLong extraFieldBufferSize,
|
||||
char* szComment, uLong commentBufferSize)
|
||||
{
|
||||
extern int ZEXPORT unzGetCurrentFileInfo(unzFile file,
|
||||
unz_file_info * pfile_info,
|
||||
char * szFileName, uLong fileNameBufferSize,
|
||||
void *extraField, uLong extraFieldBufferSize,
|
||||
char* szComment, uLong commentBufferSize) {
|
||||
int err;
|
||||
unz_file_info64 file_info64;
|
||||
err = unz64local_GetCurrentFileInfoInternal(file,&file_info64,NULL,
|
||||
@ -1162,7 +1045,7 @@ extern int ZEXPORT unzGetCurrentFileInfo (unzFile file,
|
||||
pfile_info->internal_fa = file_info64.internal_fa;
|
||||
pfile_info->external_fa = file_info64.external_fa;
|
||||
|
||||
pfile_info->tmu_date = file_info64.tmu_date,
|
||||
pfile_info->tmu_date = file_info64.tmu_date;
|
||||
|
||||
|
||||
pfile_info->compressed_size = (uLong)file_info64.compressed_size;
|
||||
@ -1175,8 +1058,7 @@ extern int ZEXPORT unzGetCurrentFileInfo (unzFile file,
|
||||
Set the current file of the zipfile to the first file.
|
||||
return UNZ_OK if there is no problem
|
||||
*/
|
||||
extern int ZEXPORT unzGoToFirstFile (unzFile file)
|
||||
{
|
||||
extern int ZEXPORT unzGoToFirstFile(unzFile file) {
|
||||
int err=UNZ_OK;
|
||||
unz64_s* s;
|
||||
if (file==NULL)
|
||||
@ -1196,8 +1078,7 @@ extern int ZEXPORT unzGoToFirstFile (unzFile file)
|
||||
return UNZ_OK if there is no problem
|
||||
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
|
||||
*/
|
||||
extern int ZEXPORT unzGoToNextFile (unzFile file)
|
||||
{
|
||||
extern int ZEXPORT unzGoToNextFile(unzFile file) {
|
||||
unz64_s* s;
|
||||
int err;
|
||||
|
||||
@ -1229,8 +1110,7 @@ extern int ZEXPORT unzGoToNextFile (unzFile file)
|
||||
UNZ_OK if the file is found. It becomes the current file.
|
||||
UNZ_END_OF_LIST_OF_FILE if the file is not found
|
||||
*/
|
||||
extern int ZEXPORT unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity)
|
||||
{
|
||||
extern int ZEXPORT unzLocateFile(unzFile file, const char *szFileName, int iCaseSensitivity) {
|
||||
unz64_s* s;
|
||||
int err;
|
||||
|
||||
@ -1305,8 +1185,7 @@ typedef struct unz_file_pos_s
|
||||
} unz_file_pos;
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos)
|
||||
{
|
||||
extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos) {
|
||||
unz64_s* s;
|
||||
|
||||
if (file==NULL || file_pos==NULL)
|
||||
@ -1321,10 +1200,7 @@ extern int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos* file_pos)
|
||||
return UNZ_OK;
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzGetFilePos(
|
||||
unzFile file,
|
||||
unz_file_pos* file_pos)
|
||||
{
|
||||
extern int ZEXPORT unzGetFilePos(unzFile file, unz_file_pos* file_pos) {
|
||||
unz64_file_pos file_pos64;
|
||||
int err = unzGetFilePos64(file,&file_pos64);
|
||||
if (err==UNZ_OK)
|
||||
@ -1335,8 +1211,7 @@ extern int ZEXPORT unzGetFilePos(
|
||||
return err;
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos)
|
||||
{
|
||||
extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos) {
|
||||
unz64_s* s;
|
||||
int err;
|
||||
|
||||
@ -1357,10 +1232,7 @@ extern int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos
|
||||
return err;
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzGoToFilePos(
|
||||
unzFile file,
|
||||
unz_file_pos* file_pos)
|
||||
{
|
||||
extern int ZEXPORT unzGoToFilePos(unzFile file, unz_file_pos* file_pos) {
|
||||
unz64_file_pos file_pos64;
|
||||
if (file_pos == NULL)
|
||||
return UNZ_PARAMERROR;
|
||||
@ -1382,10 +1254,9 @@ extern int ZEXPORT unzGoToFilePos(
|
||||
store in *piSizeVar the size of extra info in local header
|
||||
(filename and size of extra field data)
|
||||
*/
|
||||
local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVar,
|
||||
ZPOS64_T * poffset_local_extrafield,
|
||||
uInt * psize_local_extrafield)
|
||||
{
|
||||
local int unz64local_CheckCurrentFileCoherencyHeader(unz64_s* s, uInt* piSizeVar,
|
||||
ZPOS64_T * poffset_local_extrafield,
|
||||
uInt * psize_local_extrafield) {
|
||||
uLong uMagic,uData,uFlags;
|
||||
uLong size_filename;
|
||||
uLong size_extra_field;
|
||||
@ -1469,9 +1340,8 @@ local int unz64local_CheckCurrentFileCoherencyHeader (unz64_s* s, uInt* piSizeVa
|
||||
Open for reading data the current file in the zipfile.
|
||||
If there is no error and the file is opened, the return value is UNZ_OK.
|
||||
*/
|
||||
extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
||||
int* level, int raw, const char* password)
|
||||
{
|
||||
extern int ZEXPORT unzOpenCurrentFile3(unzFile file, int* method,
|
||||
int* level, int raw, const char* password) {
|
||||
int err=UNZ_OK;
|
||||
uInt iSizeVar;
|
||||
unz64_s* s;
|
||||
@ -1509,7 +1379,7 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
||||
|
||||
if (pfile_in_zip_read_info->read_buffer==NULL)
|
||||
{
|
||||
TRYFREE(pfile_in_zip_read_info);
|
||||
free(pfile_in_zip_read_info);
|
||||
return UNZ_INTERNALERROR;
|
||||
}
|
||||
|
||||
@ -1566,7 +1436,8 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
||||
pfile_in_zip_read_info->stream_initialised=Z_BZIP2ED;
|
||||
else
|
||||
{
|
||||
TRYFREE(pfile_in_zip_read_info);
|
||||
free(pfile_in_zip_read_info->read_buffer);
|
||||
free(pfile_in_zip_read_info);
|
||||
return err;
|
||||
}
|
||||
#else
|
||||
@ -1586,7 +1457,8 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
||||
pfile_in_zip_read_info->stream_initialised=Z_DEFLATED;
|
||||
else
|
||||
{
|
||||
TRYFREE(pfile_in_zip_read_info);
|
||||
free(pfile_in_zip_read_info->read_buffer);
|
||||
free(pfile_in_zip_read_info);
|
||||
return err;
|
||||
}
|
||||
/* windowBits is passed < 0 to tell that there is no zlib header.
|
||||
@ -1638,25 +1510,21 @@ extern int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
||||
return UNZ_OK;
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzOpenCurrentFile (unzFile file)
|
||||
{
|
||||
extern int ZEXPORT unzOpenCurrentFile(unzFile file) {
|
||||
return unzOpenCurrentFile3(file, NULL, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzOpenCurrentFilePassword (unzFile file, const char* password)
|
||||
{
|
||||
extern int ZEXPORT unzOpenCurrentFilePassword(unzFile file, const char* password) {
|
||||
return unzOpenCurrentFile3(file, NULL, NULL, 0, password);
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw)
|
||||
{
|
||||
extern int ZEXPORT unzOpenCurrentFile2(unzFile file, int* method, int* level, int raw) {
|
||||
return unzOpenCurrentFile3(file, method, level, raw, NULL);
|
||||
}
|
||||
|
||||
/** Addition for GDAL : START */
|
||||
|
||||
extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file)
|
||||
{
|
||||
extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64(unzFile file) {
|
||||
unz64_s* s;
|
||||
file_in_zip64_read_info_s* pfile_in_zip_read_info;
|
||||
s=(unz64_s*)file;
|
||||
@ -1676,13 +1544,12 @@ extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64( unzFile file)
|
||||
buf contain buffer where data must be copied
|
||||
len the size of buf.
|
||||
|
||||
return the number of byte copied if somes bytes are copied
|
||||
return the number of byte copied if some bytes are copied
|
||||
return 0 if the end of file was reached
|
||||
return <0 with error code if there is an error
|
||||
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
|
||||
*/
|
||||
extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
|
||||
{
|
||||
extern int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, unsigned len) {
|
||||
int err=UNZ_OK;
|
||||
uInt iRead = 0;
|
||||
unz64_s* s;
|
||||
@ -1889,8 +1756,7 @@ extern int ZEXPORT unzReadCurrentFile (unzFile file, voidp buf, unsigned len)
|
||||
/*
|
||||
Give the current position in uncompressed data
|
||||
*/
|
||||
extern z_off_t ZEXPORT unztell (unzFile file)
|
||||
{
|
||||
extern z_off_t ZEXPORT unztell(unzFile file) {
|
||||
unz64_s* s;
|
||||
file_in_zip64_read_info_s* pfile_in_zip_read_info;
|
||||
if (file==NULL)
|
||||
@ -1904,8 +1770,7 @@ extern z_off_t ZEXPORT unztell (unzFile file)
|
||||
return (z_off_t)pfile_in_zip_read_info->stream.total_out;
|
||||
}
|
||||
|
||||
extern ZPOS64_T ZEXPORT unztell64 (unzFile file)
|
||||
{
|
||||
extern ZPOS64_T ZEXPORT unztell64(unzFile file) {
|
||||
|
||||
unz64_s* s;
|
||||
file_in_zip64_read_info_s* pfile_in_zip_read_info;
|
||||
@ -1924,8 +1789,7 @@ extern ZPOS64_T ZEXPORT unztell64 (unzFile file)
|
||||
/*
|
||||
return 1 if the end of file was reached, 0 elsewhere
|
||||
*/
|
||||
extern int ZEXPORT unzeof (unzFile file)
|
||||
{
|
||||
extern int ZEXPORT unzeof(unzFile file) {
|
||||
unz64_s* s;
|
||||
file_in_zip64_read_info_s* pfile_in_zip_read_info;
|
||||
if (file==NULL)
|
||||
@ -1956,8 +1820,7 @@ more info in the local-header version than in the central-header)
|
||||
the return value is the number of bytes copied in buf, or (if <0)
|
||||
the error code
|
||||
*/
|
||||
extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len)
|
||||
{
|
||||
extern int ZEXPORT unzGetLocalExtrafield(unzFile file, voidp buf, unsigned len) {
|
||||
unz64_s* s;
|
||||
file_in_zip64_read_info_s* pfile_in_zip_read_info;
|
||||
uInt read_now;
|
||||
@ -2004,8 +1867,7 @@ extern int ZEXPORT unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len)
|
||||
Close the file in zip opened with unzOpenCurrentFile
|
||||
Return UNZ_CRCERROR if all the file was read but the CRC is not good
|
||||
*/
|
||||
extern int ZEXPORT unzCloseCurrentFile (unzFile file)
|
||||
{
|
||||
extern int ZEXPORT unzCloseCurrentFile(unzFile file) {
|
||||
int err=UNZ_OK;
|
||||
|
||||
unz64_s* s;
|
||||
@ -2027,7 +1889,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file)
|
||||
}
|
||||
|
||||
|
||||
TRYFREE(pfile_in_zip_read_info->read_buffer);
|
||||
free(pfile_in_zip_read_info->read_buffer);
|
||||
pfile_in_zip_read_info->read_buffer = NULL;
|
||||
if (pfile_in_zip_read_info->stream_initialised == Z_DEFLATED)
|
||||
inflateEnd(&pfile_in_zip_read_info->stream);
|
||||
@ -2038,7 +1900,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file)
|
||||
|
||||
|
||||
pfile_in_zip_read_info->stream_initialised = 0;
|
||||
TRYFREE(pfile_in_zip_read_info);
|
||||
free(pfile_in_zip_read_info);
|
||||
|
||||
s->pfile_in_zip_read=NULL;
|
||||
|
||||
@ -2051,8 +1913,7 @@ extern int ZEXPORT unzCloseCurrentFile (unzFile file)
|
||||
uSizeBuf is the size of the szComment buffer.
|
||||
return the number of byte copied or an error code <0
|
||||
*/
|
||||
extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uSizeBuf)
|
||||
{
|
||||
extern int ZEXPORT unzGetGlobalComment(unzFile file, char * szComment, uLong uSizeBuf) {
|
||||
unz64_s* s;
|
||||
uLong uReadThis ;
|
||||
if (file==NULL)
|
||||
@ -2079,8 +1940,7 @@ extern int ZEXPORT unzGetGlobalComment (unzFile file, char * szComment, uLong uS
|
||||
}
|
||||
|
||||
/* Additions by RX '2004 */
|
||||
extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file)
|
||||
{
|
||||
extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file) {
|
||||
unz64_s* s;
|
||||
|
||||
if (file==NULL)
|
||||
@ -2094,8 +1954,7 @@ extern ZPOS64_T ZEXPORT unzGetOffset64(unzFile file)
|
||||
return s->pos_in_central_dir;
|
||||
}
|
||||
|
||||
extern uLong ZEXPORT unzGetOffset (unzFile file)
|
||||
{
|
||||
extern uLong ZEXPORT unzGetOffset(unzFile file) {
|
||||
ZPOS64_T offset64;
|
||||
|
||||
if (file==NULL)
|
||||
@ -2104,8 +1963,7 @@ extern uLong ZEXPORT unzGetOffset (unzFile file)
|
||||
return (uLong)offset64;
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos)
|
||||
{
|
||||
extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos) {
|
||||
unz64_s* s;
|
||||
int err;
|
||||
|
||||
@ -2122,7 +1980,6 @@ extern int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos)
|
||||
return err;
|
||||
}
|
||||
|
||||
extern int ZEXPORT unzSetOffset (unzFile file, uLong pos)
|
||||
{
|
||||
extern int ZEXPORT unzSetOffset (unzFile file, uLong pos) {
|
||||
return unzSetOffset64(file,pos);
|
||||
}
|
||||
|
134
3rdparty/zlib/contrib/minizip/unzip.h
vendored
134
3rdparty/zlib/contrib/minizip/unzip.h
vendored
@ -150,21 +150,21 @@ typedef struct unz_file_info_s
|
||||
tm_unz tmu_date;
|
||||
} unz_file_info;
|
||||
|
||||
extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
|
||||
const char* fileName2,
|
||||
int iCaseSensitivity));
|
||||
extern int ZEXPORT unzStringFileNameCompare(const char* fileName1,
|
||||
const char* fileName2,
|
||||
int iCaseSensitivity);
|
||||
/*
|
||||
Compare two filename (fileName1,fileName2).
|
||||
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
|
||||
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
|
||||
Compare two filenames (fileName1,fileName2).
|
||||
If iCaseSensitivity = 1, comparison is case sensitive (like strcmp)
|
||||
If iCaseSensitivity = 2, comparison is not case sensitive (like strcmpi
|
||||
or strcasecmp)
|
||||
If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
|
||||
If iCaseSensitivity = 0, case sensitivity is default of your operating system
|
||||
(like 1 on Unix, 2 on Windows)
|
||||
*/
|
||||
|
||||
|
||||
extern unzFile ZEXPORT unzOpen OF((const char *path));
|
||||
extern unzFile ZEXPORT unzOpen64 OF((const void *path));
|
||||
extern unzFile ZEXPORT unzOpen(const char *path);
|
||||
extern unzFile ZEXPORT unzOpen64(const void *path);
|
||||
/*
|
||||
Open a Zip file. path contain the full pathname (by example,
|
||||
on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer
|
||||
@ -181,41 +181,41 @@ extern unzFile ZEXPORT unzOpen64 OF((const void *path));
|
||||
*/
|
||||
|
||||
|
||||
extern unzFile ZEXPORT unzOpen2 OF((const char *path,
|
||||
zlib_filefunc_def* pzlib_filefunc_def));
|
||||
extern unzFile ZEXPORT unzOpen2(const char *path,
|
||||
zlib_filefunc_def* pzlib_filefunc_def);
|
||||
/*
|
||||
Open a Zip file, like unzOpen, but provide a set of file low level API
|
||||
for read/write the zip file (see ioapi.h)
|
||||
*/
|
||||
|
||||
extern unzFile ZEXPORT unzOpen2_64 OF((const void *path,
|
||||
zlib_filefunc64_def* pzlib_filefunc_def));
|
||||
extern unzFile ZEXPORT unzOpen2_64(const void *path,
|
||||
zlib_filefunc64_def* pzlib_filefunc_def);
|
||||
/*
|
||||
Open a Zip file, like unz64Open, but provide a set of file low level API
|
||||
for read/write the zip file (see ioapi.h)
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzClose OF((unzFile file));
|
||||
extern int ZEXPORT unzClose(unzFile file);
|
||||
/*
|
||||
Close a ZipFile opened with unzOpen.
|
||||
If there is files inside the .Zip opened with unzOpenCurrentFile (see later),
|
||||
these files MUST be closed with unzCloseCurrentFile before call unzClose.
|
||||
return UNZ_OK if there is no problem. */
|
||||
|
||||
extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
|
||||
unz_global_info *pglobal_info));
|
||||
extern int ZEXPORT unzGetGlobalInfo(unzFile file,
|
||||
unz_global_info *pglobal_info);
|
||||
|
||||
extern int ZEXPORT unzGetGlobalInfo64 OF((unzFile file,
|
||||
unz_global_info64 *pglobal_info));
|
||||
extern int ZEXPORT unzGetGlobalInfo64(unzFile file,
|
||||
unz_global_info64 *pglobal_info);
|
||||
/*
|
||||
Write info about the ZipFile in the *pglobal_info structure.
|
||||
No preparation of the structure is needed
|
||||
return UNZ_OK if there is no problem. */
|
||||
|
||||
|
||||
extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
|
||||
char *szComment,
|
||||
uLong uSizeBuf));
|
||||
extern int ZEXPORT unzGetGlobalComment(unzFile file,
|
||||
char *szComment,
|
||||
uLong uSizeBuf);
|
||||
/*
|
||||
Get the global comment string of the ZipFile, in the szComment buffer.
|
||||
uSizeBuf is the size of the szComment buffer.
|
||||
@ -226,22 +226,22 @@ extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
|
||||
/***************************************************************************/
|
||||
/* Unzip package allow you browse the directory of the zipfile */
|
||||
|
||||
extern int ZEXPORT unzGoToFirstFile OF((unzFile file));
|
||||
extern int ZEXPORT unzGoToFirstFile(unzFile file);
|
||||
/*
|
||||
Set the current file of the zipfile to the first file.
|
||||
return UNZ_OK if there is no problem
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzGoToNextFile OF((unzFile file));
|
||||
extern int ZEXPORT unzGoToNextFile(unzFile file);
|
||||
/*
|
||||
Set the current file of the zipfile to the next file.
|
||||
return UNZ_OK if there is no problem
|
||||
return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest.
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzLocateFile OF((unzFile file,
|
||||
const char *szFileName,
|
||||
int iCaseSensitivity));
|
||||
extern int ZEXPORT unzLocateFile(unzFile file,
|
||||
const char *szFileName,
|
||||
int iCaseSensitivity);
|
||||
/*
|
||||
Try locate the file szFileName in the zipfile.
|
||||
For the iCaseSensitivity signification, see unzStringFileNameCompare
|
||||
@ -285,26 +285,26 @@ extern int ZEXPORT unzGoToFilePos64(
|
||||
|
||||
/* ****************************************** */
|
||||
|
||||
extern int ZEXPORT unzGetCurrentFileInfo64 OF((unzFile file,
|
||||
unz_file_info64 *pfile_info,
|
||||
char *szFileName,
|
||||
uLong fileNameBufferSize,
|
||||
void *extraField,
|
||||
uLong extraFieldBufferSize,
|
||||
char *szComment,
|
||||
uLong commentBufferSize));
|
||||
extern int ZEXPORT unzGetCurrentFileInfo64(unzFile file,
|
||||
unz_file_info64 *pfile_info,
|
||||
char *szFileName,
|
||||
uLong fileNameBufferSize,
|
||||
void *extraField,
|
||||
uLong extraFieldBufferSize,
|
||||
char *szComment,
|
||||
uLong commentBufferSize);
|
||||
|
||||
extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
|
||||
unz_file_info *pfile_info,
|
||||
char *szFileName,
|
||||
uLong fileNameBufferSize,
|
||||
void *extraField,
|
||||
uLong extraFieldBufferSize,
|
||||
char *szComment,
|
||||
uLong commentBufferSize));
|
||||
extern int ZEXPORT unzGetCurrentFileInfo(unzFile file,
|
||||
unz_file_info *pfile_info,
|
||||
char *szFileName,
|
||||
uLong fileNameBufferSize,
|
||||
void *extraField,
|
||||
uLong extraFieldBufferSize,
|
||||
char *szComment,
|
||||
uLong commentBufferSize);
|
||||
/*
|
||||
Get Info about the current file
|
||||
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
|
||||
if pfile_info!=NULL, the *pfile_info structure will contain some info about
|
||||
the current file
|
||||
if szFileName!=NULL, the filemane string will be copied in szFileName
|
||||
(fileNameBufferSize is the size of the buffer)
|
||||
@ -318,7 +318,7 @@ extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
|
||||
|
||||
/** Addition for GDAL : START */
|
||||
|
||||
extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file));
|
||||
extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64(unzFile file);
|
||||
|
||||
/** Addition for GDAL : END */
|
||||
|
||||
@ -328,24 +328,24 @@ extern ZPOS64_T ZEXPORT unzGetCurrentFileZStreamPos64 OF((unzFile file));
|
||||
from it, and close it (you can close it before reading all the file)
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzOpenCurrentFile OF((unzFile file));
|
||||
extern int ZEXPORT unzOpenCurrentFile(unzFile file);
|
||||
/*
|
||||
Open for reading data the current file in the zipfile.
|
||||
If there is no error, the return value is UNZ_OK.
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzOpenCurrentFilePassword OF((unzFile file,
|
||||
const char* password));
|
||||
extern int ZEXPORT unzOpenCurrentFilePassword(unzFile file,
|
||||
const char* password);
|
||||
/*
|
||||
Open for reading data the current file in the zipfile.
|
||||
password is a crypting password
|
||||
If there is no error, the return value is UNZ_OK.
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
|
||||
int* method,
|
||||
int* level,
|
||||
int raw));
|
||||
extern int ZEXPORT unzOpenCurrentFile2(unzFile file,
|
||||
int* method,
|
||||
int* level,
|
||||
int raw);
|
||||
/*
|
||||
Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
|
||||
if raw==1
|
||||
@ -355,11 +355,11 @@ extern int ZEXPORT unzOpenCurrentFile2 OF((unzFile file,
|
||||
but you CANNOT set method parameter as NULL
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
|
||||
int* method,
|
||||
int* level,
|
||||
int raw,
|
||||
const char* password));
|
||||
extern int ZEXPORT unzOpenCurrentFile3(unzFile file,
|
||||
int* method,
|
||||
int* level,
|
||||
int raw,
|
||||
const char* password);
|
||||
/*
|
||||
Same than unzOpenCurrentFile, but open for read raw the file (not uncompress)
|
||||
if raw==1
|
||||
@ -370,41 +370,41 @@ extern int ZEXPORT unzOpenCurrentFile3 OF((unzFile file,
|
||||
*/
|
||||
|
||||
|
||||
extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
|
||||
extern int ZEXPORT unzCloseCurrentFile(unzFile file);
|
||||
/*
|
||||
Close the file in zip opened with unzOpenCurrentFile
|
||||
Return UNZ_CRCERROR if all the file was read but the CRC is not good
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
|
||||
voidp buf,
|
||||
unsigned len));
|
||||
extern int ZEXPORT unzReadCurrentFile(unzFile file,
|
||||
voidp buf,
|
||||
unsigned len);
|
||||
/*
|
||||
Read bytes from the current file (opened by unzOpenCurrentFile)
|
||||
buf contain buffer where data must be copied
|
||||
len the size of buf.
|
||||
|
||||
return the number of byte copied if somes bytes are copied
|
||||
return the number of byte copied if some bytes are copied
|
||||
return 0 if the end of file was reached
|
||||
return <0 with error code if there is an error
|
||||
(UNZ_ERRNO for IO error, or zLib error for uncompress error)
|
||||
*/
|
||||
|
||||
extern z_off_t ZEXPORT unztell OF((unzFile file));
|
||||
extern z_off_t ZEXPORT unztell(unzFile file);
|
||||
|
||||
extern ZPOS64_T ZEXPORT unztell64 OF((unzFile file));
|
||||
extern ZPOS64_T ZEXPORT unztell64(unzFile file);
|
||||
/*
|
||||
Give the current position in uncompressed data
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzeof OF((unzFile file));
|
||||
extern int ZEXPORT unzeof(unzFile file);
|
||||
/*
|
||||
return 1 if the end of file was reached, 0 elsewhere
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
|
||||
voidp buf,
|
||||
unsigned len));
|
||||
extern int ZEXPORT unzGetLocalExtrafield(unzFile file,
|
||||
voidp buf,
|
||||
unsigned len);
|
||||
/*
|
||||
Read extra field from the current file (opened by unzOpenCurrentFile)
|
||||
This is the local-header version of the extra field (sometimes, there is
|
||||
|
322
3rdparty/zlib/contrib/minizip/zip.c
vendored
322
3rdparty/zlib/contrib/minizip/zip.c
vendored
@ -14,7 +14,7 @@
|
||||
Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives
|
||||
Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions.
|
||||
Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data
|
||||
It is used when recreting zip archive with RAW when deleting items from a zip.
|
||||
It is used when recreating zip archive with RAW when deleting items from a zip.
|
||||
ZIP64 data is automatically added to items that needs it, and existing ZIP64 data need to be removed.
|
||||
Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required)
|
||||
Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer
|
||||
@ -25,14 +25,13 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include "zlib.h"
|
||||
#include "zip.h"
|
||||
|
||||
#ifdef STDC
|
||||
# include <stddef.h>
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef NO_ERRNO_H
|
||||
extern int errno;
|
||||
@ -47,7 +46,7 @@
|
||||
/* compile with -Dlocal if your debugger can't find static symbols */
|
||||
|
||||
#ifndef VERSIONMADEBY
|
||||
# define VERSIONMADEBY (0x0) /* platform depedent */
|
||||
# define VERSIONMADEBY (0x0) /* platform dependent */
|
||||
#endif
|
||||
|
||||
#ifndef Z_BUFSIZE
|
||||
@ -61,9 +60,6 @@
|
||||
#ifndef ALLOC
|
||||
# define ALLOC(size) (malloc(size))
|
||||
#endif
|
||||
#ifndef TRYFREE
|
||||
# define TRYFREE(p) {if (p) free(p);}
|
||||
#endif
|
||||
|
||||
/*
|
||||
#define SIZECENTRALDIRITEM (0x2e)
|
||||
@ -138,20 +134,20 @@ typedef struct
|
||||
uInt pos_in_buffered_data; /* last written byte in buffered_data */
|
||||
|
||||
ZPOS64_T pos_local_header; /* offset of the local header of the file
|
||||
currenty writing */
|
||||
currently writing */
|
||||
char* central_header; /* central header data for the current file */
|
||||
uLong size_centralExtra;
|
||||
uLong size_centralheader; /* size of the central header for cur file */
|
||||
uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */
|
||||
uLong flag; /* flag of the file currently writing */
|
||||
|
||||
int method; /* compression method of file currenty wr.*/
|
||||
int method; /* compression method of file currently wr.*/
|
||||
int raw; /* 1 for directly writing raw data */
|
||||
Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/
|
||||
uLong dosDate;
|
||||
uLong crc32;
|
||||
int encrypt;
|
||||
int zip64; /* Add ZIP64 extened information in the extra field */
|
||||
int zip64; /* Add ZIP64 extended information in the extra field */
|
||||
ZPOS64_T pos_zip64extrainfo;
|
||||
ZPOS64_T totalCompressedData;
|
||||
ZPOS64_T totalUncompressedData;
|
||||
@ -165,10 +161,10 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
zlib_filefunc64_32_def z_filefunc;
|
||||
voidpf filestream; /* io structore of the zipfile */
|
||||
voidpf filestream; /* io structure of the zipfile */
|
||||
linkedlist_data central_dir;/* datablock with central dir in construction*/
|
||||
int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/
|
||||
curfile64_info ci; /* info on the file curretly writing */
|
||||
curfile64_info ci; /* info on the file currently writing */
|
||||
|
||||
ZPOS64_T begin_pos; /* position of the beginning of the zipfile */
|
||||
ZPOS64_T add_position_when_writing_offset;
|
||||
@ -186,8 +182,7 @@ typedef struct
|
||||
#include "crypt.h"
|
||||
#endif
|
||||
|
||||
local linkedlist_datablock_internal* allocate_new_datablock()
|
||||
{
|
||||
local linkedlist_datablock_internal* allocate_new_datablock(void) {
|
||||
linkedlist_datablock_internal* ldi;
|
||||
ldi = (linkedlist_datablock_internal*)
|
||||
ALLOC(sizeof(linkedlist_datablock_internal));
|
||||
@ -200,30 +195,26 @@ local linkedlist_datablock_internal* allocate_new_datablock()
|
||||
return ldi;
|
||||
}
|
||||
|
||||
local void free_datablock(linkedlist_datablock_internal* ldi)
|
||||
{
|
||||
local void free_datablock(linkedlist_datablock_internal* ldi) {
|
||||
while (ldi!=NULL)
|
||||
{
|
||||
linkedlist_datablock_internal* ldinext = ldi->next_datablock;
|
||||
TRYFREE(ldi);
|
||||
free(ldi);
|
||||
ldi = ldinext;
|
||||
}
|
||||
}
|
||||
|
||||
local void init_linkedlist(linkedlist_data* ll)
|
||||
{
|
||||
local void init_linkedlist(linkedlist_data* ll) {
|
||||
ll->first_block = ll->last_block = NULL;
|
||||
}
|
||||
|
||||
local void free_linkedlist(linkedlist_data* ll)
|
||||
{
|
||||
local void free_linkedlist(linkedlist_data* ll) {
|
||||
free_datablock(ll->first_block);
|
||||
ll->first_block = ll->last_block = NULL;
|
||||
}
|
||||
|
||||
|
||||
local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len)
|
||||
{
|
||||
local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) {
|
||||
linkedlist_datablock_internal* ldi;
|
||||
const unsigned char* from_copy;
|
||||
|
||||
@ -238,7 +229,7 @@ local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len)
|
||||
}
|
||||
|
||||
ldi = ll->last_block;
|
||||
from_copy = (unsigned char*)buf;
|
||||
from_copy = (const unsigned char*)buf;
|
||||
|
||||
while (len>0)
|
||||
{
|
||||
@ -283,9 +274,7 @@ local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len)
|
||||
nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T)
|
||||
*/
|
||||
|
||||
local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte));
|
||||
local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)
|
||||
{
|
||||
local int zip64local_putValue(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) {
|
||||
unsigned char buf[8];
|
||||
int n;
|
||||
for (n = 0; n < nbByte; n++)
|
||||
@ -307,9 +296,7 @@ local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
return ZIP_OK;
|
||||
}
|
||||
|
||||
local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte));
|
||||
local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte)
|
||||
{
|
||||
local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) {
|
||||
unsigned char* buf=(unsigned char*)dest;
|
||||
int n;
|
||||
for (n = 0; n < nbByte; n++) {
|
||||
@ -329,8 +316,7 @@ local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte)
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm)
|
||||
{
|
||||
local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) {
|
||||
uLong year = (uLong)ptm->tm_year;
|
||||
if (year>=1980)
|
||||
year-=1980;
|
||||
@ -344,10 +330,7 @@ local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi));
|
||||
|
||||
local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi)
|
||||
{
|
||||
local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int* pi) {
|
||||
unsigned char c;
|
||||
int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1);
|
||||
if (err==1)
|
||||
@ -368,10 +351,7 @@ local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,vo
|
||||
/* ===========================================================================
|
||||
Reads a long in LSB order from the given gz_stream. Sets
|
||||
*/
|
||||
local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));
|
||||
|
||||
local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)
|
||||
{
|
||||
local int zip64local_getShort(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) {
|
||||
uLong x ;
|
||||
int i = 0;
|
||||
int err;
|
||||
@ -390,10 +370,7 @@ local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
return err;
|
||||
}
|
||||
|
||||
local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX));
|
||||
|
||||
local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX)
|
||||
{
|
||||
local int zip64local_getLong(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) {
|
||||
uLong x ;
|
||||
int i = 0;
|
||||
int err;
|
||||
@ -420,11 +397,8 @@ local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def,
|
||||
return err;
|
||||
}
|
||||
|
||||
local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX));
|
||||
|
||||
|
||||
local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)
|
||||
{
|
||||
local int zip64local_getLong64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) {
|
||||
ZPOS64_T x;
|
||||
int i = 0;
|
||||
int err;
|
||||
@ -475,10 +449,7 @@ local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def
|
||||
Locate the Central directory of a zipfile (at the end, just before
|
||||
the global comment)
|
||||
*/
|
||||
local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
|
||||
|
||||
local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
|
||||
{
|
||||
local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) {
|
||||
unsigned char* buf;
|
||||
ZPOS64_T uSizeFile;
|
||||
ZPOS64_T uBackRead;
|
||||
@ -529,7 +500,7 @@ local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
|
||||
if (uPosFound!=0)
|
||||
break;
|
||||
}
|
||||
TRYFREE(buf);
|
||||
free(buf);
|
||||
return uPosFound;
|
||||
}
|
||||
|
||||
@ -537,10 +508,7 @@ local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_f
|
||||
Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before
|
||||
the global comment)
|
||||
*/
|
||||
local ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream));
|
||||
|
||||
local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)
|
||||
{
|
||||
local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) {
|
||||
unsigned char* buf;
|
||||
ZPOS64_T uSizeFile;
|
||||
ZPOS64_T uBackRead;
|
||||
@ -595,7 +563,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
||||
break;
|
||||
}
|
||||
|
||||
TRYFREE(buf);
|
||||
free(buf);
|
||||
if (uPosFound == 0)
|
||||
return 0;
|
||||
|
||||
@ -637,8 +605,7 @@ local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib
|
||||
return relativeOffset;
|
||||
}
|
||||
|
||||
local int LoadCentralDirectoryRecord(zip64_internal* pziinit)
|
||||
{
|
||||
local int LoadCentralDirectoryRecord(zip64_internal* pziinit) {
|
||||
int err=ZIP_OK;
|
||||
ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/
|
||||
|
||||
@ -648,9 +615,9 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit)
|
||||
uLong uL;
|
||||
|
||||
uLong number_disk; /* number of the current dist, used for
|
||||
spaning ZIP, unsupported, always 0*/
|
||||
spanning ZIP, unsupported, always 0*/
|
||||
uLong number_disk_with_CD; /* number the the disk with central dir, used
|
||||
for spaning ZIP, unsupported, always 0*/
|
||||
for spanning ZIP, unsupported, always 0*/
|
||||
ZPOS64_T number_entry;
|
||||
ZPOS64_T number_entry_CD; /* total number of entries in
|
||||
the central dir
|
||||
@ -830,7 +797,7 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit)
|
||||
|
||||
size_central_dir_to_read-=read_this;
|
||||
}
|
||||
TRYFREE(buf_read);
|
||||
free(buf_read);
|
||||
}
|
||||
pziinit->begin_pos = byte_before_the_zipfile;
|
||||
pziinit->number_entry = number_entry_CD;
|
||||
@ -846,8 +813,7 @@ local int LoadCentralDirectoryRecord(zip64_internal* pziinit)
|
||||
|
||||
|
||||
/************************************************************/
|
||||
extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def)
|
||||
{
|
||||
extern zipFile ZEXPORT zipOpen3(const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) {
|
||||
zip64_internal ziinit;
|
||||
zip64_internal* zi;
|
||||
int err=ZIP_OK;
|
||||
@ -905,9 +871,9 @@ extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* gl
|
||||
if (err != ZIP_OK)
|
||||
{
|
||||
# ifndef NO_ADDFILEINEXISTINGZIP
|
||||
TRYFREE(ziinit.globalcomment);
|
||||
free(ziinit.globalcomment);
|
||||
# endif /* !NO_ADDFILEINEXISTINGZIP*/
|
||||
TRYFREE(zi);
|
||||
free(zi);
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
@ -917,8 +883,7 @@ extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* gl
|
||||
}
|
||||
}
|
||||
|
||||
extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def)
|
||||
{
|
||||
extern zipFile ZEXPORT zipOpen2(const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def) {
|
||||
if (pzlib_filefunc32_def != NULL)
|
||||
{
|
||||
zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
|
||||
@ -929,8 +894,7 @@ extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* gl
|
||||
return zipOpen3(pathname, append, globalcomment, NULL);
|
||||
}
|
||||
|
||||
extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def)
|
||||
{
|
||||
extern zipFile ZEXPORT zipOpen2_64(const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def) {
|
||||
if (pzlib_filefunc_def != NULL)
|
||||
{
|
||||
zlib_filefunc64_32_def zlib_filefunc64_32_def_fill;
|
||||
@ -945,18 +909,15 @@ extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc*
|
||||
|
||||
|
||||
|
||||
extern zipFile ZEXPORT zipOpen (const char* pathname, int append)
|
||||
{
|
||||
extern zipFile ZEXPORT zipOpen(const char* pathname, int append) {
|
||||
return zipOpen3((const void*)pathname,append,NULL,NULL);
|
||||
}
|
||||
|
||||
extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append)
|
||||
{
|
||||
extern zipFile ZEXPORT zipOpen64(const void* pathname, int append) {
|
||||
return zipOpen3(pathname,append,NULL,NULL);
|
||||
}
|
||||
|
||||
local int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local)
|
||||
{
|
||||
local int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) {
|
||||
/* write the local header */
|
||||
int err;
|
||||
uInt size_filename = (uInt)strlen(filename);
|
||||
@ -1052,14 +1013,13 @@ local int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt s
|
||||
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,
|
||||
const void* extrafield_local, uInt size_extrafield_local,
|
||||
const void* extrafield_global, uInt size_extrafield_global,
|
||||
const char* comment, int method, int level, int raw,
|
||||
int windowBits,int memLevel, int strategy,
|
||||
const char* password, uLong crcForCrypting,
|
||||
uLong versionMadeBy, uLong flagBase, int zip64)
|
||||
{
|
||||
extern int ZEXPORT zipOpenNewFileInZip4_64(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,
|
||||
const char* comment, int method, int level, int raw,
|
||||
int windowBits,int memLevel, int strategy,
|
||||
const char* password, uLong crcForCrypting,
|
||||
uLong versionMadeBy, uLong flagBase, int zip64) {
|
||||
zip64_internal* zi;
|
||||
uInt size_filename;
|
||||
uInt size_comment;
|
||||
@ -1262,35 +1222,33 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename,
|
||||
return err;
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip4 (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,
|
||||
const char* comment, int method, int level, int raw,
|
||||
int windowBits,int memLevel, int strategy,
|
||||
const char* password, uLong crcForCrypting,
|
||||
uLong versionMadeBy, uLong flagBase)
|
||||
{
|
||||
return zipOpenNewFileInZip4_64 (file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
windowBits, memLevel, strategy,
|
||||
password, crcForCrypting, versionMadeBy, flagBase, 0);
|
||||
extern int ZEXPORT zipOpenNewFileInZip4(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,
|
||||
const char* comment, int method, int level, int raw,
|
||||
int windowBits,int memLevel, int strategy,
|
||||
const char* password, uLong crcForCrypting,
|
||||
uLong versionMadeBy, uLong flagBase) {
|
||||
return zipOpenNewFileInZip4_64(file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
windowBits, memLevel, strategy,
|
||||
password, crcForCrypting, versionMadeBy, flagBase, 0);
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip3 (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,
|
||||
const char* comment, int method, int level, int raw,
|
||||
int windowBits,int memLevel, int strategy,
|
||||
const char* password, uLong crcForCrypting)
|
||||
{
|
||||
return zipOpenNewFileInZip4_64 (file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
windowBits, memLevel, strategy,
|
||||
password, crcForCrypting, VERSIONMADEBY, 0, 0);
|
||||
extern int ZEXPORT zipOpenNewFileInZip3(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,
|
||||
const char* comment, int method, int level, int raw,
|
||||
int windowBits,int memLevel, int strategy,
|
||||
const char* password, uLong crcForCrypting) {
|
||||
return zipOpenNewFileInZip4_64(file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
windowBits, memLevel, strategy,
|
||||
password, crcForCrypting, VERSIONMADEBY, 0, 0);
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi,
|
||||
@ -1298,70 +1256,64 @@ extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, c
|
||||
const void* extrafield_global, uInt size_extrafield_global,
|
||||
const char* comment, int method, int level, int raw,
|
||||
int windowBits,int memLevel, int strategy,
|
||||
const char* password, uLong crcForCrypting, int zip64)
|
||||
{
|
||||
return zipOpenNewFileInZip4_64 (file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
windowBits, memLevel, strategy,
|
||||
password, crcForCrypting, VERSIONMADEBY, 0, zip64);
|
||||
const char* password, uLong crcForCrypting, int zip64) {
|
||||
return zipOpenNewFileInZip4_64(file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
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,
|
||||
const char* comment, int method, int level, int raw)
|
||||
{
|
||||
return zipOpenNewFileInZip4_64 (file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
-MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
|
||||
NULL, 0, VERSIONMADEBY, 0, 0);
|
||||
const char* comment, int method, int level, int raw) {
|
||||
return zipOpenNewFileInZip4_64(file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
-MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
|
||||
NULL, 0, VERSIONMADEBY, 0, 0);
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip2_64(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,
|
||||
const char* comment, int method, int level, int raw, int zip64)
|
||||
{
|
||||
return zipOpenNewFileInZip4_64 (file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
-MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
|
||||
NULL, 0, VERSIONMADEBY, 0, zip64);
|
||||
const void* extrafield_local, uInt size_extrafield_local,
|
||||
const void* extrafield_global, uInt size_extrafield_global,
|
||||
const char* comment, int method, int level, int raw, int zip64) {
|
||||
return zipOpenNewFileInZip4_64(file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, raw,
|
||||
-MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
|
||||
NULL, 0, VERSIONMADEBY, 0, zip64);
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip64 (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,
|
||||
const char* comment, int method, int level, int zip64)
|
||||
{
|
||||
return zipOpenNewFileInZip4_64 (file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, 0,
|
||||
-MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
|
||||
NULL, 0, VERSIONMADEBY, 0, zip64);
|
||||
extern int ZEXPORT zipOpenNewFileInZip64(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,
|
||||
const char* comment, int method, int level, int zip64) {
|
||||
return zipOpenNewFileInZip4_64(file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, 0,
|
||||
-MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
|
||||
NULL, 0, VERSIONMADEBY, 0, zip64);
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip (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,
|
||||
const char* comment, int method, int level)
|
||||
{
|
||||
return zipOpenNewFileInZip4_64 (file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, 0,
|
||||
-MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
|
||||
NULL, 0, VERSIONMADEBY, 0, 0);
|
||||
extern int ZEXPORT zipOpenNewFileInZip(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,
|
||||
const char* comment, int method, int level) {
|
||||
return zipOpenNewFileInZip4_64(file, filename, zipfi,
|
||||
extrafield_local, size_extrafield_local,
|
||||
extrafield_global, size_extrafield_global,
|
||||
comment, method, level, 0,
|
||||
-MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,
|
||||
NULL, 0, VERSIONMADEBY, 0, 0);
|
||||
}
|
||||
|
||||
local int zip64FlushWriteBuffer(zip64_internal* zi)
|
||||
{
|
||||
local int zip64FlushWriteBuffer(zip64_internal* zi) {
|
||||
int err=ZIP_OK;
|
||||
|
||||
if (zi->ci.encrypt != 0)
|
||||
@ -1399,8 +1351,7 @@ local int zip64FlushWriteBuffer(zip64_internal* zi)
|
||||
return err;
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len)
|
||||
{
|
||||
extern int ZEXPORT zipWriteInFileInZip(zipFile file, const void* buf, unsigned int len) {
|
||||
zip64_internal* zi;
|
||||
int err=ZIP_OK;
|
||||
|
||||
@ -1450,7 +1401,7 @@ extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned in
|
||||
else
|
||||
#endif
|
||||
{
|
||||
zi->ci.stream.next_in = (Bytef*)buf;
|
||||
zi->ci.stream.next_in = (Bytef*)(uintptr_t)buf;
|
||||
zi->ci.stream.avail_in = len;
|
||||
|
||||
while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0))
|
||||
@ -1471,11 +1422,6 @@ extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned in
|
||||
{
|
||||
uLong uTotalOutBefore = zi->ci.stream.total_out;
|
||||
err=deflate(&zi->ci.stream, Z_NO_FLUSH);
|
||||
if(uTotalOutBefore > zi->ci.stream.total_out)
|
||||
{
|
||||
int bBreak = 0;
|
||||
bBreak++;
|
||||
}
|
||||
|
||||
zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ;
|
||||
}
|
||||
@ -1506,13 +1452,11 @@ extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned in
|
||||
return err;
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32)
|
||||
{
|
||||
extern int ZEXPORT zipCloseFileInZipRaw(zipFile file, uLong uncompressed_size, uLong crc32) {
|
||||
return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32);
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32)
|
||||
{
|
||||
extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file, ZPOS64_T uncompressed_size, uLong crc32) {
|
||||
zip64_internal* zi;
|
||||
ZPOS64_T compressed_size;
|
||||
uLong invalidValue = 0xffffffff;
|
||||
@ -1747,13 +1691,11 @@ extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_s
|
||||
return err;
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipCloseFileInZip (zipFile file)
|
||||
{
|
||||
extern int ZEXPORT zipCloseFileInZip(zipFile file) {
|
||||
return zipCloseFileInZipRaw (file,0,0);
|
||||
}
|
||||
|
||||
local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip)
|
||||
{
|
||||
local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) {
|
||||
int err = ZIP_OK;
|
||||
ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writing_offset;
|
||||
|
||||
@ -1774,8 +1716,7 @@ local int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T z
|
||||
return err;
|
||||
}
|
||||
|
||||
local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
|
||||
{
|
||||
local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) {
|
||||
int err = ZIP_OK;
|
||||
|
||||
uLong Zip64DataSize = 44;
|
||||
@ -1813,8 +1754,8 @@ local int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_
|
||||
}
|
||||
return err;
|
||||
}
|
||||
local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip)
|
||||
{
|
||||
|
||||
local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) {
|
||||
int err = ZIP_OK;
|
||||
|
||||
/*signature*/
|
||||
@ -1861,8 +1802,7 @@ local int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centr
|
||||
return err;
|
||||
}
|
||||
|
||||
local int Write_GlobalComment(zip64_internal* zi, const char* global_comment)
|
||||
{
|
||||
local int Write_GlobalComment(zip64_internal* zi, const char* global_comment) {
|
||||
int err = ZIP_OK;
|
||||
uInt size_global_comment = 0;
|
||||
|
||||
@ -1879,8 +1819,7 @@ local int Write_GlobalComment(zip64_internal* zi, const char* global_comment)
|
||||
return err;
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipClose (zipFile file, const char* global_comment)
|
||||
{
|
||||
extern int ZEXPORT zipClose(zipFile file, const char* global_comment) {
|
||||
zip64_internal* zi;
|
||||
int err = 0;
|
||||
uLong size_centraldir = 0;
|
||||
@ -1941,15 +1880,14 @@ extern int ZEXPORT zipClose (zipFile file, const char* global_comment)
|
||||
err = ZIP_ERRNO;
|
||||
|
||||
#ifndef NO_ADDFILEINEXISTINGZIP
|
||||
TRYFREE(zi->globalcomment);
|
||||
free(zi->globalcomment);
|
||||
#endif
|
||||
TRYFREE(zi);
|
||||
free(zi);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader)
|
||||
{
|
||||
extern int ZEXPORT zipRemoveExtraInfoBlock(char* pData, int* dataLen, short sHeader) {
|
||||
char* p = pData;
|
||||
int size = 0;
|
||||
char* pNewHeader;
|
||||
@ -1959,7 +1897,7 @@ extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHe
|
||||
|
||||
int retVal = ZIP_OK;
|
||||
|
||||
if(pData == NULL || *dataLen < 4)
|
||||
if(pData == NULL || dataLen == NULL || *dataLen < 4)
|
||||
return ZIP_PARAMERROR;
|
||||
|
||||
pNewHeader = (char*)ALLOC((unsigned)*dataLen);
|
||||
@ -2001,7 +1939,7 @@ extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHe
|
||||
else
|
||||
retVal = ZIP_ERRNO;
|
||||
|
||||
TRYFREE(pNewHeader);
|
||||
free(pNewHeader);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
285
3rdparty/zlib/contrib/minizip/zip.h
vendored
285
3rdparty/zlib/contrib/minizip/zip.h
vendored
@ -113,8 +113,8 @@ typedef const char* zipcharpc;
|
||||
#define APPEND_STATUS_CREATEAFTER (1)
|
||||
#define APPEND_STATUS_ADDINZIP (2)
|
||||
|
||||
extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append));
|
||||
extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append));
|
||||
extern zipFile ZEXPORT zipOpen(const char *pathname, int append);
|
||||
extern zipFile ZEXPORT zipOpen64(const void *pathname, int append);
|
||||
/*
|
||||
Create a zipfile.
|
||||
pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on
|
||||
@ -131,46 +131,46 @@ extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append));
|
||||
|
||||
/* Note : there is no delete function into a zipfile.
|
||||
If you want delete file into a zipfile, you must open a zipfile, and create another
|
||||
Of couse, you can use RAW reading and writing to copy the file you did not want delte
|
||||
Of course, you can use RAW reading and writing to copy the file you did not want delete
|
||||
*/
|
||||
|
||||
extern zipFile ZEXPORT zipOpen2 OF((const char *pathname,
|
||||
extern zipFile ZEXPORT zipOpen2(const char *pathname,
|
||||
int append,
|
||||
zipcharpc* globalcomment,
|
||||
zlib_filefunc_def* pzlib_filefunc_def);
|
||||
|
||||
extern zipFile ZEXPORT zipOpen2_64(const void *pathname,
|
||||
int append,
|
||||
zipcharpc* globalcomment,
|
||||
zlib_filefunc_def* pzlib_filefunc_def));
|
||||
zlib_filefunc64_def* pzlib_filefunc_def);
|
||||
|
||||
extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname,
|
||||
int append,
|
||||
zipcharpc* globalcomment,
|
||||
zlib_filefunc64_def* pzlib_filefunc_def));
|
||||
extern zipFile ZEXPORT zipOpen3(const void *pathname,
|
||||
int append,
|
||||
zipcharpc* globalcomment,
|
||||
zlib_filefunc64_32_def* pzlib_filefunc64_32_def);
|
||||
|
||||
extern zipFile ZEXPORT zipOpen3 OF((const void *pathname,
|
||||
int append,
|
||||
zipcharpc* globalcomment,
|
||||
zlib_filefunc64_32_def* pzlib_filefunc64_32_def));
|
||||
extern int ZEXPORT zipOpenNewFileInZip(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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level);
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip OF((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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level));
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip64 OF((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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int zip64));
|
||||
extern int ZEXPORT zipOpenNewFileInZip64(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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int zip64);
|
||||
|
||||
/*
|
||||
Open a file in the ZIP for writing.
|
||||
@ -189,70 +189,69 @@ extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file,
|
||||
*/
|
||||
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip2 OF((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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw));
|
||||
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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw);
|
||||
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip2_64 OF((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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int zip64));
|
||||
extern int ZEXPORT zipOpenNewFileInZip2_64(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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int zip64);
|
||||
/*
|
||||
Same than zipOpenNewFileInZip, except if raw=1, we write raw file
|
||||
*/
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip3 OF((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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int windowBits,
|
||||
int memLevel,
|
||||
int strategy,
|
||||
const char* password,
|
||||
uLong crcForCrypting));
|
||||
extern int ZEXPORT zipOpenNewFileInZip3(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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int windowBits,
|
||||
int memLevel,
|
||||
int strategy,
|
||||
const char* password,
|
||||
uLong crcForCrypting);
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip3_64 OF((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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int windowBits,
|
||||
int memLevel,
|
||||
int strategy,
|
||||
const char* password,
|
||||
uLong crcForCrypting,
|
||||
int zip64
|
||||
));
|
||||
extern int ZEXPORT zipOpenNewFileInZip3_64(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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int windowBits,
|
||||
int memLevel,
|
||||
int strategy,
|
||||
const char* password,
|
||||
uLong crcForCrypting,
|
||||
int zip64);
|
||||
|
||||
/*
|
||||
Same than zipOpenNewFileInZip2, except
|
||||
@ -261,47 +260,45 @@ extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file,
|
||||
crcForCrypting : crc of file to compress (needed for crypting)
|
||||
*/
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip4 OF((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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int windowBits,
|
||||
int memLevel,
|
||||
int strategy,
|
||||
const char* password,
|
||||
uLong crcForCrypting,
|
||||
uLong versionMadeBy,
|
||||
uLong flagBase
|
||||
));
|
||||
extern int ZEXPORT zipOpenNewFileInZip4(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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int windowBits,
|
||||
int memLevel,
|
||||
int strategy,
|
||||
const char* password,
|
||||
uLong crcForCrypting,
|
||||
uLong versionMadeBy,
|
||||
uLong flagBase);
|
||||
|
||||
|
||||
extern int ZEXPORT zipOpenNewFileInZip4_64 OF((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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int windowBits,
|
||||
int memLevel,
|
||||
int strategy,
|
||||
const char* password,
|
||||
uLong crcForCrypting,
|
||||
uLong versionMadeBy,
|
||||
uLong flagBase,
|
||||
int zip64
|
||||
));
|
||||
extern int ZEXPORT zipOpenNewFileInZip4_64(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,
|
||||
const char* comment,
|
||||
int method,
|
||||
int level,
|
||||
int raw,
|
||||
int windowBits,
|
||||
int memLevel,
|
||||
int strategy,
|
||||
const char* password,
|
||||
uLong crcForCrypting,
|
||||
uLong versionMadeBy,
|
||||
uLong flagBase,
|
||||
int zip64);
|
||||
/*
|
||||
Same than zipOpenNewFileInZip4, except
|
||||
versionMadeBy : value for Version made by field
|
||||
@ -309,25 +306,25 @@ extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file,
|
||||
*/
|
||||
|
||||
|
||||
extern int ZEXPORT zipWriteInFileInZip OF((zipFile file,
|
||||
const void* buf,
|
||||
unsigned len));
|
||||
extern int ZEXPORT zipWriteInFileInZip(zipFile file,
|
||||
const void* buf,
|
||||
unsigned len);
|
||||
/*
|
||||
Write data in the zipfile
|
||||
*/
|
||||
|
||||
extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
|
||||
extern int ZEXPORT zipCloseFileInZip(zipFile file);
|
||||
/*
|
||||
Close the current file in the zipfile
|
||||
*/
|
||||
|
||||
extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
|
||||
uLong uncompressed_size,
|
||||
uLong crc32));
|
||||
extern int ZEXPORT zipCloseFileInZipRaw(zipFile file,
|
||||
uLong uncompressed_size,
|
||||
uLong crc32);
|
||||
|
||||
extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file,
|
||||
ZPOS64_T uncompressed_size,
|
||||
uLong crc32));
|
||||
extern int ZEXPORT zipCloseFileInZipRaw64(zipFile file,
|
||||
ZPOS64_T uncompressed_size,
|
||||
uLong crc32);
|
||||
|
||||
/*
|
||||
Close the current file in the zipfile, for file opened with
|
||||
@ -335,14 +332,14 @@ extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file,
|
||||
uncompressed_size and crc32 are value for the uncompressed size
|
||||
*/
|
||||
|
||||
extern int ZEXPORT zipClose OF((zipFile file,
|
||||
const char* global_comment));
|
||||
extern int ZEXPORT zipClose(zipFile file,
|
||||
const char* global_comment);
|
||||
/*
|
||||
Close the zipfile
|
||||
*/
|
||||
|
||||
|
||||
extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader));
|
||||
extern int ZEXPORT zipRemoveExtraInfoBlock(char* pData, int* dataLen, short sHeader);
|
||||
/*
|
||||
zipRemoveExtraInfoBlock - Added by Mathias Svensson
|
||||
|
||||
|
2
3rdparty/zlib/contrib/pascal/zlibpas.pas
vendored
2
3rdparty/zlib/contrib/pascal/zlibpas.pas
vendored
@ -10,7 +10,7 @@ unit zlibpas;
|
||||
interface
|
||||
|
||||
const
|
||||
ZLIB_VERSION = '1.2.12';
|
||||
ZLIB_VERSION = '1.3.0';
|
||||
ZLIB_VERNUM = $12a0;
|
||||
|
||||
type
|
||||
|
2
3rdparty/zlib/contrib/puff/README
vendored
2
3rdparty/zlib/contrib/puff/README
vendored
@ -38,7 +38,7 @@ Then you can call puff() to decompress a deflate stream that is in memory in
|
||||
its entirety at source, to a sufficiently sized block of memory for the
|
||||
decompressed data at dest. puff() is the only external symbol in puff.c The
|
||||
only C library functions that puff.c needs are setjmp() and longjmp(), which
|
||||
are used to simplify error checking in the code to improve readabilty. puff.c
|
||||
are used to simplify error checking in the code to improve readability. puff.c
|
||||
does no memory allocation, and uses less than 2K bytes off of the stack.
|
||||
|
||||
If destlen is not enough space for the uncompressed data, then inflate will
|
||||
|
4
3rdparty/zlib/contrib/puff/puff.c
vendored
4
3rdparty/zlib/contrib/puff/puff.c
vendored
@ -43,7 +43,7 @@
|
||||
* - Use pointers instead of long to specify source and
|
||||
* destination sizes to avoid arbitrary 4 GB limits
|
||||
* 1.2 17 Mar 2002 - Add faster version of decode(), doubles speed (!),
|
||||
* but leave simple version for readabilty
|
||||
* but leave simple version for readability
|
||||
* - Make sure invalid distances detected if pointers
|
||||
* are 16 bits
|
||||
* - Fix fixed codes table error
|
||||
@ -624,7 +624,7 @@ local int fixed(struct state *s)
|
||||
* are themselves compressed using Huffman codes and run-length encoding. In
|
||||
* the list of code lengths, a 0 symbol means no code, a 1..15 symbol means
|
||||
* that length, and the symbols 16, 17, and 18 are run-length instructions.
|
||||
* Each of 16, 17, and 18 are follwed by extra bits to define the length of
|
||||
* Each of 16, 17, and 18 are followed by extra bits to define the length of
|
||||
* the run. 16 copies the last length 3 to 6 times. 17 represents 3 to 10
|
||||
* zero lengths, and 18 represents 11 to 138 zero lengths. Unused symbols
|
||||
* are common, hence the special coding for zero lengths.
|
||||
|
2
3rdparty/zlib/contrib/puff/pufftest.c
vendored
2
3rdparty/zlib/contrib/puff/pufftest.c
vendored
@ -143,7 +143,7 @@ int main(int argc, char **argv)
|
||||
len - sourcelen);
|
||||
}
|
||||
|
||||
/* if requested, inflate again and write decompressd data to stdout */
|
||||
/* if requested, inflate again and write decompressed data to stdout */
|
||||
if (put && ret == 0) {
|
||||
if (fail)
|
||||
destlen >>= 1;
|
||||
|
2
3rdparty/zlib/contrib/testzlib/testzlib.c
vendored
2
3rdparty/zlib/contrib/testzlib/testzlib.c
vendored
@ -169,7 +169,7 @@ int main(int argc, char *argv[])
|
||||
printf("error reading %s\n",argv[1]);
|
||||
return 1;
|
||||
}
|
||||
else printf("file %s read, %u bytes\n",argv[1],lFileSize);
|
||||
else printf("file %s read, %ld bytes\n",argv[1],lFileSize);
|
||||
|
||||
if (argc>=3)
|
||||
BlockSizeCompress=atol(argv[2]);
|
||||
|
63
3rdparty/zlib/contrib/untgz/untgz.c
vendored
63
3rdparty/zlib/contrib/untgz/untgz.c
vendored
@ -4,6 +4,22 @@
|
||||
* written by Pedro A. Aranda Gutierrez <paag@tid.es>
|
||||
* adaptation to Unix by Jean-loup Gailly <jloup@gzip.org>
|
||||
* various fixes by Cosmin Truta <cosmint@cs.ubbcluj.ro>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -14,15 +30,10 @@
|
||||
|
||||
#include "zlib.h"
|
||||
|
||||
#ifdef unix
|
||||
# include <unistd.h>
|
||||
#else
|
||||
#ifdef _WIN32
|
||||
# include <direct.h>
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
# include <windows.h>
|
||||
# ifndef F_OK
|
||||
# define F_OK 0
|
||||
# endif
|
||||
@ -33,6 +44,8 @@
|
||||
# define strdup(str) _strdup(str)
|
||||
# endif
|
||||
#else
|
||||
# include <sys/stat.h>
|
||||
# include <unistd.h>
|
||||
# include <utime.h>
|
||||
#endif
|
||||
|
||||
@ -102,28 +115,14 @@ struct attr_item
|
||||
|
||||
enum { TGZ_EXTRACT, TGZ_LIST, TGZ_INVALID };
|
||||
|
||||
char *TGZfname OF((const char *));
|
||||
void TGZnotfound OF((const char *));
|
||||
|
||||
int getoct OF((char *, int));
|
||||
char *strtime OF((time_t *));
|
||||
int setfiletime OF((char *, time_t));
|
||||
void push_attr OF((struct attr_item **, char *, int, time_t));
|
||||
void restore_attr OF((struct attr_item **));
|
||||
|
||||
int ExprMatch OF((char *, char *));
|
||||
|
||||
int makedir OF((char *));
|
||||
int matchname OF((int, int, char **, char *));
|
||||
|
||||
void error OF((const char *));
|
||||
int tar OF((gzFile, int, int, int, char **));
|
||||
|
||||
void help OF((int));
|
||||
int main OF((int, char **));
|
||||
|
||||
char *prog;
|
||||
|
||||
void error(const char *msg)
|
||||
{
|
||||
fprintf(stderr, "%s: %s\n", prog, msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
const char *TGZsuffix[] = { "\0", ".tar", ".tar.gz", ".taz", ".tgz", NULL };
|
||||
|
||||
/* return the file name of the TGZ archive */
|
||||
@ -205,7 +204,7 @@ char *strtime (time_t *t)
|
||||
|
||||
int setfiletime (char *fname,time_t ftime)
|
||||
{
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
static int isWinNT = -1;
|
||||
SYSTEMTIME st;
|
||||
FILETIME locft, modft;
|
||||
@ -590,12 +589,6 @@ void help(int exitval)
|
||||
exit(exitval);
|
||||
}
|
||||
|
||||
void error(const char *msg)
|
||||
{
|
||||
fprintf(stderr, "%s: %s\n", prog, msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================ */
|
||||
|
||||
@ -608,7 +601,7 @@ int main(int argc,char **argv)
|
||||
int action = TGZ_EXTRACT;
|
||||
int arg = 1;
|
||||
char *TGZfile;
|
||||
gzFile *f;
|
||||
gzFile f;
|
||||
|
||||
prog = strrchr(argv[0],'\\');
|
||||
if (prog == NULL)
|
||||
|
5
3rdparty/zlib/contrib/vstudio/readme.txt
vendored
5
3rdparty/zlib/contrib/vstudio/readme.txt
vendored
@ -1,4 +1,4 @@
|
||||
Building instructions for the DLL versions of Zlib 1.2.12
|
||||
Building instructions for the DLL versions of Zlib 1.3.0
|
||||
========================================================
|
||||
|
||||
This directory contains projects that build zlib and minizip using
|
||||
@ -17,9 +17,6 @@ More information can be found at this site.
|
||||
Build instructions for Visual Studio 2008 (32 bits or 64 bits)
|
||||
--------------------------------------------------------------
|
||||
- Decompress current zlib, including all contrib/* files
|
||||
- Compile assembly code (with Visual Studio Command Prompt) by running:
|
||||
bld_ml64.bat (in contrib\masmx64)
|
||||
bld_ml32.bat (in contrib\masmx86)
|
||||
- Open contrib\vstudio\vc9\zlibvc.sln with Microsoft Visual C++ 2008
|
||||
- Or run: vcbuild /rebuild contrib\vstudio\vc9\zlibvc.sln "Release|Win32"
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{048af943-022b-4db6-beeb-a54c34774ee2}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{c1d600d2-888f-4aea-b73e-8b0dd9befa0c}</UniqueIdentifier>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{c0419b40-bf50-40da-b153-ff74215b79de}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{bb87b070-735b-478e-92ce-7383abb2f36c}</UniqueIdentifier>
|
||||
|
@ -181,7 +181,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@ -194,7 +194,7 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
|
||||
@ -241,7 +241,7 @@
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@ -254,7 +254,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@ -269,14 +269,14 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
@ -352,14 +352,14 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
@ -398,14 +398,6 @@
|
||||
<ClCompile Include="..\..\..\crc32.c" />
|
||||
<ClCompile Include="..\..\..\deflate.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
@ -3,7 +3,7 @@
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{c1f6a2e3-5da5-4955-8653-310d3efe05a9}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{c2aaffdc-2c95-4d6f-8466-4bec5890af2c}</UniqueIdentifier>
|
||||
@ -30,9 +30,6 @@
|
||||
<ClCompile Include="..\..\..\infback.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{fa61a89f-93fc-4c89-b29e-36224b7592f4}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm</Extensions>
|
||||
<Extensions>cpp;c;cxx;def;odl;idl;hpj;bat</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{d4b85da0-2ba2-4934-b57f-e2584e3848ee}</UniqueIdentifier>
|
||||
|
8
3rdparty/zlib/contrib/vstudio/vc10/zlib.rc
vendored
8
3rdparty/zlib/contrib/vstudio/vc10/zlib.rc
vendored
@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 12, 0
|
||||
PRODUCTVERSION 1, 2, 12, 0
|
||||
FILEVERSION 1, 3, 0, 0
|
||||
PRODUCTVERSION 1, 3, 0, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@ -17,12 +17,12 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.12\0"
|
||||
VALUE "FileVersion", "1.3.0\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -160,7 +160,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -182,16 +182,12 @@
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -210,19 +206,15 @@ bld_ml32.bat</Command>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -252,7 +244,7 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -274,10 +266,6 @@ bld_ml32.bat</Command>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
@ -285,7 +273,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -314,8 +302,8 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -334,14 +322,10 @@ bld_ml64.bat</Command>
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
@ -349,7 +333,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -379,7 +363,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -409,7 +393,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -443,14 +427,6 @@ bld_ml64.bat</Command>
|
||||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
@ -33,9 +33,6 @@
|
||||
<ClCompile Include="..\..\..\infback.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -1,7 +1,7 @@
|
||||
LIBRARY
|
||||
; zlib data compression and ZIP file I/O library
|
||||
|
||||
VERSION 1.2
|
||||
VERSION 1.3
|
||||
|
||||
EXPORTS
|
||||
adler32 @1
|
||||
|
@ -197,8 +197,8 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@ -219,7 +219,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -229,10 +229,6 @@
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<Midl>
|
||||
@ -244,7 +240,7 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -288,8 +284,8 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -312,7 +308,7 @@ bld_ml32.bat</Command>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
@ -322,10 +318,6 @@ bld_ml32.bat</Command>
|
||||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
@ -337,8 +329,8 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -358,7 +350,7 @@ bld_ml32.bat</Command>
|
||||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -366,10 +358,6 @@ bld_ml32.bat</Command>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
@ -381,7 +369,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -424,7 +412,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -465,7 +453,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -510,8 +498,8 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -533,7 +521,7 @@ bld_ml64.bat</Command>
|
||||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
@ -541,10 +529,6 @@ bld_ml64.bat</Command>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
@ -556,7 +540,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -601,14 +585,6 @@ bld_ml64.bat</Command>
|
||||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
@ -42,9 +42,6 @@
|
||||
<ClCompile Include="..\..\..\infback.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
@ -187,7 +187,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -200,7 +200,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
|
||||
@ -247,7 +247,7 @@
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@ -260,7 +260,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@ -275,14 +275,14 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
@ -358,14 +358,14 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
@ -404,14 +404,6 @@
|
||||
<ClCompile Include="..\..\..\crc32.c" />
|
||||
<ClCompile Include="..\..\..\deflate.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
8
3rdparty/zlib/contrib/vstudio/vc11/zlib.rc
vendored
8
3rdparty/zlib/contrib/vstudio/vc11/zlib.rc
vendored
@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 12, 0
|
||||
PRODUCTVERSION 1, 2, 12, 0
|
||||
FILEVERSION 1, 3, 0, 0
|
||||
PRODUCTVERSION 1, 3, 0, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@ -17,12 +17,12 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.12\0"
|
||||
VALUE "FileVersion", "1.3.0\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -167,7 +167,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -193,8 +193,8 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -213,7 +213,7 @@
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
@ -221,7 +221,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -251,7 +251,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -280,7 +280,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -309,8 +309,8 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -329,7 +329,7 @@
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
@ -340,7 +340,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -370,7 +370,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -400,7 +400,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -434,14 +434,6 @@
|
||||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
LIBRARY
|
||||
; zlib data compression and ZIP file I/O library
|
||||
|
||||
VERSION 1.2
|
||||
VERSION 1.3
|
||||
|
||||
EXPORTS
|
||||
adler32 @1
|
||||
|
@ -204,8 +204,8 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -226,7 +226,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
@ -240,10 +240,6 @@
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<Midl>
|
||||
@ -255,7 +251,7 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -303,8 +299,8 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -327,7 +323,7 @@ bld_ml32.bat</Command>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
@ -341,10 +337,6 @@ bld_ml32.bat</Command>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
@ -356,8 +348,8 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -377,7 +369,7 @@ bld_ml32.bat</Command>
|
||||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
@ -389,10 +381,6 @@ bld_ml32.bat</Command>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\contrib\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
@ -404,7 +392,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -447,7 +435,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -492,7 +480,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -537,8 +525,8 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -560,7 +548,7 @@ bld_ml64.bat</Command>
|
||||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
@ -572,10 +560,6 @@ bld_ml64.bat</Command>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
@ -587,7 +571,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -632,14 +616,6 @@ bld_ml64.bat</Command>
|
||||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
@ -190,7 +190,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -203,7 +203,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
|
||||
@ -250,7 +250,7 @@
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@ -263,7 +263,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@ -279,14 +279,14 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
@ -362,14 +362,14 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
@ -408,14 +408,6 @@
|
||||
<ClCompile Include="..\..\..\crc32.c" />
|
||||
<ClCompile Include="..\..\..\deflate.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
8
3rdparty/zlib/contrib/vstudio/vc12/zlib.rc
vendored
8
3rdparty/zlib/contrib/vstudio/vc12/zlib.rc
vendored
@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 12, 0
|
||||
PRODUCTVERSION 1, 2, 12, 0
|
||||
FILEVERSION 1, 3, 0, 0
|
||||
PRODUCTVERSION 1, 3, 0, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@ -17,12 +17,12 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.12\0"
|
||||
VALUE "FileVersion", "1.3.0\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -170,7 +170,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -196,8 +196,8 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -216,7 +216,7 @@
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
@ -224,7 +224,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -254,7 +254,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -283,7 +283,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -312,8 +312,8 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -332,7 +332,7 @@
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
@ -343,7 +343,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -373,7 +373,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -403,7 +403,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -437,14 +437,6 @@
|
||||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
LIBRARY
|
||||
; zlib data compression and ZIP file I/O library
|
||||
|
||||
VERSION 1.2
|
||||
VERSION 1.3
|
||||
|
||||
EXPORTS
|
||||
adler32 @1
|
||||
|
@ -207,8 +207,8 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -229,7 +229,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
@ -243,10 +243,6 @@
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<Midl>
|
||||
@ -258,7 +254,7 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -306,8 +302,8 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -330,7 +326,7 @@ bld_ml32.bat</Command>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
@ -345,10 +341,6 @@ bld_ml32.bat</Command>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
@ -360,8 +352,8 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -381,7 +373,7 @@ bld_ml32.bat</Command>
|
||||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
@ -393,10 +385,6 @@ bld_ml32.bat</Command>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\contrib\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
@ -408,7 +396,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -451,7 +439,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -496,7 +484,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -541,8 +529,8 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -564,7 +552,7 @@ bld_ml64.bat</Command>
|
||||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
@ -576,10 +564,6 @@ bld_ml64.bat</Command>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
@ -591,7 +575,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -636,14 +620,6 @@ bld_ml64.bat</Command>
|
||||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
@ -190,7 +190,7 @@
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -203,7 +203,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(OutDir)testzlib.pdb</ProgramDatabaseFile>
|
||||
@ -250,7 +250,7 @@
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<OmitFramePointers>true</OmitFramePointers>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@ -263,7 +263,7 @@
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)testzlib.exe</OutputFile>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Console</SubSystem>
|
||||
@ -279,14 +279,14 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
@ -362,14 +362,14 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
@ -408,14 +408,6 @@
|
||||
<ClCompile Include="..\..\..\crc32.c" />
|
||||
<ClCompile Include="..\..\..\deflate.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
8
3rdparty/zlib/contrib/vstudio/vc14/zlib.rc
vendored
8
3rdparty/zlib/contrib/vstudio/vc14/zlib.rc
vendored
@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 12, 0
|
||||
PRODUCTVERSION 1, 2, 12, 0
|
||||
FILEVERSION 1, 3, 0, 0
|
||||
PRODUCTVERSION 1, 3, 0, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@ -17,12 +17,12 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.12\0"
|
||||
VALUE "FileVersion", "1.3.0\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -170,7 +170,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -196,8 +196,8 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -216,7 +216,7 @@
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
@ -224,7 +224,7 @@
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -254,7 +254,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -283,7 +283,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -312,8 +312,8 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -332,7 +332,7 @@
|
||||
</ResourceCompile>
|
||||
<Lib>
|
||||
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Lib>
|
||||
@ -343,7 +343,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -373,7 +373,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -403,7 +403,7 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -437,14 +437,6 @@
|
||||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
LIBRARY
|
||||
; zlib data compression and ZIP file I/O library
|
||||
|
||||
VERSION 1.2
|
||||
VERSION 1.3
|
||||
|
||||
EXPORTS
|
||||
adler32 @1
|
||||
|
@ -207,8 +207,8 @@
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -229,7 +229,7 @@
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
@ -243,10 +243,6 @@
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
|
||||
<Midl>
|
||||
@ -258,7 +254,7 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -306,8 +302,8 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -330,7 +326,7 @@ bld_ml32.bat</Command>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
|
||||
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
@ -345,10 +341,6 @@ bld_ml32.bat</Command>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx86
|
||||
bld_ml32.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Midl>
|
||||
@ -360,8 +352,8 @@ bld_ml32.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
@ -381,7 +373,7 @@ bld_ml32.bat</Command>
|
||||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<ModuleDefinitionFile>.\zlibvc.def</ModuleDefinitionFile>
|
||||
@ -393,10 +385,6 @@ bld_ml32.bat</Command>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\contrib\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
|
||||
<Midl>
|
||||
@ -408,7 +396,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -451,7 +439,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -496,7 +484,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -541,8 +529,8 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
@ -564,7 +552,7 @@ bld_ml64.bat</Command>
|
||||
<Culture>0x040c</Culture>
|
||||
</ResourceCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<OutputFile>$(OutDir)zlibwapi.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
|
||||
@ -576,10 +564,6 @@ bld_ml64.bat</Command>
|
||||
<ImportLibrary>$(OutDir)zlibwapi.lib</ImportLibrary>
|
||||
<TargetMachine>MachineX64</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>cd ..\..\masmx64
|
||||
bld_ml64.bat</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
|
||||
<Midl>
|
||||
@ -591,7 +575,7 @@ bld_ml64.bat</Command>
|
||||
</Midl>
|
||||
<ClCompile>
|
||||
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
|
||||
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>
|
||||
@ -636,14 +620,6 @@ bld_ml64.bat</Command>
|
||||
<ClCompile Include="..\..\..\gzread.c" />
|
||||
<ClCompile Include="..\..\..\gzwrite.c" />
|
||||
<ClCompile Include="..\..\..\infback.c" />
|
||||
<ClCompile Include="..\..\masmx64\inffas8664.c">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\inffast.c" />
|
||||
<ClCompile Include="..\..\..\inflate.c" />
|
||||
<ClCompile Include="..\..\..\inftrees.c" />
|
||||
|
@ -542,7 +542,7 @@
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\minizip\miniunz.c"
|
||||
|
@ -539,7 +539,7 @@
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\minizip\minizip.c"
|
||||
|
@ -48,7 +48,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
@ -71,7 +71,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
@ -128,7 +127,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
@ -145,7 +144,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
|
||||
GenerateManifest="false"
|
||||
/>
|
||||
<Tool
|
||||
@ -517,7 +515,7 @@
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
@ -540,7 +538,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
@ -600,7 +597,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
@ -617,7 +614,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
|
||||
GenerateManifest="false"
|
||||
/>
|
||||
<Tool
|
||||
@ -733,7 +729,7 @@
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\adler32.c"
|
||||
@ -755,58 +751,6 @@
|
||||
RelativePath="..\..\..\infback.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx64\inffas8664.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inffast.c"
|
||||
>
|
||||
|
@ -542,7 +542,7 @@
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\testzlib\testzlib.c"
|
||||
|
8
3rdparty/zlib/contrib/vstudio/vc9/zlib.rc
vendored
8
3rdparty/zlib/contrib/vstudio/vc9/zlib.rc
vendored
@ -2,8 +2,8 @@
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1, 2, 12, 0
|
||||
PRODUCTVERSION 1, 2, 12, 0
|
||||
FILEVERSION 1, 3, 0, 0
|
||||
PRODUCTVERSION 1, 3, 0, 0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
@ -17,12 +17,12 @@ BEGIN
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
|
||||
VALUE "FileVersion", "1.2.12\0"
|
||||
VALUE "FileVersion", "1.3.0\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlibwapi.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2023 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -47,7 +47,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="1"
|
||||
@ -121,7 +121,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
@ -195,7 +195,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
@ -268,8 +268,8 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
@ -295,7 +295,6 @@
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
@ -343,8 +342,8 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
@ -370,7 +369,6 @@
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
@ -418,7 +416,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
@ -491,7 +489,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
@ -565,7 +563,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
@ -639,7 +637,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
@ -732,58 +730,6 @@
|
||||
RelativePath="..\..\..\infback.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx64\inffas8664.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inffast.c"
|
||||
>
|
||||
|
2
3rdparty/zlib/contrib/vstudio/vc9/zlibvc.def
vendored
2
3rdparty/zlib/contrib/vstudio/vc9/zlibvc.def
vendored
@ -1,7 +1,7 @@
|
||||
LIBRARY
|
||||
; zlib data compression and ZIP file I/O library
|
||||
|
||||
VERSION 1.2
|
||||
VERSION 1.3
|
||||
|
||||
EXPORTS
|
||||
adler32 @1
|
||||
|
82
3rdparty/zlib/contrib/vstudio/vc9/zlibvc.vcproj
vendored
82
3rdparty/zlib/contrib/vstudio/vc9/zlibvc.vcproj
vendored
@ -53,8 +53,8 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
@ -81,7 +81,6 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj"
|
||||
OutputFile="$(OutDir)\zlibwapi.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
@ -150,8 +149,8 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
@ -177,7 +176,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
|
||||
OutputFile="$(OutDir)\zlibwapi.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="true"
|
||||
@ -245,7 +243,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
@ -340,7 +338,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
@ -440,7 +438,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
@ -538,7 +536,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
@ -636,8 +634,8 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
@ -666,7 +664,6 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="..\..\masmx86\match686.obj ..\..\masmx86\inffas32.obj "
|
||||
OutputFile="$(OutDir)\zlibwapi.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@ -737,8 +734,8 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF;WIN64"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
@ -766,7 +763,6 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
|
||||
OutputFile="$(OutDir)\zlibwapi.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
@ -836,7 +832,7 @@
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
@ -949,58 +945,6 @@
|
||||
RelativePath="..\..\..\infback.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx64\inffas8664.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inffast.c"
|
||||
>
|
||||
|
255
3rdparty/zlib/crc32.c
vendored
255
3rdparty/zlib/crc32.c
vendored
@ -98,10 +98,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Local functions. */
|
||||
local z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
|
||||
local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
|
||||
|
||||
/* If available, use the ARM processor CRC32 instruction. */
|
||||
#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8
|
||||
# define ARMCRC32
|
||||
@ -114,9 +110,7 @@ local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
|
||||
instruction, if one is available. This assumes that word_t is either 32 bits
|
||||
or 64 bits.
|
||||
*/
|
||||
local z_word_t byte_swap(word)
|
||||
z_word_t word;
|
||||
{
|
||||
local z_word_t byte_swap(z_word_t word) {
|
||||
# if W == 8
|
||||
return
|
||||
(word & 0xff00000000000000) >> 56 |
|
||||
@ -137,24 +131,77 @@ local z_word_t byte_swap(word)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
/* =========================================================================
|
||||
* Table of powers of x for combining CRC-32s, filled in by make_crc_table()
|
||||
* below.
|
||||
*/
|
||||
local z_crc_t FAR x2n_table[32];
|
||||
#else
|
||||
/* =========================================================================
|
||||
* Tables for byte-wise and braided CRC-32 calculations, and a table of powers
|
||||
* of x for combining CRC-32s, all made by make_crc_table().
|
||||
*/
|
||||
# include "crc32.h"
|
||||
#endif
|
||||
|
||||
/* CRC polynomial. */
|
||||
#define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */
|
||||
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
/*
|
||||
Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
|
||||
reflected. For speed, this requires that a not be zero.
|
||||
*/
|
||||
local z_crc_t multmodp(z_crc_t a, z_crc_t b) {
|
||||
z_crc_t m, p;
|
||||
|
||||
m = (z_crc_t)1 << 31;
|
||||
p = 0;
|
||||
for (;;) {
|
||||
if (a & m) {
|
||||
p ^= b;
|
||||
if ((a & (m - 1)) == 0)
|
||||
break;
|
||||
}
|
||||
m >>= 1;
|
||||
b = b & 1 ? (b >> 1) ^ POLY : b >> 1;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been
|
||||
initialized.
|
||||
*/
|
||||
local z_crc_t x2nmodp(z_off64_t n, unsigned k) {
|
||||
z_crc_t p;
|
||||
|
||||
p = (z_crc_t)1 << 31; /* x^0 == 1 */
|
||||
while (n) {
|
||||
if (n & 1)
|
||||
p = multmodp(x2n_table[k & 31], p);
|
||||
n >>= 1;
|
||||
k++;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
/* =========================================================================
|
||||
* Build the tables for byte-wise and braided CRC-32 calculations, and a table
|
||||
* of powers of x for combining CRC-32s.
|
||||
*/
|
||||
local z_crc_t FAR crc_table[256];
|
||||
local z_crc_t FAR x2n_table[32];
|
||||
local void make_crc_table OF((void));
|
||||
#ifdef W
|
||||
local z_word_t FAR crc_big_table[256];
|
||||
local z_crc_t FAR crc_braid_table[W][256];
|
||||
local z_word_t FAR crc_braid_big_table[W][256];
|
||||
local void braid OF((z_crc_t [][256], z_word_t [][256], int, int));
|
||||
local void braid(z_crc_t [][256], z_word_t [][256], int, int);
|
||||
#endif
|
||||
#ifdef MAKECRCH
|
||||
local void write_table OF((FILE *, const z_crc_t FAR *, int));
|
||||
local void write_table32hi OF((FILE *, const z_word_t FAR *, int));
|
||||
local void write_table64 OF((FILE *, const z_word_t FAR *, int));
|
||||
local void write_table(FILE *, const z_crc_t FAR *, int);
|
||||
local void write_table32hi(FILE *, const z_word_t FAR *, int);
|
||||
local void write_table64(FILE *, const z_word_t FAR *, int);
|
||||
#endif /* MAKECRCH */
|
||||
|
||||
/*
|
||||
@ -167,7 +214,6 @@ local void make_crc_table OF((void));
|
||||
|
||||
/* Definition of once functionality. */
|
||||
typedef struct once_s once_t;
|
||||
local void once OF((once_t *, void (*)(void)));
|
||||
|
||||
/* Check for the availability of atomics. */
|
||||
#if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \
|
||||
@ -187,10 +233,7 @@ struct once_s {
|
||||
invoke once() at the same time. The state must be a once_t initialized with
|
||||
ONCE_INIT.
|
||||
*/
|
||||
local void once(state, init)
|
||||
once_t *state;
|
||||
void (*init)(void);
|
||||
{
|
||||
local void once(once_t *state, void (*init)(void)) {
|
||||
if (!atomic_load(&state->done)) {
|
||||
if (atomic_flag_test_and_set(&state->begun))
|
||||
while (!atomic_load(&state->done))
|
||||
@ -213,10 +256,7 @@ struct once_s {
|
||||
|
||||
/* Test and set. Alas, not atomic, but tries to minimize the period of
|
||||
vulnerability. */
|
||||
local int test_and_set OF((int volatile *));
|
||||
local int test_and_set(flag)
|
||||
int volatile *flag;
|
||||
{
|
||||
local int test_and_set(int volatile *flag) {
|
||||
int was;
|
||||
|
||||
was = *flag;
|
||||
@ -225,10 +265,7 @@ local int test_and_set(flag)
|
||||
}
|
||||
|
||||
/* Run the provided init() function once. This is not thread-safe. */
|
||||
local void once(state, init)
|
||||
once_t *state;
|
||||
void (*init)(void);
|
||||
{
|
||||
local void once(once_t *state, void (*init)(void)) {
|
||||
if (!state->done) {
|
||||
if (test_and_set(&state->begun))
|
||||
while (!state->done)
|
||||
@ -270,8 +307,7 @@ local once_t made = ONCE_INIT;
|
||||
combinations of CRC register values and incoming bytes.
|
||||
*/
|
||||
|
||||
local void make_crc_table()
|
||||
{
|
||||
local void make_crc_table(void) {
|
||||
unsigned i, j, n;
|
||||
z_crc_t p;
|
||||
|
||||
@ -438,11 +474,7 @@ local void make_crc_table()
|
||||
Write the 32-bit values in table[0..k-1] to out, five per line in
|
||||
hexadecimal separated by commas.
|
||||
*/
|
||||
local void write_table(out, table, k)
|
||||
FILE *out;
|
||||
const z_crc_t FAR *table;
|
||||
int k;
|
||||
{
|
||||
local void write_table(FILE *out, const z_crc_t FAR *table, int k) {
|
||||
int n;
|
||||
|
||||
for (n = 0; n < k; n++)
|
||||
@ -455,11 +487,7 @@ local void write_table(out, table, k)
|
||||
Write the high 32-bits of each value in table[0..k-1] to out, five per line
|
||||
in hexadecimal separated by commas.
|
||||
*/
|
||||
local void write_table32hi(out, table, k)
|
||||
FILE *out;
|
||||
const z_word_t FAR *table;
|
||||
int k;
|
||||
{
|
||||
local void write_table32hi(FILE *out, const z_word_t FAR *table, int k) {
|
||||
int n;
|
||||
|
||||
for (n = 0; n < k; n++)
|
||||
@ -475,11 +503,7 @@ int k;
|
||||
bits. If not, then the type cast and format string can be adjusted
|
||||
accordingly.
|
||||
*/
|
||||
local void write_table64(out, table, k)
|
||||
FILE *out;
|
||||
const z_word_t FAR *table;
|
||||
int k;
|
||||
{
|
||||
local void write_table64(FILE *out, const z_word_t FAR *table, int k) {
|
||||
int n;
|
||||
|
||||
for (n = 0; n < k; n++)
|
||||
@ -489,8 +513,7 @@ local void write_table64(out, table, k)
|
||||
}
|
||||
|
||||
/* Actually do the deed. */
|
||||
int main()
|
||||
{
|
||||
int main(void) {
|
||||
make_crc_table();
|
||||
return 0;
|
||||
}
|
||||
@ -502,12 +525,7 @@ int main()
|
||||
Generate the little and big-endian braid tables for the given n and z_word_t
|
||||
size w. Each array must have room for w blocks of 256 elements.
|
||||
*/
|
||||
local void braid(ltl, big, n, w)
|
||||
z_crc_t ltl[][256];
|
||||
z_word_t big[][256];
|
||||
int n;
|
||||
int w;
|
||||
{
|
||||
local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) {
|
||||
int k;
|
||||
z_crc_t i, p, q;
|
||||
for (k = 0; k < w; k++) {
|
||||
@ -522,69 +540,13 @@ local void braid(ltl, big, n, w)
|
||||
}
|
||||
#endif
|
||||
|
||||
#else /* !DYNAMIC_CRC_TABLE */
|
||||
/* ========================================================================
|
||||
* Tables for byte-wise and braided CRC-32 calculations, and a table of powers
|
||||
* of x for combining CRC-32s, all made by make_crc_table().
|
||||
*/
|
||||
#include "crc32.h"
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
|
||||
/* ========================================================================
|
||||
* Routines used for CRC calculation. Some are also required for the table
|
||||
* generation above.
|
||||
*/
|
||||
|
||||
/*
|
||||
Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial,
|
||||
reflected. For speed, this requires that a not be zero.
|
||||
*/
|
||||
local z_crc_t multmodp(a, b)
|
||||
z_crc_t a;
|
||||
z_crc_t b;
|
||||
{
|
||||
z_crc_t m, p;
|
||||
|
||||
m = (z_crc_t)1 << 31;
|
||||
p = 0;
|
||||
for (;;) {
|
||||
if (a & m) {
|
||||
p ^= b;
|
||||
if ((a & (m - 1)) == 0)
|
||||
break;
|
||||
}
|
||||
m >>= 1;
|
||||
b = b & 1 ? (b >> 1) ^ POLY : b >> 1;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/*
|
||||
Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been
|
||||
initialized.
|
||||
*/
|
||||
local z_crc_t x2nmodp(n, k)
|
||||
z_off64_t n;
|
||||
unsigned k;
|
||||
{
|
||||
z_crc_t p;
|
||||
|
||||
p = (z_crc_t)1 << 31; /* x^0 == 1 */
|
||||
while (n) {
|
||||
if (n & 1)
|
||||
p = multmodp(x2n_table[k & 31], p);
|
||||
n >>= 1;
|
||||
k++;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
/* =========================================================================
|
||||
* This function can be used by asm versions of crc32(), and to force the
|
||||
* generation of the CRC tables in a threaded application.
|
||||
*/
|
||||
const z_crc_t FAR * ZEXPORT get_crc_table()
|
||||
{
|
||||
const z_crc_t FAR * ZEXPORT get_crc_table(void) {
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
once(&made, make_crc_table);
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
@ -610,11 +572,8 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
|
||||
#define Z_BATCH_ZEROS 0xa10d3d0c /* computed from Z_BATCH = 3990 */
|
||||
#define Z_BATCH_MIN 800 /* fewest words in a final batch */
|
||||
|
||||
unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
unsigned long crc;
|
||||
const unsigned char FAR *buf;
|
||||
z_size_t len;
|
||||
{
|
||||
unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf,
|
||||
z_size_t len) {
|
||||
z_crc_t val;
|
||||
z_word_t crc1, crc2;
|
||||
const z_word_t *word;
|
||||
@ -630,7 +589,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
|
||||
/* Pre-condition the CRC */
|
||||
crc ^= 0xffffffff;
|
||||
crc = (~crc) & 0xffffffff;
|
||||
|
||||
/* Compute the CRC up to a word boundary. */
|
||||
while (len && ((z_size_t)buf & 7) != 0) {
|
||||
@ -645,8 +604,8 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
len &= 7;
|
||||
|
||||
/* Do three interleaved CRCs to realize the throughput of one crc32x
|
||||
instruction per cycle. Each CRC is calcuated on Z_BATCH words. The three
|
||||
CRCs are combined into a single CRC after each set of batches. */
|
||||
instruction per cycle. Each CRC is calculated on Z_BATCH words. The
|
||||
three CRCs are combined into a single CRC after each set of batches. */
|
||||
while (num >= 3 * Z_BATCH) {
|
||||
crc1 = 0;
|
||||
crc2 = 0;
|
||||
@ -714,18 +673,14 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
least-significant byte of the word as the first byte of data, without any pre
|
||||
or post conditioning. This is used to combine the CRCs of each braid.
|
||||
*/
|
||||
local z_crc_t crc_word(data)
|
||||
z_word_t data;
|
||||
{
|
||||
local z_crc_t crc_word(z_word_t data) {
|
||||
int k;
|
||||
for (k = 0; k < W; k++)
|
||||
data = (data >> 8) ^ crc_table[data & 0xff];
|
||||
return (z_crc_t)data;
|
||||
}
|
||||
|
||||
local z_word_t crc_word_big(data)
|
||||
z_word_t data;
|
||||
{
|
||||
local z_word_t crc_word_big(z_word_t data) {
|
||||
int k;
|
||||
for (k = 0; k < W; k++)
|
||||
data = (data << 8) ^
|
||||
@ -736,11 +691,8 @@ local z_word_t crc_word_big(data)
|
||||
#endif
|
||||
|
||||
/* ========================================================================= */
|
||||
unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
unsigned long crc;
|
||||
const unsigned char FAR *buf;
|
||||
z_size_t len;
|
||||
{
|
||||
unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf,
|
||||
z_size_t len) {
|
||||
/* Return initial CRC, if requested. */
|
||||
if (buf == Z_NULL) return 0;
|
||||
|
||||
@ -749,7 +701,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
|
||||
/* Pre-condition the CRC */
|
||||
crc ^= 0xffffffff;
|
||||
crc = (~crc) & 0xffffffff;
|
||||
|
||||
#ifdef W
|
||||
|
||||
@ -772,8 +724,8 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
words = (z_word_t const *)buf;
|
||||
|
||||
/* Do endian check at execution time instead of compile time, since ARM
|
||||
processors can change the endianess at execution time. If the
|
||||
compiler knows what the endianess will be, it can optimize out the
|
||||
processors can change the endianness at execution time. If the
|
||||
compiler knows what the endianness will be, it can optimize out the
|
||||
check and the unused branch. */
|
||||
endian = 1;
|
||||
if (*(unsigned char *)&endian) {
|
||||
@ -1060,39 +1012,26 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
#endif
|
||||
|
||||
/* ========================================================================= */
|
||||
unsigned long ZEXPORT crc32(crc, buf, len)
|
||||
unsigned long crc;
|
||||
const unsigned char FAR *buf;
|
||||
uInt len;
|
||||
{
|
||||
unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf,
|
||||
uInt len) {
|
||||
return crc32_z(crc, buf, len);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
|
||||
uLong crc1;
|
||||
uLong crc2;
|
||||
z_off64_t len2;
|
||||
{
|
||||
uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) {
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
once(&made, make_crc_table);
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
return multmodp(x2nmodp(len2, 3), crc1) ^ crc2;
|
||||
return multmodp(x2nmodp(len2, 3), crc1) ^ (crc2 & 0xffffffff);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT crc32_combine(crc1, crc2, len2)
|
||||
uLong crc1;
|
||||
uLong crc2;
|
||||
z_off_t len2;
|
||||
{
|
||||
return crc32_combine64(crc1, crc2, len2);
|
||||
uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) {
|
||||
return crc32_combine64(crc1, crc2, (z_off64_t)len2);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT crc32_combine_gen64(len2)
|
||||
z_off64_t len2;
|
||||
{
|
||||
uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) {
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
once(&made, make_crc_table);
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
@ -1100,17 +1039,11 @@ uLong ZEXPORT crc32_combine_gen64(len2)
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT crc32_combine_gen(len2)
|
||||
z_off_t len2;
|
||||
{
|
||||
return crc32_combine_gen64(len2);
|
||||
uLong ZEXPORT crc32_combine_gen(z_off_t len2) {
|
||||
return crc32_combine_gen64((z_off64_t)len2);
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong crc32_combine_op(crc1, crc2, op)
|
||||
uLong crc1;
|
||||
uLong crc2;
|
||||
uLong op;
|
||||
{
|
||||
return multmodp(op, crc1) ^ crc2;
|
||||
uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) {
|
||||
return multmodp(op, crc1) ^ (crc2 & 0xffffffff);
|
||||
}
|
||||
|
753
3rdparty/zlib/deflate.c
vendored
753
3rdparty/zlib/deflate.c
vendored
File diff suppressed because it is too large
Load Diff
20
3rdparty/zlib/deflate.h
vendored
20
3rdparty/zlib/deflate.h
vendored
@ -291,14 +291,14 @@ typedef struct internal_state {
|
||||
memory checker errors from longest match routines */
|
||||
|
||||
/* in trees.c */
|
||||
void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
|
||||
int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
|
||||
void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
|
||||
ulg stored_len, int last));
|
||||
void ZLIB_INTERNAL _tr_flush_bits OF((deflate_state *s));
|
||||
void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
|
||||
void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
|
||||
ulg stored_len, int last));
|
||||
void ZLIB_INTERNAL _tr_init(deflate_state *s);
|
||||
int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc);
|
||||
void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf,
|
||||
ulg stored_len, int last);
|
||||
void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s);
|
||||
void ZLIB_INTERNAL _tr_align(deflate_state *s);
|
||||
void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
|
||||
ulg stored_len, int last);
|
||||
|
||||
#define d_code(dist) \
|
||||
((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
|
||||
@ -329,8 +329,8 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
|
||||
# define _tr_tally_dist(s, distance, length, flush) \
|
||||
{ uch len = (uch)(length); \
|
||||
ush dist = (ush)(distance); \
|
||||
s->sym_buf[s->sym_next++] = dist; \
|
||||
s->sym_buf[s->sym_next++] = dist >> 8; \
|
||||
s->sym_buf[s->sym_next++] = (uch)dist; \
|
||||
s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \
|
||||
s->sym_buf[s->sym_next++] = len; \
|
||||
dist--; \
|
||||
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
|
||||
|
2
3rdparty/zlib/examples/enough.c
vendored
2
3rdparty/zlib/examples/enough.c
vendored
@ -486,7 +486,7 @@ local void enough(int syms) {
|
||||
// are 286, 9, and 15 respectively, for the deflate literal/length code. The
|
||||
// possible codes are counted for each number of coded symbols from two to the
|
||||
// maximum. The counts for each of those and the total number of codes are
|
||||
// shown. The maximum number of inflate table entires is then calculated across
|
||||
// shown. The maximum number of inflate table entries is then calculated across
|
||||
// all possible codes. Each new maximum number of table entries and the
|
||||
// associated sub-code (starting at root + 1 == 10 bits) is shown.
|
||||
//
|
||||
|
6
3rdparty/zlib/examples/fitblk.c
vendored
6
3rdparty/zlib/examples/fitblk.c
vendored
@ -17,7 +17,7 @@
|
||||
data in order to determine how much of that input will compress to
|
||||
nearly the requested output block size. The first pass generates
|
||||
enough deflate blocks to produce output to fill the requested
|
||||
output size plus a specfied excess amount (see the EXCESS define
|
||||
output size plus a specified excess amount (see the EXCESS define
|
||||
below). The last deflate block may go quite a bit past that, but
|
||||
is discarded. The second pass decompresses and recompresses just
|
||||
the compressed data that fit in the requested plus excess sized
|
||||
@ -109,7 +109,7 @@ local int recompress(z_streamp inf, z_streamp def)
|
||||
if (ret == Z_MEM_ERROR)
|
||||
return ret;
|
||||
|
||||
/* compress what was decompresed until done or no room */
|
||||
/* compress what was decompressed until done or no room */
|
||||
def->avail_in = RAWLEN - inf->avail_out;
|
||||
def->next_in = raw;
|
||||
if (inf->avail_out != 0)
|
||||
@ -198,7 +198,7 @@ int main(int argc, char **argv)
|
||||
if (ret == Z_MEM_ERROR)
|
||||
quit("out of memory");
|
||||
|
||||
/* set up for next reocmpression */
|
||||
/* set up for next recompression */
|
||||
ret = inflateReset(&inf);
|
||||
assert(ret != Z_STREAM_ERROR);
|
||||
ret = deflateReset(&def);
|
||||
|
2
3rdparty/zlib/examples/gun.c
vendored
2
3rdparty/zlib/examples/gun.c
vendored
@ -43,7 +43,7 @@
|
||||
gun will also decompress files made by Unix compress, which uses LZW
|
||||
compression. These files are automatically detected by virtue of their
|
||||
magic header bytes. Since the end of Unix compress stream is marked by the
|
||||
end-of-file, they cannot be concantenated. If a Unix compress stream is
|
||||
end-of-file, they cannot be concatenated. If a Unix compress stream is
|
||||
encountered in an input file, it is the last stream in that file.
|
||||
|
||||
Like gunzip and uncompress, the file attributes of the original compressed
|
||||
|
4
3rdparty/zlib/examples/gzappend.c
vendored
4
3rdparty/zlib/examples/gzappend.c
vendored
@ -33,7 +33,7 @@
|
||||
* - Add L to constants in lseek() calls
|
||||
* - Remove some debugging information in error messages
|
||||
* - Use new data_type definition for zlib 1.2.1
|
||||
* - Simplfy and unify file operations
|
||||
* - Simplify and unify file operations
|
||||
* - Finish off gzip file in gztack()
|
||||
* - Use deflatePrime() instead of adding empty blocks
|
||||
* - Keep gzip file clean on appended file read errors
|
||||
@ -54,7 +54,7 @@
|
||||
block boundary to facilitate locating and modifying the last block bit at
|
||||
the start of the final deflate block. Also whether using Z_BLOCK or not,
|
||||
another required feature of zlib 1.2.x is that inflate() now provides the
|
||||
number of unusued bits in the last input byte used. gzappend will not work
|
||||
number of unused bits in the last input byte used. gzappend will not work
|
||||
with versions of zlib earlier than 1.2.1.
|
||||
|
||||
gzappend first decompresses the gzip file internally, discarding all but
|
||||
|
2
3rdparty/zlib/examples/gzlog.h
vendored
2
3rdparty/zlib/examples/gzlog.h
vendored
@ -40,7 +40,7 @@
|
||||
its new size at that time. After each write operation, the log file is a
|
||||
valid gzip file that can decompressed to recover what was written.
|
||||
|
||||
The gzlog operations can be interupted at any point due to an application or
|
||||
The gzlog operations can be interrupted at any point due to an application or
|
||||
system crash, and the log file will be recovered the next time the log is
|
||||
opened with gzlog_open().
|
||||
*/
|
||||
|
26
3rdparty/zlib/examples/zlib_how.html
vendored
26
3rdparty/zlib/examples/zlib_how.html
vendored
@ -1,10 +1,10 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>zlib Usage Example</title>
|
||||
<!-- Copyright (c) 2004, 2005 Mark Adler. -->
|
||||
<!-- Copyright (c) 2004-2023 Mark Adler. -->
|
||||
</head>
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#00A000">
|
||||
<h2 align="center"> zlib Usage Example </h2>
|
||||
@ -17,7 +17,7 @@ from an input file to an output file using <tt>deflate()</tt> and <tt>inflate()<
|
||||
annotations are interspersed between lines of the code. So please read between the lines.
|
||||
We hope this helps explain some of the intricacies of <em>zlib</em>.
|
||||
<p>
|
||||
Without further adieu, here is the program <a href="zpipe.c"><tt>zpipe.c</tt></a>:
|
||||
Without further ado, here is the program <a href="zpipe.c"><tt>zpipe.c</tt></a>:
|
||||
<pre><b>
|
||||
/* zpipe.c: example of proper use of zlib's inflate() and deflate()
|
||||
Not copyrighted -- provided to the public domain
|
||||
@ -155,13 +155,11 @@ before we fall out of the loop at the bottom.
|
||||
</b></pre>
|
||||
We start off by reading data from the input file. The number of bytes read is put directly
|
||||
into <tt>avail_in</tt>, and a pointer to those bytes is put into <tt>next_in</tt>. We also
|
||||
check to see if end-of-file on the input has been reached. If we are at the end of file, then <tt>flush</tt> is set to the
|
||||
check to see if end-of-file on the input has been reached using feof().
|
||||
If we are at the end of file, then <tt>flush</tt> is set to the
|
||||
<em>zlib</em> constant <tt>Z_FINISH</tt>, which is later passed to <tt>deflate()</tt> to
|
||||
indicate that this is the last chunk of input data to compress. We need to use <tt>feof()</tt>
|
||||
to check for end-of-file as opposed to seeing if fewer than <tt>CHUNK</tt> bytes have been read. The
|
||||
reason is that if the input file length is an exact multiple of <tt>CHUNK</tt>, we will miss
|
||||
the fact that we got to the end-of-file, and not know to tell <tt>deflate()</tt> to finish
|
||||
up the compressed stream. If we are not yet at the end of the input, then the <em>zlib</em>
|
||||
indicate that this is the last chunk of input data to compress.
|
||||
If we are not yet at the end of the input, then the <em>zlib</em>
|
||||
constant <tt>Z_NO_FLUSH</tt> will be passed to <tt>deflate</tt> to indicate that we are still
|
||||
in the middle of the uncompressed data.
|
||||
<p>
|
||||
@ -540,6 +538,12 @@ int main(int argc, char **argv)
|
||||
}
|
||||
</b></pre>
|
||||
<hr>
|
||||
<i>Copyright (c) 2004, 2005 by Mark Adler<br>Last modified 11 December 2005</i>
|
||||
<i>Last modified 24 January 2023<br>
|
||||
Copyright © 2004-2023 Mark Adler</i><br>
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nd/4.0/">
|
||||
<img alt="Creative Commons License" style="border-width:0"
|
||||
src="https://i.creativecommons.org/l/by-nd/4.0/88x31.png"></a>
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by-nd/4.0/">
|
||||
Creative Commons Attribution-NoDerivatives 4.0 International License</a>.
|
||||
</body>
|
||||
</html>
|
||||
|
732
3rdparty/zlib/examples/zran.c
vendored
732
3rdparty/zlib/examples/zran.c
vendored
@ -1,114 +1,102 @@
|
||||
/* zran.c -- example of zlib/gzip stream indexing and random access
|
||||
* Copyright (C) 2005, 2012, 2018 Mark Adler
|
||||
/* zran.c -- example of deflate stream indexing and random access
|
||||
* Copyright (C) 2005, 2012, 2018, 2023 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
* Version 1.2 14 Oct 2018 Mark Adler */
|
||||
* Version 1.4 13 Apr 2023 Mark Adler */
|
||||
|
||||
/* Version History:
|
||||
1.0 29 May 2005 First version
|
||||
1.1 29 Sep 2012 Fix memory reallocation error
|
||||
1.2 14 Oct 2018 Handle gzip streams with multiple members
|
||||
Add a header file to facilitate usage in applications
|
||||
1.3 18 Feb 2023 Permit raw deflate streams as well as zlib and gzip
|
||||
Permit crossing gzip member boundaries when extracting
|
||||
Support a size_t size when extracting (was an int)
|
||||
Do a binary search over the index for an access point
|
||||
Expose the access point type to enable save and load
|
||||
1.4 13 Apr 2023 Add a NOPRIME define to not use inflatePrime()
|
||||
*/
|
||||
|
||||
/* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary()
|
||||
for random access of a compressed file. A file containing a zlib or gzip
|
||||
stream is provided on the command line. The compressed stream is decoded in
|
||||
its entirety, and an index built with access points about every SPAN bytes
|
||||
in the uncompressed output. The compressed file is left open, and can then
|
||||
be read randomly, having to decompress on the average SPAN/2 uncompressed
|
||||
bytes before getting to the desired block of data.
|
||||
|
||||
An access point can be created at the start of any deflate block, by saving
|
||||
the starting file offset and bit of that block, and the 32K bytes of
|
||||
uncompressed data that precede that block. Also the uncompressed offset of
|
||||
that block is saved to provide a referece for locating a desired starting
|
||||
point in the uncompressed stream. deflate_index_build() works by
|
||||
decompressing the input zlib or gzip stream a block at a time, and at the
|
||||
end of each block deciding if enough uncompressed data has gone by to
|
||||
justify the creation of a new access point. If so, that point is saved in a
|
||||
data structure that grows as needed to accommodate the points.
|
||||
|
||||
To use the index, an offset in the uncompressed data is provided, for which
|
||||
the latest access point at or preceding that offset is located in the index.
|
||||
The input file is positioned to the specified location in the index, and if
|
||||
necessary the first few bits of the compressed data is read from the file.
|
||||
inflate is initialized with those bits and the 32K of uncompressed data, and
|
||||
the decompression then proceeds until the desired offset in the file is
|
||||
reached. Then the decompression continues to read the desired uncompressed
|
||||
data from the file.
|
||||
|
||||
Another approach would be to generate the index on demand. In that case,
|
||||
requests for random access reads from the compressed data would try to use
|
||||
the index, but if a read far enough past the end of the index is required,
|
||||
then further index entries would be generated and added.
|
||||
|
||||
There is some fair bit of overhead to starting inflation for the random
|
||||
access, mainly copying the 32K byte dictionary. So if small pieces of the
|
||||
file are being accessed, it would make sense to implement a cache to hold
|
||||
some lookahead and avoid many calls to deflate_index_extract() for small
|
||||
lengths.
|
||||
|
||||
Another way to build an index would be to use inflateCopy(). That would
|
||||
not be constrained to have access points at block boundaries, but requires
|
||||
more memory per access point, and also cannot be saved to file due to the
|
||||
use of pointers in the state. The approach here allows for storage of the
|
||||
index in a file.
|
||||
*/
|
||||
// Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary()
|
||||
// for random access of a compressed file. A file containing a raw deflate
|
||||
// stream is provided on the command line. The compressed stream is decoded in
|
||||
// its entirety, and an index built with access points about every SPAN bytes
|
||||
// in the uncompressed output. The compressed file is left open, and can then
|
||||
// be read randomly, having to decompress on the average SPAN/2 uncompressed
|
||||
// bytes before getting to the desired block of data.
|
||||
//
|
||||
// An access point can be created at the start of any deflate block, by saving
|
||||
// the starting file offset and bit of that block, and the 32K bytes of
|
||||
// uncompressed data that precede that block. Also the uncompressed offset of
|
||||
// that block is saved to provide a reference for locating a desired starting
|
||||
// point in the uncompressed stream. deflate_index_build() decompresses the
|
||||
// input raw deflate stream a block at a time, and at the end of each block
|
||||
// decides if enough uncompressed data has gone by to justify the creation of a
|
||||
// new access point. If so, that point is saved in a data structure that grows
|
||||
// as needed to accommodate the points.
|
||||
//
|
||||
// To use the index, an offset in the uncompressed data is provided, for which
|
||||
// the latest access point at or preceding that offset is located in the index.
|
||||
// The input file is positioned to the specified location in the index, and if
|
||||
// necessary the first few bits of the compressed data is read from the file.
|
||||
// inflate is initialized with those bits and the 32K of uncompressed data, and
|
||||
// decompression then proceeds until the desired offset in the file is reached.
|
||||
// Then decompression continues to read the requested uncompressed data from
|
||||
// the file.
|
||||
//
|
||||
// There is some fair bit of overhead to starting inflation for the random
|
||||
// access, mainly copying the 32K byte dictionary. If small pieces of the file
|
||||
// are being accessed, it would make sense to implement a cache to hold some
|
||||
// lookahead to avoid many calls to deflate_index_extract() for small lengths.
|
||||
//
|
||||
// Another way to build an index would be to use inflateCopy(). That would not
|
||||
// be constrained to have access points at block boundaries, but would require
|
||||
// more memory per access point, and could not be saved to a file due to the
|
||||
// use of pointers in the state. The approach here allows for storage of the
|
||||
// index in a file.
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include "zlib.h"
|
||||
#include "zran.h"
|
||||
|
||||
#define WINSIZE 32768U /* sliding window size */
|
||||
#define CHUNK 16384 /* file input buffer size */
|
||||
#define WINSIZE 32768U // sliding window size
|
||||
#define CHUNK 16384 // file input buffer size
|
||||
|
||||
/* Access point entry. */
|
||||
struct point {
|
||||
off_t out; /* corresponding offset in uncompressed data */
|
||||
off_t in; /* offset in input file of first full byte */
|
||||
int bits; /* number of bits (1-7) from byte at in-1, or 0 */
|
||||
unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */
|
||||
};
|
||||
|
||||
/* See comments in zran.h. */
|
||||
void deflate_index_free(struct deflate_index *index)
|
||||
{
|
||||
// See comments in zran.h.
|
||||
void deflate_index_free(struct deflate_index *index) {
|
||||
if (index != NULL) {
|
||||
free(index->list);
|
||||
free(index);
|
||||
}
|
||||
}
|
||||
|
||||
/* Add an entry to the access point list. If out of memory, deallocate the
|
||||
existing list and return NULL. index->gzip is the allocated size of the
|
||||
index in point entries, until it is time for deflate_index_build() to
|
||||
return, at which point gzip is set to indicate a gzip file or not.
|
||||
*/
|
||||
static struct deflate_index *addpoint(struct deflate_index *index, int bits,
|
||||
off_t in, off_t out, unsigned left,
|
||||
unsigned char *window)
|
||||
{
|
||||
struct point *next;
|
||||
|
||||
/* if list is empty, create it (start with eight points) */
|
||||
// Add an access point to the list. If out of memory, deallocate the existing
|
||||
// list and return NULL. index->mode is temporarily the allocated number of
|
||||
// access points, until it is time for deflate_index_build() to return. Then
|
||||
// index->mode is set to the mode of inflation.
|
||||
static struct deflate_index *add_point(struct deflate_index *index, int bits,
|
||||
off_t in, off_t out, unsigned left,
|
||||
unsigned char *window) {
|
||||
if (index == NULL) {
|
||||
// The list is empty. Create it, starting with eight access points.
|
||||
index = malloc(sizeof(struct deflate_index));
|
||||
if (index == NULL) return NULL;
|
||||
index->list = malloc(sizeof(struct point) << 3);
|
||||
if (index == NULL)
|
||||
return NULL;
|
||||
index->have = 0;
|
||||
index->mode = 8;
|
||||
index->list = malloc(sizeof(point_t) * index->mode);
|
||||
if (index->list == NULL) {
|
||||
free(index);
|
||||
return NULL;
|
||||
}
|
||||
index->gzip = 8;
|
||||
index->have = 0;
|
||||
}
|
||||
|
||||
/* if list is full, make it bigger */
|
||||
else if (index->have == index->gzip) {
|
||||
index->gzip <<= 1;
|
||||
next = realloc(index->list, sizeof(struct point) * index->gzip);
|
||||
else if (index->have == index->mode) {
|
||||
// The list is full. Make it bigger.
|
||||
index->mode <<= 1;
|
||||
point_t *next = realloc(index->list, sizeof(point_t) * index->mode);
|
||||
if (next == NULL) {
|
||||
deflate_index_free(index);
|
||||
return NULL;
|
||||
@ -116,318 +104,379 @@ static struct deflate_index *addpoint(struct deflate_index *index, int bits,
|
||||
index->list = next;
|
||||
}
|
||||
|
||||
/* fill in entry and increment how many we have */
|
||||
next = (struct point *)(index->list) + index->have;
|
||||
next->bits = bits;
|
||||
next->in = in;
|
||||
// Fill in the access point and increment how many we have.
|
||||
point_t *next = (point_t *)(index->list) + index->have++;
|
||||
if (index->have < 0) {
|
||||
// Overflowed the int!
|
||||
deflate_index_free(index);
|
||||
return NULL;
|
||||
}
|
||||
next->out = out;
|
||||
next->in = in;
|
||||
next->bits = bits;
|
||||
if (left)
|
||||
memcpy(next->window, window + WINSIZE - left, left);
|
||||
if (left < WINSIZE)
|
||||
memcpy(next->window + left, window, WINSIZE - left);
|
||||
index->have++;
|
||||
|
||||
/* return list, possibly reallocated */
|
||||
// Return the index, which may have been newly allocated or destroyed.
|
||||
return index;
|
||||
}
|
||||
|
||||
/* See comments in zran.h. */
|
||||
int deflate_index_build(FILE *in, off_t span, struct deflate_index **built)
|
||||
{
|
||||
int ret;
|
||||
int gzip = 0; /* true if reading a gzip file */
|
||||
off_t totin, totout; /* our own total counters to avoid 4GB limit */
|
||||
off_t last; /* totout value of last access point */
|
||||
struct deflate_index *index; /* access points being generated */
|
||||
z_stream strm;
|
||||
unsigned char input[CHUNK];
|
||||
unsigned char window[WINSIZE];
|
||||
// Decompression modes. These are the inflateInit2() windowBits parameter.
|
||||
#define RAW -15
|
||||
#define ZLIB 15
|
||||
#define GZIP 31
|
||||
|
||||
/* initialize inflate */
|
||||
strm.zalloc = Z_NULL;
|
||||
strm.zfree = Z_NULL;
|
||||
strm.opaque = Z_NULL;
|
||||
strm.avail_in = 0;
|
||||
strm.next_in = Z_NULL;
|
||||
ret = inflateInit2(&strm, 47); /* automatic zlib or gzip decoding */
|
||||
if (ret != Z_OK)
|
||||
return ret;
|
||||
// See comments in zran.h.
|
||||
int deflate_index_build(FILE *in, off_t span, struct deflate_index **built) {
|
||||
// Set up inflation state.
|
||||
z_stream strm = {0}; // inflate engine (gets fired up later)
|
||||
unsigned char buf[CHUNK]; // input buffer
|
||||
unsigned char win[WINSIZE] = {0}; // output sliding window
|
||||
off_t totin = 0; // total bytes read from input
|
||||
off_t totout = 0; // total bytes uncompressed
|
||||
int mode = 0; // mode: RAW, ZLIB, or GZIP (0 => not set yet)
|
||||
|
||||
/* inflate the input, maintain a sliding window, and build an index -- this
|
||||
also validates the integrity of the compressed data using the check
|
||||
information in the gzip or zlib stream */
|
||||
totin = totout = last = 0;
|
||||
index = NULL; /* will be allocated by first addpoint() */
|
||||
strm.avail_out = 0;
|
||||
// Decompress from in, generating access points along the way.
|
||||
int ret; // the return value from zlib, or Z_ERRNO
|
||||
off_t last; // last access point uncompressed offset
|
||||
struct deflate_index *index = NULL; // list of access points
|
||||
do {
|
||||
/* get some compressed data from input file */
|
||||
strm.avail_in = fread(input, 1, CHUNK, in);
|
||||
if (ferror(in)) {
|
||||
ret = Z_ERRNO;
|
||||
goto deflate_index_build_error;
|
||||
}
|
||||
// Assure available input, at least until reaching EOF.
|
||||
if (strm.avail_in == 0) {
|
||||
ret = Z_DATA_ERROR;
|
||||
goto deflate_index_build_error;
|
||||
}
|
||||
strm.next_in = input;
|
||||
|
||||
/* check for a gzip stream */
|
||||
if (totin == 0 && strm.avail_in >= 3 &&
|
||||
input[0] == 31 && input[1] == 139 && input[2] == 8)
|
||||
gzip = 1;
|
||||
|
||||
/* process all of that, or until end of stream */
|
||||
do {
|
||||
/* reset sliding window if necessary */
|
||||
if (strm.avail_out == 0) {
|
||||
strm.avail_out = WINSIZE;
|
||||
strm.next_out = window;
|
||||
}
|
||||
|
||||
/* inflate until out of input, output, or at end of block --
|
||||
update the total input and output counters */
|
||||
strm.avail_in = fread(buf, 1, sizeof(buf), in);
|
||||
totin += strm.avail_in;
|
||||
totout += strm.avail_out;
|
||||
ret = inflate(&strm, Z_BLOCK); /* return at end of block */
|
||||
totin -= strm.avail_in;
|
||||
totout -= strm.avail_out;
|
||||
if (ret == Z_NEED_DICT)
|
||||
ret = Z_DATA_ERROR;
|
||||
if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
|
||||
goto deflate_index_build_error;
|
||||
if (ret == Z_STREAM_END) {
|
||||
if (gzip &&
|
||||
(strm.avail_in || ungetc(getc(in), in) != EOF)) {
|
||||
ret = inflateReset(&strm);
|
||||
if (ret != Z_OK)
|
||||
goto deflate_index_build_error;
|
||||
continue;
|
||||
}
|
||||
strm.next_in = buf;
|
||||
if (strm.avail_in < sizeof(buf) && ferror(in)) {
|
||||
ret = Z_ERRNO;
|
||||
break;
|
||||
}
|
||||
|
||||
/* if at end of block, consider adding an index entry (note that if
|
||||
data_type indicates an end-of-block, then all of the
|
||||
uncompressed data from that block has been delivered, and none
|
||||
of the compressed data after that block has been consumed,
|
||||
except for up to seven bits) -- the totout == 0 provides an
|
||||
entry point after the zlib or gzip header, and assures that the
|
||||
index always has at least one access point; we avoid creating an
|
||||
access point after the last block by checking bit 6 of data_type
|
||||
*/
|
||||
if ((strm.data_type & 128) && !(strm.data_type & 64) &&
|
||||
(totout == 0 || totout - last > span)) {
|
||||
index = addpoint(index, strm.data_type & 7, totin,
|
||||
totout, strm.avail_out, window);
|
||||
if (index == NULL) {
|
||||
ret = Z_MEM_ERROR;
|
||||
goto deflate_index_build_error;
|
||||
}
|
||||
last = totout;
|
||||
if (mode == 0) {
|
||||
// At the start of the input -- determine the type. Assume raw
|
||||
// if it is neither zlib nor gzip. This could in theory result
|
||||
// in a false positive for zlib, but in practice the fill bits
|
||||
// after a stored block are always zeros, so a raw stream won't
|
||||
// start with an 8 in the low nybble.
|
||||
mode = strm.avail_in == 0 ? RAW : // empty -- will fail
|
||||
(strm.next_in[0] & 0xf) == 8 ? ZLIB :
|
||||
strm.next_in[0] == 0x1f ? GZIP :
|
||||
/* else */ RAW;
|
||||
ret = inflateInit2(&strm, mode);
|
||||
if (ret != Z_OK)
|
||||
break;
|
||||
}
|
||||
} while (strm.avail_in != 0);
|
||||
} while (ret != Z_STREAM_END);
|
||||
}
|
||||
|
||||
/* clean up and return index (release unused entries in list) */
|
||||
(void)inflateEnd(&strm);
|
||||
index->list = realloc(index->list, sizeof(struct point) * index->have);
|
||||
index->gzip = gzip;
|
||||
// Assure available output. This rotates the output through, for use as
|
||||
// a sliding window on the uncompressed data.
|
||||
if (strm.avail_out == 0) {
|
||||
strm.avail_out = sizeof(win);
|
||||
strm.next_out = win;
|
||||
}
|
||||
|
||||
if (mode == RAW && index == NULL)
|
||||
// We skip the inflate() call at the start of raw deflate data in
|
||||
// order generate an access point there. Set data_type to imitate
|
||||
// the end of a header.
|
||||
strm.data_type = 0x80;
|
||||
else {
|
||||
// Inflate and update the number of uncompressed bytes.
|
||||
unsigned before = strm.avail_out;
|
||||
ret = inflate(&strm, Z_BLOCK);
|
||||
totout += before - strm.avail_out;
|
||||
}
|
||||
|
||||
if ((strm.data_type & 0xc0) == 0x80 &&
|
||||
(index == NULL || totout - last >= span)) {
|
||||
// We are at the end of a header or a non-last deflate block, so we
|
||||
// can add an access point here. Furthermore, we are either at the
|
||||
// very start for the first access point, or there has been span or
|
||||
// more uncompressed bytes since the last access point, so we want
|
||||
// to add an access point here.
|
||||
index = add_point(index, strm.data_type & 7, totin - strm.avail_in,
|
||||
totout, strm.avail_out, win);
|
||||
if (index == NULL) {
|
||||
ret = Z_MEM_ERROR;
|
||||
break;
|
||||
}
|
||||
last = totout;
|
||||
}
|
||||
|
||||
if (ret == Z_STREAM_END && mode == GZIP &&
|
||||
(strm.avail_in || ungetc(getc(in), in) != EOF))
|
||||
// There is more input after the end of a gzip member. Reset the
|
||||
// inflate state to read another gzip member. On success, this will
|
||||
// set ret to Z_OK to continue decompressing.
|
||||
ret = inflateReset2(&strm, GZIP);
|
||||
|
||||
// Keep going until Z_STREAM_END or error. If the compressed data ends
|
||||
// prematurely without a file read error, Z_BUF_ERROR is returned.
|
||||
} while (ret == Z_OK);
|
||||
inflateEnd(&strm);
|
||||
|
||||
if (ret != Z_STREAM_END) {
|
||||
// An error was encountered. Discard the index and return a negative
|
||||
// error code.
|
||||
deflate_index_free(index);
|
||||
return ret == Z_NEED_DICT ? Z_DATA_ERROR : ret;
|
||||
}
|
||||
|
||||
// Shrink the index to only the occupied access points and return it.
|
||||
index->mode = mode;
|
||||
index->length = totout;
|
||||
point_t *list = realloc(index->list, sizeof(point_t) * index->have);
|
||||
if (list == NULL) {
|
||||
// Seems like a realloc() to make something smaller should always work,
|
||||
// but just in case.
|
||||
deflate_index_free(index);
|
||||
return Z_MEM_ERROR;
|
||||
}
|
||||
index->list = list;
|
||||
*built = index;
|
||||
return index->have;
|
||||
|
||||
/* return error */
|
||||
deflate_index_build_error:
|
||||
(void)inflateEnd(&strm);
|
||||
deflate_index_free(index);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* See comments in zran.h. */
|
||||
int deflate_index_extract(FILE *in, struct deflate_index *index, off_t offset,
|
||||
unsigned char *buf, int len)
|
||||
{
|
||||
int ret, skip;
|
||||
z_stream strm;
|
||||
struct point *here;
|
||||
unsigned char input[CHUNK];
|
||||
unsigned char discard[WINSIZE];
|
||||
#ifdef NOPRIME
|
||||
// Support zlib versions before 1.2.3 (July 2005), or incomplete zlib clones
|
||||
// that do not have inflatePrime().
|
||||
|
||||
/* proceed only if something reasonable to do */
|
||||
if (len < 0)
|
||||
# define INFLATEPRIME inflatePreface
|
||||
|
||||
// Append the low bits bits of value to in[] at bit position *have, updating
|
||||
// *have. value must be zero above its low bits bits. bits must be positive.
|
||||
// This assumes that any bits above the *have bits in the last byte are zeros.
|
||||
// That assumption is preserved on return, as any bits above *have + bits in
|
||||
// the last byte written will be set to zeros.
|
||||
static inline void append_bits(unsigned value, int bits,
|
||||
unsigned char *in, int *have) {
|
||||
in += *have >> 3; // where the first bits from value will go
|
||||
int k = *have & 7; // the number of bits already there
|
||||
*have += bits;
|
||||
if (k)
|
||||
*in |= value << k; // write value above the low k bits
|
||||
else
|
||||
*in = value;
|
||||
k = 8 - k; // the number of bits just appended
|
||||
while (bits > k) {
|
||||
value >>= k; // drop the bits appended
|
||||
bits -= k;
|
||||
k = 8; // now at a byte boundary
|
||||
*++in = value;
|
||||
}
|
||||
}
|
||||
|
||||
// Insert enough bits in the form of empty deflate blocks in front of the the
|
||||
// low bits bits of value, in order to bring the sequence to a byte boundary.
|
||||
// Then feed that to inflate(). This does what inflatePrime() does, except that
|
||||
// a negative value of bits is not supported. bits must be in 0..16. If the
|
||||
// arguments are invalid, Z_STREAM_ERROR is returned. Otherwise the return
|
||||
// value from inflate() is returned.
|
||||
static int inflatePreface(z_stream *strm, int bits, int value) {
|
||||
// Check input.
|
||||
if (strm == Z_NULL || bits < 0 || bits > 16)
|
||||
return Z_STREAM_ERROR;
|
||||
if (bits == 0)
|
||||
return Z_OK;
|
||||
value &= (2 << (bits - 1)) - 1;
|
||||
|
||||
// An empty dynamic block with an odd number of bits (95). The high bit of
|
||||
// the last byte is unused.
|
||||
static const unsigned char dyn[] = {
|
||||
4, 0xe0, 0x81, 8, 0, 0, 0, 0, 0x20, 0xa8, 0xab, 0x1f
|
||||
};
|
||||
const int dynlen = 95; // number of bits in the block
|
||||
|
||||
// Build an input buffer for inflate that is a multiple of eight bits in
|
||||
// length, and that ends with the low bits bits of value.
|
||||
unsigned char in[(dynlen + 3 * 10 + 16 + 7) / 8];
|
||||
int have = 0;
|
||||
if (bits & 1) {
|
||||
// Insert an empty dynamic block to get to an odd number of bits, so
|
||||
// when bits bits from value are appended, we are at an even number of
|
||||
// bits.
|
||||
memcpy(in, dyn, sizeof(dyn));
|
||||
have = dynlen;
|
||||
}
|
||||
while ((have + bits) & 7)
|
||||
// Insert empty fixed blocks until appending bits bits would put us on
|
||||
// a byte boundary. This will insert at most three fixed blocks.
|
||||
append_bits(2, 10, in, &have);
|
||||
|
||||
// Append the bits bits from value, which takes us to a byte boundary.
|
||||
append_bits(value, bits, in, &have);
|
||||
|
||||
// Deliver the input to inflate(). There is no output space provided, but
|
||||
// inflate() can't get stuck waiting on output not ingesting all of the
|
||||
// provided input. The reason is that there will be at most 16 bits of
|
||||
// input from value after the empty deflate blocks (which themselves
|
||||
// generate no output). At least ten bits are needed to generate the first
|
||||
// output byte from a fixed block. The last two bytes of the buffer have to
|
||||
// be ingested in order to get ten bits, which is the most that value can
|
||||
// occupy.
|
||||
strm->avail_in = have >> 3;
|
||||
strm->next_in = in;
|
||||
strm->avail_out = 0;
|
||||
strm->next_out = in; // not used, but can't be NULL
|
||||
return inflate(strm, Z_NO_FLUSH);
|
||||
}
|
||||
|
||||
#else
|
||||
# define INFLATEPRIME inflatePrime
|
||||
#endif
|
||||
|
||||
// See comments in zran.h.
|
||||
ptrdiff_t deflate_index_extract(FILE *in, struct deflate_index *index,
|
||||
off_t offset, unsigned char *buf, size_t len) {
|
||||
// Do a quick sanity check on the index.
|
||||
if (index == NULL || index->have < 1 || index->list[0].out != 0)
|
||||
return Z_STREAM_ERROR;
|
||||
|
||||
// If nothing to extract, return zero bytes extracted.
|
||||
if (len == 0 || offset < 0 || offset >= index->length)
|
||||
return 0;
|
||||
|
||||
/* find where in stream to start */
|
||||
here = index->list;
|
||||
ret = index->have;
|
||||
while (--ret && here[1].out <= offset)
|
||||
here++;
|
||||
// Find the access point closest to but not after offset.
|
||||
int lo = -1, hi = index->have;
|
||||
point_t *point = index->list;
|
||||
while (hi - lo > 1) {
|
||||
int mid = (lo + hi) >> 1;
|
||||
if (offset < point[mid].out)
|
||||
hi = mid;
|
||||
else
|
||||
lo = mid;
|
||||
}
|
||||
point += lo;
|
||||
|
||||
/* initialize file and inflate state to start there */
|
||||
strm.zalloc = Z_NULL;
|
||||
strm.zfree = Z_NULL;
|
||||
strm.opaque = Z_NULL;
|
||||
strm.avail_in = 0;
|
||||
strm.next_in = Z_NULL;
|
||||
ret = inflateInit2(&strm, -15); /* raw inflate */
|
||||
// Initialize the input file and prime the inflate engine to start there.
|
||||
int ret = fseeko(in, point->in - (point->bits ? 1 : 0), SEEK_SET);
|
||||
if (ret == -1)
|
||||
return Z_ERRNO;
|
||||
int ch = 0;
|
||||
if (point->bits && (ch = getc(in)) == EOF)
|
||||
return ferror(in) ? Z_ERRNO : Z_BUF_ERROR;
|
||||
z_stream strm = {0};
|
||||
ret = inflateInit2(&strm, RAW);
|
||||
if (ret != Z_OK)
|
||||
return ret;
|
||||
ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET);
|
||||
if (ret == -1)
|
||||
goto deflate_index_extract_ret;
|
||||
if (here->bits) {
|
||||
ret = getc(in);
|
||||
if (ret == -1) {
|
||||
ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR;
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
(void)inflatePrime(&strm, here->bits, ret >> (8 - here->bits));
|
||||
}
|
||||
(void)inflateSetDictionary(&strm, here->window, WINSIZE);
|
||||
if (point->bits)
|
||||
INFLATEPRIME(&strm, point->bits, ch >> (8 - point->bits));
|
||||
inflateSetDictionary(&strm, point->window, WINSIZE);
|
||||
|
||||
/* skip uncompressed bytes until offset reached, then satisfy request */
|
||||
offset -= here->out;
|
||||
strm.avail_in = 0;
|
||||
skip = 1; /* while skipping to offset */
|
||||
// Skip uncompressed bytes until offset reached, then satisfy request.
|
||||
unsigned char input[CHUNK];
|
||||
unsigned char discard[WINSIZE];
|
||||
offset -= point->out; // number of bytes to skip to get to offset
|
||||
size_t left = len; // number of bytes left to read after offset
|
||||
do {
|
||||
/* define where to put uncompressed data, and how much */
|
||||
if (offset > WINSIZE) { /* skip WINSIZE bytes */
|
||||
strm.avail_out = WINSIZE;
|
||||
if (offset) {
|
||||
// Discard up to offset uncompressed bytes.
|
||||
strm.avail_out = offset < WINSIZE ? (unsigned)offset : WINSIZE;
|
||||
strm.next_out = discard;
|
||||
offset -= WINSIZE;
|
||||
}
|
||||
else if (offset > 0) { /* last skip */
|
||||
strm.avail_out = (unsigned)offset;
|
||||
strm.next_out = discard;
|
||||
offset = 0;
|
||||
}
|
||||
else if (skip) { /* at offset now */
|
||||
strm.avail_out = len;
|
||||
strm.next_out = buf;
|
||||
skip = 0; /* only do this once */
|
||||
else {
|
||||
// Uncompress up to left bytes into buf.
|
||||
strm.avail_out = left < UINT_MAX ? (unsigned)left : UINT_MAX;
|
||||
strm.next_out = buf + len - left;
|
||||
}
|
||||
|
||||
/* uncompress until avail_out filled, or end of stream */
|
||||
do {
|
||||
if (strm.avail_in == 0) {
|
||||
strm.avail_in = fread(input, 1, CHUNK, in);
|
||||
if (ferror(in)) {
|
||||
ret = Z_ERRNO;
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
if (strm.avail_in == 0) {
|
||||
ret = Z_DATA_ERROR;
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
strm.next_in = input;
|
||||
// Uncompress, setting got to the number of bytes uncompressed.
|
||||
if (strm.avail_in == 0) {
|
||||
// Assure available input.
|
||||
strm.avail_in = fread(input, 1, CHUNK, in);
|
||||
if (strm.avail_in < CHUNK && ferror(in)) {
|
||||
ret = Z_ERRNO;
|
||||
break;
|
||||
}
|
||||
ret = inflate(&strm, Z_NO_FLUSH); /* normal inflate */
|
||||
if (ret == Z_NEED_DICT)
|
||||
ret = Z_DATA_ERROR;
|
||||
if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
|
||||
goto deflate_index_extract_ret;
|
||||
if (ret == Z_STREAM_END) {
|
||||
/* the raw deflate stream has ended */
|
||||
if (index->gzip == 0)
|
||||
/* this is a zlib stream that has ended -- done */
|
||||
break;
|
||||
strm.next_in = input;
|
||||
}
|
||||
unsigned got = strm.avail_out;
|
||||
ret = inflate(&strm, Z_NO_FLUSH);
|
||||
got -= strm.avail_out;
|
||||
|
||||
/* near the end of a gzip member, which might be followed by
|
||||
another gzip member -- skip the gzip trailer and see if
|
||||
there is more input after it */
|
||||
if (strm.avail_in < 8) {
|
||||
fseeko(in, 8 - strm.avail_in, SEEK_CUR);
|
||||
strm.avail_in = 0;
|
||||
}
|
||||
else {
|
||||
strm.avail_in -= 8;
|
||||
strm.next_in += 8;
|
||||
}
|
||||
if (strm.avail_in == 0 && ungetc(getc(in), in) == EOF)
|
||||
/* the input ended after the gzip trailer -- done */
|
||||
break;
|
||||
// Update the appropriate count.
|
||||
if (offset)
|
||||
offset -= got;
|
||||
else
|
||||
left -= got;
|
||||
|
||||
/* there is more input, so another gzip member should follow --
|
||||
validate and skip the gzip header */
|
||||
ret = inflateReset2(&strm, 31);
|
||||
if (ret != Z_OK)
|
||||
goto deflate_index_extract_ret;
|
||||
// If we're at the end of a gzip member and there's more to read,
|
||||
// continue to the next gzip member.
|
||||
if (ret == Z_STREAM_END && index->mode == GZIP) {
|
||||
// Discard the gzip trailer.
|
||||
unsigned drop = 8; // length of gzip trailer
|
||||
if (strm.avail_in >= drop) {
|
||||
strm.avail_in -= drop;
|
||||
strm.next_in += drop;
|
||||
}
|
||||
else {
|
||||
// Read and discard the remainder of the gzip trailer.
|
||||
drop -= strm.avail_in;
|
||||
strm.avail_in = 0;
|
||||
do {
|
||||
if (getc(in) == EOF)
|
||||
// The input does not have a complete trailer.
|
||||
return ferror(in) ? Z_ERRNO : Z_BUF_ERROR;
|
||||
} while (--drop);
|
||||
}
|
||||
|
||||
if (strm.avail_in || ungetc(getc(in), in) != EOF) {
|
||||
// There's more after the gzip trailer. Use inflate to skip the
|
||||
// gzip header and resume the raw inflate there.
|
||||
inflateReset2(&strm, GZIP);
|
||||
do {
|
||||
if (strm.avail_in == 0) {
|
||||
strm.avail_in = fread(input, 1, CHUNK, in);
|
||||
if (ferror(in)) {
|
||||
if (strm.avail_in < CHUNK && ferror(in)) {
|
||||
ret = Z_ERRNO;
|
||||
goto deflate_index_extract_ret;
|
||||
}
|
||||
if (strm.avail_in == 0) {
|
||||
ret = Z_DATA_ERROR;
|
||||
goto deflate_index_extract_ret;
|
||||
break;
|
||||
}
|
||||
strm.next_in = input;
|
||||
}
|
||||
ret = inflate(&strm, Z_BLOCK);
|
||||
if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
|
||||
goto deflate_index_extract_ret;
|
||||
} while ((strm.data_type & 128) == 0);
|
||||
|
||||
/* set up to continue decompression of the raw deflate stream
|
||||
that follows the gzip header */
|
||||
ret = inflateReset2(&strm, -15);
|
||||
strm.avail_out = WINSIZE;
|
||||
strm.next_out = discard;
|
||||
ret = inflate(&strm, Z_BLOCK); // stop at end of header
|
||||
} while (ret == Z_OK && (strm.data_type & 0x80) == 0);
|
||||
if (ret != Z_OK)
|
||||
goto deflate_index_extract_ret;
|
||||
break;
|
||||
inflateReset2(&strm, RAW);
|
||||
}
|
||||
}
|
||||
|
||||
/* continue to process the available input before reading more */
|
||||
} while (strm.avail_out != 0);
|
||||
// Continue until we have the requested data, the deflate data has
|
||||
// ended, or an error is encountered.
|
||||
} while (ret == Z_OK && left);
|
||||
inflateEnd(&strm);
|
||||
|
||||
if (ret == Z_STREAM_END)
|
||||
/* reached the end of the compressed data -- return the data that
|
||||
was available, possibly less than requested */
|
||||
break;
|
||||
|
||||
/* do until offset reached and requested data read */
|
||||
} while (skip);
|
||||
|
||||
/* compute the number of uncompressed bytes read after the offset */
|
||||
ret = skip ? 0 : len - strm.avail_out;
|
||||
|
||||
/* clean up and return the bytes read, or the negative error */
|
||||
deflate_index_extract_ret:
|
||||
(void)inflateEnd(&strm);
|
||||
return ret;
|
||||
// Return the number of uncompressed bytes read into buf, or the error.
|
||||
return ret == Z_OK || ret == Z_STREAM_END ? len - left : ret;
|
||||
}
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
#define SPAN 1048576L /* desired distance between access points */
|
||||
#define LEN 16384 /* number of bytes to extract */
|
||||
#define SPAN 1048576L // desired distance between access points
|
||||
#define LEN 16384 // number of bytes to extract
|
||||
|
||||
/* Demonstrate the use of deflate_index_build() and deflate_index_extract() by
|
||||
processing the file provided on the command line, and extracting LEN bytes
|
||||
from 2/3rds of the way through the uncompressed output, writing that to
|
||||
stdout. An offset can be provided as the second argument, in which case the
|
||||
data is extracted from there instead. */
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int len;
|
||||
off_t offset = -1;
|
||||
FILE *in;
|
||||
struct deflate_index *index = NULL;
|
||||
unsigned char buf[LEN];
|
||||
|
||||
/* open input file */
|
||||
// Demonstrate the use of deflate_index_build() and deflate_index_extract() by
|
||||
// processing the file provided on the command line, and extracting LEN bytes
|
||||
// from 2/3rds of the way through the uncompressed output, writing that to
|
||||
// stdout. An offset can be provided as the second argument, in which case the
|
||||
// data is extracted from there instead.
|
||||
int main(int argc, char **argv) {
|
||||
// Open the input file.
|
||||
if (argc < 2 || argc > 3) {
|
||||
fprintf(stderr, "usage: zran file.gz [offset]\n");
|
||||
fprintf(stderr, "usage: zran file.raw [offset]\n");
|
||||
return 1;
|
||||
}
|
||||
in = fopen(argv[1], "rb");
|
||||
FILE *in = fopen(argv[1], "rb");
|
||||
if (in == NULL) {
|
||||
fprintf(stderr, "zran: could not open %s for reading\n", argv[1]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* get optional offset */
|
||||
// Get optional offset.
|
||||
off_t offset = -1;
|
||||
if (argc == 3) {
|
||||
char *end;
|
||||
offset = strtoll(argv[2], &end, 10);
|
||||
@ -437,14 +486,18 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
/* build index */
|
||||
len = deflate_index_build(in, SPAN, &index);
|
||||
// Build index.
|
||||
struct deflate_index *index = NULL;
|
||||
int len = deflate_index_build(in, SPAN, &index);
|
||||
if (len < 0) {
|
||||
fclose(in);
|
||||
switch (len) {
|
||||
case Z_MEM_ERROR:
|
||||
fprintf(stderr, "zran: out of memory\n");
|
||||
break;
|
||||
case Z_BUF_ERROR:
|
||||
fprintf(stderr, "zran: %s ended prematurely\n", argv[1]);
|
||||
break;
|
||||
case Z_DATA_ERROR:
|
||||
fprintf(stderr, "zran: compressed data error in %s\n", argv[1]);
|
||||
break;
|
||||
@ -458,19 +511,20 @@ int main(int argc, char **argv)
|
||||
}
|
||||
fprintf(stderr, "zran: built index with %d access points\n", len);
|
||||
|
||||
/* use index by reading some bytes from an arbitrary offset */
|
||||
// Use index by reading some bytes from an arbitrary offset.
|
||||
unsigned char buf[LEN];
|
||||
if (offset == -1)
|
||||
offset = (index->length << 1) / 3;
|
||||
len = deflate_index_extract(in, index, offset, buf, LEN);
|
||||
if (len < 0)
|
||||
offset = ((index->length + 1) << 1) / 3;
|
||||
ptrdiff_t got = deflate_index_extract(in, index, offset, buf, LEN);
|
||||
if (got < 0)
|
||||
fprintf(stderr, "zran: extraction failed: %s error\n",
|
||||
len == Z_MEM_ERROR ? "out of memory" : "input corrupted");
|
||||
got == Z_MEM_ERROR ? "out of memory" : "input corrupted");
|
||||
else {
|
||||
fwrite(buf, 1, len, stdout);
|
||||
fprintf(stderr, "zran: extracted %d bytes at %llu\n", len, offset);
|
||||
fwrite(buf, 1, got, stdout);
|
||||
fprintf(stderr, "zran: extracted %ld bytes at %lld\n", got, offset);
|
||||
}
|
||||
|
||||
/* clean up and exit */
|
||||
// Clean up and exit.
|
||||
deflate_index_free(index);
|
||||
fclose(in);
|
||||
return 0;
|
||||
|
69
3rdparty/zlib/examples/zran.h
vendored
69
3rdparty/zlib/examples/zran.h
vendored
@ -1,40 +1,51 @@
|
||||
/* zran.h -- example of zlib/gzip stream indexing and random access
|
||||
* Copyright (C) 2005, 2012, 2018 Mark Adler
|
||||
/* zran.h -- example of deflated stream indexing and random access
|
||||
* Copyright (C) 2005, 2012, 2018, 2023 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
* Version 1.2 14 Oct 2018 Mark Adler */
|
||||
* Version 1.3 18 Feb 2023 Mark Adler */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "zlib.h"
|
||||
|
||||
/* Access point list. */
|
||||
// Access point.
|
||||
typedef struct point {
|
||||
off_t out; // offset in uncompressed data
|
||||
off_t in; // offset in compressed file of first full byte
|
||||
int bits; // 0, or number of bits (1-7) from byte at in-1
|
||||
unsigned char window[32768]; // preceding 32K of uncompressed data
|
||||
} point_t;
|
||||
|
||||
// Access point list.
|
||||
struct deflate_index {
|
||||
int have; /* number of list entries */
|
||||
int gzip; /* 1 if the index is of a gzip file, 0 if it is of a
|
||||
zlib stream */
|
||||
off_t length; /* total length of uncompressed data */
|
||||
void *list; /* allocated list of entries */
|
||||
int have; // number of access points in list
|
||||
int mode; // -15 for raw, 15 for zlib, or 31 for gzip
|
||||
off_t length; // total length of uncompressed data
|
||||
point_t *list; // allocated list of access points
|
||||
};
|
||||
|
||||
/* Make one entire pass through a zlib or gzip compressed stream and build an
|
||||
index, with access points about every span bytes of uncompressed output.
|
||||
gzip files with multiple members are indexed in their entirety. span should
|
||||
be chosen to balance the speed of random access against the memory
|
||||
requirements of the list, about 32K bytes per access point. The return value
|
||||
is the number of access points on success (>= 1), Z_MEM_ERROR for out of
|
||||
memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a file
|
||||
read error. On success, *built points to the resulting index. */
|
||||
// Make one pass through a zlib, gzip, or raw deflate compressed stream and
|
||||
// build an index, with access points about every span bytes of uncompressed
|
||||
// output. gzip files with multiple members are fully indexed. span should be
|
||||
// chosen to balance the speed of random access against the memory requirements
|
||||
// of the list, which is about 32K bytes per access point. The return value is
|
||||
// the number of access points on success (>= 1), Z_MEM_ERROR for out of
|
||||
// memory, Z_BUF_ERROR for a premature end of input, Z_DATA_ERROR for a format
|
||||
// or verification error in the input file, or Z_ERRNO for a file read error.
|
||||
// On success, *built points to the resulting index.
|
||||
int deflate_index_build(FILE *in, off_t span, struct deflate_index **built);
|
||||
|
||||
/* Deallocate an index built by deflate_index_build() */
|
||||
void deflate_index_free(struct deflate_index *index);
|
||||
// Use the index to read len bytes from offset into buf. Return the number of
|
||||
// bytes read or a negative error code. If data is requested past the end of
|
||||
// the uncompressed data, then deflate_index_extract() will return a value less
|
||||
// than len, indicating how much was actually read into buf. If given a valid
|
||||
// index, this function should not return an error unless the file was modified
|
||||
// somehow since the index was generated, given that deflate_index_build() had
|
||||
// validated all of the input. If nevertheless there is a failure, Z_BUF_ERROR
|
||||
// is returned if the compressed data ends prematurely, Z_DATA_ERROR if the
|
||||
// deflate compressed data is not valid, Z_MEM_ERROR if out of memory,
|
||||
// Z_STREAM_ERROR if the index is not valid, or Z_ERRNO if there is an error
|
||||
// reading or seeking on the input file.
|
||||
ptrdiff_t deflate_index_extract(FILE *in, struct deflate_index *index,
|
||||
off_t offset, unsigned char *buf, size_t len);
|
||||
|
||||
/* Use the index to read len bytes from offset into buf. Return bytes read or
|
||||
negative for error (Z_DATA_ERROR or Z_MEM_ERROR). If data is requested past
|
||||
the end of the uncompressed data, then deflate_index_extract() will return a
|
||||
value less than len, indicating how much was actually read into buf. This
|
||||
function should not return a data error unless the file was modified since
|
||||
the index was generated, since deflate_index_build() validated all of the
|
||||
input. deflate_index_extract() will return Z_ERRNO if there is an error on
|
||||
reading or seeking the input file. */
|
||||
int deflate_index_extract(FILE *in, struct deflate_index *index, off_t offset,
|
||||
unsigned char *buf, int len);
|
||||
// Deallocate an index built by deflate_index_build().
|
||||
void deflate_index_free(struct deflate_index *index);
|
||||
|
4
3rdparty/zlib/gzclose.c
vendored
4
3rdparty/zlib/gzclose.c
vendored
@ -8,9 +8,7 @@
|
||||
/* gzclose() is in a separate file so that it is linked in only if it is used.
|
||||
That way the other gzclose functions can be used instead to avoid linking in
|
||||
unneeded compression or decompression routines. */
|
||||
int ZEXPORT gzclose(file)
|
||||
gzFile file;
|
||||
{
|
||||
int ZEXPORT gzclose(gzFile file) {
|
||||
#ifndef NO_GZCOMPRESS
|
||||
gz_statep state;
|
||||
|
||||
|
23
3rdparty/zlib/gzguts.h
vendored
23
3rdparty/zlib/gzguts.h
vendored
@ -7,9 +7,8 @@
|
||||
# ifndef _LARGEFILE_SOURCE
|
||||
# define _LARGEFILE_SOURCE 1
|
||||
# endif
|
||||
# ifdef _FILE_OFFSET_BITS
|
||||
# undef _FILE_OFFSET_BITS
|
||||
# endif
|
||||
# undef _FILE_OFFSET_BITS
|
||||
# undef _TIME_BITS
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_HIDDEN
|
||||
@ -119,8 +118,8 @@
|
||||
|
||||
/* gz* functions always use library allocation functions */
|
||||
#ifndef STDC
|
||||
extern voidp malloc OF((uInt size));
|
||||
extern void free OF((voidpf ptr));
|
||||
extern voidp malloc(uInt size);
|
||||
extern void free(voidpf ptr);
|
||||
#endif
|
||||
|
||||
/* get errno and strerror definition */
|
||||
@ -138,10 +137,10 @@
|
||||
|
||||
/* provide prototypes for these when building zlib without LFS */
|
||||
#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
|
||||
ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
|
||||
ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
|
||||
ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
|
||||
ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
|
||||
ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
|
||||
ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int);
|
||||
ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
|
||||
ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
|
||||
#endif
|
||||
|
||||
/* default memLevel */
|
||||
@ -203,9 +202,9 @@ typedef struct {
|
||||
typedef gz_state FAR *gz_statep;
|
||||
|
||||
/* shared functions */
|
||||
void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
|
||||
void ZLIB_INTERNAL gz_error(gz_statep, int, const char *);
|
||||
#if defined UNDER_CE
|
||||
char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
|
||||
char ZLIB_INTERNAL *gz_strwinerror(DWORD error);
|
||||
#endif
|
||||
|
||||
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
|
||||
@ -214,6 +213,6 @@ char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
|
||||
#ifdef INT_MAX
|
||||
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
|
||||
#else
|
||||
unsigned ZLIB_INTERNAL gz_intmax OF((void));
|
||||
unsigned ZLIB_INTERNAL gz_intmax(void);
|
||||
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
|
||||
#endif
|
||||
|
101
3rdparty/zlib/gzlib.c
vendored
101
3rdparty/zlib/gzlib.c
vendored
@ -15,10 +15,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Local functions */
|
||||
local void gz_reset OF((gz_statep));
|
||||
local gzFile gz_open OF((const void *, int, const char *));
|
||||
|
||||
#if defined UNDER_CE
|
||||
|
||||
/* Map the Windows error number in ERROR to a locale-dependent error message
|
||||
@ -30,9 +26,7 @@ local gzFile gz_open OF((const void *, int, const char *));
|
||||
|
||||
The gz_strwinerror function does not change the current setting of
|
||||
GetLastError. */
|
||||
char ZLIB_INTERNAL *gz_strwinerror (error)
|
||||
DWORD error;
|
||||
{
|
||||
char ZLIB_INTERNAL *gz_strwinerror(DWORD error) {
|
||||
static char buf[1024];
|
||||
|
||||
wchar_t *msgbuf;
|
||||
@ -72,9 +66,7 @@ char ZLIB_INTERNAL *gz_strwinerror (error)
|
||||
#endif /* UNDER_CE */
|
||||
|
||||
/* Reset gzip file state */
|
||||
local void gz_reset(state)
|
||||
gz_statep state;
|
||||
{
|
||||
local void gz_reset(gz_statep state) {
|
||||
state->x.have = 0; /* no output data available */
|
||||
if (state->mode == GZ_READ) { /* for reading ... */
|
||||
state->eof = 0; /* not at end of file */
|
||||
@ -90,11 +82,7 @@ local void gz_reset(state)
|
||||
}
|
||||
|
||||
/* Open a gzip file either by name or file descriptor. */
|
||||
local gzFile gz_open(path, fd, mode)
|
||||
const void *path;
|
||||
int fd;
|
||||
const char *mode;
|
||||
{
|
||||
local gzFile gz_open(const void *path, int fd, const char *mode) {
|
||||
gz_statep state;
|
||||
z_size_t len;
|
||||
int oflag;
|
||||
@ -269,26 +257,17 @@ local gzFile gz_open(path, fd, mode)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
gzFile ZEXPORT gzopen(path, mode)
|
||||
const char *path;
|
||||
const char *mode;
|
||||
{
|
||||
gzFile ZEXPORT gzopen(const char *path, const char *mode) {
|
||||
return gz_open(path, -1, mode);
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
gzFile ZEXPORT gzopen64(path, mode)
|
||||
const char *path;
|
||||
const char *mode;
|
||||
{
|
||||
gzFile ZEXPORT gzopen64(const char *path, const char *mode) {
|
||||
return gz_open(path, -1, mode);
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
gzFile ZEXPORT gzdopen(fd, mode)
|
||||
int fd;
|
||||
const char *mode;
|
||||
{
|
||||
gzFile ZEXPORT gzdopen(int fd, const char *mode) {
|
||||
char *path; /* identifier for error messages */
|
||||
gzFile gz;
|
||||
|
||||
@ -306,19 +285,13 @@ gzFile ZEXPORT gzdopen(fd, mode)
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
#ifdef WIDECHAR
|
||||
gzFile ZEXPORT gzopen_w(path, mode)
|
||||
const wchar_t *path;
|
||||
const char *mode;
|
||||
{
|
||||
gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode) {
|
||||
return gz_open(path, -2, mode);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzbuffer(file, size)
|
||||
gzFile file;
|
||||
unsigned size;
|
||||
{
|
||||
int ZEXPORT gzbuffer(gzFile file, unsigned size) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure and check integrity */
|
||||
@ -335,16 +308,14 @@ int ZEXPORT gzbuffer(file, size)
|
||||
/* check and set requested size */
|
||||
if ((size << 1) < size)
|
||||
return -1; /* need to be able to double it */
|
||||
if (size < 2)
|
||||
size = 2; /* need two bytes to check magic header */
|
||||
if (size < 8)
|
||||
size = 8; /* needed to behave well with flushing */
|
||||
state->want = size;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzrewind(file)
|
||||
gzFile file;
|
||||
{
|
||||
int ZEXPORT gzrewind(gzFile file) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure */
|
||||
@ -365,11 +336,7 @@ int ZEXPORT gzrewind(file)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
z_off64_t ZEXPORT gzseek64(file, offset, whence)
|
||||
gzFile file;
|
||||
z_off64_t offset;
|
||||
int whence;
|
||||
{
|
||||
z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence) {
|
||||
unsigned n;
|
||||
z_off64_t ret;
|
||||
gz_statep state;
|
||||
@ -442,11 +409,7 @@ z_off64_t ZEXPORT gzseek64(file, offset, whence)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
z_off_t ZEXPORT gzseek(file, offset, whence)
|
||||
gzFile file;
|
||||
z_off_t offset;
|
||||
int whence;
|
||||
{
|
||||
z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence) {
|
||||
z_off64_t ret;
|
||||
|
||||
ret = gzseek64(file, (z_off64_t)offset, whence);
|
||||
@ -454,9 +417,7 @@ z_off_t ZEXPORT gzseek(file, offset, whence)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
z_off64_t ZEXPORT gztell64(file)
|
||||
gzFile file;
|
||||
{
|
||||
z_off64_t ZEXPORT gztell64(gzFile file) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure and check integrity */
|
||||
@ -471,9 +432,7 @@ z_off64_t ZEXPORT gztell64(file)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
z_off_t ZEXPORT gztell(file)
|
||||
gzFile file;
|
||||
{
|
||||
z_off_t ZEXPORT gztell(gzFile file) {
|
||||
z_off64_t ret;
|
||||
|
||||
ret = gztell64(file);
|
||||
@ -481,9 +440,7 @@ z_off_t ZEXPORT gztell(file)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
z_off64_t ZEXPORT gzoffset64(file)
|
||||
gzFile file;
|
||||
{
|
||||
z_off64_t ZEXPORT gzoffset64(gzFile file) {
|
||||
z_off64_t offset;
|
||||
gz_statep state;
|
||||
|
||||
@ -504,9 +461,7 @@ z_off64_t ZEXPORT gzoffset64(file)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
z_off_t ZEXPORT gzoffset(file)
|
||||
gzFile file;
|
||||
{
|
||||
z_off_t ZEXPORT gzoffset(gzFile file) {
|
||||
z_off64_t ret;
|
||||
|
||||
ret = gzoffset64(file);
|
||||
@ -514,9 +469,7 @@ z_off_t ZEXPORT gzoffset(file)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzeof(file)
|
||||
gzFile file;
|
||||
{
|
||||
int ZEXPORT gzeof(gzFile file) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure and check integrity */
|
||||
@ -531,10 +484,7 @@ int ZEXPORT gzeof(file)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
const char * ZEXPORT gzerror(file, errnum)
|
||||
gzFile file;
|
||||
int *errnum;
|
||||
{
|
||||
const char * ZEXPORT gzerror(gzFile file, int *errnum) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure and check integrity */
|
||||
@ -552,9 +502,7 @@ const char * ZEXPORT gzerror(file, errnum)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
void ZEXPORT gzclearerr(file)
|
||||
gzFile file;
|
||||
{
|
||||
void ZEXPORT gzclearerr(gzFile file) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure and check integrity */
|
||||
@ -578,11 +526,7 @@ void ZEXPORT gzclearerr(file)
|
||||
memory). Simply save the error message as a static string. If there is an
|
||||
allocation failure constructing the error message, then convert the error to
|
||||
out of memory. */
|
||||
void ZLIB_INTERNAL gz_error(state, err, msg)
|
||||
gz_statep state;
|
||||
int err;
|
||||
const char *msg;
|
||||
{
|
||||
void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) {
|
||||
/* free previously allocated message and clear */
|
||||
if (state->msg != NULL) {
|
||||
if (state->err != Z_MEM_ERROR)
|
||||
@ -624,8 +568,7 @@ void ZLIB_INTERNAL gz_error(state, err, msg)
|
||||
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 ZLIB_INTERNAL gz_intmax()
|
||||
{
|
||||
unsigned ZLIB_INTERNAL gz_intmax(void) {
|
||||
unsigned p, q;
|
||||
|
||||
p = 1;
|
||||
|
96
3rdparty/zlib/gzread.c
vendored
96
3rdparty/zlib/gzread.c
vendored
@ -5,25 +5,12 @@
|
||||
|
||||
#include "gzguts.h"
|
||||
|
||||
/* Local functions */
|
||||
local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *));
|
||||
local int gz_avail OF((gz_statep));
|
||||
local int gz_look OF((gz_statep));
|
||||
local int gz_decomp OF((gz_statep));
|
||||
local int gz_fetch OF((gz_statep));
|
||||
local int gz_skip OF((gz_statep, z_off64_t));
|
||||
local z_size_t gz_read OF((gz_statep, voidp, z_size_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.
|
||||
This function needs to loop on read(), since read() is not guaranteed to
|
||||
read the number of bytes requested, depending on the type of descriptor. */
|
||||
local int gz_load(state, buf, len, have)
|
||||
gz_statep state;
|
||||
unsigned char *buf;
|
||||
unsigned len;
|
||||
unsigned *have;
|
||||
{
|
||||
local int gz_load(gz_statep state, unsigned char *buf, unsigned len,
|
||||
unsigned *have) {
|
||||
int ret;
|
||||
unsigned get, max = ((unsigned)-1 >> 2) + 1;
|
||||
|
||||
@ -53,9 +40,7 @@ local int gz_load(state, buf, len, have)
|
||||
If strm->avail_in != 0, then the current data is moved to the beginning of
|
||||
the input buffer, and then the remainder of the buffer is loaded with the
|
||||
available data from the input file. */
|
||||
local int gz_avail(state)
|
||||
gz_statep state;
|
||||
{
|
||||
local int gz_avail(gz_statep state) {
|
||||
unsigned got;
|
||||
z_streamp strm = &(state->strm);
|
||||
|
||||
@ -88,9 +73,7 @@ local int gz_avail(state)
|
||||
case, all further file reads will be directly to either the output buffer or
|
||||
a user buffer. If decompressing, the inflate state will be initialized.
|
||||
gz_look() will return 0 on success or -1 on failure. */
|
||||
local int gz_look(state)
|
||||
gz_statep state;
|
||||
{
|
||||
local int gz_look(gz_statep state) {
|
||||
z_streamp strm = &(state->strm);
|
||||
|
||||
/* allocate read buffers and inflate memory */
|
||||
@ -157,11 +140,9 @@ local int gz_look(state)
|
||||
the output buffer is larger than the input buffer, which also assures
|
||||
space for gzungetc() */
|
||||
state->x.next = state->out;
|
||||
if (strm->avail_in) {
|
||||
memcpy(state->x.next, strm->next_in, strm->avail_in);
|
||||
state->x.have = strm->avail_in;
|
||||
strm->avail_in = 0;
|
||||
}
|
||||
memcpy(state->x.next, strm->next_in, strm->avail_in);
|
||||
state->x.have = strm->avail_in;
|
||||
strm->avail_in = 0;
|
||||
state->how = COPY;
|
||||
state->direct = 1;
|
||||
return 0;
|
||||
@ -172,9 +153,7 @@ local int gz_look(state)
|
||||
data. If the gzip stream completes, state->how is reset to LOOK to look for
|
||||
the next gzip stream or raw data, once state->x.have is depleted. Returns 0
|
||||
on success, -1 on failure. */
|
||||
local int gz_decomp(state)
|
||||
gz_statep state;
|
||||
{
|
||||
local int gz_decomp(gz_statep state) {
|
||||
int ret = Z_OK;
|
||||
unsigned had;
|
||||
z_streamp strm = &(state->strm);
|
||||
@ -226,9 +205,7 @@ local int gz_decomp(state)
|
||||
looked for to determine whether to copy or decompress. Returns -1 on error,
|
||||
otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the
|
||||
end of the input file has been reached and all data has been processed. */
|
||||
local int gz_fetch(state)
|
||||
gz_statep state;
|
||||
{
|
||||
local int gz_fetch(gz_statep state) {
|
||||
z_streamp strm = &(state->strm);
|
||||
|
||||
do {
|
||||
@ -256,10 +233,7 @@ local int gz_fetch(state)
|
||||
}
|
||||
|
||||
/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */
|
||||
local int gz_skip(state, len)
|
||||
gz_statep state;
|
||||
z_off64_t len;
|
||||
{
|
||||
local int gz_skip(gz_statep state, z_off64_t len) {
|
||||
unsigned n;
|
||||
|
||||
/* skip over len bytes or reach end-of-file, whichever comes first */
|
||||
@ -291,11 +265,7 @@ local int gz_skip(state, len)
|
||||
input. Return the number of bytes read. If zero is returned, either the
|
||||
end of file was reached, or there was an error. state->err must be
|
||||
consulted in that case to determine which. */
|
||||
local z_size_t gz_read(state, buf, len)
|
||||
gz_statep state;
|
||||
voidp buf;
|
||||
z_size_t len;
|
||||
{
|
||||
local z_size_t gz_read(gz_statep state, voidp buf, z_size_t len) {
|
||||
z_size_t got;
|
||||
unsigned n;
|
||||
|
||||
@ -372,11 +342,7 @@ local z_size_t gz_read(state, buf, len)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzread(file, buf, len)
|
||||
gzFile file;
|
||||
voidp buf;
|
||||
unsigned len;
|
||||
{
|
||||
int ZEXPORT gzread(gzFile file, voidp buf, unsigned len) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure */
|
||||
@ -408,12 +374,7 @@ int ZEXPORT gzread(file, buf, len)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
z_size_t ZEXPORT gzfread(buf, size, nitems, file)
|
||||
voidp buf;
|
||||
z_size_t size;
|
||||
z_size_t nitems;
|
||||
gzFile file;
|
||||
{
|
||||
z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, gzFile file) {
|
||||
z_size_t len;
|
||||
gz_statep state;
|
||||
|
||||
@ -444,9 +405,7 @@ z_size_t ZEXPORT gzfread(buf, size, nitems, file)
|
||||
#else
|
||||
# undef gzgetc
|
||||
#endif
|
||||
int ZEXPORT gzgetc(file)
|
||||
gzFile file;
|
||||
{
|
||||
int ZEXPORT gzgetc(gzFile file) {
|
||||
unsigned char buf[1];
|
||||
gz_statep state;
|
||||
|
||||
@ -471,17 +430,12 @@ int ZEXPORT gzgetc(file)
|
||||
return gz_read(state, buf, 1) < 1 ? -1 : buf[0];
|
||||
}
|
||||
|
||||
int ZEXPORT gzgetc_(file)
|
||||
gzFile file;
|
||||
{
|
||||
int ZEXPORT gzgetc_(gzFile file) {
|
||||
return gzgetc(file);
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzungetc(c, file)
|
||||
int c;
|
||||
gzFile file;
|
||||
{
|
||||
int ZEXPORT gzungetc(int c, gzFile file) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure */
|
||||
@ -489,6 +443,10 @@ int ZEXPORT gzungetc(c, file)
|
||||
return -1;
|
||||
state = (gz_statep)file;
|
||||
|
||||
/* in case this was just opened, set up the input buffer */
|
||||
if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0)
|
||||
(void)gz_look(state);
|
||||
|
||||
/* check that we're reading and that there's no (serious) error */
|
||||
if (state->mode != GZ_READ ||
|
||||
(state->err != Z_OK && state->err != Z_BUF_ERROR))
|
||||
@ -538,11 +496,7 @@ int ZEXPORT gzungetc(c, file)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
char * ZEXPORT gzgets(file, buf, len)
|
||||
gzFile file;
|
||||
char *buf;
|
||||
int len;
|
||||
{
|
||||
char * ZEXPORT gzgets(gzFile file, char *buf, int len) {
|
||||
unsigned left, n;
|
||||
char *str;
|
||||
unsigned char *eol;
|
||||
@ -602,9 +556,7 @@ char * ZEXPORT gzgets(file, buf, len)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzdirect(file)
|
||||
gzFile file;
|
||||
{
|
||||
int ZEXPORT gzdirect(gzFile file) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure */
|
||||
@ -622,9 +574,7 @@ int ZEXPORT gzdirect(file)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzclose_r(file)
|
||||
gzFile file;
|
||||
{
|
||||
int ZEXPORT gzclose_r(gzFile file) {
|
||||
int ret, err;
|
||||
gz_statep state;
|
||||
|
||||
|
84
3rdparty/zlib/gzwrite.c
vendored
84
3rdparty/zlib/gzwrite.c
vendored
@ -5,18 +5,10 @@
|
||||
|
||||
#include "gzguts.h"
|
||||
|
||||
/* 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_off64_t));
|
||||
local z_size_t gz_write OF((gz_statep, voidpc, z_size_t));
|
||||
|
||||
/* Initialize state for writing a gzip file. Mark initialization by setting
|
||||
state->size to non-zero. Return -1 on a memory allocation failure, or 0 on
|
||||
success. */
|
||||
local int gz_init(state)
|
||||
gz_statep state;
|
||||
{
|
||||
local int gz_init(gz_statep state) {
|
||||
int ret;
|
||||
z_streamp strm = &(state->strm);
|
||||
|
||||
@ -70,10 +62,7 @@ local int gz_init(state)
|
||||
deflate() flush value. If flush is Z_FINISH, then the deflate() state is
|
||||
reset to start a new gzip stream. If gz->direct is true, then simply write
|
||||
to the output file without compressing, and ignore flush. */
|
||||
local int gz_comp(state, flush)
|
||||
gz_statep state;
|
||||
int flush;
|
||||
{
|
||||
local int gz_comp(gz_statep state, int flush) {
|
||||
int ret, writ;
|
||||
unsigned have, put, max = ((unsigned)-1 >> 2) + 1;
|
||||
z_streamp strm = &(state->strm);
|
||||
@ -151,10 +140,7 @@ local int gz_comp(state, flush)
|
||||
|
||||
/* Compress len zeros to output. Return -1 on a write error or memory
|
||||
allocation failure by gz_comp(), or 0 on success. */
|
||||
local int gz_zero(state, len)
|
||||
gz_statep state;
|
||||
z_off64_t len;
|
||||
{
|
||||
local int gz_zero(gz_statep state, z_off64_t len) {
|
||||
int first;
|
||||
unsigned n;
|
||||
z_streamp strm = &(state->strm);
|
||||
@ -184,11 +170,7 @@ local int gz_zero(state, len)
|
||||
|
||||
/* Write len bytes from buf to file. Return the number of bytes written. If
|
||||
the returned value is less than len, then there was an error. */
|
||||
local z_size_t gz_write(state, buf, len)
|
||||
gz_statep state;
|
||||
voidpc buf;
|
||||
z_size_t len;
|
||||
{
|
||||
local z_size_t gz_write(gz_statep state, voidpc buf, z_size_t len) {
|
||||
z_size_t put = len;
|
||||
|
||||
/* if len is zero, avoid unnecessary operations */
|
||||
@ -252,11 +234,7 @@ local z_size_t gz_write(state, buf, len)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzwrite(file, buf, len)
|
||||
gzFile file;
|
||||
voidpc buf;
|
||||
unsigned len;
|
||||
{
|
||||
int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure */
|
||||
@ -280,12 +258,8 @@ int ZEXPORT gzwrite(file, buf, len)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
z_size_t ZEXPORT gzfwrite(buf, size, nitems, file)
|
||||
voidpc buf;
|
||||
z_size_t size;
|
||||
z_size_t nitems;
|
||||
gzFile file;
|
||||
{
|
||||
z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, z_size_t nitems,
|
||||
gzFile file) {
|
||||
z_size_t len;
|
||||
gz_statep state;
|
||||
|
||||
@ -310,10 +284,7 @@ z_size_t ZEXPORT gzfwrite(buf, size, nitems, file)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzputc(file, c)
|
||||
gzFile file;
|
||||
int c;
|
||||
{
|
||||
int ZEXPORT gzputc(gzFile file, int c) {
|
||||
unsigned have;
|
||||
unsigned char buf[1];
|
||||
gz_statep state;
|
||||
@ -358,10 +329,7 @@ int ZEXPORT gzputc(file, c)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzputs(file, s)
|
||||
gzFile file;
|
||||
const char *s;
|
||||
{
|
||||
int ZEXPORT gzputs(gzFile file, const char *s) {
|
||||
z_size_t len, put;
|
||||
gz_statep state;
|
||||
|
||||
@ -388,8 +356,7 @@ int ZEXPORT gzputs(file, s)
|
||||
#include <stdarg.h>
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
|
||||
{
|
||||
int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) {
|
||||
int len;
|
||||
unsigned left;
|
||||
char *next;
|
||||
@ -460,8 +427,7 @@ int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
|
||||
return len;
|
||||
}
|
||||
|
||||
int ZEXPORTVA gzprintf(gzFile file, const char *format, ...)
|
||||
{
|
||||
int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) {
|
||||
va_list va;
|
||||
int ret;
|
||||
|
||||
@ -474,13 +440,10 @@ int ZEXPORTVA gzprintf(gzFile file, const char *format, ...)
|
||||
#else /* !STDC && !Z_HAVE_STDARG_H */
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
|
||||
a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
|
||||
gzFile file;
|
||||
const char *format;
|
||||
int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
|
||||
a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
|
||||
{
|
||||
int ZEXPORTVA gzprintf(gzFile file, const char *format, int a1, int a2, int a3,
|
||||
int a4, int a5, int a6, int a7, int a8, int a9, int a10,
|
||||
int a11, int a12, int a13, int a14, int a15, int a16,
|
||||
int a17, int a18, int a19, int a20) {
|
||||
unsigned len, left;
|
||||
char *next;
|
||||
gz_statep state;
|
||||
@ -562,10 +525,7 @@ int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
|
||||
#endif
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzflush(file, flush)
|
||||
gzFile file;
|
||||
int flush;
|
||||
{
|
||||
int ZEXPORT gzflush(gzFile file, int flush) {
|
||||
gz_statep state;
|
||||
|
||||
/* get internal structure */
|
||||
@ -594,11 +554,7 @@ int ZEXPORT gzflush(file, flush)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzsetparams(file, level, strategy)
|
||||
gzFile file;
|
||||
int level;
|
||||
int strategy;
|
||||
{
|
||||
int ZEXPORT gzsetparams(gzFile file, int level, int strategy) {
|
||||
gz_statep state;
|
||||
z_streamp strm;
|
||||
|
||||
@ -609,7 +565,7 @@ int ZEXPORT gzsetparams(file, level, strategy)
|
||||
strm = &(state->strm);
|
||||
|
||||
/* 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 || state->direct)
|
||||
return Z_STREAM_ERROR;
|
||||
|
||||
/* if no change is requested, then do nothing */
|
||||
@ -636,9 +592,7 @@ int ZEXPORT gzsetparams(file, level, strategy)
|
||||
}
|
||||
|
||||
/* -- see zlib.h -- */
|
||||
int ZEXPORT gzclose_w(file)
|
||||
gzFile file;
|
||||
{
|
||||
int ZEXPORT gzclose_w(gzFile file) {
|
||||
int ret = Z_OK;
|
||||
gz_statep state;
|
||||
|
||||
|
47
3rdparty/zlib/infback.c
vendored
47
3rdparty/zlib/infback.c
vendored
@ -15,9 +15,6 @@
|
||||
#include "inflate.h"
|
||||
#include "inffast.h"
|
||||
|
||||
/* function prototypes */
|
||||
local void fixedtables OF((struct inflate_state FAR *state));
|
||||
|
||||
/*
|
||||
strm provides memory allocation functions in zalloc and zfree, or
|
||||
Z_NULL to use the library memory allocation functions.
|
||||
@ -25,13 +22,9 @@ local void fixedtables OF((struct inflate_state FAR *state));
|
||||
windowBits is in the range 8..15, and window is a user-supplied
|
||||
window and output buffer that is 2**windowBits bytes.
|
||||
*/
|
||||
int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
|
||||
z_streamp strm;
|
||||
int windowBits;
|
||||
unsigned char FAR *window;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{
|
||||
int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits,
|
||||
unsigned char FAR *window, const char *version,
|
||||
int stream_size) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
|
||||
@ -66,6 +59,7 @@ int stream_size;
|
||||
state->window = window;
|
||||
state->wnext = 0;
|
||||
state->whave = 0;
|
||||
state->sane = 1;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
@ -79,9 +73,7 @@ int stream_size;
|
||||
used for threaded applications, since the rewriting of the tables and virgin
|
||||
may not be thread-safe.
|
||||
*/
|
||||
local void fixedtables(state)
|
||||
struct inflate_state FAR *state;
|
||||
{
|
||||
local void fixedtables(struct inflate_state FAR *state) {
|
||||
#ifdef BUILDFIXED
|
||||
static int virgin = 1;
|
||||
static code *lenfix, *distfix;
|
||||
@ -247,13 +239,8 @@ struct inflate_state FAR *state;
|
||||
inflateBack() can also return Z_STREAM_ERROR if the input parameters
|
||||
are not correct, i.e. strm is Z_NULL or the state was not initialized.
|
||||
*/
|
||||
int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
|
||||
z_streamp strm;
|
||||
in_func in;
|
||||
void FAR *in_desc;
|
||||
out_func out;
|
||||
void FAR *out_desc;
|
||||
{
|
||||
int ZEXPORT inflateBack(z_streamp strm, in_func in, void FAR *in_desc,
|
||||
out_func out, void FAR *out_desc) {
|
||||
struct inflate_state FAR *state;
|
||||
z_const unsigned char FAR *next; /* next input */
|
||||
unsigned char FAR *put; /* next output */
|
||||
@ -605,33 +592,33 @@ void FAR *out_desc;
|
||||
break;
|
||||
|
||||
case DONE:
|
||||
/* inflate stream terminated properly -- write leftover output */
|
||||
/* inflate stream terminated properly */
|
||||
ret = Z_STREAM_END;
|
||||
if (left < state->wsize) {
|
||||
if (out(out_desc, state->window, state->wsize - left))
|
||||
ret = Z_BUF_ERROR;
|
||||
}
|
||||
goto inf_leave;
|
||||
|
||||
case BAD:
|
||||
ret = Z_DATA_ERROR;
|
||||
goto inf_leave;
|
||||
|
||||
default: /* can't happen, but makes compilers happy */
|
||||
default:
|
||||
/* can't happen, but makes compilers happy */
|
||||
ret = Z_STREAM_ERROR;
|
||||
goto inf_leave;
|
||||
}
|
||||
|
||||
/* Return unused input */
|
||||
/* Write leftover output and return unused input */
|
||||
inf_leave:
|
||||
if (left < state->wsize) {
|
||||
if (out(out_desc, state->window, state->wsize - left) &&
|
||||
ret == Z_STREAM_END)
|
||||
ret = Z_BUF_ERROR;
|
||||
}
|
||||
strm->next_in = next;
|
||||
strm->avail_in = have;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateBackEnd(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
int ZEXPORT inflateBackEnd(z_streamp strm) {
|
||||
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
|
||||
return Z_STREAM_ERROR;
|
||||
ZFREE(strm, strm->state);
|
||||
|
5
3rdparty/zlib/inffast.c
vendored
5
3rdparty/zlib/inffast.c
vendored
@ -47,10 +47,7 @@
|
||||
requires strm->avail_out >= 258 for each loop to avoid checking for
|
||||
output space.
|
||||
*/
|
||||
void ZLIB_INTERNAL inflate_fast(strm, start)
|
||||
z_streamp strm;
|
||||
unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
{
|
||||
void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) {
|
||||
struct inflate_state FAR *state;
|
||||
z_const unsigned char FAR *in; /* local strm->next_in */
|
||||
z_const unsigned char FAR *last; /* have enough input while in < last */
|
||||
|
2
3rdparty/zlib/inffast.h
vendored
2
3rdparty/zlib/inffast.h
vendored
@ -8,4 +8,4 @@
|
||||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
|
||||
void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start);
|
||||
|
136
3rdparty/zlib/inflate.c
vendored
136
3rdparty/zlib/inflate.c
vendored
@ -91,20 +91,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* function prototypes */
|
||||
local int inflateStateCheck OF((z_streamp strm));
|
||||
local void fixedtables OF((struct inflate_state FAR *state));
|
||||
local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
|
||||
unsigned copy));
|
||||
#ifdef BUILDFIXED
|
||||
void makefixed OF((void));
|
||||
#endif
|
||||
local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
|
||||
unsigned len));
|
||||
|
||||
local int inflateStateCheck(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
local int inflateStateCheck(z_streamp strm) {
|
||||
struct inflate_state FAR *state;
|
||||
if (strm == Z_NULL ||
|
||||
strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
|
||||
@ -116,9 +103,7 @@ z_streamp strm;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateResetKeep(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
int ZEXPORT inflateResetKeep(z_streamp strm) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
@ -142,9 +127,7 @@ z_streamp strm;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateReset(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
int ZEXPORT inflateReset(z_streamp strm) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
@ -155,10 +138,7 @@ z_streamp strm;
|
||||
return inflateResetKeep(strm);
|
||||
}
|
||||
|
||||
int ZEXPORT inflateReset2(strm, windowBits)
|
||||
z_streamp strm;
|
||||
int windowBits;
|
||||
{
|
||||
int ZEXPORT inflateReset2(z_streamp strm, int windowBits) {
|
||||
int wrap;
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
@ -168,6 +148,8 @@ int windowBits;
|
||||
|
||||
/* extract wrap request from windowBits parameter */
|
||||
if (windowBits < 0) {
|
||||
if (windowBits < -15)
|
||||
return Z_STREAM_ERROR;
|
||||
wrap = 0;
|
||||
windowBits = -windowBits;
|
||||
}
|
||||
@ -193,12 +175,8 @@ int windowBits;
|
||||
return inflateReset(strm);
|
||||
}
|
||||
|
||||
int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
|
||||
z_streamp strm;
|
||||
int windowBits;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{
|
||||
int ZEXPORT inflateInit2_(z_streamp strm, int windowBits,
|
||||
const char *version, int stream_size) {
|
||||
int ret;
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
@ -237,22 +215,17 @@ int stream_size;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateInit_(strm, version, stream_size)
|
||||
z_streamp strm;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{
|
||||
int ZEXPORT inflateInit_(z_streamp strm, const char *version,
|
||||
int stream_size) {
|
||||
return inflateInit2_(strm, DEF_WBITS, version, stream_size);
|
||||
}
|
||||
|
||||
int ZEXPORT inflatePrime(strm, bits, value)
|
||||
z_streamp strm;
|
||||
int bits;
|
||||
int value;
|
||||
{
|
||||
int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
if (bits == 0)
|
||||
return Z_OK;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (bits < 0) {
|
||||
state->hold = 0;
|
||||
@ -276,9 +249,7 @@ int value;
|
||||
used for threaded applications, since the rewriting of the tables and virgin
|
||||
may not be thread-safe.
|
||||
*/
|
||||
local void fixedtables(state)
|
||||
struct inflate_state FAR *state;
|
||||
{
|
||||
local void fixedtables(struct inflate_state FAR *state) {
|
||||
#ifdef BUILDFIXED
|
||||
static int virgin = 1;
|
||||
static code *lenfix, *distfix;
|
||||
@ -340,7 +311,7 @@ struct inflate_state FAR *state;
|
||||
|
||||
a.out > inffixed.h
|
||||
*/
|
||||
void makefixed()
|
||||
void makefixed(void)
|
||||
{
|
||||
unsigned low, size;
|
||||
struct inflate_state state;
|
||||
@ -394,11 +365,7 @@ void makefixed()
|
||||
output will fall in the output data, making match copies simpler and faster.
|
||||
The advantage may be dependent on the size of the processor's data caches.
|
||||
*/
|
||||
local int updatewindow(strm, end, copy)
|
||||
z_streamp strm;
|
||||
const Bytef *end;
|
||||
unsigned copy;
|
||||
{
|
||||
local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) {
|
||||
struct inflate_state FAR *state;
|
||||
unsigned dist;
|
||||
|
||||
@ -620,10 +587,7 @@ unsigned copy;
|
||||
will return Z_BUF_ERROR if it has not reached the end of the stream.
|
||||
*/
|
||||
|
||||
int ZEXPORT inflate(strm, flush)
|
||||
z_streamp strm;
|
||||
int flush;
|
||||
{
|
||||
int ZEXPORT inflate(z_streamp strm, int flush) {
|
||||
struct inflate_state FAR *state;
|
||||
z_const unsigned char FAR *next; /* next input */
|
||||
unsigned char FAR *put; /* next output */
|
||||
@ -764,8 +728,9 @@ int flush;
|
||||
if (copy > have) copy = have;
|
||||
if (copy) {
|
||||
if (state->head != Z_NULL &&
|
||||
state->head->extra != Z_NULL) {
|
||||
len = state->head->extra_len - state->length;
|
||||
state->head->extra != Z_NULL &&
|
||||
(len = state->head->extra_len - state->length) <
|
||||
state->head->extra_max) {
|
||||
zmemcpy(state->head->extra + len, next,
|
||||
len + copy > state->head->extra_max ?
|
||||
state->head->extra_max - len : copy);
|
||||
@ -1298,9 +1263,7 @@ int flush;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateEnd(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
int ZEXPORT inflateEnd(z_streamp strm) {
|
||||
struct inflate_state FAR *state;
|
||||
if (inflateStateCheck(strm))
|
||||
return Z_STREAM_ERROR;
|
||||
@ -1312,11 +1275,8 @@ z_streamp strm;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
|
||||
z_streamp strm;
|
||||
Bytef *dictionary;
|
||||
uInt *dictLength;
|
||||
{
|
||||
int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary,
|
||||
uInt *dictLength) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
/* check state */
|
||||
@ -1335,11 +1295,8 @@ uInt *dictLength;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
|
||||
z_streamp strm;
|
||||
const Bytef *dictionary;
|
||||
uInt dictLength;
|
||||
{
|
||||
int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary,
|
||||
uInt dictLength) {
|
||||
struct inflate_state FAR *state;
|
||||
unsigned long dictid;
|
||||
int ret;
|
||||
@ -1370,10 +1327,7 @@ uInt dictLength;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateGetHeader(strm, head)
|
||||
z_streamp strm;
|
||||
gz_headerp head;
|
||||
{
|
||||
int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
/* check state */
|
||||
@ -1398,11 +1352,8 @@ gz_headerp head;
|
||||
called again with more data and the *have state. *have is initialized to
|
||||
zero for the first call.
|
||||
*/
|
||||
local unsigned syncsearch(have, buf, len)
|
||||
unsigned FAR *have;
|
||||
const unsigned char FAR *buf;
|
||||
unsigned len;
|
||||
{
|
||||
local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf,
|
||||
unsigned len) {
|
||||
unsigned got;
|
||||
unsigned next;
|
||||
|
||||
@ -1421,9 +1372,7 @@ unsigned len;
|
||||
return next;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateSync(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
int ZEXPORT inflateSync(z_streamp strm) {
|
||||
unsigned len; /* number of bytes to look at or looked at */
|
||||
int flags; /* temporary to save header status */
|
||||
unsigned long in, out; /* temporary to save total_in and total_out */
|
||||
@ -1479,9 +1428,7 @@ z_streamp strm;
|
||||
block. When decompressing, PPP checks that at the end of input packet,
|
||||
inflate is waiting for these length bytes.
|
||||
*/
|
||||
int ZEXPORT inflateSyncPoint(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
int ZEXPORT inflateSyncPoint(z_streamp strm) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
@ -1489,10 +1436,7 @@ z_streamp strm;
|
||||
return state->mode == STORED && state->bits == 0;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateCopy(dest, source)
|
||||
z_streamp dest;
|
||||
z_streamp source;
|
||||
{
|
||||
int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) {
|
||||
struct inflate_state FAR *state;
|
||||
struct inflate_state FAR *copy;
|
||||
unsigned char FAR *window;
|
||||
@ -1536,10 +1480,7 @@ z_streamp source;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateUndermine(strm, subvert)
|
||||
z_streamp strm;
|
||||
int subvert;
|
||||
{
|
||||
int ZEXPORT inflateUndermine(z_streamp strm, int subvert) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
@ -1554,10 +1495,7 @@ int subvert;
|
||||
#endif
|
||||
}
|
||||
|
||||
int ZEXPORT inflateValidate(strm, check)
|
||||
z_streamp strm;
|
||||
int check;
|
||||
{
|
||||
int ZEXPORT inflateValidate(z_streamp strm, int check) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
@ -1569,9 +1507,7 @@ int check;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
long ZEXPORT inflateMark(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
long ZEXPORT inflateMark(z_streamp strm) {
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm))
|
||||
@ -1582,9 +1518,7 @@ z_streamp strm;
|
||||
(state->mode == MATCH ? state->was - state->length : 0));
|
||||
}
|
||||
|
||||
unsigned long ZEXPORT inflateCodesUsed(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) {
|
||||
struct inflate_state FAR *state;
|
||||
if (inflateStateCheck(strm)) return (unsigned long)-1;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user