merge conflicts
This commit is contained in:
parent
b84f96bdde
commit
6db8c6e988
209
common/dist/zlib/algorithm.txt
vendored
209
common/dist/zlib/algorithm.txt
vendored
@ -1,209 +0,0 @@
|
||||
1. Compression algorithm (deflate)
|
||||
|
||||
The deflation algorithm used by gzip (also zip and zlib) is a variation of
|
||||
LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
|
||||
the input data. The second occurrence of a string is replaced by a
|
||||
pointer to the previous string, in the form of a pair (distance,
|
||||
length). Distances are limited to 32K bytes, and lengths are limited
|
||||
to 258 bytes. When a string does not occur anywhere in the previous
|
||||
32K bytes, it is emitted as a sequence of literal bytes. (In this
|
||||
description, `string' must be taken as an arbitrary sequence of bytes,
|
||||
and is not restricted to printable characters.)
|
||||
|
||||
Literals or match lengths are compressed with one Huffman tree, and
|
||||
match distances are compressed with another tree. The trees are stored
|
||||
in a compact form at the start of each block. The blocks can have any
|
||||
size (except that the compressed data for one block must fit in
|
||||
available memory). A block is terminated when deflate() determines that
|
||||
it would be useful to start another block with fresh trees. (This is
|
||||
somewhat similar to the behavior of LZW-based _compress_.)
|
||||
|
||||
Duplicated strings are found using a hash table. All input strings of
|
||||
length 3 are inserted in the hash table. A hash index is computed for
|
||||
the next 3 bytes. If the hash chain for this index is not empty, all
|
||||
strings in the chain are compared with the current input string, and
|
||||
the longest match is selected.
|
||||
|
||||
The hash chains are searched starting with the most recent strings, to
|
||||
favor small distances and thus take advantage of the Huffman encoding.
|
||||
The hash chains are singly linked. There are no deletions from the
|
||||
hash chains, the algorithm simply discards matches that are too old.
|
||||
|
||||
To avoid a worst-case situation, very long hash chains are arbitrarily
|
||||
truncated at a certain length, determined by a runtime option (level
|
||||
parameter of deflateInit). So deflate() does not always find the longest
|
||||
possible match but generally finds a match which is long enough.
|
||||
|
||||
deflate() also defers the selection of matches with a lazy evaluation
|
||||
mechanism. After a match of length N has been found, deflate() searches for
|
||||
a longer match at the next input byte. If a longer match is found, the
|
||||
previous match is truncated to a length of one (thus producing a single
|
||||
literal byte) and the process of lazy evaluation begins again. Otherwise,
|
||||
the original match is kept, and the next match search is attempted only N
|
||||
steps later.
|
||||
|
||||
The lazy match evaluation is also subject to a runtime parameter. If
|
||||
the current match is long enough, deflate() reduces the search for a longer
|
||||
match, thus speeding up the whole process. If compression ratio is more
|
||||
important than speed, deflate() attempts a complete second search even if
|
||||
the first match is already long enough.
|
||||
|
||||
The lazy match evaluation is not performed for the fastest compression
|
||||
modes (level parameter 1 to 3). For these fast modes, new strings
|
||||
are inserted in the hash table only when no match was found, or
|
||||
when the match is not too long. This degrades the compression ratio
|
||||
but saves time since there are both fewer insertions and fewer searches.
|
||||
|
||||
|
||||
2. Decompression algorithm (inflate)
|
||||
|
||||
2.1 Introduction
|
||||
|
||||
The key question is how to represent a Huffman code (or any prefix code) so
|
||||
that you can decode fast. The most important characteristic is that shorter
|
||||
codes are much more common than longer codes, so pay attention to decoding the
|
||||
short codes fast, and let the long codes take longer to decode.
|
||||
|
||||
inflate() sets up a first level table that covers some number of bits of
|
||||
input less than the length of longest code. It gets that many bits from the
|
||||
stream, and looks it up in the table. The table will tell if the next
|
||||
code is that many bits or less and how many, and if it is, it will tell
|
||||
the value, else it will point to the next level table for which inflate()
|
||||
grabs more bits and tries to decode a longer code.
|
||||
|
||||
How many bits to make the first lookup is a tradeoff between the time it
|
||||
takes to decode and the time it takes to build the table. If building the
|
||||
table took no time (and if you had infinite memory), then there would only
|
||||
be a first level table to cover all the way to the longest code. However,
|
||||
building the table ends up taking a lot longer for more bits since short
|
||||
codes are replicated many times in such a table. What inflate() does is
|
||||
simply to make the number of bits in the first table a variable, and then
|
||||
to set that variable for the maximum speed.
|
||||
|
||||
For inflate, which has 286 possible codes for the literal/length tree, the size
|
||||
of the first table is nine bits. Also the distance trees have 30 possible
|
||||
values, and the size of the first table is six bits. Note that for each of
|
||||
those cases, the table ended up one bit longer than the ``average'' code
|
||||
length, i.e. the code length of an approximately flat code which would be a
|
||||
little more than eight bits for 286 symbols and a little less than five bits
|
||||
for 30 symbols.
|
||||
|
||||
|
||||
2.2 More details on the inflate table lookup
|
||||
|
||||
Ok, you want to know what this cleverly obfuscated inflate tree actually
|
||||
looks like. You are correct that it's not a Huffman tree. It is simply a
|
||||
lookup table for the first, let's say, nine bits of a Huffman symbol. The
|
||||
symbol could be as short as one bit or as long as 15 bits. If a particular
|
||||
symbol is shorter than nine bits, then that symbol's translation is duplicated
|
||||
in all those entries that start with that symbol's bits. For example, if the
|
||||
symbol is four bits, then it's duplicated 32 times in a nine-bit table. If a
|
||||
symbol is nine bits long, it appears in the table once.
|
||||
|
||||
If the symbol is longer than nine bits, then that entry in the table points
|
||||
to another similar table for the remaining bits. Again, there are duplicated
|
||||
entries as needed. The idea is that most of the time the symbol will be short
|
||||
and there will only be one table look up. (That's whole idea behind data
|
||||
compression in the first place.) For the less frequent long symbols, there
|
||||
will be two lookups. If you had a compression method with really long
|
||||
symbols, you could have as many levels of lookups as is efficient. For
|
||||
inflate, two is enough.
|
||||
|
||||
So a table entry either points to another table (in which case nine bits in
|
||||
the above example are gobbled), or it contains the translation for the symbol
|
||||
and the number of bits to gobble. Then you start again with the next
|
||||
ungobbled bit.
|
||||
|
||||
You may wonder: why not just have one lookup table for how ever many bits the
|
||||
longest symbol is? The reason is that if you do that, you end up spending
|
||||
more time filling in duplicate symbol entries than you do actually decoding.
|
||||
At least for deflate's output that generates new trees every several 10's of
|
||||
kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code
|
||||
would take too long if you're only decoding several thousand symbols. At the
|
||||
other extreme, you could make a new table for every bit in the code. In fact,
|
||||
that's essentially a Huffman tree. But then you spend two much time
|
||||
traversing the tree while decoding, even for short symbols.
|
||||
|
||||
So the number of bits for the first lookup table is a trade of the time to
|
||||
fill out the table vs. the time spent looking at the second level and above of
|
||||
the table.
|
||||
|
||||
Here is an example, scaled down:
|
||||
|
||||
The code being decoded, with 10 symbols, from 1 to 6 bits long:
|
||||
|
||||
A: 0
|
||||
B: 10
|
||||
C: 1100
|
||||
D: 11010
|
||||
E: 11011
|
||||
F: 11100
|
||||
G: 11101
|
||||
H: 11110
|
||||
I: 111110
|
||||
J: 111111
|
||||
|
||||
Let's make the first table three bits long (eight entries):
|
||||
|
||||
000: A,1
|
||||
001: A,1
|
||||
010: A,1
|
||||
011: A,1
|
||||
100: B,2
|
||||
101: B,2
|
||||
110: -> table X (gobble 3 bits)
|
||||
111: -> table Y (gobble 3 bits)
|
||||
|
||||
Each entry is what the bits decode as and how many bits that is, i.e. how
|
||||
many bits to gobble. Or the entry points to another table, with the number of
|
||||
bits to gobble implicit in the size of the table.
|
||||
|
||||
Table X is two bits long since the longest code starting with 110 is five bits
|
||||
long:
|
||||
|
||||
00: C,1
|
||||
01: C,1
|
||||
10: D,2
|
||||
11: E,2
|
||||
|
||||
Table Y is three bits long since the longest code starting with 111 is six
|
||||
bits long:
|
||||
|
||||
000: F,2
|
||||
001: F,2
|
||||
010: G,2
|
||||
011: G,2
|
||||
100: H,2
|
||||
101: H,2
|
||||
110: I,3
|
||||
111: J,3
|
||||
|
||||
So what we have here are three tables with a total of 20 entries that had to
|
||||
be constructed. That's compared to 64 entries for a single table. Or
|
||||
compared to 16 entries for a Huffman tree (six two entry tables and one four
|
||||
entry table). Assuming that the code ideally represents the probability of
|
||||
the symbols, it takes on the average 1.25 lookups per symbol. That's compared
|
||||
to one lookup for the single table, or 1.66 lookups per symbol for the
|
||||
Huffman tree.
|
||||
|
||||
There, I think that gives you a picture of what's going on. For inflate, the
|
||||
meaning of a particular symbol is often more than just a letter. It can be a
|
||||
byte (a "literal"), or it can be either a length or a distance which
|
||||
indicates a base value and a number of bits to fetch after the code that is
|
||||
added to the base value. Or it might be the special end-of-block code. The
|
||||
data structures created in inftrees.c try to encode all that information
|
||||
compactly in the tables.
|
||||
|
||||
|
||||
Jean-loup Gailly Mark Adler
|
||||
jloup@gzip.org madler@alumni.caltech.edu
|
||||
|
||||
|
||||
References:
|
||||
|
||||
[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data
|
||||
Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
|
||||
pp. 337-343.
|
||||
|
||||
``DEFLATE Compressed Data Format Specification'' available in
|
||||
http://www.ietf.org/rfc/rfc1951.txt
|
132
common/dist/zlib/as400/bndsrc
vendored
132
common/dist/zlib/as400/bndsrc
vendored
@ -1,132 +0,0 @@
|
||||
STRPGMEXP PGMLVL(*CURRENT) SIGNATURE('ZLIB')
|
||||
|
||||
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
||||
/* Version 1.1.3 entry points. */
|
||||
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE ADLER32 ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("adler32")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("compress")
|
||||
EXPORT SYMBOL("compress2")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE CRC32 ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("crc32")
|
||||
EXPORT SYMBOL("get_crc_table")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("deflate")
|
||||
EXPORT SYMBOL("deflateEnd")
|
||||
EXPORT SYMBOL("deflateSetDictionary")
|
||||
EXPORT SYMBOL("deflateCopy")
|
||||
EXPORT SYMBOL("deflateReset")
|
||||
EXPORT SYMBOL("deflateParams")
|
||||
EXPORT SYMBOL("deflatePrime")
|
||||
EXPORT SYMBOL("deflateInit_")
|
||||
EXPORT SYMBOL("deflateInit2_")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("gzopen")
|
||||
EXPORT SYMBOL("gzdopen")
|
||||
EXPORT SYMBOL("gzsetparams")
|
||||
EXPORT SYMBOL("gzread")
|
||||
EXPORT SYMBOL("gzwrite")
|
||||
EXPORT SYMBOL("gzprintf")
|
||||
EXPORT SYMBOL("gzputs")
|
||||
EXPORT SYMBOL("gzgets")
|
||||
EXPORT SYMBOL("gzputc")
|
||||
EXPORT SYMBOL("gzgetc")
|
||||
EXPORT SYMBOL("gzflush")
|
||||
EXPORT SYMBOL("gzseek")
|
||||
EXPORT SYMBOL("gzrewind")
|
||||
EXPORT SYMBOL("gztell")
|
||||
EXPORT SYMBOL("gzeof")
|
||||
EXPORT SYMBOL("gzclose")
|
||||
EXPORT SYMBOL("gzerror")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("inflate")
|
||||
EXPORT SYMBOL("inflateEnd")
|
||||
EXPORT SYMBOL("inflateSetDictionary")
|
||||
EXPORT SYMBOL("inflateSync")
|
||||
EXPORT SYMBOL("inflateReset")
|
||||
EXPORT SYMBOL("inflateInit_")
|
||||
EXPORT SYMBOL("inflateInit2_")
|
||||
EXPORT SYMBOL("inflateSyncPoint")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE UNCOMPR ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("uncompress")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("zlibVersion")
|
||||
EXPORT SYMBOL("zError")
|
||||
|
||||
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
||||
/* Version 1.2.1 additional entry points. */
|
||||
/*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE COMPRESS ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("compressBound")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE DEFLATE ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("deflateBound")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE GZIO ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("gzungetc")
|
||||
EXPORT SYMBOL("gzclearerr")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE INFBACK ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("inflateBack")
|
||||
EXPORT SYMBOL("inflateBackEnd")
|
||||
EXPORT SYMBOL("inflateBackInit_")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE INFLATE ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("inflateCopy")
|
||||
|
||||
/********************************************************************/
|
||||
/* *MODULE ZUTIL ZLIB 01/02/01 00:15:09 */
|
||||
/********************************************************************/
|
||||
|
||||
EXPORT SYMBOL("zlibCompileFlags")
|
||||
|
||||
ENDPGMEXP
|
123
common/dist/zlib/as400/compile.clp
vendored
123
common/dist/zlib/as400/compile.clp
vendored
@ -1,123 +0,0 @@
|
||||
/******************************************************************************/
|
||||
/* */
|
||||
/* ZLIB */
|
||||
/* */
|
||||
/* Compile sources into modules and link them into a service program. */
|
||||
/* */
|
||||
/******************************************************************************/
|
||||
|
||||
PGM
|
||||
|
||||
/* Configuration adjustable parameters. */
|
||||
|
||||
DCL VAR(&SRCLIB) TYPE(*CHAR) LEN(10) +
|
||||
VALUE('ZLIB') /* Source library. */
|
||||
DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10) +
|
||||
VALUE('SOURCES') /* Source member file. */
|
||||
DCL VAR(&CTLFILE) TYPE(*CHAR) LEN(10) +
|
||||
VALUE('TOOLS') /* Control member file. */
|
||||
|
||||
DCL VAR(&MODLIB) TYPE(*CHAR) LEN(10) +
|
||||
VALUE('ZLIB') /* Module library. */
|
||||
|
||||
DCL VAR(&SRVLIB) TYPE(*CHAR) LEN(10) +
|
||||
VALUE('LGPL') /* Service program library. */
|
||||
|
||||
DCL VAR(&CFLAGS) TYPE(*CHAR) +
|
||||
VALUE('OPTIMIZE(40)') /* Compile options. */
|
||||
|
||||
|
||||
/* Working storage. */
|
||||
|
||||
DCL VAR(&CMDLEN) TYPE(*DEC) LEN(15 5) VALUE(300) /* Command length. */
|
||||
DCL VAR(&CMD) TYPE(*CHAR) LEN(512)
|
||||
|
||||
|
||||
/* Compile sources into modules. */
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/ADLER32) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/COMPRESS) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/CRC32) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/DEFLATE) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/GZIO) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/INFBACK) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/INFFAST) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/INFLATE) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/INFTREES) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/TREES) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/UNCOMPR) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
CHGVAR VAR(&CMD) VALUE('CRTCMOD MODULE(' *TCAT &MODLIB *TCAT +
|
||||
'/ZUTIL) SRCFILE(' *TCAT +
|
||||
&SRCLIB *TCAT '/' *TCAT &SRCFILE *TCAT +
|
||||
') SYSIFCOPT(*IFSIO)' *BCAT &CFLAGS)
|
||||
CALL PGM(QCMDEXC) PARM(&CMD &CMDLEN)
|
||||
|
||||
|
||||
/* Link modules into a service program. */
|
||||
|
||||
CRTSRVPGM SRVPGM(&SRVLIB/ZLIB) +
|
||||
MODULE(&MODLIB/ADLER32 &MODLIB/COMPRESS +
|
||||
&MODLIB/CRC32 &MODLIB/DEFLATE +
|
||||
&MODLIB/GZIO &MODLIB/INFBACK +
|
||||
&MODLIB/INFFAST &MODLIB/INFLATE +
|
||||
&MODLIB/INFTREES &MODLIB/TREES +
|
||||
&MODLIB/UNCOMPR &MODLIB/ZUTIL) +
|
||||
SRCFILE(&SRCLIB/&CTLFILE) SRCMBR(BNDSRC) +
|
||||
TEXT('ZLIB 1.2.3') TGTRLS(V4R4M0)
|
||||
|
||||
ENDPGM
|
111
common/dist/zlib/as400/readme.txt
vendored
111
common/dist/zlib/as400/readme.txt
vendored
@ -1,111 +0,0 @@
|
||||
ZLIB version 1.2.3 for AS400 installation instructions
|
||||
|
||||
I) From an AS400 *SAVF file:
|
||||
|
||||
1) Unpacking archive to an AS400 save file
|
||||
|
||||
On the AS400:
|
||||
|
||||
_ Create the ZLIB AS400 library:
|
||||
|
||||
CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library')
|
||||
|
||||
_ Create a work save file, for example:
|
||||
|
||||
CRTSAVF FILE(ZLIB/ZLIBSAVF)
|
||||
|
||||
On a PC connected to the target AS400:
|
||||
|
||||
_ Unpack the save file image to a PC file "ZLIBSAVF"
|
||||
_ Upload this file into the save file on the AS400, for example
|
||||
using ftp in BINARY mode.
|
||||
|
||||
|
||||
2) Populating the ZLIB AS400 source library
|
||||
|
||||
On the AS400:
|
||||
|
||||
_ Extract the saved objects into the ZLIB AS400 library using:
|
||||
|
||||
RSTOBJ OBJ(*ALL) SAVLIB(ZLIB) DEV(*SAVF) SAVF(ZLIB/ZLIBSAVF) RSTLIB(ZLIB)
|
||||
|
||||
|
||||
3) Customize installation:
|
||||
|
||||
_ Edit CL member ZLIB/TOOLS(COMPILE) and change parameters if needed,
|
||||
according to the comments.
|
||||
|
||||
_ Compile this member with:
|
||||
|
||||
CRTCLPGM PGM(ZLIB/COMPILE) SRCFILE(ZLIB/TOOLS) SRCMBR(COMPILE)
|
||||
|
||||
|
||||
4) Compile and generate the service program:
|
||||
|
||||
_ This can now be done by executing:
|
||||
|
||||
CALL PGM(ZLIB/COMPILE)
|
||||
|
||||
|
||||
|
||||
II) From the original source distribution:
|
||||
|
||||
1) On the AS400, create the source library:
|
||||
|
||||
CRTLIB LIB(ZLIB) TYPE(PROD) TEXT('ZLIB compression API library')
|
||||
|
||||
2) Create the source files:
|
||||
|
||||
CRTSRCPF FILE(ZLIB/SOURCES) RCDLEN(112) TEXT('ZLIB library modules')
|
||||
CRTSRCPF FILE(ZLIB/H) RCDLEN(112) TEXT('ZLIB library includes')
|
||||
CRTSRCPF FILE(ZLIB/TOOLS) RCDLEN(112) TEXT('ZLIB library control utilities')
|
||||
|
||||
3) From the machine hosting the distribution files, upload them (with
|
||||
FTP in text mode, for example) according to the following table:
|
||||
|
||||
Original AS400 AS400 AS400 AS400
|
||||
file file member type description
|
||||
SOURCES Original ZLIB C subprogram sources
|
||||
adler32.c ADLER32 C ZLIB - Compute the Adler-32 checksum of a dta strm
|
||||
compress.c COMPRESS C ZLIB - Compress a memory buffer
|
||||
crc32.c CRC32 C ZLIB - Compute the CRC-32 of a data stream
|
||||
deflate.c DEFLATE C ZLIB - Compress data using the deflation algorithm
|
||||
gzio.c GZIO C ZLIB - IO on .gz files
|
||||
infback.c INFBACK C ZLIB - Inflate using a callback interface
|
||||
inffast.c INFFAST C ZLIB - Fast proc. literals & length/distance pairs
|
||||
inflate.c INFLATE C ZLIB - Interface to inflate modules
|
||||
inftrees.c INFTREES C ZLIB - Generate Huffman trees for efficient decode
|
||||
trees.c TREES C ZLIB - Output deflated data using Huffman coding
|
||||
uncompr.c UNCOMPR C ZLIB - Decompress a memory buffer
|
||||
zutil.c ZUTIL C ZLIB - Target dependent utility functions
|
||||
H Original ZLIB C and ILE/RPG include files
|
||||
crc32.h CRC32 C ZLIB - CRC32 tables
|
||||
deflate.h DEFLATE C ZLIB - Internal compression state
|
||||
inffast.h INFFAST C ZLIB - Header to use inffast.c
|
||||
inffixed.h INFFIXED C ZLIB - Table for decoding fixed codes
|
||||
inflate.h INFLATE C ZLIB - Internal inflate state definitions
|
||||
inftrees.h INFTREES C ZLIB - Header to use inftrees.c
|
||||
trees.h TREES C ZLIB - Created automatically with -DGEN_TREES_H
|
||||
zconf.h ZCONF C ZLIB - Compression library configuration
|
||||
zlib.h ZLIB C ZLIB - Compression library C user interface
|
||||
as400/zlib.inc ZLIB.INC RPGLE ZLIB - Compression library ILE RPG user interface
|
||||
zutil.h ZUTIL C ZLIB - Internal interface and configuration
|
||||
TOOLS Building source software & AS/400 README
|
||||
as400/bndsrc BNDSRC Entry point exportation list
|
||||
as400/compile.clp COMPILE CLP Compile sources & generate service program
|
||||
as400/readme.txt README TXT Installation instructions
|
||||
|
||||
4) Continue as in I)3).
|
||||
|
||||
|
||||
|
||||
|
||||
Notes: For AS400 ILE RPG programmers, a /copy member defining the ZLIB
|
||||
API prototypes for ILE RPG can be found in ZLIB/H(ZLIB.INC).
|
||||
Please read comments in this member for more information.
|
||||
|
||||
Remember that most foreign textual data are ASCII coded: this
|
||||
implementation does not handle conversion from/to ASCII, so
|
||||
text data code conversions must be done explicitely.
|
||||
|
||||
Always open zipped files in binary mode.
|
331
common/dist/zlib/as400/zlib.inc
vendored
331
common/dist/zlib/as400/zlib.inc
vendored
@ -1,331 +0,0 @@
|
||||
* ZLIB.INC - Interface to the general purpose compression library
|
||||
*
|
||||
* ILE RPG400 version by Patrick Monnerat, DATASPHERE.
|
||||
* Version 1.2.3
|
||||
*
|
||||
*
|
||||
* WARNING:
|
||||
* Procedures inflateInit(), inflateInit2(), deflateInit(),
|
||||
* deflateInit2() and inflateBackInit() need to be called with
|
||||
* two additional arguments:
|
||||
* the package version string and the stream control structure.
|
||||
* size. This is needed because RPG lacks some macro feature.
|
||||
* Call these procedures as:
|
||||
* inflateInit(...: ZLIB_VERSION: %size(z_stream))
|
||||
*
|
||||
/if not defined(ZLIB_H_)
|
||||
/define ZLIB_H_
|
||||
*
|
||||
**************************************************************************
|
||||
* Constants
|
||||
**************************************************************************
|
||||
*
|
||||
* Versioning information.
|
||||
*
|
||||
D ZLIB_VERSION C '1.2.3'
|
||||
D ZLIB_VERNUM C X'1230'
|
||||
*
|
||||
* Other equates.
|
||||
*
|
||||
D Z_NO_FLUSH C 0
|
||||
D Z_SYNC_FLUSH C 2
|
||||
D Z_FULL_FLUSH C 3
|
||||
D Z_FINISH C 4
|
||||
D Z_BLOCK C 5
|
||||
*
|
||||
D Z_OK C 0
|
||||
D Z_STREAM_END C 1
|
||||
D Z_NEED_DICT C 2
|
||||
D Z_ERRNO C -1
|
||||
D Z_STREAM_ERROR C -2
|
||||
D Z_DATA_ERROR C -3
|
||||
D Z_MEM_ERROR C -4
|
||||
D Z_BUF_ERROR C -5
|
||||
DZ_VERSION_ERROR C -6
|
||||
*
|
||||
D Z_NO_COMPRESSION...
|
||||
D C 0
|
||||
D Z_BEST_SPEED C 1
|
||||
D Z_BEST_COMPRESSION...
|
||||
D C 9
|
||||
D Z_DEFAULT_COMPRESSION...
|
||||
D C -1
|
||||
*
|
||||
D Z_FILTERED C 1
|
||||
D Z_HUFFMAN_ONLY C 2
|
||||
D Z_RLE C 3
|
||||
D Z_DEFAULT_STRATEGY...
|
||||
D C 0
|
||||
*
|
||||
D Z_BINARY C 0
|
||||
D Z_ASCII C 1
|
||||
D Z_UNKNOWN C 2
|
||||
*
|
||||
D Z_DEFLATED C 8
|
||||
*
|
||||
D Z_NULL C 0
|
||||
*
|
||||
**************************************************************************
|
||||
* Types
|
||||
**************************************************************************
|
||||
*
|
||||
D z_streamp S * Stream struct ptr
|
||||
D gzFile S * File pointer
|
||||
D z_off_t S 10i 0 Stream offsets
|
||||
*
|
||||
**************************************************************************
|
||||
* Structures
|
||||
**************************************************************************
|
||||
*
|
||||
* The GZIP encode/decode stream support structure.
|
||||
*
|
||||
D z_stream DS align based(z_streamp)
|
||||
D zs_next_in * Next input byte
|
||||
D zs_avail_in 10U 0 Byte cnt at next_in
|
||||
D zs_total_in 10U 0 Total bytes read
|
||||
D zs_next_out * Output buffer ptr
|
||||
D zs_avail_out 10U 0 Room left @ next_out
|
||||
D zs_total_out 10U 0 Total bytes written
|
||||
D zs_msg * Last errmsg or null
|
||||
D zs_state * Internal state
|
||||
D zs_zalloc * procptr Int. state allocator
|
||||
D zs_free * procptr Int. state dealloc.
|
||||
D zs_opaque * Private alloc. data
|
||||
D zs_data_type 10i 0 ASC/BIN best guess
|
||||
D zs_adler 10u 0 Uncompr. adler32 val
|
||||
D 10U 0 Reserved
|
||||
D 10U 0 Ptr. alignment
|
||||
*
|
||||
**************************************************************************
|
||||
* Utility function prototypes
|
||||
**************************************************************************
|
||||
*
|
||||
D compress PR 10I 0 extproc('compress')
|
||||
D dest 32767 options(*varsize) Destination buffer
|
||||
D destLen 10U 0 Destination length
|
||||
D source 32767 const options(*varsize) Source buffer
|
||||
D sourceLen 10u 0 value Source length
|
||||
*
|
||||
D compress2 PR 10I 0 extproc('compress2')
|
||||
D dest 32767 options(*varsize) Destination buffer
|
||||
D destLen 10U 0 Destination length
|
||||
D source 32767 const options(*varsize) Source buffer
|
||||
D sourceLen 10U 0 value Source length
|
||||
D level 10I 0 value Compression level
|
||||
*
|
||||
D compressBound PR 10U 0 extproc('compressBound')
|
||||
D sourceLen 10U 0 value
|
||||
*
|
||||
D uncompress PR 10I 0 extproc('uncompress')
|
||||
D dest 32767 options(*varsize) Destination buffer
|
||||
D destLen 10U 0 Destination length
|
||||
D source 32767 const options(*varsize) Source buffer
|
||||
D sourceLen 10U 0 value Source length
|
||||
*
|
||||
D gzopen PR extproc('gzopen')
|
||||
D like(gzFile)
|
||||
D path * value options(*string) File pathname
|
||||
D mode * value options(*string) Open mode
|
||||
*
|
||||
D gzdopen PR extproc('gzdopen')
|
||||
D like(gzFile)
|
||||
D fd 10i 0 value File descriptor
|
||||
D mode * value options(*string) Open mode
|
||||
*
|
||||
D gzsetparams PR 10I 0 extproc('gzsetparams')
|
||||
D file value like(gzFile) File pointer
|
||||
D level 10I 0 value
|
||||
D strategy 10i 0 value
|
||||
*
|
||||
D gzread PR 10I 0 extproc('gzread')
|
||||
D file value like(gzFile) File pointer
|
||||
D buf 32767 options(*varsize) Buffer
|
||||
D len 10u 0 value Buffer length
|
||||
*
|
||||
D gzwrite PR 10I 0 extproc('gzwrite')
|
||||
D file value like(gzFile) File pointer
|
||||
D buf 32767 const options(*varsize) Buffer
|
||||
D len 10u 0 value Buffer length
|
||||
*
|
||||
D gzputs PR 10I 0 extproc('gzputs')
|
||||
D file value like(gzFile) File pointer
|
||||
D s * value options(*string) String to output
|
||||
*
|
||||
D gzgets PR * extproc('gzgets')
|
||||
D file value like(gzFile) File pointer
|
||||
D buf 32767 options(*varsize) Read buffer
|
||||
D len 10i 0 value Buffer length
|
||||
*
|
||||
D gzflush PR 10i 0 extproc('gzflush')
|
||||
D file value like(gzFile) File pointer
|
||||
D flush 10I 0 value Type of flush
|
||||
*
|
||||
D gzseek PR extproc('gzseek')
|
||||
D like(z_off_t)
|
||||
D file value like(gzFile) File pointer
|
||||
D offset value like(z_off_t) Offset
|
||||
D whence 10i 0 value Origin
|
||||
*
|
||||
D gzrewind PR 10i 0 extproc('gzrewind')
|
||||
D file value like(gzFile) File pointer
|
||||
*
|
||||
D gztell PR extproc('gztell')
|
||||
D like(z_off_t)
|
||||
D file value like(gzFile) File pointer
|
||||
*
|
||||
D gzeof PR 10i 0 extproc('gzeof')
|
||||
D file value like(gzFile) File pointer
|
||||
*
|
||||
D gzclose PR 10i 0 extproc('gzclose')
|
||||
D file value like(gzFile) File pointer
|
||||
*
|
||||
D gzerror PR * extproc('gzerror') Error string
|
||||
D file value like(gzFile) File pointer
|
||||
D errnum 10I 0 Error code
|
||||
*
|
||||
D gzclearerr PR extproc('gzclearerr')
|
||||
D file value like(gzFile) File pointer
|
||||
*
|
||||
**************************************************************************
|
||||
* Basic function prototypes
|
||||
**************************************************************************
|
||||
*
|
||||
D zlibVersion PR * extproc('zlibVersion') Version string
|
||||
*
|
||||
D deflateInit PR 10I 0 extproc('deflateInit_') Init. compression
|
||||
D strm like(z_stream) Compression stream
|
||||
D level 10I 0 value Compression level
|
||||
D version * value options(*string) Version string
|
||||
D stream_size 10i 0 value Stream struct. size
|
||||
*
|
||||
D deflate PR 10I 0 extproc('deflate') Compress data
|
||||
D strm like(z_stream) Compression stream
|
||||
D flush 10I 0 value Flush type required
|
||||
*
|
||||
D deflateEnd PR 10I 0 extproc('deflateEnd') Termin. compression
|
||||
D strm like(z_stream) Compression stream
|
||||
*
|
||||
D inflateInit PR 10I 0 extproc('inflateInit_') Init. expansion
|
||||
D strm like(z_stream) Expansion stream
|
||||
D version * value options(*string) Version string
|
||||
D stream_size 10i 0 value Stream struct. size
|
||||
*
|
||||
D inflate PR 10I 0 extproc('inflate') Expand data
|
||||
D strm like(z_stream) Expansion stream
|
||||
D flush 10I 0 value Flush type required
|
||||
*
|
||||
D inflateEnd PR 10I 0 extproc('inflateEnd') Termin. expansion
|
||||
D strm like(z_stream) Expansion stream
|
||||
*
|
||||
**************************************************************************
|
||||
* Advanced function prototypes
|
||||
**************************************************************************
|
||||
*
|
||||
D deflateInit2 PR 10I 0 extproc('deflateInit2_') Init. compression
|
||||
D strm like(z_stream) Compression stream
|
||||
D level 10I 0 value Compression level
|
||||
D method 10I 0 value Compression method
|
||||
D windowBits 10I 0 value log2(window size)
|
||||
D memLevel 10I 0 value Mem/cmpress tradeoff
|
||||
D strategy 10I 0 value Compression stategy
|
||||
D version * value options(*string) Version string
|
||||
D stream_size 10i 0 value Stream struct. size
|
||||
*
|
||||
D deflateSetDictionary...
|
||||
D PR 10I 0 extproc('deflateSetDictionary') Init. dictionary
|
||||
D strm like(z_stream) Compression stream
|
||||
D dictionary 32767 const options(*varsize) Dictionary bytes
|
||||
D dictLength 10U 0 value Dictionary length
|
||||
*
|
||||
D deflateCopy PR 10I 0 extproc('deflateCopy') Compress strm 2 strm
|
||||
D dest like(z_stream) Destination stream
|
||||
D source like(z_stream) Source stream
|
||||
*
|
||||
D deflateReset PR 10I 0 extproc('deflateReset') End and init. stream
|
||||
D strm like(z_stream) Compression stream
|
||||
*
|
||||
D deflateParams PR 10I 0 extproc('deflateParams') Change level & strat
|
||||
D strm like(z_stream) Compression stream
|
||||
D level 10I 0 value Compression level
|
||||
D strategy 10I 0 value Compression stategy
|
||||
*
|
||||
D deflateBound PR 10U 0 extproc('deflateBound') Change level & strat
|
||||
D strm like(z_stream) Compression stream
|
||||
D sourcelen 10U 0 value Compression level
|
||||
*
|
||||
D deflatePrime PR 10I 0 extproc('deflatePrime') Change level & strat
|
||||
D strm like(z_stream) Compression stream
|
||||
D bits 10I 0 value Number of bits to insert
|
||||
D value 10I 0 value Bits to insert
|
||||
*
|
||||
D inflateInit2 PR 10I 0 extproc('inflateInit2_') Init. expansion
|
||||
D strm like(z_stream) Expansion stream
|
||||
D windowBits 10I 0 value log2(window size)
|
||||
D version * value options(*string) Version string
|
||||
D stream_size 10i 0 value Stream struct. size
|
||||
*
|
||||
D inflateSetDictionary...
|
||||
D PR 10I 0 extproc('inflateSetDictionary') Init. dictionary
|
||||
D strm like(z_stream) Expansion stream
|
||||
D dictionary 32767 const options(*varsize) Dictionary bytes
|
||||
D dictLength 10U 0 value Dictionary length
|
||||
*
|
||||
D inflateSync PR 10I 0 extproc('inflateSync') Sync. expansion
|
||||
D strm like(z_stream) Expansion stream
|
||||
*
|
||||
D inflateCopy PR 10I 0 extproc('inflateCopy')
|
||||
D dest like(z_stream) Destination stream
|
||||
D source like(z_stream) Source stream
|
||||
*
|
||||
D inflateReset PR 10I 0 extproc('inflateReset') End and init. stream
|
||||
D strm like(z_stream) Expansion stream
|
||||
*
|
||||
D inflateBackInit...
|
||||
D PR 10I 0 extproc('inflateBackInit_')
|
||||
D strm like(z_stream) Expansion stream
|
||||
D windowBits 10I 0 value Log2(buffer size)
|
||||
D window 32767 options(*varsize) Buffer
|
||||
D version * value options(*string) Version string
|
||||
D stream_size 10i 0 value Stream struct. size
|
||||
*
|
||||
D inflateBack PR 10I 0 extproc('inflateBack')
|
||||
D strm like(z_stream) Expansion stream
|
||||
D in * value procptr Input function
|
||||
D in_desc * value Input descriptor
|
||||
D out * value procptr Output function
|
||||
D out_desc * value Output descriptor
|
||||
*
|
||||
D inflateBackEnd PR 10I 0 extproc('inflateBackEnd')
|
||||
D strm like(z_stream) Expansion stream
|
||||
*
|
||||
D zlibCompileFlags...
|
||||
D PR 10U 0 extproc('zlibCompileFlags')
|
||||
*
|
||||
**************************************************************************
|
||||
* Checksum function prototypes
|
||||
**************************************************************************
|
||||
*
|
||||
D adler32 PR 10U 0 extproc('adler32') New checksum
|
||||
D adler 10U 0 value Old checksum
|
||||
D buf 32767 const options(*varsize) Bytes to accumulate
|
||||
D len 10U 0 value Buffer length
|
||||
*
|
||||
D crc32 PR 10U 0 extproc('crc32') New checksum
|
||||
D crc 10U 0 value Old checksum
|
||||
D buf 32767 const options(*varsize) Bytes to accumulate
|
||||
D len 10U 0 value Buffer length
|
||||
*
|
||||
**************************************************************************
|
||||
* Miscellaneous function prototypes
|
||||
**************************************************************************
|
||||
*
|
||||
D zError PR * extproc('zError') Error string
|
||||
D err 10I 0 value Error code
|
||||
*
|
||||
D inflateSyncPoint...
|
||||
D PR 10I 0 extproc('inflateSyncPoint')
|
||||
D strm like(z_stream) Expansion stream
|
||||
*
|
||||
D get_crc_table PR * extproc('get_crc_table') Ptr to ulongs
|
||||
*
|
||||
/endif
|
49
common/dist/zlib/compress.c
vendored
49
common/dist/zlib/compress.c
vendored
@ -1,11 +1,11 @@
|
||||
/* $NetBSD: compress.c,v 1.2 2006/01/27 00:45:27 christos Exp $ */
|
||||
/* $NetBSD: compress.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* compress.c -- compress a memory buffer
|
||||
* Copyright (C) 1995-2003 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
/* @(#) $Id: compress.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
#define ZLIB_INTERNAL
|
||||
#include "zlib.h"
|
||||
@ -30,16 +30,11 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
|
||||
{
|
||||
z_stream stream;
|
||||
int err;
|
||||
const uInt max = (uInt)-1;
|
||||
uLong left;
|
||||
|
||||
stream.next_in = __UNCONST(source);
|
||||
stream.avail_in = (uInt)sourceLen;
|
||||
#ifdef MAXSEG_64K
|
||||
/* Check for source > 64K on 16-bit machine: */
|
||||
if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
|
||||
#endif
|
||||
stream.next_out = dest;
|
||||
stream.avail_out = (uInt)*destLen;
|
||||
if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
|
||||
left = *destLen;
|
||||
*destLen = 0;
|
||||
|
||||
stream.zalloc = (alloc_func)0;
|
||||
stream.zfree = (free_func)0;
|
||||
@ -48,15 +43,26 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
|
||||
err = deflateInit(&stream, level);
|
||||
if (err != Z_OK) return err;
|
||||
|
||||
err = deflate(&stream, Z_FINISH);
|
||||
if (err != Z_STREAM_END) {
|
||||
deflateEnd(&stream);
|
||||
return err == Z_OK ? Z_BUF_ERROR : err;
|
||||
}
|
||||
*destLen = stream.total_out;
|
||||
stream.next_out = dest;
|
||||
stream.avail_out = 0;
|
||||
stream.next_in = __UNCONST(source);
|
||||
stream.avail_in = 0;
|
||||
|
||||
err = deflateEnd(&stream);
|
||||
return err;
|
||||
do {
|
||||
if (stream.avail_out == 0) {
|
||||
stream.avail_out = left > (uLong)max ? max : (uInt)left;
|
||||
left -= stream.avail_out;
|
||||
}
|
||||
if (stream.avail_in == 0) {
|
||||
stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen;
|
||||
sourceLen -= stream.avail_in;
|
||||
}
|
||||
err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH);
|
||||
} while (err == Z_OK);
|
||||
|
||||
*destLen = stream.total_out;
|
||||
deflateEnd(&stream);
|
||||
return err == Z_STREAM_END ? Z_OK : err;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
@ -77,5 +83,6 @@ int ZEXPORT compress (dest, destLen, source, sourceLen)
|
||||
uLong ZEXPORT compressBound (sourceLen)
|
||||
uLong sourceLen;
|
||||
{
|
||||
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
|
||||
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
|
||||
(sourceLen >> 25) + 13;
|
||||
}
|
||||
|
43
common/dist/zlib/contrib/asm586/README.586
vendored
43
common/dist/zlib/contrib/asm586/README.586
vendored
@ -1,43 +0,0 @@
|
||||
This is a patched version of zlib modified to use
|
||||
Pentium-optimized assembly code in the deflation algorithm. The files
|
||||
changed/added by this patch are:
|
||||
|
||||
README.586
|
||||
match.S
|
||||
|
||||
The effectiveness of these modifications is a bit marginal, as the
|
||||
program's bottleneck seems to be mostly L1-cache contention, for which
|
||||
there is no real way to work around without rewriting the basic
|
||||
algorithm. The speedup on average is around 5-10% (which is generally
|
||||
less than the amount of variance between subsequent executions).
|
||||
However, when used at level 9 compression, the cache contention can
|
||||
drop enough for the assembly version to achieve 10-20% speedup (and
|
||||
sometimes more, depending on the amount of overall redundancy in the
|
||||
files). Even here, though, cache contention can still be the limiting
|
||||
factor, depending on the nature of the program using the zlib library.
|
||||
This may also mean that better improvements will be seen on a Pentium
|
||||
with MMX, which suffers much less from L1-cache contention, but I have
|
||||
not yet verified this.
|
||||
|
||||
Note that this code has been tailored for the Pentium in particular,
|
||||
and will not perform well on the Pentium Pro (due to the use of a
|
||||
partial register in the inner loop).
|
||||
|
||||
If you are using an assembler other than GNU as, you will have to
|
||||
translate match.S to use your assembler's syntax. (Have fun.)
|
||||
|
||||
Brian Raiter
|
||||
breadbox@muppetlabs.com
|
||||
April, 1998
|
||||
|
||||
|
||||
Added for zlib 1.1.3:
|
||||
|
||||
The patches come from
|
||||
http://www.muppetlabs.com/~breadbox/software/assembly.html
|
||||
|
||||
To compile zlib with this asm file, copy match.S to the zlib directory
|
||||
then do:
|
||||
|
||||
CFLAGS="-O3 -DASMV" ./configure
|
||||
make OBJA=match.o
|
364
common/dist/zlib/contrib/asm586/match.S
vendored
364
common/dist/zlib/contrib/asm586/match.S
vendored
@ -1,364 +0,0 @@
|
||||
/* match.s -- Pentium-optimized version of longest_match()
|
||||
* Written for zlib 1.1.2
|
||||
* Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
|
||||
*
|
||||
* This is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License.
|
||||
*/
|
||||
|
||||
#ifndef NO_UNDERLINE
|
||||
#define match_init _match_init
|
||||
#define longest_match _longest_match
|
||||
#endif
|
||||
|
||||
#define MAX_MATCH (258)
|
||||
#define MIN_MATCH (3)
|
||||
#define MIN_LOOKAHEAD (MAX_MATCH + MIN_MATCH + 1)
|
||||
#define MAX_MATCH_8 ((MAX_MATCH + 7) & ~7)
|
||||
|
||||
/* stack frame offsets */
|
||||
|
||||
#define wmask 0 /* local copy of s->wmask */
|
||||
#define window 4 /* local copy of s->window */
|
||||
#define windowbestlen 8 /* s->window + bestlen */
|
||||
#define chainlenscanend 12 /* high word: current chain len */
|
||||
/* low word: last bytes sought */
|
||||
#define scanstart 16 /* first two bytes of string */
|
||||
#define scanalign 20 /* dword-misalignment of string */
|
||||
#define nicematch 24 /* a good enough match size */
|
||||
#define bestlen 28 /* size of best match so far */
|
||||
#define scan 32 /* ptr to string wanting match */
|
||||
|
||||
#define LocalVarsSize (36)
|
||||
/* saved ebx 36 */
|
||||
/* saved edi 40 */
|
||||
/* saved esi 44 */
|
||||
/* saved ebp 48 */
|
||||
/* return address 52 */
|
||||
#define deflatestate 56 /* the function arguments */
|
||||
#define curmatch 60
|
||||
|
||||
/* Offsets for fields in the deflate_state structure. These numbers
|
||||
* are calculated from the definition of deflate_state, with the
|
||||
* assumption that the compiler will dword-align the fields. (Thus,
|
||||
* changing the definition of deflate_state could easily cause this
|
||||
* program to crash horribly, without so much as a warning at
|
||||
* compile time. Sigh.)
|
||||
*/
|
||||
|
||||
/* All the +zlib1222add offsets are due to the addition of fields
|
||||
* in zlib in the deflate_state structure since the asm code was first written
|
||||
* (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
|
||||
* (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
|
||||
* if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
|
||||
*/
|
||||
|
||||
#define zlib1222add (8)
|
||||
|
||||
#define dsWSize (36+zlib1222add)
|
||||
#define dsWMask (44+zlib1222add)
|
||||
#define dsWindow (48+zlib1222add)
|
||||
#define dsPrev (56+zlib1222add)
|
||||
#define dsMatchLen (88+zlib1222add)
|
||||
#define dsPrevMatch (92+zlib1222add)
|
||||
#define dsStrStart (100+zlib1222add)
|
||||
#define dsMatchStart (104+zlib1222add)
|
||||
#define dsLookahead (108+zlib1222add)
|
||||
#define dsPrevLen (112+zlib1222add)
|
||||
#define dsMaxChainLen (116+zlib1222add)
|
||||
#define dsGoodMatch (132+zlib1222add)
|
||||
#define dsNiceMatch (136+zlib1222add)
|
||||
|
||||
|
||||
.file "match.S"
|
||||
|
||||
.globl match_init, longest_match
|
||||
|
||||
.text
|
||||
|
||||
/* uInt longest_match(deflate_state *deflatestate, IPos curmatch) */
|
||||
|
||||
longest_match:
|
||||
|
||||
/* Save registers that the compiler may be using, and adjust %esp to */
|
||||
/* make room for our stack frame. */
|
||||
|
||||
pushl %ebp
|
||||
pushl %edi
|
||||
pushl %esi
|
||||
pushl %ebx
|
||||
subl $LocalVarsSize, %esp
|
||||
|
||||
/* Retrieve the function arguments. %ecx will hold cur_match */
|
||||
/* throughout the entire function. %edx will hold the pointer to the */
|
||||
/* deflate_state structure during the function's setup (before */
|
||||
/* entering the main loop). */
|
||||
|
||||
movl deflatestate(%esp), %edx
|
||||
movl curmatch(%esp), %ecx
|
||||
|
||||
/* if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; */
|
||||
|
||||
movl dsNiceMatch(%edx), %eax
|
||||
movl dsLookahead(%edx), %ebx
|
||||
cmpl %eax, %ebx
|
||||
jl LookaheadLess
|
||||
movl %eax, %ebx
|
||||
LookaheadLess: movl %ebx, nicematch(%esp)
|
||||
|
||||
/* register Bytef *scan = s->window + s->strstart; */
|
||||
|
||||
movl dsWindow(%edx), %esi
|
||||
movl %esi, window(%esp)
|
||||
movl dsStrStart(%edx), %ebp
|
||||
lea (%esi,%ebp), %edi
|
||||
movl %edi, scan(%esp)
|
||||
|
||||
/* Determine how many bytes the scan ptr is off from being */
|
||||
/* dword-aligned. */
|
||||
|
||||
movl %edi, %eax
|
||||
negl %eax
|
||||
andl $3, %eax
|
||||
movl %eax, scanalign(%esp)
|
||||
|
||||
/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */
|
||||
/* s->strstart - (IPos)MAX_DIST(s) : NIL; */
|
||||
|
||||
movl dsWSize(%edx), %eax
|
||||
subl $MIN_LOOKAHEAD, %eax
|
||||
subl %eax, %ebp
|
||||
jg LimitPositive
|
||||
xorl %ebp, %ebp
|
||||
LimitPositive:
|
||||
|
||||
/* unsigned chain_length = s->max_chain_length; */
|
||||
/* if (s->prev_length >= s->good_match) { */
|
||||
/* chain_length >>= 2; */
|
||||
/* } */
|
||||
|
||||
movl dsPrevLen(%edx), %eax
|
||||
movl dsGoodMatch(%edx), %ebx
|
||||
cmpl %ebx, %eax
|
||||
movl dsMaxChainLen(%edx), %ebx
|
||||
jl LastMatchGood
|
||||
shrl $2, %ebx
|
||||
LastMatchGood:
|
||||
|
||||
/* chainlen is decremented once beforehand so that the function can */
|
||||
/* use the sign flag instead of the zero flag for the exit test. */
|
||||
/* It is then shifted into the high word, to make room for the scanend */
|
||||
/* scanend value, which it will always accompany. */
|
||||
|
||||
decl %ebx
|
||||
shll $16, %ebx
|
||||
|
||||
/* int best_len = s->prev_length; */
|
||||
|
||||
movl dsPrevLen(%edx), %eax
|
||||
movl %eax, bestlen(%esp)
|
||||
|
||||
/* Store the sum of s->window + best_len in %esi locally, and in %esi. */
|
||||
|
||||
addl %eax, %esi
|
||||
movl %esi, windowbestlen(%esp)
|
||||
|
||||
/* register ush scan_start = *(ushf*)scan; */
|
||||
/* register ush scan_end = *(ushf*)(scan+best_len-1); */
|
||||
|
||||
movw (%edi), %bx
|
||||
movw %bx, scanstart(%esp)
|
||||
movw -1(%edi,%eax), %bx
|
||||
movl %ebx, chainlenscanend(%esp)
|
||||
|
||||
/* Posf *prev = s->prev; */
|
||||
/* uInt wmask = s->w_mask; */
|
||||
|
||||
movl dsPrev(%edx), %edi
|
||||
movl dsWMask(%edx), %edx
|
||||
mov %edx, wmask(%esp)
|
||||
|
||||
/* Jump into the main loop. */
|
||||
|
||||
jmp LoopEntry
|
||||
|
||||
.balign 16
|
||||
|
||||
/* do {
|
||||
* match = s->window + cur_match;
|
||||
* if (*(ushf*)(match+best_len-1) != scan_end ||
|
||||
* *(ushf*)match != scan_start) continue;
|
||||
* [...]
|
||||
* } while ((cur_match = prev[cur_match & wmask]) > limit
|
||||
* && --chain_length != 0);
|
||||
*
|
||||
* Here is the inner loop of the function. The function will spend the
|
||||
* majority of its time in this loop, and majority of that time will
|
||||
* be spent in the first ten instructions.
|
||||
*
|
||||
* Within this loop:
|
||||
* %ebx = chainlenscanend - i.e., ((chainlen << 16) | scanend)
|
||||
* %ecx = curmatch
|
||||
* %edx = curmatch & wmask
|
||||
* %esi = windowbestlen - i.e., (window + bestlen)
|
||||
* %edi = prev
|
||||
* %ebp = limit
|
||||
*
|
||||
* Two optimization notes on the choice of instructions:
|
||||
*
|
||||
* The first instruction uses a 16-bit address, which costs an extra,
|
||||
* unpairable cycle. This is cheaper than doing a 32-bit access and
|
||||
* zeroing the high word, due to the 3-cycle misalignment penalty which
|
||||
* would occur half the time. This also turns out to be cheaper than
|
||||
* doing two separate 8-bit accesses, as the memory is so rarely in the
|
||||
* L1 cache.
|
||||
*
|
||||
* The window buffer, however, apparently spends a lot of time in the
|
||||
* cache, and so it is faster to retrieve the word at the end of the
|
||||
* match string with two 8-bit loads. The instructions that test the
|
||||
* word at the beginning of the match string, however, are executed
|
||||
* much less frequently, and there it was cheaper to use 16-bit
|
||||
* instructions, which avoided the necessity of saving off and
|
||||
* subsequently reloading one of the other registers.
|
||||
*/
|
||||
LookupLoop:
|
||||
/* 1 U & V */
|
||||
movw (%edi,%edx,2), %cx /* 2 U pipe */
|
||||
movl wmask(%esp), %edx /* 2 V pipe */
|
||||
cmpl %ebp, %ecx /* 3 U pipe */
|
||||
jbe LeaveNow /* 3 V pipe */
|
||||
subl $0x00010000, %ebx /* 4 U pipe */
|
||||
js LeaveNow /* 4 V pipe */
|
||||
LoopEntry: movb -1(%esi,%ecx), %al /* 5 U pipe */
|
||||
andl %ecx, %edx /* 5 V pipe */
|
||||
cmpb %bl, %al /* 6 U pipe */
|
||||
jnz LookupLoop /* 6 V pipe */
|
||||
movb (%esi,%ecx), %ah
|
||||
cmpb %bh, %ah
|
||||
jnz LookupLoop
|
||||
movl window(%esp), %eax
|
||||
movw (%eax,%ecx), %ax
|
||||
cmpw scanstart(%esp), %ax
|
||||
jnz LookupLoop
|
||||
|
||||
/* Store the current value of chainlen. */
|
||||
|
||||
movl %ebx, chainlenscanend(%esp)
|
||||
|
||||
/* Point %edi to the string under scrutiny, and %esi to the string we */
|
||||
/* are hoping to match it up with. In actuality, %esi and %edi are */
|
||||
/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */
|
||||
/* initialized to -(MAX_MATCH_8 - scanalign). */
|
||||
|
||||
movl window(%esp), %esi
|
||||
movl scan(%esp), %edi
|
||||
addl %ecx, %esi
|
||||
movl scanalign(%esp), %eax
|
||||
movl $(-MAX_MATCH_8), %edx
|
||||
lea MAX_MATCH_8(%edi,%eax), %edi
|
||||
lea MAX_MATCH_8(%esi,%eax), %esi
|
||||
|
||||
/* Test the strings for equality, 8 bytes at a time. At the end,
|
||||
* adjust %edx so that it is offset to the exact byte that mismatched.
|
||||
*
|
||||
* We already know at this point that the first three bytes of the
|
||||
* strings match each other, and they can be safely passed over before
|
||||
* starting the compare loop. So what this code does is skip over 0-3
|
||||
* bytes, as much as necessary in order to dword-align the %edi
|
||||
* pointer. (%esi will still be misaligned three times out of four.)
|
||||
*
|
||||
* It should be confessed that this loop usually does not represent
|
||||
* much of the total running time. Replacing it with a more
|
||||
* straightforward "rep cmpsb" would not drastically degrade
|
||||
* performance.
|
||||
*/
|
||||
LoopCmps:
|
||||
movl (%esi,%edx), %eax
|
||||
movl (%edi,%edx), %ebx
|
||||
xorl %ebx, %eax
|
||||
jnz LeaveLoopCmps
|
||||
movl 4(%esi,%edx), %eax
|
||||
movl 4(%edi,%edx), %ebx
|
||||
xorl %ebx, %eax
|
||||
jnz LeaveLoopCmps4
|
||||
addl $8, %edx
|
||||
jnz LoopCmps
|
||||
jmp LenMaximum
|
||||
LeaveLoopCmps4: addl $4, %edx
|
||||
LeaveLoopCmps: testl $0x0000FFFF, %eax
|
||||
jnz LenLower
|
||||
addl $2, %edx
|
||||
shrl $16, %eax
|
||||
LenLower: subb $1, %al
|
||||
adcl $0, %edx
|
||||
|
||||
/* Calculate the length of the match. If it is longer than MAX_MATCH, */
|
||||
/* then automatically accept it as the best possible match and leave. */
|
||||
|
||||
lea (%edi,%edx), %eax
|
||||
movl scan(%esp), %edi
|
||||
subl %edi, %eax
|
||||
cmpl $MAX_MATCH, %eax
|
||||
jge LenMaximum
|
||||
|
||||
/* If the length of the match is not longer than the best match we */
|
||||
/* have so far, then forget it and return to the lookup loop. */
|
||||
|
||||
movl deflatestate(%esp), %edx
|
||||
movl bestlen(%esp), %ebx
|
||||
cmpl %ebx, %eax
|
||||
jg LongerMatch
|
||||
movl chainlenscanend(%esp), %ebx
|
||||
movl windowbestlen(%esp), %esi
|
||||
movl dsPrev(%edx), %edi
|
||||
movl wmask(%esp), %edx
|
||||
andl %ecx, %edx
|
||||
jmp LookupLoop
|
||||
|
||||
/* s->match_start = cur_match; */
|
||||
/* best_len = len; */
|
||||
/* if (len >= nice_match) break; */
|
||||
/* scan_end = *(ushf*)(scan+best_len-1); */
|
||||
|
||||
LongerMatch: movl nicematch(%esp), %ebx
|
||||
movl %eax, bestlen(%esp)
|
||||
movl %ecx, dsMatchStart(%edx)
|
||||
cmpl %ebx, %eax
|
||||
jge LeaveNow
|
||||
movl window(%esp), %esi
|
||||
addl %eax, %esi
|
||||
movl %esi, windowbestlen(%esp)
|
||||
movl chainlenscanend(%esp), %ebx
|
||||
movw -1(%edi,%eax), %bx
|
||||
movl dsPrev(%edx), %edi
|
||||
movl %ebx, chainlenscanend(%esp)
|
||||
movl wmask(%esp), %edx
|
||||
andl %ecx, %edx
|
||||
jmp LookupLoop
|
||||
|
||||
/* Accept the current string, with the maximum possible length. */
|
||||
|
||||
LenMaximum: movl deflatestate(%esp), %edx
|
||||
movl $MAX_MATCH, bestlen(%esp)
|
||||
movl %ecx, dsMatchStart(%edx)
|
||||
|
||||
/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */
|
||||
/* return s->lookahead; */
|
||||
|
||||
LeaveNow:
|
||||
movl deflatestate(%esp), %edx
|
||||
movl bestlen(%esp), %ebx
|
||||
movl dsLookahead(%edx), %eax
|
||||
cmpl %eax, %ebx
|
||||
jg LookaheadRet
|
||||
movl %ebx, %eax
|
||||
LookaheadRet:
|
||||
|
||||
/* Restore the stack and return from whence we came. */
|
||||
|
||||
addl $LocalVarsSize, %esp
|
||||
popl %ebx
|
||||
popl %esi
|
||||
popl %edi
|
||||
popl %ebp
|
||||
match_init: ret
|
413
common/dist/zlib/contrib/masm686/match.asm
vendored
413
common/dist/zlib/contrib/masm686/match.asm
vendored
@ -1,413 +0,0 @@
|
||||
|
||||
; match.asm -- Pentium-Pro optimized version of longest_match()
|
||||
;
|
||||
; Updated for zlib 1.1.3 and converted to MASM 6.1x
|
||||
; Copyright (C) 2000 Dan Higdon <hdan@kinesoft.com>
|
||||
; and Chuck Walbourn <chuckw@kinesoft.com>
|
||||
; Corrections by Cosmin Truta <cosmint@cs.ubbcluj.ro>
|
||||
;
|
||||
; This is free software; you can redistribute it and/or modify it
|
||||
; under the terms of the GNU General Public License.
|
||||
|
||||
; Based on match.S
|
||||
; Written for zlib 1.1.2
|
||||
; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
|
||||
;
|
||||
; Modified by Gilles Vollant (2005) for add gzhead and gzindex
|
||||
|
||||
.686P
|
||||
.MODEL FLAT
|
||||
|
||||
;===========================================================================
|
||||
; EQUATES
|
||||
;===========================================================================
|
||||
|
||||
MAX_MATCH EQU 258
|
||||
MIN_MATCH EQU 3
|
||||
MIN_LOOKAHEAD EQU (MAX_MATCH + MIN_MATCH + 1)
|
||||
MAX_MATCH_8 EQU ((MAX_MATCH + 7) AND (NOT 7))
|
||||
|
||||
;===========================================================================
|
||||
; STRUCTURES
|
||||
;===========================================================================
|
||||
|
||||
; This STRUCT assumes a 4-byte alignment
|
||||
|
||||
DEFLATE_STATE STRUCT
|
||||
ds_strm dd ?
|
||||
ds_status dd ?
|
||||
ds_pending_buf dd ?
|
||||
ds_pending_buf_size dd ?
|
||||
ds_pending_out dd ?
|
||||
ds_pending dd ?
|
||||
ds_wrap dd ?
|
||||
; gzhead and gzindex are added in zlib 1.2.2.2 (see deflate.h)
|
||||
ds_gzhead dd ?
|
||||
ds_gzindex dd ?
|
||||
ds_data_type db ?
|
||||
ds_method db ?
|
||||
db ? ; padding
|
||||
db ? ; padding
|
||||
ds_last_flush dd ?
|
||||
ds_w_size dd ? ; used
|
||||
ds_w_bits dd ?
|
||||
ds_w_mask dd ? ; used
|
||||
ds_window dd ? ; used
|
||||
ds_window_size dd ?
|
||||
ds_prev dd ? ; used
|
||||
ds_head dd ?
|
||||
ds_ins_h dd ?
|
||||
ds_hash_size dd ?
|
||||
ds_hash_bits dd ?
|
||||
ds_hash_mask dd ?
|
||||
ds_hash_shift dd ?
|
||||
ds_block_start dd ?
|
||||
ds_match_length dd ? ; used
|
||||
ds_prev_match dd ? ; used
|
||||
ds_match_available dd ?
|
||||
ds_strstart dd ? ; used
|
||||
ds_match_start dd ? ; used
|
||||
ds_lookahead dd ? ; used
|
||||
ds_prev_length dd ? ; used
|
||||
ds_max_chain_length dd ? ; used
|
||||
ds_max_laxy_match dd ?
|
||||
ds_level dd ?
|
||||
ds_strategy dd ?
|
||||
ds_good_match dd ? ; used
|
||||
ds_nice_match dd ? ; used
|
||||
|
||||
; Don't need anymore of the struct for match
|
||||
DEFLATE_STATE ENDS
|
||||
|
||||
;===========================================================================
|
||||
; CODE
|
||||
;===========================================================================
|
||||
_TEXT SEGMENT
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
; match_init
|
||||
;---------------------------------------------------------------------------
|
||||
ALIGN 4
|
||||
PUBLIC _match_init
|
||||
_match_init PROC
|
||||
; no initialization needed
|
||||
ret
|
||||
_match_init ENDP
|
||||
|
||||
;---------------------------------------------------------------------------
|
||||
; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
|
||||
;---------------------------------------------------------------------------
|
||||
ALIGN 4
|
||||
|
||||
PUBLIC _longest_match
|
||||
_longest_match PROC
|
||||
|
||||
; Since this code uses EBP for a scratch register, the stack frame must
|
||||
; be manually constructed and referenced relative to the ESP register.
|
||||
|
||||
; Stack image
|
||||
; Variables
|
||||
chainlenwmask = 0 ; high word: current chain len
|
||||
; low word: s->wmask
|
||||
window = 4 ; local copy of s->window
|
||||
windowbestlen = 8 ; s->window + bestlen
|
||||
scanend = 12 ; last two bytes of string
|
||||
scanstart = 16 ; first two bytes of string
|
||||
scanalign = 20 ; dword-misalignment of string
|
||||
nicematch = 24 ; a good enough match size
|
||||
bestlen = 28 ; size of best match so far
|
||||
scan = 32 ; ptr to string wanting match
|
||||
varsize = 36 ; number of bytes (also offset to last saved register)
|
||||
|
||||
; Saved Registers (actually pushed into place)
|
||||
ebx_save = 36
|
||||
edi_save = 40
|
||||
esi_save = 44
|
||||
ebp_save = 48
|
||||
|
||||
; Parameters
|
||||
retaddr = 52
|
||||
deflatestate = 56
|
||||
curmatch = 60
|
||||
|
||||
; Save registers that the compiler may be using
|
||||
push ebp
|
||||
push edi
|
||||
push esi
|
||||
push ebx
|
||||
|
||||
; Allocate local variable space
|
||||
sub esp,varsize
|
||||
|
||||
; Retrieve the function arguments. ecx will hold cur_match
|
||||
; throughout the entire function. edx will hold the pointer to the
|
||||
; deflate_state structure during the function's setup (before
|
||||
; entering the main loop).
|
||||
|
||||
mov edx, [esp+deflatestate]
|
||||
ASSUME edx:PTR DEFLATE_STATE
|
||||
|
||||
mov ecx, [esp+curmatch]
|
||||
|
||||
; uInt wmask = s->w_mask;
|
||||
; unsigned chain_length = s->max_chain_length;
|
||||
; if (s->prev_length >= s->good_match) {
|
||||
; chain_length >>= 2;
|
||||
; }
|
||||
|
||||
mov eax, [edx].ds_prev_length
|
||||
mov ebx, [edx].ds_good_match
|
||||
cmp eax, ebx
|
||||
mov eax, [edx].ds_w_mask
|
||||
mov ebx, [edx].ds_max_chain_length
|
||||
jl SHORT LastMatchGood
|
||||
shr ebx, 2
|
||||
LastMatchGood:
|
||||
|
||||
; chainlen is decremented once beforehand so that the function can
|
||||
; use the sign flag instead of the zero flag for the exit test.
|
||||
; It is then shifted into the high word, to make room for the wmask
|
||||
; value, which it will always accompany.
|
||||
|
||||
dec ebx
|
||||
shl ebx, 16
|
||||
or ebx, eax
|
||||
mov [esp+chainlenwmask], ebx
|
||||
|
||||
; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
|
||||
|
||||
mov eax, [edx].ds_nice_match
|
||||
mov ebx, [edx].ds_lookahead
|
||||
cmp ebx, eax
|
||||
jl SHORT LookaheadLess
|
||||
mov ebx, eax
|
||||
LookaheadLess:
|
||||
mov [esp+nicematch], ebx
|
||||
|
||||
;/* register Bytef *scan = s->window + s->strstart; */
|
||||
|
||||
mov esi, [edx].ds_window
|
||||
mov [esp+window], esi
|
||||
mov ebp, [edx].ds_strstart
|
||||
lea edi, [esi+ebp]
|
||||
mov [esp+scan],edi
|
||||
|
||||
;/* Determine how many bytes the scan ptr is off from being */
|
||||
;/* dword-aligned. */
|
||||
|
||||
mov eax, edi
|
||||
neg eax
|
||||
and eax, 3
|
||||
mov [esp+scanalign], eax
|
||||
|
||||
;/* IPos limit = s->strstart > (IPos)MAX_DIST(s) ? */
|
||||
;/* s->strstart - (IPos)MAX_DIST(s) : NIL; */
|
||||
|
||||
mov eax, [edx].ds_w_size
|
||||
sub eax, MIN_LOOKAHEAD
|
||||
sub ebp, eax
|
||||
jg SHORT LimitPositive
|
||||
xor ebp, ebp
|
||||
LimitPositive:
|
||||
|
||||
;/* int best_len = s->prev_length; */
|
||||
|
||||
mov eax, [edx].ds_prev_length
|
||||
mov [esp+bestlen], eax
|
||||
|
||||
;/* Store the sum of s->window + best_len in %esi locally, and in %esi. */
|
||||
|
||||
add esi, eax
|
||||
mov [esp+windowbestlen], esi
|
||||
|
||||
;/* register ush scan_start = *(ushf*)scan; */
|
||||
;/* register ush scan_end = *(ushf*)(scan+best_len-1); */
|
||||
;/* Posf *prev = s->prev; */
|
||||
|
||||
movzx ebx, WORD PTR[edi]
|
||||
mov [esp+scanstart], ebx
|
||||
movzx ebx, WORD PTR[eax+edi-1]
|
||||
mov [esp+scanend], ebx
|
||||
mov edi, [edx].ds_prev
|
||||
|
||||
;/* Jump into the main loop. */
|
||||
|
||||
mov edx, [esp+chainlenwmask]
|
||||
jmp SHORT LoopEntry
|
||||
|
||||
;/* do {
|
||||
; * match = s->window + cur_match;
|
||||
; * if (*(ushf*)(match+best_len-1) != scan_end ||
|
||||
; * *(ushf*)match != scan_start) continue;
|
||||
; * [...]
|
||||
; * } while ((cur_match = prev[cur_match & wmask]) > limit
|
||||
; * && --chain_length != 0);
|
||||
; *
|
||||
; * Here is the inner loop of the function. The function will spend the
|
||||
; * majority of its time in this loop, and majority of that time will
|
||||
; * be spent in the first ten instructions.
|
||||
; *
|
||||
; * Within this loop:
|
||||
; * %ebx = scanend
|
||||
; * %ecx = curmatch
|
||||
; * %edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
|
||||
; * %esi = windowbestlen - i.e., (window + bestlen)
|
||||
; * %edi = prev
|
||||
; * %ebp = limit
|
||||
; */
|
||||
|
||||
ALIGN 4
|
||||
LookupLoop:
|
||||
and ecx, edx
|
||||
movzx ecx, WORD PTR[edi+ecx*2]
|
||||
cmp ecx, ebp
|
||||
jbe LeaveNow
|
||||
sub edx, 000010000H
|
||||
js LeaveNow
|
||||
|
||||
LoopEntry:
|
||||
movzx eax, WORD PTR[esi+ecx-1]
|
||||
cmp eax, ebx
|
||||
jnz SHORT LookupLoop
|
||||
|
||||
mov eax, [esp+window]
|
||||
movzx eax, WORD PTR[eax+ecx]
|
||||
cmp eax, [esp+scanstart]
|
||||
jnz SHORT LookupLoop
|
||||
|
||||
;/* Store the current value of chainlen. */
|
||||
|
||||
mov [esp+chainlenwmask], edx
|
||||
|
||||
;/* Point %edi to the string under scrutiny, and %esi to the string we */
|
||||
;/* are hoping to match it up with. In actuality, %esi and %edi are */
|
||||
;/* both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and %edx is */
|
||||
;/* initialized to -(MAX_MATCH_8 - scanalign). */
|
||||
|
||||
mov esi, [esp+window]
|
||||
mov edi, [esp+scan]
|
||||
add esi, ecx
|
||||
mov eax, [esp+scanalign]
|
||||
mov edx, -MAX_MATCH_8
|
||||
lea edi, [edi+eax+MAX_MATCH_8]
|
||||
lea esi, [esi+eax+MAX_MATCH_8]
|
||||
|
||||
;/* Test the strings for equality, 8 bytes at a time. At the end,
|
||||
; * adjust %edx so that it is offset to the exact byte that mismatched.
|
||||
; *
|
||||
; * We already know at this point that the first three bytes of the
|
||||
; * strings match each other, and they can be safely passed over before
|
||||
; * starting the compare loop. So what this code does is skip over 0-3
|
||||
; * bytes, as much as necessary in order to dword-align the %edi
|
||||
; * pointer. (%esi will still be misaligned three times out of four.)
|
||||
; *
|
||||
; * It should be confessed that this loop usually does not represent
|
||||
; * much of the total running time. Replacing it with a more
|
||||
; * straightforward "rep cmpsb" would not drastically degrade
|
||||
; * performance.
|
||||
; */
|
||||
|
||||
LoopCmps:
|
||||
mov eax, DWORD PTR[esi+edx]
|
||||
xor eax, DWORD PTR[edi+edx]
|
||||
jnz SHORT LeaveLoopCmps
|
||||
|
||||
mov eax, DWORD PTR[esi+edx+4]
|
||||
xor eax, DWORD PTR[edi+edx+4]
|
||||
jnz SHORT LeaveLoopCmps4
|
||||
|
||||
add edx, 8
|
||||
jnz SHORT LoopCmps
|
||||
jmp LenMaximum
|
||||
ALIGN 4
|
||||
|
||||
LeaveLoopCmps4:
|
||||
add edx, 4
|
||||
|
||||
LeaveLoopCmps:
|
||||
test eax, 00000FFFFH
|
||||
jnz SHORT LenLower
|
||||
|
||||
add edx, 2
|
||||
shr eax, 16
|
||||
|
||||
LenLower:
|
||||
sub al, 1
|
||||
adc edx, 0
|
||||
|
||||
;/* Calculate the length of the match. If it is longer than MAX_MATCH, */
|
||||
;/* then automatically accept it as the best possible match and leave. */
|
||||
|
||||
lea eax, [edi+edx]
|
||||
mov edi, [esp+scan]
|
||||
sub eax, edi
|
||||
cmp eax, MAX_MATCH
|
||||
jge SHORT LenMaximum
|
||||
|
||||
;/* If the length of the match is not longer than the best match we */
|
||||
;/* have so far, then forget it and return to the lookup loop. */
|
||||
|
||||
mov edx, [esp+deflatestate]
|
||||
mov ebx, [esp+bestlen]
|
||||
cmp eax, ebx
|
||||
jg SHORT LongerMatch
|
||||
mov esi, [esp+windowbestlen]
|
||||
mov edi, [edx].ds_prev
|
||||
mov ebx, [esp+scanend]
|
||||
mov edx, [esp+chainlenwmask]
|
||||
jmp LookupLoop
|
||||
ALIGN 4
|
||||
|
||||
;/* s->match_start = cur_match; */
|
||||
;/* best_len = len; */
|
||||
;/* if (len >= nice_match) break; */
|
||||
;/* scan_end = *(ushf*)(scan+best_len-1); */
|
||||
|
||||
LongerMatch:
|
||||
mov ebx, [esp+nicematch]
|
||||
mov [esp+bestlen], eax
|
||||
mov [edx].ds_match_start, ecx
|
||||
cmp eax, ebx
|
||||
jge SHORT LeaveNow
|
||||
mov esi, [esp+window]
|
||||
add esi, eax
|
||||
mov [esp+windowbestlen], esi
|
||||
movzx ebx, WORD PTR[edi+eax-1]
|
||||
mov edi, [edx].ds_prev
|
||||
mov [esp+scanend], ebx
|
||||
mov edx, [esp+chainlenwmask]
|
||||
jmp LookupLoop
|
||||
ALIGN 4
|
||||
|
||||
;/* Accept the current string, with the maximum possible length. */
|
||||
|
||||
LenMaximum:
|
||||
mov edx, [esp+deflatestate]
|
||||
mov DWORD PTR[esp+bestlen], MAX_MATCH
|
||||
mov [edx].ds_match_start, ecx
|
||||
|
||||
;/* if ((uInt)best_len <= s->lookahead) return (uInt)best_len; */
|
||||
;/* return s->lookahead; */
|
||||
|
||||
LeaveNow:
|
||||
mov edx, [esp+deflatestate]
|
||||
mov ebx, [esp+bestlen]
|
||||
mov eax, [edx].ds_lookahead
|
||||
cmp ebx, eax
|
||||
jg SHORT LookaheadRet
|
||||
mov eax, ebx
|
||||
LookaheadRet:
|
||||
|
||||
; Restore the stack and return from whence we came.
|
||||
|
||||
add esp, varsize
|
||||
pop ebx
|
||||
pop esi
|
||||
pop edi
|
||||
pop ebp
|
||||
ret
|
||||
|
||||
_longest_match ENDP
|
||||
|
||||
_TEXT ENDS
|
||||
END
|
972
common/dist/zlib/contrib/masmx86/gvmat32.asm
vendored
972
common/dist/zlib/contrib/masmx86/gvmat32.asm
vendored
@ -1,972 +0,0 @@
|
||||
; gvmat32.asm -- Asm portion of the optimized longest_match for 32 bits x86
|
||||
; Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.
|
||||
; File written by Gilles Vollant, by modifiying the longest_match
|
||||
; from Jean-loup Gailly in deflate.c
|
||||
;
|
||||
; http://www.zlib.net
|
||||
; http://www.winimage.com/zLibDll
|
||||
; http://www.muppetlabs.com/~breadbox/software/assembly.html
|
||||
;
|
||||
; For Visual C++ 4.x and higher and ML 6.x and higher
|
||||
; ml.exe is in directory \MASM611C of Win95 DDK
|
||||
; ml.exe is also distributed in http://www.masm32.com/masmdl.htm
|
||||
; and in VC++2003 toolkit at http://msdn.microsoft.com/visualc/vctoolkit2003/
|
||||
;
|
||||
; this file contain two implementation of longest_match
|
||||
;
|
||||
; longest_match_7fff : written 1996 by Gilles Vollant optimized for
|
||||
; first Pentium. Assume s->w_mask == 0x7fff
|
||||
; longest_match_686 : written by Brian raiter (1998), optimized for Pentium Pro
|
||||
;
|
||||
; for using an seembly version of longest_match, you need define ASMV in project
|
||||
; There is two way in using gvmat32.asm
|
||||
;
|
||||
; A) Suggested method
|
||||
; if you want include both longest_match_7fff and longest_match_686
|
||||
; compile the asm file running
|
||||
; ml /coff /Zi /Flgvmat32.lst /c gvmat32.asm
|
||||
; and include gvmat32c.c in your project
|
||||
; if you have an old cpu (386,486 or first Pentium) and s->w_mask==0x7fff,
|
||||
; longest_match_7fff will be used
|
||||
; if you have a more modern CPU (Pentium Pro, II and higher)
|
||||
; longest_match_686 will be used
|
||||
; on old cpu with s->w_mask!=0x7fff, longest_match_686 will be used,
|
||||
; but this is not a sitation you'll find often
|
||||
;
|
||||
; B) Alternative
|
||||
; if you are not interresed in old cpu performance and want the smaller
|
||||
; binaries possible
|
||||
;
|
||||
; compile the asm file running
|
||||
; ml /coff /Zi /c /Flgvmat32.lst /DNOOLDPENTIUMCODE gvmat32.asm
|
||||
; and do not include gvmat32c.c in your project (ou define also
|
||||
; NOOLDPENTIUMCODE)
|
||||
;
|
||||
; note : as I known, longest_match_686 is very faster than longest_match_7fff
|
||||
; on pentium Pro/II/III, faster (but less) in P4, but it seem
|
||||
; longest_match_7fff can be faster (very very litte) on AMD Athlon64/K8
|
||||
;
|
||||
; see below : zlib1222add must be adjuster if you use a zlib version < 1.2.2.2
|
||||
|
||||
;uInt longest_match_7fff(s, cur_match)
|
||||
; deflate_state *s;
|
||||
; IPos cur_match; /* current match */
|
||||
|
||||
NbStack equ 76
|
||||
cur_match equ dword ptr[esp+NbStack-0]
|
||||
str_s equ dword ptr[esp+NbStack-4]
|
||||
; 5 dword on top (ret,ebp,esi,edi,ebx)
|
||||
adrret equ dword ptr[esp+NbStack-8]
|
||||
pushebp equ dword ptr[esp+NbStack-12]
|
||||
pushedi equ dword ptr[esp+NbStack-16]
|
||||
pushesi equ dword ptr[esp+NbStack-20]
|
||||
pushebx equ dword ptr[esp+NbStack-24]
|
||||
|
||||
chain_length equ dword ptr [esp+NbStack-28]
|
||||
limit equ dword ptr [esp+NbStack-32]
|
||||
best_len equ dword ptr [esp+NbStack-36]
|
||||
window equ dword ptr [esp+NbStack-40]
|
||||
prev equ dword ptr [esp+NbStack-44]
|
||||
scan_start equ word ptr [esp+NbStack-48]
|
||||
wmask equ dword ptr [esp+NbStack-52]
|
||||
match_start_ptr equ dword ptr [esp+NbStack-56]
|
||||
nice_match equ dword ptr [esp+NbStack-60]
|
||||
scan equ dword ptr [esp+NbStack-64]
|
||||
|
||||
windowlen equ dword ptr [esp+NbStack-68]
|
||||
match_start equ dword ptr [esp+NbStack-72]
|
||||
strend equ dword ptr [esp+NbStack-76]
|
||||
NbStackAdd equ (NbStack-24)
|
||||
|
||||
.386p
|
||||
|
||||
name gvmatch
|
||||
.MODEL FLAT
|
||||
|
||||
|
||||
|
||||
; all the +zlib1222add offsets are due to the addition of fields
|
||||
; in zlib in the deflate_state structure since the asm code was first written
|
||||
; (if you compile with zlib 1.0.4 or older, use "zlib1222add equ (-4)").
|
||||
; (if you compile with zlib between 1.0.5 and 1.2.2.1, use "zlib1222add equ 0").
|
||||
; if you compile with zlib 1.2.2.2 or later , use "zlib1222add equ 8").
|
||||
|
||||
zlib1222add equ 8
|
||||
|
||||
; Note : these value are good with a 8 bytes boundary pack structure
|
||||
dep_chain_length equ 74h+zlib1222add
|
||||
dep_window equ 30h+zlib1222add
|
||||
dep_strstart equ 64h+zlib1222add
|
||||
dep_prev_length equ 70h+zlib1222add
|
||||
dep_nice_match equ 88h+zlib1222add
|
||||
dep_w_size equ 24h+zlib1222add
|
||||
dep_prev equ 38h+zlib1222add
|
||||
dep_w_mask equ 2ch+zlib1222add
|
||||
dep_good_match equ 84h+zlib1222add
|
||||
dep_match_start equ 68h+zlib1222add
|
||||
dep_lookahead equ 6ch+zlib1222add
|
||||
|
||||
|
||||
_TEXT segment
|
||||
|
||||
IFDEF NOUNDERLINE
|
||||
IFDEF NOOLDPENTIUMCODE
|
||||
public longest_match
|
||||
public match_init
|
||||
ELSE
|
||||
public longest_match_7fff
|
||||
public cpudetect32
|
||||
public longest_match_686
|
||||
ENDIF
|
||||
ELSE
|
||||
IFDEF NOOLDPENTIUMCODE
|
||||
public _longest_match
|
||||
public _match_init
|
||||
ELSE
|
||||
public _longest_match_7fff
|
||||
public _cpudetect32
|
||||
public _longest_match_686
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
MAX_MATCH equ 258
|
||||
MIN_MATCH equ 3
|
||||
MIN_LOOKAHEAD equ (MAX_MATCH+MIN_MATCH+1)
|
||||
|
||||
|
||||
|
||||
IFNDEF NOOLDPENTIUMCODE
|
||||
IFDEF NOUNDERLINE
|
||||
longest_match_7fff proc near
|
||||
ELSE
|
||||
_longest_match_7fff proc near
|
||||
ENDIF
|
||||
|
||||
mov edx,[esp+4]
|
||||
|
||||
|
||||
|
||||
push ebp
|
||||
push edi
|
||||
push esi
|
||||
push ebx
|
||||
|
||||
sub esp,NbStackAdd
|
||||
|
||||
; initialize or check the variables used in match.asm.
|
||||
mov ebp,edx
|
||||
|
||||
; chain_length = s->max_chain_length
|
||||
; if (prev_length>=good_match) chain_length >>= 2
|
||||
mov edx,[ebp+dep_chain_length]
|
||||
mov ebx,[ebp+dep_prev_length]
|
||||
cmp [ebp+dep_good_match],ebx
|
||||
ja noshr
|
||||
shr edx,2
|
||||
noshr:
|
||||
; we increment chain_length because in the asm, the --chain_lenght is in the beginning of the loop
|
||||
inc edx
|
||||
mov edi,[ebp+dep_nice_match]
|
||||
mov chain_length,edx
|
||||
mov eax,[ebp+dep_lookahead]
|
||||
cmp eax,edi
|
||||
; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
|
||||
jae nolookaheadnicematch
|
||||
mov edi,eax
|
||||
nolookaheadnicematch:
|
||||
; best_len = s->prev_length
|
||||
mov best_len,ebx
|
||||
|
||||
; window = s->window
|
||||
mov esi,[ebp+dep_window]
|
||||
mov ecx,[ebp+dep_strstart]
|
||||
mov window,esi
|
||||
|
||||
mov nice_match,edi
|
||||
; scan = window + strstart
|
||||
add esi,ecx
|
||||
mov scan,esi
|
||||
; dx = *window
|
||||
mov dx,word ptr [esi]
|
||||
; bx = *(window+best_len-1)
|
||||
mov bx,word ptr [esi+ebx-1]
|
||||
add esi,MAX_MATCH-1
|
||||
; scan_start = *scan
|
||||
mov scan_start,dx
|
||||
; strend = scan + MAX_MATCH-1
|
||||
mov strend,esi
|
||||
; bx = scan_end = *(window+best_len-1)
|
||||
|
||||
; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
|
||||
; s->strstart - (IPos)MAX_DIST(s) : NIL;
|
||||
|
||||
mov esi,[ebp+dep_w_size]
|
||||
sub esi,MIN_LOOKAHEAD
|
||||
; here esi = MAX_DIST(s)
|
||||
sub ecx,esi
|
||||
ja nodist
|
||||
xor ecx,ecx
|
||||
nodist:
|
||||
mov limit,ecx
|
||||
|
||||
; prev = s->prev
|
||||
mov edx,[ebp+dep_prev]
|
||||
mov prev,edx
|
||||
|
||||
;
|
||||
mov edx,dword ptr [ebp+dep_match_start]
|
||||
mov bp,scan_start
|
||||
mov eax,cur_match
|
||||
mov match_start,edx
|
||||
|
||||
mov edx,window
|
||||
mov edi,edx
|
||||
add edi,best_len
|
||||
mov esi,prev
|
||||
dec edi
|
||||
; windowlen = window + best_len -1
|
||||
mov windowlen,edi
|
||||
|
||||
jmp beginloop2
|
||||
align 4
|
||||
|
||||
; here, in the loop
|
||||
; eax = ax = cur_match
|
||||
; ecx = limit
|
||||
; bx = scan_end
|
||||
; bp = scan_start
|
||||
; edi = windowlen (window + best_len -1)
|
||||
; esi = prev
|
||||
|
||||
|
||||
;// here; chain_length <=16
|
||||
normalbeg0add16:
|
||||
add chain_length,16
|
||||
jz exitloop
|
||||
normalbeg0:
|
||||
cmp word ptr[edi+eax],bx
|
||||
je normalbeg2noroll
|
||||
rcontlabnoroll:
|
||||
; cur_match = prev[cur_match & wmask]
|
||||
and eax,7fffh
|
||||
mov ax,word ptr[esi+eax*2]
|
||||
; if cur_match > limit, go to exitloop
|
||||
cmp ecx,eax
|
||||
jnb exitloop
|
||||
; if --chain_length != 0, go to exitloop
|
||||
dec chain_length
|
||||
jnz normalbeg0
|
||||
jmp exitloop
|
||||
|
||||
normalbeg2noroll:
|
||||
; if (scan_start==*(cur_match+window)) goto normalbeg2
|
||||
cmp bp,word ptr[edx+eax]
|
||||
jne rcontlabnoroll
|
||||
jmp normalbeg2
|
||||
|
||||
contloop3:
|
||||
mov edi,windowlen
|
||||
|
||||
; cur_match = prev[cur_match & wmask]
|
||||
and eax,7fffh
|
||||
mov ax,word ptr[esi+eax*2]
|
||||
; if cur_match > limit, go to exitloop
|
||||
cmp ecx,eax
|
||||
jnbexitloopshort1:
|
||||
jnb exitloop
|
||||
; if --chain_length != 0, go to exitloop
|
||||
|
||||
|
||||
; begin the main loop
|
||||
beginloop2:
|
||||
sub chain_length,16+1
|
||||
; if chain_length <=16, don't use the unrolled loop
|
||||
jna normalbeg0add16
|
||||
|
||||
do16:
|
||||
cmp word ptr[edi+eax],bx
|
||||
je normalbeg2dc0
|
||||
|
||||
maccn MACRO lab
|
||||
and eax,7fffh
|
||||
mov ax,word ptr[esi+eax*2]
|
||||
cmp ecx,eax
|
||||
jnb exitloop
|
||||
cmp word ptr[edi+eax],bx
|
||||
je lab
|
||||
ENDM
|
||||
|
||||
rcontloop0:
|
||||
maccn normalbeg2dc1
|
||||
|
||||
rcontloop1:
|
||||
maccn normalbeg2dc2
|
||||
|
||||
rcontloop2:
|
||||
maccn normalbeg2dc3
|
||||
|
||||
rcontloop3:
|
||||
maccn normalbeg2dc4
|
||||
|
||||
rcontloop4:
|
||||
maccn normalbeg2dc5
|
||||
|
||||
rcontloop5:
|
||||
maccn normalbeg2dc6
|
||||
|
||||
rcontloop6:
|
||||
maccn normalbeg2dc7
|
||||
|
||||
rcontloop7:
|
||||
maccn normalbeg2dc8
|
||||
|
||||
rcontloop8:
|
||||
maccn normalbeg2dc9
|
||||
|
||||
rcontloop9:
|
||||
maccn normalbeg2dc10
|
||||
|
||||
rcontloop10:
|
||||
maccn short normalbeg2dc11
|
||||
|
||||
rcontloop11:
|
||||
maccn short normalbeg2dc12
|
||||
|
||||
rcontloop12:
|
||||
maccn short normalbeg2dc13
|
||||
|
||||
rcontloop13:
|
||||
maccn short normalbeg2dc14
|
||||
|
||||
rcontloop14:
|
||||
maccn short normalbeg2dc15
|
||||
|
||||
rcontloop15:
|
||||
and eax,7fffh
|
||||
mov ax,word ptr[esi+eax*2]
|
||||
cmp ecx,eax
|
||||
jnb exitloop
|
||||
|
||||
sub chain_length,16
|
||||
ja do16
|
||||
jmp normalbeg0add16
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
normbeg MACRO rcontlab,valsub
|
||||
; if we are here, we know that *(match+best_len-1) == scan_end
|
||||
cmp bp,word ptr[edx+eax]
|
||||
; if (match != scan_start) goto rcontlab
|
||||
jne rcontlab
|
||||
; calculate the good chain_length, and we'll compare scan and match string
|
||||
add chain_length,16-valsub
|
||||
jmp iseq
|
||||
ENDM
|
||||
|
||||
|
||||
normalbeg2dc11:
|
||||
normbeg rcontloop11,11
|
||||
|
||||
normalbeg2dc12:
|
||||
normbeg short rcontloop12,12
|
||||
|
||||
normalbeg2dc13:
|
||||
normbeg short rcontloop13,13
|
||||
|
||||
normalbeg2dc14:
|
||||
normbeg short rcontloop14,14
|
||||
|
||||
normalbeg2dc15:
|
||||
normbeg short rcontloop15,15
|
||||
|
||||
normalbeg2dc10:
|
||||
normbeg rcontloop10,10
|
||||
|
||||
normalbeg2dc9:
|
||||
normbeg rcontloop9,9
|
||||
|
||||
normalbeg2dc8:
|
||||
normbeg rcontloop8,8
|
||||
|
||||
normalbeg2dc7:
|
||||
normbeg rcontloop7,7
|
||||
|
||||
normalbeg2dc6:
|
||||
normbeg rcontloop6,6
|
||||
|
||||
normalbeg2dc5:
|
||||
normbeg rcontloop5,5
|
||||
|
||||
normalbeg2dc4:
|
||||
normbeg rcontloop4,4
|
||||
|
||||
normalbeg2dc3:
|
||||
normbeg rcontloop3,3
|
||||
|
||||
normalbeg2dc2:
|
||||
normbeg rcontloop2,2
|
||||
|
||||
normalbeg2dc1:
|
||||
normbeg rcontloop1,1
|
||||
|
||||
normalbeg2dc0:
|
||||
normbeg rcontloop0,0
|
||||
|
||||
|
||||
; we go in normalbeg2 because *(ushf*)(match+best_len-1) == scan_end
|
||||
|
||||
normalbeg2:
|
||||
mov edi,window
|
||||
|
||||
cmp bp,word ptr[edi+eax]
|
||||
jne contloop3 ; if *(ushf*)match != scan_start, continue
|
||||
|
||||
iseq:
|
||||
; if we are here, we know that *(match+best_len-1) == scan_end
|
||||
; and (match == scan_start)
|
||||
|
||||
mov edi,edx
|
||||
mov esi,scan ; esi = scan
|
||||
add edi,eax ; edi = window + cur_match = match
|
||||
|
||||
mov edx,[esi+3] ; compare manually dword at match+3
|
||||
xor edx,[edi+3] ; and scan +3
|
||||
|
||||
jz begincompare ; if equal, go to long compare
|
||||
|
||||
; we will determine the unmatch byte and calculate len (in esi)
|
||||
or dl,dl
|
||||
je eq1rr
|
||||
mov esi,3
|
||||
jmp trfinval
|
||||
eq1rr:
|
||||
or dx,dx
|
||||
je eq1
|
||||
|
||||
mov esi,4
|
||||
jmp trfinval
|
||||
eq1:
|
||||
and edx,0ffffffh
|
||||
jz eq11
|
||||
mov esi,5
|
||||
jmp trfinval
|
||||
eq11:
|
||||
mov esi,6
|
||||
jmp trfinval
|
||||
|
||||
begincompare:
|
||||
; here we now scan and match begin same
|
||||
add edi,6
|
||||
add esi,6
|
||||
mov ecx,(MAX_MATCH-(2+4))/4 ; scan for at most MAX_MATCH bytes
|
||||
repe cmpsd ; loop until mismatch
|
||||
|
||||
je trfin ; go to trfin if not unmatch
|
||||
; we determine the unmatch byte
|
||||
sub esi,4
|
||||
mov edx,[edi-4]
|
||||
xor edx,[esi]
|
||||
|
||||
or dl,dl
|
||||
jnz trfin
|
||||
inc esi
|
||||
|
||||
or dx,dx
|
||||
jnz trfin
|
||||
inc esi
|
||||
|
||||
and edx,0ffffffh
|
||||
jnz trfin
|
||||
inc esi
|
||||
|
||||
trfin:
|
||||
sub esi,scan ; esi = len
|
||||
trfinval:
|
||||
; here we have finised compare, and esi contain len of equal string
|
||||
cmp esi,best_len ; if len > best_len, go newbestlen
|
||||
ja short newbestlen
|
||||
; now we restore edx, ecx and esi, for the big loop
|
||||
mov esi,prev
|
||||
mov ecx,limit
|
||||
mov edx,window
|
||||
jmp contloop3
|
||||
|
||||
newbestlen:
|
||||
mov best_len,esi ; len become best_len
|
||||
|
||||
mov match_start,eax ; save new position as match_start
|
||||
cmp esi,nice_match ; if best_len >= nice_match, exit
|
||||
jae exitloop
|
||||
mov ecx,scan
|
||||
mov edx,window ; restore edx=window
|
||||
add ecx,esi
|
||||
add esi,edx
|
||||
|
||||
dec esi
|
||||
mov windowlen,esi ; windowlen = window + best_len-1
|
||||
mov bx,[ecx-1] ; bx = *(scan+best_len-1) = scan_end
|
||||
|
||||
; now we restore ecx and esi, for the big loop :
|
||||
mov esi,prev
|
||||
mov ecx,limit
|
||||
jmp contloop3
|
||||
|
||||
exitloop:
|
||||
; exit : s->match_start=match_start
|
||||
mov ebx,match_start
|
||||
mov ebp,str_s
|
||||
mov ecx,best_len
|
||||
mov dword ptr [ebp+dep_match_start],ebx
|
||||
mov eax,dword ptr [ebp+dep_lookahead]
|
||||
cmp ecx,eax
|
||||
ja minexlo
|
||||
mov eax,ecx
|
||||
minexlo:
|
||||
; return min(best_len,s->lookahead)
|
||||
|
||||
; restore stack and register ebx,esi,edi,ebp
|
||||
add esp,NbStackAdd
|
||||
|
||||
pop ebx
|
||||
pop esi
|
||||
pop edi
|
||||
pop ebp
|
||||
ret
|
||||
InfoAuthor:
|
||||
; please don't remove this string !
|
||||
; Your are free use gvmat32 in any fre or commercial apps if you don't remove the string in the binary!
|
||||
db 0dh,0ah,"GVMat32 optimised assembly code written 1996-98 by Gilles Vollant",0dh,0ah
|
||||
|
||||
|
||||
|
||||
IFDEF NOUNDERLINE
|
||||
longest_match_7fff endp
|
||||
ELSE
|
||||
_longest_match_7fff endp
|
||||
ENDIF
|
||||
|
||||
|
||||
IFDEF NOUNDERLINE
|
||||
cpudetect32 proc near
|
||||
ELSE
|
||||
_cpudetect32 proc near
|
||||
ENDIF
|
||||
|
||||
push ebx
|
||||
|
||||
pushfd ; push original EFLAGS
|
||||
pop eax ; get original EFLAGS
|
||||
mov ecx, eax ; save original EFLAGS
|
||||
xor eax, 40000h ; flip AC bit in EFLAGS
|
||||
push eax ; save new EFLAGS value on stack
|
||||
popfd ; replace current EFLAGS value
|
||||
pushfd ; get new EFLAGS
|
||||
pop eax ; store new EFLAGS in EAX
|
||||
xor eax, ecx ; can’t toggle AC bit, processor=80386
|
||||
jz end_cpu_is_386 ; jump if 80386 processor
|
||||
push ecx
|
||||
popfd ; restore AC bit in EFLAGS first
|
||||
|
||||
pushfd
|
||||
pushfd
|
||||
pop ecx
|
||||
|
||||
mov eax, ecx ; get original EFLAGS
|
||||
xor eax, 200000h ; flip ID bit in EFLAGS
|
||||
push eax ; save new EFLAGS value on stack
|
||||
popfd ; replace current EFLAGS value
|
||||
pushfd ; get new EFLAGS
|
||||
pop eax ; store new EFLAGS in EAX
|
||||
popfd ; restore original EFLAGS
|
||||
xor eax, ecx ; can’t toggle ID bit,
|
||||
je is_old_486 ; processor=old
|
||||
|
||||
mov eax,1
|
||||
db 0fh,0a2h ;CPUID
|
||||
|
||||
exitcpudetect:
|
||||
pop ebx
|
||||
ret
|
||||
|
||||
end_cpu_is_386:
|
||||
mov eax,0300h
|
||||
jmp exitcpudetect
|
||||
|
||||
is_old_486:
|
||||
mov eax,0400h
|
||||
jmp exitcpudetect
|
||||
|
||||
IFDEF NOUNDERLINE
|
||||
cpudetect32 endp
|
||||
ELSE
|
||||
_cpudetect32 endp
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
MAX_MATCH equ 258
|
||||
MIN_MATCH equ 3
|
||||
MIN_LOOKAHEAD equ (MAX_MATCH + MIN_MATCH + 1)
|
||||
MAX_MATCH_8_ equ ((MAX_MATCH + 7) AND 0FFF0h)
|
||||
|
||||
|
||||
;;; stack frame offsets
|
||||
|
||||
chainlenwmask equ esp + 0 ; high word: current chain len
|
||||
; low word: s->wmask
|
||||
window equ esp + 4 ; local copy of s->window
|
||||
windowbestlen equ esp + 8 ; s->window + bestlen
|
||||
scanstart equ esp + 16 ; first two bytes of string
|
||||
scanend equ esp + 12 ; last two bytes of string
|
||||
scanalign equ esp + 20 ; dword-misalignment of string
|
||||
nicematch equ esp + 24 ; a good enough match size
|
||||
bestlen equ esp + 28 ; size of best match so far
|
||||
scan equ esp + 32 ; ptr to string wanting match
|
||||
|
||||
LocalVarsSize equ 36
|
||||
; saved ebx byte esp + 36
|
||||
; saved edi byte esp + 40
|
||||
; saved esi byte esp + 44
|
||||
; saved ebp byte esp + 48
|
||||
; return address byte esp + 52
|
||||
deflatestate equ esp + 56 ; the function arguments
|
||||
curmatch equ esp + 60
|
||||
|
||||
;;; Offsets for fields in the deflate_state structure. These numbers
|
||||
;;; are calculated from the definition of deflate_state, with the
|
||||
;;; assumption that the compiler will dword-align the fields. (Thus,
|
||||
;;; changing the definition of deflate_state could easily cause this
|
||||
;;; program to crash horribly, without so much as a warning at
|
||||
;;; compile time. Sigh.)
|
||||
|
||||
dsWSize equ 36+zlib1222add
|
||||
dsWMask equ 44+zlib1222add
|
||||
dsWindow equ 48+zlib1222add
|
||||
dsPrev equ 56+zlib1222add
|
||||
dsMatchLen equ 88+zlib1222add
|
||||
dsPrevMatch equ 92+zlib1222add
|
||||
dsStrStart equ 100+zlib1222add
|
||||
dsMatchStart equ 104+zlib1222add
|
||||
dsLookahead equ 108+zlib1222add
|
||||
dsPrevLen equ 112+zlib1222add
|
||||
dsMaxChainLen equ 116+zlib1222add
|
||||
dsGoodMatch equ 132+zlib1222add
|
||||
dsNiceMatch equ 136+zlib1222add
|
||||
|
||||
|
||||
;;; match.asm -- Pentium-Pro-optimized version of longest_match()
|
||||
;;; Written for zlib 1.1.2
|
||||
;;; Copyright (C) 1998 Brian Raiter <breadbox@muppetlabs.com>
|
||||
;;; You can look at http://www.muppetlabs.com/~breadbox/software/assembly.html
|
||||
;;;
|
||||
;;; This is free software; you can redistribute it and/or modify it
|
||||
;;; under the terms of the GNU General Public License.
|
||||
|
||||
;GLOBAL _longest_match, _match_init
|
||||
|
||||
|
||||
;SECTION .text
|
||||
|
||||
;;; uInt longest_match(deflate_state *deflatestate, IPos curmatch)
|
||||
|
||||
;_longest_match:
|
||||
IFDEF NOOLDPENTIUMCODE
|
||||
IFDEF NOUNDERLINE
|
||||
longest_match proc near
|
||||
ELSE
|
||||
_longest_match proc near
|
||||
ENDIF
|
||||
ELSE
|
||||
IFDEF NOUNDERLINE
|
||||
longest_match_686 proc near
|
||||
ELSE
|
||||
_longest_match_686 proc near
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
;;; Save registers that the compiler may be using, and adjust esp to
|
||||
;;; make room for our stack frame.
|
||||
|
||||
push ebp
|
||||
push edi
|
||||
push esi
|
||||
push ebx
|
||||
sub esp, LocalVarsSize
|
||||
|
||||
;;; Retrieve the function arguments. ecx will hold cur_match
|
||||
;;; throughout the entire function. edx will hold the pointer to the
|
||||
;;; deflate_state structure during the function's setup (before
|
||||
;;; entering the main loop.
|
||||
|
||||
mov edx, [deflatestate]
|
||||
mov ecx, [curmatch]
|
||||
|
||||
;;; uInt wmask = s->w_mask;
|
||||
;;; unsigned chain_length = s->max_chain_length;
|
||||
;;; if (s->prev_length >= s->good_match) {
|
||||
;;; chain_length >>= 2;
|
||||
;;; }
|
||||
|
||||
mov eax, [edx + dsPrevLen]
|
||||
mov ebx, [edx + dsGoodMatch]
|
||||
cmp eax, ebx
|
||||
mov eax, [edx + dsWMask]
|
||||
mov ebx, [edx + dsMaxChainLen]
|
||||
jl LastMatchGood
|
||||
shr ebx, 2
|
||||
LastMatchGood:
|
||||
|
||||
;;; chainlen is decremented once beforehand so that the function can
|
||||
;;; use the sign flag instead of the zero flag for the exit test.
|
||||
;;; It is then shifted into the high word, to make room for the wmask
|
||||
;;; value, which it will always accompany.
|
||||
|
||||
dec ebx
|
||||
shl ebx, 16
|
||||
or ebx, eax
|
||||
mov [chainlenwmask], ebx
|
||||
|
||||
;;; if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead;
|
||||
|
||||
mov eax, [edx + dsNiceMatch]
|
||||
mov ebx, [edx + dsLookahead]
|
||||
cmp ebx, eax
|
||||
jl LookaheadLess
|
||||
mov ebx, eax
|
||||
LookaheadLess: mov [nicematch], ebx
|
||||
|
||||
;;; register Bytef *scan = s->window + s->strstart;
|
||||
|
||||
mov esi, [edx + dsWindow]
|
||||
mov [window], esi
|
||||
mov ebp, [edx + dsStrStart]
|
||||
lea edi, [esi + ebp]
|
||||
mov [scan], edi
|
||||
|
||||
;;; Determine how many bytes the scan ptr is off from being
|
||||
;;; dword-aligned.
|
||||
|
||||
mov eax, edi
|
||||
neg eax
|
||||
and eax, 3
|
||||
mov [scanalign], eax
|
||||
|
||||
;;; IPos limit = s->strstart > (IPos)MAX_DIST(s) ?
|
||||
;;; s->strstart - (IPos)MAX_DIST(s) : NIL;
|
||||
|
||||
mov eax, [edx + dsWSize]
|
||||
sub eax, MIN_LOOKAHEAD
|
||||
sub ebp, eax
|
||||
jg LimitPositive
|
||||
xor ebp, ebp
|
||||
LimitPositive:
|
||||
|
||||
;;; int best_len = s->prev_length;
|
||||
|
||||
mov eax, [edx + dsPrevLen]
|
||||
mov [bestlen], eax
|
||||
|
||||
;;; Store the sum of s->window + best_len in esi locally, and in esi.
|
||||
|
||||
add esi, eax
|
||||
mov [windowbestlen], esi
|
||||
|
||||
;;; register ush scan_start = *(ushf*)scan;
|
||||
;;; register ush scan_end = *(ushf*)(scan+best_len-1);
|
||||
;;; Posf *prev = s->prev;
|
||||
|
||||
movzx ebx, word ptr [edi]
|
||||
mov [scanstart], ebx
|
||||
movzx ebx, word ptr [edi + eax - 1]
|
||||
mov [scanend], ebx
|
||||
mov edi, [edx + dsPrev]
|
||||
|
||||
;;; Jump into the main loop.
|
||||
|
||||
mov edx, [chainlenwmask]
|
||||
jmp short LoopEntry
|
||||
|
||||
align 4
|
||||
|
||||
;;; do {
|
||||
;;; match = s->window + cur_match;
|
||||
;;; if (*(ushf*)(match+best_len-1) != scan_end ||
|
||||
;;; *(ushf*)match != scan_start) continue;
|
||||
;;; [...]
|
||||
;;; } while ((cur_match = prev[cur_match & wmask]) > limit
|
||||
;;; && --chain_length != 0);
|
||||
;;;
|
||||
;;; Here is the inner loop of the function. The function will spend the
|
||||
;;; majority of its time in this loop, and majority of that time will
|
||||
;;; be spent in the first ten instructions.
|
||||
;;;
|
||||
;;; Within this loop:
|
||||
;;; ebx = scanend
|
||||
;;; ecx = curmatch
|
||||
;;; edx = chainlenwmask - i.e., ((chainlen << 16) | wmask)
|
||||
;;; esi = windowbestlen - i.e., (window + bestlen)
|
||||
;;; edi = prev
|
||||
;;; ebp = limit
|
||||
|
||||
LookupLoop:
|
||||
and ecx, edx
|
||||
movzx ecx, word ptr [edi + ecx*2]
|
||||
cmp ecx, ebp
|
||||
jbe LeaveNow
|
||||
sub edx, 00010000h
|
||||
js LeaveNow
|
||||
LoopEntry: movzx eax, word ptr [esi + ecx - 1]
|
||||
cmp eax, ebx
|
||||
jnz LookupLoop
|
||||
mov eax, [window]
|
||||
movzx eax, word ptr [eax + ecx]
|
||||
cmp eax, [scanstart]
|
||||
jnz LookupLoop
|
||||
|
||||
;;; Store the current value of chainlen.
|
||||
|
||||
mov [chainlenwmask], edx
|
||||
|
||||
;;; Point edi to the string under scrutiny, and esi to the string we
|
||||
;;; are hoping to match it up with. In actuality, esi and edi are
|
||||
;;; both pointed (MAX_MATCH_8 - scanalign) bytes ahead, and edx is
|
||||
;;; initialized to -(MAX_MATCH_8 - scanalign).
|
||||
|
||||
mov esi, [window]
|
||||
mov edi, [scan]
|
||||
add esi, ecx
|
||||
mov eax, [scanalign]
|
||||
mov edx, 0fffffef8h; -(MAX_MATCH_8)
|
||||
lea edi, [edi + eax + 0108h] ;MAX_MATCH_8]
|
||||
lea esi, [esi + eax + 0108h] ;MAX_MATCH_8]
|
||||
|
||||
;;; Test the strings for equality, 8 bytes at a time. At the end,
|
||||
;;; adjust edx so that it is offset to the exact byte that mismatched.
|
||||
;;;
|
||||
;;; We already know at this point that the first three bytes of the
|
||||
;;; strings match each other, and they can be safely passed over before
|
||||
;;; starting the compare loop. So what this code does is skip over 0-3
|
||||
;;; bytes, as much as necessary in order to dword-align the edi
|
||||
;;; pointer. (esi will still be misaligned three times out of four.)
|
||||
;;;
|
||||
;;; It should be confessed that this loop usually does not represent
|
||||
;;; much of the total running time. Replacing it with a more
|
||||
;;; straightforward "rep cmpsb" would not drastically degrade
|
||||
;;; performance.
|
||||
|
||||
LoopCmps:
|
||||
mov eax, [esi + edx]
|
||||
xor eax, [edi + edx]
|
||||
jnz LeaveLoopCmps
|
||||
mov eax, [esi + edx + 4]
|
||||
xor eax, [edi + edx + 4]
|
||||
jnz LeaveLoopCmps4
|
||||
add edx, 8
|
||||
jnz LoopCmps
|
||||
jmp short LenMaximum
|
||||
LeaveLoopCmps4: add edx, 4
|
||||
LeaveLoopCmps: test eax, 0000FFFFh
|
||||
jnz LenLower
|
||||
add edx, 2
|
||||
shr eax, 16
|
||||
LenLower: sub al, 1
|
||||
adc edx, 0
|
||||
|
||||
;;; Calculate the length of the match. If it is longer than MAX_MATCH,
|
||||
;;; then automatically accept it as the best possible match and leave.
|
||||
|
||||
lea eax, [edi + edx]
|
||||
mov edi, [scan]
|
||||
sub eax, edi
|
||||
cmp eax, MAX_MATCH
|
||||
jge LenMaximum
|
||||
|
||||
;;; If the length of the match is not longer than the best match we
|
||||
;;; have so far, then forget it and return to the lookup loop.
|
||||
|
||||
mov edx, [deflatestate]
|
||||
mov ebx, [bestlen]
|
||||
cmp eax, ebx
|
||||
jg LongerMatch
|
||||
mov esi, [windowbestlen]
|
||||
mov edi, [edx + dsPrev]
|
||||
mov ebx, [scanend]
|
||||
mov edx, [chainlenwmask]
|
||||
jmp LookupLoop
|
||||
|
||||
;;; s->match_start = cur_match;
|
||||
;;; best_len = len;
|
||||
;;; if (len >= nice_match) break;
|
||||
;;; scan_end = *(ushf*)(scan+best_len-1);
|
||||
|
||||
LongerMatch: mov ebx, [nicematch]
|
||||
mov [bestlen], eax
|
||||
mov [edx + dsMatchStart], ecx
|
||||
cmp eax, ebx
|
||||
jge LeaveNow
|
||||
mov esi, [window]
|
||||
add esi, eax
|
||||
mov [windowbestlen], esi
|
||||
movzx ebx, word ptr [edi + eax - 1]
|
||||
mov edi, [edx + dsPrev]
|
||||
mov [scanend], ebx
|
||||
mov edx, [chainlenwmask]
|
||||
jmp LookupLoop
|
||||
|
||||
;;; Accept the current string, with the maximum possible length.
|
||||
|
||||
LenMaximum: mov edx, [deflatestate]
|
||||
mov dword ptr [bestlen], MAX_MATCH
|
||||
mov [edx + dsMatchStart], ecx
|
||||
|
||||
;;; if ((uInt)best_len <= s->lookahead) return (uInt)best_len;
|
||||
;;; return s->lookahead;
|
||||
|
||||
LeaveNow:
|
||||
mov edx, [deflatestate]
|
||||
mov ebx, [bestlen]
|
||||
mov eax, [edx + dsLookahead]
|
||||
cmp ebx, eax
|
||||
jg LookaheadRet
|
||||
mov eax, ebx
|
||||
LookaheadRet:
|
||||
|
||||
;;; Restore the stack and return from whence we came.
|
||||
|
||||
add esp, LocalVarsSize
|
||||
pop ebx
|
||||
pop esi
|
||||
pop edi
|
||||
pop ebp
|
||||
|
||||
ret
|
||||
; please don't remove this string !
|
||||
; Your can freely use gvmat32 in any free or commercial app if you don't remove the string in the binary!
|
||||
db 0dh,0ah,"asm686 with masm, optimised assembly code from Brian Raiter, written 1998",0dh,0ah
|
||||
|
||||
|
||||
IFDEF NOOLDPENTIUMCODE
|
||||
IFDEF NOUNDERLINE
|
||||
longest_match endp
|
||||
ELSE
|
||||
_longest_match endp
|
||||
ENDIF
|
||||
|
||||
IFDEF NOUNDERLINE
|
||||
match_init proc near
|
||||
ret
|
||||
match_init endp
|
||||
ELSE
|
||||
_match_init proc near
|
||||
ret
|
||||
_match_init endp
|
||||
ENDIF
|
||||
ELSE
|
||||
IFDEF NOUNDERLINE
|
||||
longest_match_686 endp
|
||||
ELSE
|
||||
_longest_match_686 endp
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
_TEXT ends
|
||||
end
|
64
common/dist/zlib/contrib/masmx86/gvmat32c.c
vendored
64
common/dist/zlib/contrib/masmx86/gvmat32c.c
vendored
@ -1,64 +0,0 @@
|
||||
/* $NetBSD: gvmat32c.c,v 1.1.1.1 2006/01/14 20:10:56 christos Exp $ */
|
||||
|
||||
/* gvmat32.c -- C portion of the optimized longest_match for 32 bits x86
|
||||
* Copyright (C) 1995-1996 Jean-loup Gailly and Gilles Vollant.
|
||||
* File written by Gilles Vollant, by modifiying the longest_match
|
||||
* from Jean-loup Gailly in deflate.c
|
||||
* it prepare all parameters and call the assembly longest_match_gvasm
|
||||
* longest_match execute standard C code is wmask != 0x7fff
|
||||
* (assembly code is faster with a fixed wmask)
|
||||
*
|
||||
* Read comment at beginning of gvmat32.asm for more information
|
||||
*/
|
||||
|
||||
#if defined(ASMV) && (!defined(NOOLDPENTIUMCODE))
|
||||
#include "deflate.h"
|
||||
|
||||
/* if your C compiler don't add underline before function name,
|
||||
define ADD_UNDERLINE_ASMFUNC */
|
||||
#ifdef ADD_UNDERLINE_ASMFUNC
|
||||
#define longest_match_7fff _longest_match_7fff
|
||||
#define longest_match_686 _longest_match_686
|
||||
#define cpudetect32 _cpudetect32
|
||||
#endif
|
||||
|
||||
|
||||
unsigned long cpudetect32();
|
||||
|
||||
uInt longest_match_c(
|
||||
deflate_state *s,
|
||||
IPos cur_match); /* current match */
|
||||
|
||||
|
||||
uInt longest_match_7fff(
|
||||
deflate_state *s,
|
||||
IPos cur_match); /* current match */
|
||||
|
||||
uInt longest_match_686(
|
||||
deflate_state *s,
|
||||
IPos cur_match); /* current match */
|
||||
|
||||
|
||||
static uInt iIsPPro=2;
|
||||
|
||||
void match_init ()
|
||||
{
|
||||
iIsPPro = (((cpudetect32()/0x100)&0xf)>=6) ? 1 : 0;
|
||||
}
|
||||
|
||||
uInt longest_match(
|
||||
deflate_state *s,
|
||||
IPos cur_match) /* current match */
|
||||
{
|
||||
if (iIsPPro!=0)
|
||||
return longest_match_686(s,cur_match);
|
||||
|
||||
if (s->w_mask != 0x7fff)
|
||||
return longest_match_686(s,cur_match);
|
||||
|
||||
/* now ((s->w_mask == 0x7fff) && (iIsPPro==0)) */
|
||||
return longest_match_7fff(s,cur_match);
|
||||
}
|
||||
|
||||
|
||||
#endif /* defined(ASMV) && (!defined(NOOLDPENTIUMCODE)) */
|
3
common/dist/zlib/contrib/masmx86/mkasm.bat
vendored
3
common/dist/zlib/contrib/masmx86/mkasm.bat
vendored
@ -1,3 +0,0 @@
|
||||
cl /DASMV /I..\.. /O2 /c gvmat32c.c
|
||||
ml /coff /Zi /c /Flgvmat32.lst gvmat32.asm
|
||||
ml /coff /Zi /c /Flinffas32.lst inffas32.asm
|
67
common/dist/zlib/contrib/minizip/ChangeLogUnzip
vendored
67
common/dist/zlib/contrib/minizip/ChangeLogUnzip
vendored
@ -1,67 +0,0 @@
|
||||
Change in 1.01e (12 feb 05)
|
||||
- Fix in zipOpen2 for globalcomment (Rolf Kalbermatter)
|
||||
- Fix possible memory leak in unzip.c (Zoran Stevanovic)
|
||||
|
||||
Change in 1.01b (20 may 04)
|
||||
- Integrate patch from Debian package (submited by Mark Brown)
|
||||
- Add tools mztools from Xavier Roche
|
||||
|
||||
Change in 1.01 (8 may 04)
|
||||
- fix buffer overrun risk in unzip.c (Xavier Roche)
|
||||
- fix a minor buffer insecurity in minizip.c (Mike Whittaker)
|
||||
|
||||
Change in 1.00: (10 sept 03)
|
||||
- rename to 1.00
|
||||
- cosmetic code change
|
||||
|
||||
Change in 0.22: (19 May 03)
|
||||
- crypting support (unless you define NOCRYPT)
|
||||
- append file in existing zipfile
|
||||
|
||||
Change in 0.21: (10 Mar 03)
|
||||
- bug fixes
|
||||
|
||||
Change in 0.17: (27 Jan 02)
|
||||
- bug fixes
|
||||
|
||||
Change in 0.16: (19 Jan 02)
|
||||
- Support of ioapi for virtualize zip file access
|
||||
|
||||
Change in 0.15: (19 Mar 98)
|
||||
- fix memory leak in minizip.c
|
||||
|
||||
Change in 0.14: (10 Mar 98)
|
||||
- fix bugs in minizip.c sample for zipping big file
|
||||
- fix problem in month in date handling
|
||||
- fix bug in unzlocal_GetCurrentFileInfoInternal in unzip.c for
|
||||
comment handling
|
||||
|
||||
Change in 0.13: (6 Mar 98)
|
||||
- fix bugs in zip.c
|
||||
- add real minizip sample
|
||||
|
||||
Change in 0.12: (4 Mar 98)
|
||||
- add zip.c and zip.h for creates .zip file
|
||||
- fix change_file_date in miniunz.c for Unix (Jean-loup Gailly)
|
||||
- fix miniunz.c for file without specific record for directory
|
||||
|
||||
Change in 0.11: (3 Mar 98)
|
||||
- fix bug in unzGetCurrentFileInfo for get extra field and comment
|
||||
- enhance miniunz sample, remove the bad unztst.c sample
|
||||
|
||||
Change in 0.10: (2 Mar 98)
|
||||
- fix bug in unzReadCurrentFile
|
||||
- rename unzip* to unz* function and structure
|
||||
- remove Windows-like hungary notation variable name
|
||||
- modify some structure in unzip.h
|
||||
- add somes comment in source
|
||||
- remove unzipGetcCurrentFile function
|
||||
- replace ZUNZEXPORT by ZEXPORT
|
||||
- add unzGetLocalExtrafield for get the local extrafield info
|
||||
- add a new sample, miniunz.c
|
||||
|
||||
Change in 0.4: (25 Feb 98)
|
||||
- suppress the type unzipFileInZip.
|
||||
Only on file in the zipfile can be open at the same time
|
||||
- fix somes typo in code
|
||||
- added tm_unz structure in unzip_file_info (date/time in readable format)
|
126
common/dist/zlib/contrib/vstudio/vc7/miniunz.vcproj
vendored
126
common/dist/zlib/contrib/vstudio/vc7/miniunz.vcproj
vendored
@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="miniunz"
|
||||
ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/miniunz.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/miniunz.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
||||
<File
|
||||
RelativePath="..\..\minizip\miniunz.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="ReleaseDll\zlibwapi.lib">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
126
common/dist/zlib/contrib/vstudio/vc7/minizip.vcproj
vendored
126
common/dist/zlib/contrib/vstudio/vc7/minizip.vcproj
vendored
@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="minizip"
|
||||
ProjectGUID="{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/minizip.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/minizip.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/minizip.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
||||
<File
|
||||
RelativePath="..\..\minizip\minizip.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="ReleaseDll\zlibwapi.lib">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
126
common/dist/zlib/contrib/vstudio/vc7/testzlib.vcproj
vendored
126
common/dist/zlib/contrib/vstudio/vc7/testzlib.vcproj
vendored
@ -1,126 +0,0 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="testZlibDll"
|
||||
ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="5"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="TRUE"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
||||
<File
|
||||
RelativePath="..\..\testzlib\testzlib.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc">
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="ReleaseDll\zlibwapi.lib">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
32
common/dist/zlib/contrib/vstudio/vc7/zlib.rc
vendored
32
common/dist/zlib/contrib/vstudio/vc7/zlib.rc
vendored
@ -1,32 +0,0 @@
|
||||
#include <windows.h>
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1,2,3,0
|
||||
PRODUCTVERSION 1,2,3,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE 0 // not used
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
//language ID = U.S. English, char set = Windows, Multilingual
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression library\0"
|
||||
VALUE "FileVersion", "1.2.3.0\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlib.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 1252
|
||||
END
|
||||
END
|
246
common/dist/zlib/contrib/vstudio/vc7/zlibstat.vcproj
vendored
246
common/dist/zlib/contrib/vstudio/vc7/zlibstat.vcproj
vendored
@ -1,246 +0,0 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="zlibstat"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\zlibstatDebug"
|
||||
IntermediateDirectory=".\zlibstatDebug"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="5"
|
||||
PrecompiledHeaderFile=".\zlibstatDebug/zlibstat.pch"
|
||||
AssemblerListingLocation=".\zlibstatDebug/"
|
||||
ObjectFile=".\zlibstatDebug/"
|
||||
ProgramDataBaseFileName=".\zlibstatDebug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="1"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/NODEFAULTLIB "
|
||||
OutputFile=".\zlibstatDebug\zlibstat.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseAxp|Win32"
|
||||
OutputDirectory=".\zlibsta0"
|
||||
IntermediateDirectory=".\zlibsta0"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\zlibsta0/zlibstat.pch"
|
||||
AssemblerListingLocation=".\zlibsta0/"
|
||||
ObjectFile=".\zlibsta0/"
|
||||
ProgramDataBaseFileName=".\zlibsta0/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/NODEFAULTLIB "
|
||||
OutputFile=".\zlibsta0\zlibstat.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\zlibstat"
|
||||
IntermediateDirectory=".\zlibstat"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;ASMV;ASMINF"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\zlibstat/zlibstat.pch"
|
||||
AssemblerListingLocation=".\zlibstat/"
|
||||
ObjectFile=".\zlibstat/"
|
||||
ProgramDataBaseFileName=".\zlibstat/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj /NODEFAULTLIB "
|
||||
OutputFile=".\zlibstat\zlibstat.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
OutputDirectory="zlibstatWithoutAsm"
|
||||
IntermediateDirectory="zlibstatWithoutAsm"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="4"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\zlibstat/zlibstat.pch"
|
||||
AssemblerListingLocation=".\zlibstatWithoutAsm/"
|
||||
ObjectFile=".\zlibstatWithoutAsm/"
|
||||
ProgramDataBaseFileName=".\zlibstatWithoutAsm/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions=" /NODEFAULTLIB "
|
||||
OutputFile=".\zlibstatWithoutAsm\zlibstat.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\adler32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\compress.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\crc32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\deflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx86\gvmat32c.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\gzio.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\infback.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inffast.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inftrees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\ioapi.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\trees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\uncompr.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\unzip.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\zip.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlibvc.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\zutil.c">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
92
common/dist/zlib/contrib/vstudio/vc7/zlibvc.def
vendored
92
common/dist/zlib/contrib/vstudio/vc7/zlibvc.def
vendored
@ -1,92 +0,0 @@
|
||||
|
||||
VERSION 1.23
|
||||
|
||||
HEAPSIZE 1048576,8192
|
||||
|
||||
EXPORTS
|
||||
adler32 @1
|
||||
compress @2
|
||||
crc32 @3
|
||||
deflate @4
|
||||
deflateCopy @5
|
||||
deflateEnd @6
|
||||
deflateInit2_ @7
|
||||
deflateInit_ @8
|
||||
deflateParams @9
|
||||
deflateReset @10
|
||||
deflateSetDictionary @11
|
||||
gzclose @12
|
||||
gzdopen @13
|
||||
gzerror @14
|
||||
gzflush @15
|
||||
gzopen @16
|
||||
gzread @17
|
||||
gzwrite @18
|
||||
inflate @19
|
||||
inflateEnd @20
|
||||
inflateInit2_ @21
|
||||
inflateInit_ @22
|
||||
inflateReset @23
|
||||
inflateSetDictionary @24
|
||||
inflateSync @25
|
||||
uncompress @26
|
||||
zlibVersion @27
|
||||
gzprintf @28
|
||||
gzputc @29
|
||||
gzgetc @30
|
||||
gzseek @31
|
||||
gzrewind @32
|
||||
gztell @33
|
||||
gzeof @34
|
||||
gzsetparams @35
|
||||
zError @36
|
||||
inflateSyncPoint @37
|
||||
get_crc_table @38
|
||||
compress2 @39
|
||||
gzputs @40
|
||||
gzgets @41
|
||||
inflateCopy @42
|
||||
inflateBackInit_ @43
|
||||
inflateBack @44
|
||||
inflateBackEnd @45
|
||||
compressBound @46
|
||||
deflateBound @47
|
||||
gzclearerr @48
|
||||
gzungetc @49
|
||||
zlibCompileFlags @50
|
||||
deflatePrime @51
|
||||
|
||||
unzOpen @61
|
||||
unzClose @62
|
||||
unzGetGlobalInfo @63
|
||||
unzGetCurrentFileInfo @64
|
||||
unzGoToFirstFile @65
|
||||
unzGoToNextFile @66
|
||||
unzOpenCurrentFile @67
|
||||
unzReadCurrentFile @68
|
||||
unzOpenCurrentFile3 @69
|
||||
unztell @70
|
||||
unzeof @71
|
||||
unzCloseCurrentFile @72
|
||||
unzGetGlobalComment @73
|
||||
unzStringFileNameCompare @74
|
||||
unzLocateFile @75
|
||||
unzGetLocalExtrafield @76
|
||||
unzOpen2 @77
|
||||
unzOpenCurrentFile2 @78
|
||||
unzOpenCurrentFilePassword @79
|
||||
|
||||
zipOpen @80
|
||||
zipOpenNewFileInZip @81
|
||||
zipWriteInFileInZip @82
|
||||
zipCloseFileInZip @83
|
||||
zipClose @84
|
||||
zipOpenNewFileInZip2 @86
|
||||
zipCloseFileInZipRaw @87
|
||||
zipOpen2 @88
|
||||
zipOpenNewFileInZip3 @89
|
||||
|
||||
unzGetFilePos @100
|
||||
unzGoToFilePos @101
|
||||
|
||||
fill_win32_filefunc @110
|
78
common/dist/zlib/contrib/vstudio/vc7/zlibvc.sln
vendored
78
common/dist/zlib/contrib/vstudio/vc7/zlibvc.sln
vendored
@ -1,78 +0,0 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 7.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testZlibDll", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
ConfigName.0 = Debug
|
||||
ConfigName.1 = Release
|
||||
ConfigName.2 = ReleaseAxp
|
||||
ConfigName.3 = ReleaseWithoutAsm
|
||||
ConfigName.4 = ReleaseWithoutCrtdll
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectDependencies) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.ActiveCfg = Debug|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug.Build.0 = Debug|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.ActiveCfg = Release|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release.Build.0 = Release|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseAxp.Build.0 = ReleaseAxp|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseAxp|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutCrtdll.Build.0 = ReleaseAxp|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.ActiveCfg = Debug|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug.Build.0 = Debug|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.ActiveCfg = Release|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release.Build.0 = Release|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.ActiveCfg = ReleaseAxp|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseAxp.Build.0 = ReleaseAxp|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.ActiveCfg = ReleaseWithoutAsm|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm.Build.0 = ReleaseWithoutAsm|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.ActiveCfg = ReleaseWithoutCrtdll|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutCrtdll.Build.0 = ReleaseWithoutCrtdll|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.ActiveCfg = Debug|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug.Build.0 = Debug|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.ActiveCfg = Release|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release.Build.0 = Release|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.ActiveCfg = Release|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseAxp.Build.0 = Release|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm.Build.0 = Release|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.ActiveCfg = Debug|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug.Build.0 = Debug|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.ActiveCfg = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release.Build.0 = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.ActiveCfg = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseAxp.Build.0 = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm.Build.0 = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.ActiveCfg = Debug|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Debug.Build.0 = Debug|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.ActiveCfg = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.Release.Build.0 = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.ActiveCfg = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseAxp.Build.0 = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.ActiveCfg = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutAsm.Build.0 = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.ActiveCfg = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654C}.ReleaseWithoutCrtdll.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
445
common/dist/zlib/contrib/vstudio/vc7/zlibvc.vcproj
vendored
445
common/dist/zlib/contrib/vstudio/vc7/zlibvc.vcproj
vendored
@ -1,445 +0,0 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="zlibvc"
|
||||
SccProjectName=""
|
||||
SccLocalPath="">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\DebugDll"
|
||||
IntermediateDirectory=".\DebugDll"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="1"
|
||||
PrecompiledHeaderFile=".\DebugDll/zlibvc.pch"
|
||||
AssemblerListingLocation=".\DebugDll/"
|
||||
ObjectFile=".\DebugDll/"
|
||||
ProgramDataBaseFileName=".\DebugDll/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
|
||||
OutputFile=".\DebugDll\zlibwapi.dll"
|
||||
LinkIncremental="2"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ModuleDefinitionFile=".\zlibvc.def"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\DebugDll/zlibwapi.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary=".\DebugDll/zlibwapi.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\DebugDll/zlibvc.tlb"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
OutputDirectory=".\zlibDllWithoutAsm"
|
||||
IntermediateDirectory=".\zlibDllWithoutAsm"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
WholeProgramOptimization="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\zlibDllWithoutAsm/zlibvc.pch"
|
||||
AssemblerOutput="2"
|
||||
AssemblerListingLocation=".\zlibDllWithoutAsm/"
|
||||
ObjectFile=".\zlibDllWithoutAsm/"
|
||||
ProgramDataBaseFileName=".\zlibDllWithoutAsm/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="crtdll.lib"
|
||||
OutputFile=".\zlibDllWithoutAsm\zlibwapi.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
IgnoreAllDefaultLibraries="TRUE"
|
||||
ModuleDefinitionFile=".\zlibvc.def"
|
||||
ProgramDatabaseFile=".\zlibDllWithoutAsm/zlibwapi.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
MapFileName=".\zlibDllWithoutAsm/zlibwapi.map"
|
||||
SubSystem="2"
|
||||
OptimizeForWindows98="1"
|
||||
ImportLibrary=".\zlibDllWithoutAsm/zlibwapi.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\zlibDllWithoutAsm/zlibvc.tlb"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithoutCrtdll|Win32"
|
||||
OutputDirectory=".\zlibDllWithoutCrtDll"
|
||||
IntermediateDirectory=".\zlibDllWithoutCrtDll"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
WholeProgramOptimization="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\zlibDllWithoutCrtDll/zlibvc.pch"
|
||||
AssemblerOutput="2"
|
||||
AssemblerListingLocation=".\zlibDllWithoutCrtDll/"
|
||||
ObjectFile=".\zlibDllWithoutCrtDll/"
|
||||
ProgramDataBaseFileName=".\zlibDllWithoutCrtDll/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "
|
||||
OutputFile=".\zlibDllWithoutCrtDll\zlibwapi.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
IgnoreAllDefaultLibraries="FALSE"
|
||||
ModuleDefinitionFile=".\zlibvc.def"
|
||||
ProgramDatabaseFile=".\zlibDllWithoutCrtDll/zlibwapi.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
MapFileName=".\zlibDllWithoutCrtDll/zlibwapi.map"
|
||||
SubSystem="2"
|
||||
OptimizeForWindows98="1"
|
||||
ImportLibrary=".\zlibDllWithoutCrtDll/zlibwapi.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\zlibDllWithoutCrtDll/zlibvc.tlb"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseAxp|Win32"
|
||||
OutputDirectory=".\zlibvc__"
|
||||
IntermediateDirectory=".\zlibvc__"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
WholeProgramOptimization="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32,ZLIB_WINAPI"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\zlibvc__/zlibvc.pch"
|
||||
AssemblerOutput="2"
|
||||
AssemblerListingLocation=".\zlibvc__/"
|
||||
ObjectFile=".\zlibvc__/"
|
||||
ProgramDataBaseFileName=".\zlibvc__/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="crtdll.lib"
|
||||
OutputFile="zlibvc__\zlibwapi.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
IgnoreAllDefaultLibraries="TRUE"
|
||||
ModuleDefinitionFile=".\zlibvc.def"
|
||||
ProgramDatabaseFile=".\zlibvc__/zlibwapi.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
MapFileName=".\zlibvc__/zlibwapi.map"
|
||||
SubSystem="2"
|
||||
ImportLibrary=".\zlibvc__/zlibwapi.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\zlibvc__/zlibvc.tlb"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\ReleaseDll"
|
||||
IntermediateDirectory=".\ReleaseDll"
|
||||
ConfigurationType="2"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
WholeProgramOptimization="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32,ZLIB_WINAPI,ASMV,ASMINF"
|
||||
StringPooling="TRUE"
|
||||
ExceptionHandling="FALSE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
PrecompiledHeaderFile=".\ReleaseDll/zlibvc.pch"
|
||||
AssemblerOutput="2"
|
||||
AssemblerListingLocation=".\ReleaseDll/"
|
||||
ObjectFile=".\ReleaseDll/"
|
||||
ProgramDataBaseFileName=".\ReleaseDll/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="/MACHINE:I386"
|
||||
AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj crtdll.lib"
|
||||
OutputFile=".\ReleaseDll\zlibwapi.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
IgnoreAllDefaultLibraries="TRUE"
|
||||
ModuleDefinitionFile=".\zlibvc.def"
|
||||
ProgramDatabaseFile=".\ReleaseDll/zlibwapi.pdb"
|
||||
GenerateMapFile="TRUE"
|
||||
MapFileName=".\ReleaseDll/zlibwapi.map"
|
||||
SubSystem="2"
|
||||
OptimizeForWindows98="1"
|
||||
ImportLibrary=".\ReleaseDll/zlibwapi.lib"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="TRUE"
|
||||
SuppressStartupBanner="TRUE"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/zlibvc.tlb"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1036"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90">
|
||||
<File
|
||||
RelativePath="..\..\..\adler32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\compress.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\crc32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\deflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx86\gvmat32c.c">
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
ExcludedFromBuild="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\gzio.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\infback.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inffast.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inflate.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inftrees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\ioapi.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\iowin32.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\trees.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\uncompr.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\unzip.c">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="ZLIB_INTERNAL"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\zip.c">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="ZLIB_INTERNAL"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlibvc.def">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\zutil.c">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;fi;fd">
|
||||
<File
|
||||
RelativePath="..\..\..\deflate.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\infblock.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\infcodes.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inffast.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inftrees.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\infutil.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\zconf.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\zlib.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\zutil.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe">
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
566
common/dist/zlib/contrib/vstudio/vc8/miniunz.vcproj
vendored
566
common/dist/zlib/contrib/vstudio/vc8/miniunz.vcproj
vendored
@ -1,566 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="miniunz"
|
||||
ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
<Platform
|
||||
Name="Itanium"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/miniunz.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/miniunz.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Itanium"
|
||||
OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/miniunz.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/miniunz.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="x86\MiniUnzip$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\MiniUnzip$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/miniunz.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="x64\MiniUnzip$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\MiniUnzip$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/miniunz.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Itanium"
|
||||
OutputDirectory="ia64\MiniUnzip$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\MiniUnzip$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/miniunz.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\minizip\miniunz.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
563
common/dist/zlib/contrib/vstudio/vc8/minizip.vcproj
vendored
563
common/dist/zlib/contrib/vstudio/vc8/minizip.vcproj
vendored
@ -1,563 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="minizip"
|
||||
ProjectGUID="{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
<Platform
|
||||
Name="Itanium"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="x86\MiniZip$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/minizip.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/minizip.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="x64\$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/minizip.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/minizip.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Itanium"
|
||||
OutputDirectory="ia64\$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/minizip.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/minizip.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="x86\MiniZip$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\MiniZip$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/minizip.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="x64\$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/minizip.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Itanium"
|
||||
OutputDirectory="ia64\$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/minizip.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\minizip\minizip.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
948
common/dist/zlib/contrib/vstudio/vc8/testzlib.vcproj
vendored
948
common/dist/zlib/contrib/vstudio/vc8/testzlib.vcproj
vendored
@ -1,948 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="testzlib"
|
||||
ProjectGUID="{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
|
||||
RootNamespace="testzlib"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
<Platform
|
||||
Name="Itanium"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="x86\TestZlib$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerOutput="4"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="x64\TestZlib$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
|
||||
GenerateManifest="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Itanium"
|
||||
OutputDirectory="ia64\TestZlib$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerOutput="4"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
OutputDirectory="x86\TestZlib$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithoutAsm|x64"
|
||||
OutputDirectory="x64\TestZlib$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies=""
|
||||
GenerateManifest="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
OutputDirectory="ia64\TestZlib$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="x86\TestZlib$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\TestZlib$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="x64\TestZlib$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\TestZlib$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj"
|
||||
GenerateManifest="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Itanium"
|
||||
OutputDirectory="ia64\TestZlib$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\TestZlib$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\.."
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\adler32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\compress.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\crc32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\deflate.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx86\gvmat32c.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win64 (AMD64)"
|
||||
ExcludedFromBuild="TRUE"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win64 (AMD64)"
|
||||
ExcludedFromBuild="TRUE"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseAsm|Win64 (AMD64)"
|
||||
ExcludedFromBuild="TRUE"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
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"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inflate.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inftrees.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\testzlib\testzlib.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\trees.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\uncompr.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\zutil.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,567 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="TestZlibDll"
|
||||
ProjectGUID="{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
|
||||
Keyword="Win32Proj"
|
||||
SignManifests="true"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
<Platform
|
||||
Name="Itanium"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x86\ZlibDllDebug\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x64\ZlibDllDebug\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Itanium"
|
||||
OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE;WIN64"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ia64\ZlibDllDebug\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="2"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/testzlib.pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="x86\TestZlibDll$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\TestZlibDll$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x86\ZlibDllRelease\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="x64\TestZlibDll$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\TestZlibDll$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="x64\ZlibDllRelease\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="17"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Itanium"
|
||||
OutputDirectory="ia64\TestZlibDll$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\TestZlibDll$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
OmitFramePointers="true"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\minizip"
|
||||
PreprocessorDefinitions="_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE;WIN64"
|
||||
StringPooling="true"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="ia64\ZlibDllRelease\zlibwapi.lib"
|
||||
OutputFile="$(OutDir)/testzlib.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateManifest="false"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
OptimizeForWindows98="1"
|
||||
TargetMachine="5"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\testzlib\testzlib.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
32
common/dist/zlib/contrib/vstudio/vc8/zlib.rc
vendored
32
common/dist/zlib/contrib/vstudio/vc8/zlib.rc
vendored
@ -1,32 +0,0 @@
|
||||
#include <windows.h>
|
||||
|
||||
#define IDR_VERSION1 1
|
||||
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
|
||||
FILEVERSION 1,2,3,0
|
||||
PRODUCTVERSION 1,2,3,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS_DOS_WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE 0 // not used
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
//language ID = U.S. English, char set = Windows, Multilingual
|
||||
|
||||
BEGIN
|
||||
VALUE "FileDescription", "zlib data compression library\0"
|
||||
VALUE "FileVersion", "1.2.3.0\0"
|
||||
VALUE "InternalName", "zlib\0"
|
||||
VALUE "OriginalFilename", "zlib.dll\0"
|
||||
VALUE "ProductName", "ZLib.DLL\0"
|
||||
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
|
||||
VALUE "LegalCopyright", "(C) 1995-2003 Jean-loup Gailly & Mark Adler\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 1252
|
||||
END
|
||||
END
|
870
common/dist/zlib/contrib/vstudio/vc8/zlibstat.vcproj
vendored
870
common/dist/zlib/contrib/vstudio/vc8/zlibstat.vcproj
vendored
@ -1,870 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Name="zlibstat"
|
||||
ProjectGUID="{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
<Platform
|
||||
Name="x64"
|
||||
/>
|
||||
<Platform
|
||||
Name="Itanium"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="x86\ZlibStat$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(OutDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|x64"
|
||||
OutputDirectory="x64\ZlibStat$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(OutDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Itanium"
|
||||
OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="3"
|
||||
BufferSecurityCheck="false"
|
||||
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(OutDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="x86\ZlibStat$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ASMV;ASMINF"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(OutDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
|
||||
AdditionalDependencies="..\..\masmx86\gvmat32.obj ..\..\masmx86\inffas32.obj "
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|x64"
|
||||
OutputDirectory="x64\ZlibStat$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ASMV;ASMINF;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(OutDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
|
||||
AdditionalDependencies="..\..\masmx64\gvmat64.obj ..\..\masmx64\inffasx64.obj "
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Itanium"
|
||||
OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(OutDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithoutAsm|Win32"
|
||||
OutputDirectory="x86\ZlibStat$(ConfigurationName)"
|
||||
IntermediateDirectory="x86\ZlibStat$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(OutDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:X86 /NODEFAULTLIB"
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithoutAsm|x64"
|
||||
OutputDirectory="x64\ZlibStat$(ConfigurationName)"
|
||||
IntermediateDirectory="x64\ZlibStat$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(OutDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:AMD64 /NODEFAULTLIB"
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
OutputDirectory="ia64\ZlibStat$(ConfigurationName)"
|
||||
IntermediateDirectory="ia64\ZlibStat$(ConfigurationName)\Tmp"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="UpgradeFromVC70.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TargetEnvironment="2"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
|
||||
PreprocessorDefinitions="ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;WIN64"
|
||||
StringPooling="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
|
||||
AssemblerListingLocation="$(IntDir)\"
|
||||
ObjectFile="$(IntDir)\"
|
||||
ProgramDataBaseFileName="$(OutDir)\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions="/MACHINE:IA64 /NODEFAULTLIB"
|
||||
OutputFile="$(OutDir)\zlibstat.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\..\adler32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\compress.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\crc32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\deflate.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\masmx86\gvmat32c.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|x64"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="ReleaseWithoutAsm|Itanium"
|
||||
ExcludedFromBuild="true"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\gzio.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
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"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inflate.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\inftrees.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\ioapi.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\trees.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\uncompr.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\unzip.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\minizip\zip.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlib.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\zlibvc.def"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\zutil.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
92
common/dist/zlib/contrib/vstudio/vc8/zlibvc.def
vendored
92
common/dist/zlib/contrib/vstudio/vc8/zlibvc.def
vendored
@ -1,92 +0,0 @@
|
||||
|
||||
VERSION 1.23
|
||||
|
||||
HEAPSIZE 1048576,8192
|
||||
|
||||
EXPORTS
|
||||
adler32 @1
|
||||
compress @2
|
||||
crc32 @3
|
||||
deflate @4
|
||||
deflateCopy @5
|
||||
deflateEnd @6
|
||||
deflateInit2_ @7
|
||||
deflateInit_ @8
|
||||
deflateParams @9
|
||||
deflateReset @10
|
||||
deflateSetDictionary @11
|
||||
gzclose @12
|
||||
gzdopen @13
|
||||
gzerror @14
|
||||
gzflush @15
|
||||
gzopen @16
|
||||
gzread @17
|
||||
gzwrite @18
|
||||
inflate @19
|
||||
inflateEnd @20
|
||||
inflateInit2_ @21
|
||||
inflateInit_ @22
|
||||
inflateReset @23
|
||||
inflateSetDictionary @24
|
||||
inflateSync @25
|
||||
uncompress @26
|
||||
zlibVersion @27
|
||||
gzprintf @28
|
||||
gzputc @29
|
||||
gzgetc @30
|
||||
gzseek @31
|
||||
gzrewind @32
|
||||
gztell @33
|
||||
gzeof @34
|
||||
gzsetparams @35
|
||||
zError @36
|
||||
inflateSyncPoint @37
|
||||
get_crc_table @38
|
||||
compress2 @39
|
||||
gzputs @40
|
||||
gzgets @41
|
||||
inflateCopy @42
|
||||
inflateBackInit_ @43
|
||||
inflateBack @44
|
||||
inflateBackEnd @45
|
||||
compressBound @46
|
||||
deflateBound @47
|
||||
gzclearerr @48
|
||||
gzungetc @49
|
||||
zlibCompileFlags @50
|
||||
deflatePrime @51
|
||||
|
||||
unzOpen @61
|
||||
unzClose @62
|
||||
unzGetGlobalInfo @63
|
||||
unzGetCurrentFileInfo @64
|
||||
unzGoToFirstFile @65
|
||||
unzGoToNextFile @66
|
||||
unzOpenCurrentFile @67
|
||||
unzReadCurrentFile @68
|
||||
unzOpenCurrentFile3 @69
|
||||
unztell @70
|
||||
unzeof @71
|
||||
unzCloseCurrentFile @72
|
||||
unzGetGlobalComment @73
|
||||
unzStringFileNameCompare @74
|
||||
unzLocateFile @75
|
||||
unzGetLocalExtrafield @76
|
||||
unzOpen2 @77
|
||||
unzOpenCurrentFile2 @78
|
||||
unzOpenCurrentFilePassword @79
|
||||
|
||||
zipOpen @80
|
||||
zipOpenNewFileInZip @81
|
||||
zipWriteInFileInZip @82
|
||||
zipCloseFileInZip @83
|
||||
zipClose @84
|
||||
zipOpenNewFileInZip2 @86
|
||||
zipCloseFileInZipRaw @87
|
||||
zipOpen2 @88
|
||||
zipOpenNewFileInZip3 @89
|
||||
|
||||
unzGetFilePos @100
|
||||
unzGoToFilePos @101
|
||||
|
||||
fill_win32_filefunc @110
|
144
common/dist/zlib/contrib/vstudio/vc8/zlibvc.sln
vendored
144
common/dist/zlib/contrib/vstudio/vc8/zlibvc.sln
vendored
@ -1,144 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibvc", "zlibvc.vcproj", "{8FD826F8-3739-44E6-8CC8-997122E53B8D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlibstat", "zlibstat.vcproj", "{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testzlib", "testzlib.vcproj", "{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestZlibDll", "testzlibdll.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694366A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "minizip", "minizip.vcproj", "{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "miniunz", "miniunz.vcproj", "{C52F9E7B-498A-42BE-8DB4-85A15694382A}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D} = {8FD826F8-3739-44E6-8CC8-997122E53B8D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Itanium = Debug|Itanium
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Itanium = Release|Itanium
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
ReleaseWithoutAsm|Itanium = ReleaseWithoutAsm|Itanium
|
||||
ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32
|
||||
ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.ActiveCfg = Debug|Itanium
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Itanium.Build.0 = Debug|Itanium
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Debug|x64.Build.0 = Debug|x64
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.ActiveCfg = Release|Itanium
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Itanium.Build.0 = Release|Itanium
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|Win32.Build.0 = Release|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.ActiveCfg = ReleaseWithoutAsm|x64
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.Release|x64.Build.0 = ReleaseWithoutAsm|x64
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
|
||||
{8FD826F8-3739-44E6-8CC8-997122E53B8D}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.ActiveCfg = Debug|Itanium
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Itanium.Build.0 = Debug|Itanium
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.ActiveCfg = Release|Itanium
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Itanium.Build.0 = Release|Itanium
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
|
||||
{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = ReleaseWithoutAsm|Itanium
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = ReleaseWithoutAsm|Itanium
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64
|
||||
{AA6666AA-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.ActiveCfg = Debug|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Itanium.Build.0 = Debug|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Debug|x64.Build.0 = Debug|x64
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.ActiveCfg = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Itanium.Build.0 = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|Win32.Build.0 = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.ActiveCfg = Release|x64
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.Release|x64.Build.0 = Release|x64
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694366A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.ActiveCfg = Debug|Itanium
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Itanium.Build.0 = Debug|Itanium
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Debug|x64.Build.0 = Debug|x64
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.ActiveCfg = Release|Itanium
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Itanium.Build.0 = Release|Itanium
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|Win32.Build.0 = Release|Win32
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.ActiveCfg = Release|x64
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.Release|x64.Build.0 = Release|x64
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium
|
||||
{48CDD9DC-E09F-4135-9C0C-4FE50C3C654B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.ActiveCfg = Debug|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Itanium.Build.0 = Debug|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Debug|x64.Build.0 = Debug|x64
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.ActiveCfg = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Itanium.Build.0 = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|Win32.Build.0 = Release|Win32
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.ActiveCfg = Release|x64
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.Release|x64.Build.0 = Release|x64
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.ActiveCfg = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Itanium.Build.0 = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Itanium
|
||||
{C52F9E7B-498A-42BE-8DB4-85A15694382A}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Itanium
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
1219
common/dist/zlib/contrib/vstudio/vc8/zlibvc.vcproj
vendored
1219
common/dist/zlib/contrib/vstudio/vc8/zlibvc.vcproj
vendored
File diff suppressed because it is too large
Load Diff
158
common/dist/zlib/crc32.c
vendored
158
common/dist/zlib/crc32.c
vendored
@ -1,7 +1,7 @@
|
||||
/* $NetBSD: crc32.c,v 1.4 2006/02/18 18:39:58 dsl Exp $ */
|
||||
/* $NetBSD: crc32.c,v 1.5 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* crc32.c -- compute the CRC-32 of a data stream
|
||||
* Copyright (C) 1995-2005 Mark Adler
|
||||
* Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*
|
||||
* Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
|
||||
@ -11,7 +11,7 @@
|
||||
* factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3.
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
/* @(#) $Id: crc32.c,v 1.5 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/*
|
||||
Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore
|
||||
@ -19,6 +19,8 @@
|
||||
of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should
|
||||
first call get_crc_table() to initialize the tables before allowing more than
|
||||
one thread to use crc32().
|
||||
|
||||
DYNAMIC_CRC_TABLE and MAKECRCH can be #defined to write out crc32.h.
|
||||
*/
|
||||
|
||||
#ifdef MAKECRCH
|
||||
@ -37,40 +39,15 @@
|
||||
#define DYNAMIC_CRC_TABLE
|
||||
#endif
|
||||
|
||||
/* Find a four-byte integer type for crc32_little() and crc32_big(). */
|
||||
#ifndef NOBYFOUR
|
||||
#if defined(__NetBSD__) && defined(_KERNEL)
|
||||
# define BYFOUR
|
||||
typedef uint32_t u4;
|
||||
#else
|
||||
# ifdef STDC /* need ANSI C limits.h to determine sizes */
|
||||
# include <limits.h>
|
||||
# define BYFOUR
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
typedef unsigned int u4;
|
||||
# else
|
||||
# if (ULONG_MAX == 0xffffffffUL)
|
||||
typedef unsigned long u4;
|
||||
# else
|
||||
# if (USHRT_MAX == 0xffffffffUL)
|
||||
typedef unsigned short u4;
|
||||
# else
|
||||
# undef BYFOUR /* can't find a four-byte integer type! */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif /* STDC */
|
||||
#endif /* __NetBSD__ && _KERNEL */
|
||||
#endif /* !NOBYFOUR */
|
||||
|
||||
/* Definitions for doing the crc four data bytes at a time. */
|
||||
#if !defined(NOBYFOUR) && defined(Z_U4)
|
||||
# define BYFOUR
|
||||
#endif
|
||||
#ifdef BYFOUR
|
||||
# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
|
||||
(((w)&0xff00)<<8)+(((w)&0xff)<<24))
|
||||
local unsigned long crc32_little OF((unsigned long,
|
||||
const unsigned char FAR *, unsigned));
|
||||
const unsigned char FAR *, z_size_t));
|
||||
local unsigned long crc32_big OF((unsigned long,
|
||||
const unsigned char FAR *, unsigned));
|
||||
const unsigned char FAR *, z_size_t));
|
||||
# define TBLS 8
|
||||
#else
|
||||
# define TBLS 1
|
||||
@ -80,14 +57,16 @@
|
||||
local unsigned long gf2_matrix_times OF((unsigned long *mat,
|
||||
unsigned long vec));
|
||||
local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
|
||||
local uLong crc32_combine_ OF((uLong crc1, uLong crc2, z_off64_t len2));
|
||||
|
||||
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
|
||||
local volatile int crc_table_empty = 1;
|
||||
local unsigned long FAR crc_table[TBLS][256];
|
||||
local z_crc_t FAR crc_table[TBLS][256];
|
||||
local void make_crc_table OF((void));
|
||||
#ifdef MAKECRCH
|
||||
local void write_table OF((FILE *, const unsigned long FAR *));
|
||||
local void write_table OF((FILE *, const z_crc_t FAR *));
|
||||
#endif /* MAKECRCH */
|
||||
/*
|
||||
Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
|
||||
@ -117,9 +96,9 @@ local void make_crc_table OF((void));
|
||||
*/
|
||||
local void make_crc_table()
|
||||
{
|
||||
unsigned long c;
|
||||
z_crc_t c;
|
||||
int n, k;
|
||||
unsigned long poly; /* polynomial exclusive-or pattern */
|
||||
z_crc_t poly; /* polynomial exclusive-or pattern */
|
||||
/* terms of polynomial defining this crc (except x^32): */
|
||||
static volatile int first = 1; /* flag to limit concurrent making */
|
||||
static const unsigned char p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26};
|
||||
@ -131,13 +110,13 @@ local void make_crc_table()
|
||||
first = 0;
|
||||
|
||||
/* make exclusive-or pattern from polynomial (0xedb88320UL) */
|
||||
poly = 0UL;
|
||||
for (n = 0; n < sizeof(p)/sizeof(unsigned char); n++)
|
||||
poly |= 1UL << (31 - p[n]);
|
||||
poly = 0;
|
||||
for (n = 0; n < (int)(sizeof(p)/sizeof(unsigned char)); n++)
|
||||
poly |= (z_crc_t)1 << (31 - p[n]);
|
||||
|
||||
/* generate a crc for every 8-bit value */
|
||||
for (n = 0; n < 256; n++) {
|
||||
c = (unsigned long)n;
|
||||
c = (z_crc_t)n;
|
||||
for (k = 0; k < 8; k++)
|
||||
c = c & 1 ? poly ^ (c >> 1) : c >> 1;
|
||||
crc_table[0][n] = c;
|
||||
@ -148,11 +127,11 @@ local void make_crc_table()
|
||||
and then the byte reversal of those as well as the first table */
|
||||
for (n = 0; n < 256; n++) {
|
||||
c = crc_table[0][n];
|
||||
crc_table[4][n] = REV(c);
|
||||
crc_table[4][n] = ZSWAP32(c);
|
||||
for (k = 1; k < 4; k++) {
|
||||
c = crc_table[0][c & 0xff] ^ (c >> 8);
|
||||
crc_table[k][n] = c;
|
||||
crc_table[k + 4][n] = REV(c);
|
||||
crc_table[k + 4][n] = ZSWAP32(c);
|
||||
}
|
||||
}
|
||||
#endif /* BYFOUR */
|
||||
@ -174,7 +153,7 @@ local void make_crc_table()
|
||||
if (out == NULL) return;
|
||||
fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
|
||||
fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
|
||||
fprintf(out, "local const unsigned long FAR ");
|
||||
fprintf(out, "local const z_crc_t FAR ");
|
||||
fprintf(out, "crc_table[TBLS][256] =\n{\n {\n");
|
||||
write_table(out, crc_table[0]);
|
||||
# ifdef BYFOUR
|
||||
@ -194,12 +173,13 @@ local void make_crc_table()
|
||||
#ifdef MAKECRCH
|
||||
local void write_table(out, table)
|
||||
FILE *out;
|
||||
const unsigned long FAR *table;
|
||||
const z_crc_t FAR *table;
|
||||
{
|
||||
int n;
|
||||
|
||||
for (n = 0; n < 256; n++)
|
||||
fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ", table[n],
|
||||
fprintf(out, "%s0x%08lxUL%s", n % 5 ? "" : " ",
|
||||
(unsigned long)(table[n]),
|
||||
n == 255 ? "\n" : (n % 5 == 4 ? ",\n" : ", "));
|
||||
}
|
||||
#endif /* MAKECRCH */
|
||||
@ -214,13 +194,13 @@ local void write_table(out, table)
|
||||
/* =========================================================================
|
||||
* This function can be used by asm versions of crc32()
|
||||
*/
|
||||
const unsigned long FAR * ZEXPORT get_crc_table()
|
||||
const z_crc_t FAR * ZEXPORT get_crc_table()
|
||||
{
|
||||
#ifdef DYNAMIC_CRC_TABLE
|
||||
if (crc_table_empty)
|
||||
make_crc_table();
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
return (const unsigned long FAR *)crc_table;
|
||||
return (const z_crc_t FAR *)crc_table;
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
@ -228,10 +208,10 @@ const unsigned long FAR * ZEXPORT get_crc_table()
|
||||
#define DO8 DO1; DO1; DO1; DO1; DO1; DO1; DO1; DO1
|
||||
|
||||
/* ========================================================================= */
|
||||
unsigned long ZEXPORT crc32(crc, buf, len)
|
||||
unsigned long ZEXPORT crc32_z(crc, buf, len)
|
||||
unsigned long crc;
|
||||
const unsigned char FAR *buf;
|
||||
unsigned len;
|
||||
z_size_t len;
|
||||
{
|
||||
if (buf == Z_NULL) return 0UL;
|
||||
|
||||
@ -241,8 +221,8 @@ unsigned long ZEXPORT crc32(crc, buf, len)
|
||||
#endif /* DYNAMIC_CRC_TABLE */
|
||||
|
||||
#ifdef BYFOUR
|
||||
if (sizeof(void *) == sizeof(z_ptrdiff_t)) {
|
||||
u4 endian;
|
||||
if (sizeof(void *) == sizeof(ptrdiff_t)) {
|
||||
z_crc_t endian;
|
||||
|
||||
endian = 1;
|
||||
if (*((unsigned char *)(&endian)))
|
||||
@ -262,8 +242,29 @@ unsigned long ZEXPORT crc32(crc, buf, len)
|
||||
return crc ^ 0xffffffffUL;
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
unsigned long ZEXPORT crc32(crc, buf, len)
|
||||
unsigned long crc;
|
||||
const unsigned char FAR *buf;
|
||||
uInt len;
|
||||
{
|
||||
return crc32_z(crc, buf, len);
|
||||
}
|
||||
|
||||
#ifdef BYFOUR
|
||||
|
||||
/*
|
||||
This BYFOUR code accesses the passed unsigned char * buffer with a 32-bit
|
||||
integer pointer type. This violates the strict aliasing rule, where a
|
||||
compiler can assume, for optimization purposes, that two pointers to
|
||||
fundamentally different types won't ever point to the same memory. This can
|
||||
manifest as a problem only if one of the pointers is written to. This code
|
||||
only reads from those pointers. So long as this code remains isolated in
|
||||
this compilation unit, there won't be a problem. For this reason, this code
|
||||
should not be copied and pasted into a compilation unit in which other code
|
||||
writes to the buffer that is passed to these routines.
|
||||
*/
|
||||
|
||||
/* ========================================================================= */
|
||||
#define DOLIT4 c ^= *buf4++; \
|
||||
c = crc_table[3][c & 0xff] ^ crc_table[2][(c >> 8) & 0xff] ^ \
|
||||
@ -274,19 +275,19 @@ unsigned long ZEXPORT crc32(crc, buf, len)
|
||||
local unsigned long crc32_little(crc, buf, len)
|
||||
unsigned long crc;
|
||||
const unsigned char FAR *buf;
|
||||
unsigned len;
|
||||
z_size_t len;
|
||||
{
|
||||
register u4 c;
|
||||
register const u4 FAR *buf4;
|
||||
register z_crc_t c;
|
||||
register const z_crc_t FAR *buf4;
|
||||
|
||||
c = (u4)crc;
|
||||
c = (z_crc_t)crc;
|
||||
c = ~c;
|
||||
while (len && ((z_ptrdiff_t)buf & 3)) {
|
||||
c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
|
||||
len--;
|
||||
}
|
||||
|
||||
buf4 = (const u4 FAR *)(const void FAR *)buf;
|
||||
buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
|
||||
while (len >= 32) {
|
||||
DOLIT32;
|
||||
len -= 32;
|
||||
@ -305,7 +306,7 @@ local unsigned long crc32_little(crc, buf, len)
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
#define DOBIG4 c ^= *++buf4; \
|
||||
#define DOBIG4 c ^= *buf4++; \
|
||||
c = crc_table[4][c & 0xff] ^ crc_table[5][(c >> 8) & 0xff] ^ \
|
||||
crc_table[6][(c >> 16) & 0xff] ^ crc_table[7][c >> 24]
|
||||
#define DOBIG32 DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4; DOBIG4
|
||||
@ -314,20 +315,19 @@ local unsigned long crc32_little(crc, buf, len)
|
||||
local unsigned long crc32_big(crc, buf, len)
|
||||
unsigned long crc;
|
||||
const unsigned char FAR *buf;
|
||||
unsigned len;
|
||||
z_size_t len;
|
||||
{
|
||||
register u4 c;
|
||||
register const u4 FAR *buf4;
|
||||
register z_crc_t c;
|
||||
register const z_crc_t FAR *buf4;
|
||||
|
||||
c = REV((u4)crc);
|
||||
c = ZSWAP32((z_crc_t)crc);
|
||||
c = ~c;
|
||||
while (len && ((z_ptrdiff_t)buf & 3)) {
|
||||
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
|
||||
len--;
|
||||
}
|
||||
|
||||
buf4 = (const u4 FAR *)(const void FAR *)buf;
|
||||
buf4--;
|
||||
buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
|
||||
while (len >= 32) {
|
||||
DOBIG32;
|
||||
len -= 32;
|
||||
@ -336,14 +336,13 @@ local unsigned long crc32_big(crc, buf, len)
|
||||
DOBIG4;
|
||||
len -= 4;
|
||||
}
|
||||
buf4++;
|
||||
buf = (const unsigned char FAR *)buf4;
|
||||
|
||||
if (len) do {
|
||||
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
|
||||
} while (--len);
|
||||
c = ~c;
|
||||
return (unsigned long)(REV(c));
|
||||
return (unsigned long)(ZSWAP32(c));
|
||||
}
|
||||
|
||||
#endif /* BYFOUR */
|
||||
@ -379,22 +378,22 @@ local void gf2_matrix_square(square, mat)
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT crc32_combine(crc1, crc2, len2)
|
||||
local uLong crc32_combine_(crc1, crc2, len2)
|
||||
uLong crc1;
|
||||
uLong crc2;
|
||||
z_off_t len2;
|
||||
z_off64_t len2;
|
||||
{
|
||||
int n;
|
||||
unsigned long row;
|
||||
unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */
|
||||
unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */
|
||||
|
||||
/* degenerate case */
|
||||
if (len2 == 0)
|
||||
/* degenerate case (also disallow negative lengths) */
|
||||
if (len2 <= 0)
|
||||
return crc1;
|
||||
|
||||
/* put operator for one zero bit in odd */
|
||||
odd[0] = 0xedb88320L; /* CRC-32 polynomial */
|
||||
odd[0] = 0xedb88320UL; /* CRC-32 polynomial */
|
||||
row = 1;
|
||||
for (n = 1; n < GF2_DIM; n++) {
|
||||
odd[n] = row;
|
||||
@ -433,3 +432,20 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2)
|
||||
crc1 ^= crc2;
|
||||
return crc1;
|
||||
}
|
||||
|
||||
/* ========================================================================= */
|
||||
uLong ZEXPORT crc32_combine(crc1, crc2, len2)
|
||||
uLong crc1;
|
||||
uLong crc2;
|
||||
z_off_t len2;
|
||||
{
|
||||
return crc32_combine_(crc1, crc2, len2);
|
||||
}
|
||||
|
||||
uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
|
||||
uLong crc1;
|
||||
uLong crc2;
|
||||
z_off64_t len2;
|
||||
{
|
||||
return crc32_combine_(crc1, crc2, len2);
|
||||
}
|
||||
|
1312
common/dist/zlib/deflate.c
vendored
1312
common/dist/zlib/deflate.c
vendored
File diff suppressed because it is too large
Load Diff
78
common/dist/zlib/deflate.h
vendored
78
common/dist/zlib/deflate.h
vendored
@ -1,7 +1,7 @@
|
||||
/* $NetBSD: deflate.h,v 1.2 2006/01/16 17:02:29 christos Exp $ */
|
||||
/* $NetBSD: deflate.h,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* deflate.h -- internal compression state
|
||||
* Copyright (C) 1995-2004 Jean-loup Gailly
|
||||
* Copyright (C) 1995-2016 Jean-loup Gailly
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
/* @(#) $Id: deflate.h,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
#ifndef DEFLATE_H
|
||||
#define DEFLATE_H
|
||||
@ -50,13 +50,19 @@
|
||||
#define MAX_BITS 15
|
||||
/* All codes must not exceed MAX_BITS bits */
|
||||
|
||||
#define INIT_STATE 42
|
||||
#define EXTRA_STATE 69
|
||||
#define NAME_STATE 73
|
||||
#define COMMENT_STATE 91
|
||||
#define HCRC_STATE 103
|
||||
#define BUSY_STATE 113
|
||||
#define FINISH_STATE 666
|
||||
#define Buf_size 16
|
||||
/* size of bit buffer in bi_buf */
|
||||
|
||||
#define INIT_STATE 42 /* zlib header -> BUSY_STATE */
|
||||
#ifdef GZIP
|
||||
# define GZIP_STATE 57 /* gzip header -> BUSY_STATE | EXTRA_STATE */
|
||||
#endif
|
||||
#define EXTRA_STATE 69 /* gzip extra block -> NAME_STATE */
|
||||
#define NAME_STATE 73 /* gzip file name -> COMMENT_STATE */
|
||||
#define COMMENT_STATE 91 /* gzip comment -> HCRC_STATE */
|
||||
#define HCRC_STATE 103 /* gzip header CRC -> BUSY_STATE */
|
||||
#define BUSY_STATE 113 /* deflate -> FINISH_STATE */
|
||||
#define FINISH_STATE 666 /* stream complete */
|
||||
/* Stream status */
|
||||
|
||||
|
||||
@ -82,7 +88,7 @@ typedef struct static_tree_desc_s static_tree_desc;
|
||||
typedef struct tree_desc_s {
|
||||
ct_data *dyn_tree; /* the dynamic tree */
|
||||
int max_code; /* largest code with non zero frequency */
|
||||
static_tree_desc *stat_desc; /* the corresponding static tree */
|
||||
const static_tree_desc *stat_desc; /* the corresponding static tree */
|
||||
} FAR tree_desc;
|
||||
|
||||
typedef ush Pos;
|
||||
@ -99,11 +105,11 @@ typedef struct internal_state {
|
||||
Bytef *pending_buf; /* output still pending */
|
||||
ulg pending_buf_size; /* size of pending_buf */
|
||||
Bytef *pending_out; /* next pending byte to output to the stream */
|
||||
uInt pending; /* nb of bytes in the pending buffer */
|
||||
ulg pending; /* nb of bytes in the pending buffer */
|
||||
int wrap; /* bit 0 true for zlib, bit 1 true for gzip */
|
||||
gz_headerp gzhead; /* gzip header information to write */
|
||||
uInt gzindex; /* where in extra, name, or comment */
|
||||
Byte method; /* STORED (for zip only) or DEFLATED */
|
||||
ulg gzindex; /* where in extra, name, or comment */
|
||||
Byte method; /* can only be DEFLATED */
|
||||
int last_flush; /* value of flush param for previous deflate call */
|
||||
|
||||
/* used by deflate.c: */
|
||||
@ -190,7 +196,7 @@ typedef struct internal_state {
|
||||
int nice_match; /* Stop searching when current match exceeds this */
|
||||
|
||||
/* used by trees.c: */
|
||||
/* Didn't use ct_data typedef below to supress compiler warning */
|
||||
/* Didn't use ct_data typedef below to suppress compiler warning */
|
||||
struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
|
||||
struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
|
||||
struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
|
||||
@ -246,7 +252,7 @@ typedef struct internal_state {
|
||||
ulg opt_len; /* bit length of current block with optimal trees */
|
||||
ulg static_len; /* bit length of current block with static trees */
|
||||
uInt matches; /* number of string matches in current block */
|
||||
int last_eob_len; /* bit length of EOB code for last block */
|
||||
uInt insert; /* bytes at end of window left to insert */
|
||||
|
||||
#ifdef ZLIB_DEBUG
|
||||
ulg compressed_len; /* total bit length of compressed file mod 2^32 */
|
||||
@ -262,12 +268,19 @@ typedef struct internal_state {
|
||||
* are always zero.
|
||||
*/
|
||||
|
||||
ulg high_water;
|
||||
/* High water mark offset in window for initialized bytes -- bytes above
|
||||
* this are set to zero in order to avoid memory check warnings when
|
||||
* longest match routines access bytes past the input. This is then
|
||||
* updated to the new high water mark.
|
||||
*/
|
||||
|
||||
} FAR deflate_state;
|
||||
|
||||
/* Output a byte on the stream.
|
||||
* IN assertion: there is enough room in pending_buf.
|
||||
*/
|
||||
#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);}
|
||||
#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);}
|
||||
|
||||
|
||||
#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
|
||||
@ -280,14 +293,19 @@ typedef struct internal_state {
|
||||
* distances are limited to MAX_DIST instead of WSIZE.
|
||||
*/
|
||||
|
||||
#define WIN_INIT MAX_MATCH
|
||||
/* Number of bytes after end of data in window to initialize in order to avoid
|
||||
memory checker errors from longest match routines */
|
||||
|
||||
/* in trees.c */
|
||||
void _tr_init OF((deflate_state *s));
|
||||
int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
|
||||
void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
|
||||
int eof));
|
||||
void _tr_align OF((deflate_state *s));
|
||||
void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
|
||||
int eof));
|
||||
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));
|
||||
|
||||
#define d_code(dist) \
|
||||
((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
|
||||
@ -300,11 +318,11 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
|
||||
/* Inline versions of _tr_tally for speed: */
|
||||
|
||||
#if defined(GEN_TREES_H) || !defined(STDC)
|
||||
extern uch _length_code[];
|
||||
extern uch _dist_code[];
|
||||
extern uch ZLIB_INTERNAL _length_code[];
|
||||
extern uch ZLIB_INTERNAL _dist_code[];
|
||||
#else
|
||||
extern const uch _length_code[];
|
||||
extern const uch _dist_code[];
|
||||
extern const uch ZLIB_INTERNAL _length_code[];
|
||||
extern const uch ZLIB_INTERNAL _dist_code[];
|
||||
#endif
|
||||
|
||||
# define _tr_tally_lit(s, c, flush) \
|
||||
@ -315,8 +333,8 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
|
||||
flush = (s->last_lit == s->lit_bufsize-1); \
|
||||
}
|
||||
# define _tr_tally_dist(s, distance, length, flush) \
|
||||
{ uch len = (length); \
|
||||
ush dist = (distance); \
|
||||
{ uch len = (uch)(length); \
|
||||
ush dist = (ush)(distance); \
|
||||
s->d_buf[s->last_lit] = dist; \
|
||||
s->l_buf[s->last_lit++] = len; \
|
||||
dist--; \
|
||||
|
567
common/dist/zlib/example.c
vendored
567
common/dist/zlib/example.c
vendored
@ -1,567 +0,0 @@
|
||||
/* $NetBSD: example.c,v 1.1.1.1 2006/01/14 20:10:28 christos Exp $ */
|
||||
|
||||
/* example.c -- usage example of the zlib compression library
|
||||
* Copyright (C) 1995-2004 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "zlib.h"
|
||||
|
||||
#ifdef STDC
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#if defined(VMS) || defined(RISCOS)
|
||||
# define TESTFILE "foo-gz"
|
||||
#else
|
||||
# define TESTFILE "foo.gz"
|
||||
#endif
|
||||
|
||||
#define CHECK_ERR(err, msg) { \
|
||||
if (err != Z_OK) { \
|
||||
fprintf(stderr, "%s error: %d\n", msg, err); \
|
||||
exit(1); \
|
||||
} \
|
||||
}
|
||||
|
||||
const char hello[] = "hello, hello!";
|
||||
/* "hello world" would be more standard, but the repeated "hello"
|
||||
* stresses the compression code better, sorry...
|
||||
*/
|
||||
|
||||
const char dictionary[] = "hello";
|
||||
uLong dictId; /* Adler32 value of the dictionary */
|
||||
|
||||
void test_compress OF((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_gzio OF((const char *fname,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_deflate OF((Byte *compr, uLong comprLen));
|
||||
void test_inflate OF((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_large_deflate OF((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_large_inflate OF((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_flush OF((Byte *compr, uLong *comprLen));
|
||||
void test_sync OF((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
void test_dict_deflate OF((Byte *compr, uLong comprLen));
|
||||
void test_dict_inflate OF((Byte *compr, uLong comprLen,
|
||||
Byte *uncompr, uLong uncomprLen));
|
||||
int main OF((int argc, char *argv[]));
|
||||
|
||||
/* ===========================================================================
|
||||
* Test compress() and uncompress()
|
||||
*/
|
||||
void test_compress(compr, comprLen, uncompr, uncomprLen)
|
||||
Byte *compr, *uncompr;
|
||||
uLong comprLen, uncomprLen;
|
||||
{
|
||||
int err;
|
||||
uLong len = (uLong)strlen(hello)+1;
|
||||
|
||||
err = compress(compr, &comprLen, (const Bytef*)hello, len);
|
||||
CHECK_ERR(err, "compress");
|
||||
|
||||
strcpy((char*)uncompr, "garbage");
|
||||
|
||||
err = uncompress(uncompr, &uncomprLen, compr, comprLen);
|
||||
CHECK_ERR(err, "uncompress");
|
||||
|
||||
if (strcmp((char*)uncompr, hello)) {
|
||||
fprintf(stderr, "bad uncompress\n");
|
||||
exit(1);
|
||||
} else {
|
||||
printf("uncompress(): %s\n", (char *)uncompr);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Test read/write of .gz files
|
||||
*/
|
||||
void test_gzio(fname, uncompr, uncomprLen)
|
||||
const char *fname; /* compressed file name */
|
||||
Byte *uncompr;
|
||||
uLong uncomprLen;
|
||||
{
|
||||
#ifdef NO_GZCOMPRESS
|
||||
fprintf(stderr, "NO_GZCOMPRESS -- gz* functions cannot compress\n");
|
||||
#else
|
||||
int err;
|
||||
int len = (int)strlen(hello)+1;
|
||||
gzFile file;
|
||||
z_off_t pos;
|
||||
|
||||
file = gzopen(fname, "wb");
|
||||
if (file == NULL) {
|
||||
fprintf(stderr, "gzopen error\n");
|
||||
exit(1);
|
||||
}
|
||||
gzputc(file, 'h');
|
||||
if (gzputs(file, "ello") != 4) {
|
||||
fprintf(stderr, "gzputs err: %s\n", gzerror(file, &err));
|
||||
exit(1);
|
||||
}
|
||||
if (gzprintf(file, ", %s!", "hello") != 8) {
|
||||
fprintf(stderr, "gzprintf err: %s\n", gzerror(file, &err));
|
||||
exit(1);
|
||||
}
|
||||
gzseek(file, 1L, SEEK_CUR); /* add one zero byte */
|
||||
gzclose(file);
|
||||
|
||||
file = gzopen(fname, "rb");
|
||||
if (file == NULL) {
|
||||
fprintf(stderr, "gzopen error\n");
|
||||
exit(1);
|
||||
}
|
||||
strcpy((char*)uncompr, "garbage");
|
||||
|
||||
if (gzread(file, uncompr, (unsigned)uncomprLen) != len) {
|
||||
fprintf(stderr, "gzread err: %s\n", gzerror(file, &err));
|
||||
exit(1);
|
||||
}
|
||||
if (strcmp((char*)uncompr, hello)) {
|
||||
fprintf(stderr, "bad gzread: %s\n", (char*)uncompr);
|
||||
exit(1);
|
||||
} else {
|
||||
printf("gzread(): %s\n", (char*)uncompr);
|
||||
}
|
||||
|
||||
pos = gzseek(file, -8L, SEEK_CUR);
|
||||
if (pos != 6 || gztell(file) != pos) {
|
||||
fprintf(stderr, "gzseek error, pos=%ld, gztell=%ld\n",
|
||||
(long)pos, (long)gztell(file));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (gzgetc(file) != ' ') {
|
||||
fprintf(stderr, "gzgetc error\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (gzungetc(' ', file) != ' ') {
|
||||
fprintf(stderr, "gzungetc error\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
gzgets(file, (char*)uncompr, (int)uncomprLen);
|
||||
if (strlen((char*)uncompr) != 7) { /* " hello!" */
|
||||
fprintf(stderr, "gzgets err after gzseek: %s\n", gzerror(file, &err));
|
||||
exit(1);
|
||||
}
|
||||
if (strcmp((char*)uncompr, hello + 6)) {
|
||||
fprintf(stderr, "bad gzgets after gzseek\n");
|
||||
exit(1);
|
||||
} else {
|
||||
printf("gzgets() after gzseek: %s\n", (char*)uncompr);
|
||||
}
|
||||
|
||||
gzclose(file);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Test deflate() with small buffers
|
||||
*/
|
||||
void test_deflate(compr, comprLen)
|
||||
Byte *compr;
|
||||
uLong comprLen;
|
||||
{
|
||||
z_stream c_stream; /* compression stream */
|
||||
int err;
|
||||
uLong len = (uLong)strlen(hello)+1;
|
||||
|
||||
c_stream.zalloc = (alloc_func)0;
|
||||
c_stream.zfree = (free_func)0;
|
||||
c_stream.opaque = (voidpf)0;
|
||||
|
||||
err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
|
||||
CHECK_ERR(err, "deflateInit");
|
||||
|
||||
c_stream.next_in = (Bytef*)hello;
|
||||
c_stream.next_out = compr;
|
||||
|
||||
while (c_stream.total_in != len && c_stream.total_out < comprLen) {
|
||||
c_stream.avail_in = c_stream.avail_out = 1; /* force small buffers */
|
||||
err = deflate(&c_stream, Z_NO_FLUSH);
|
||||
CHECK_ERR(err, "deflate");
|
||||
}
|
||||
/* Finish the stream, still forcing small buffers: */
|
||||
for (;;) {
|
||||
c_stream.avail_out = 1;
|
||||
err = deflate(&c_stream, Z_FINISH);
|
||||
if (err == Z_STREAM_END) break;
|
||||
CHECK_ERR(err, "deflate");
|
||||
}
|
||||
|
||||
err = deflateEnd(&c_stream);
|
||||
CHECK_ERR(err, "deflateEnd");
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Test inflate() with small buffers
|
||||
*/
|
||||
void test_inflate(compr, comprLen, uncompr, uncomprLen)
|
||||
Byte *compr, *uncompr;
|
||||
uLong comprLen, uncomprLen;
|
||||
{
|
||||
int err;
|
||||
z_stream d_stream; /* decompression stream */
|
||||
|
||||
strcpy((char*)uncompr, "garbage");
|
||||
|
||||
d_stream.zalloc = (alloc_func)0;
|
||||
d_stream.zfree = (free_func)0;
|
||||
d_stream.opaque = (voidpf)0;
|
||||
|
||||
d_stream.next_in = compr;
|
||||
d_stream.avail_in = 0;
|
||||
d_stream.next_out = uncompr;
|
||||
|
||||
err = inflateInit(&d_stream);
|
||||
CHECK_ERR(err, "inflateInit");
|
||||
|
||||
while (d_stream.total_out < uncomprLen && d_stream.total_in < comprLen) {
|
||||
d_stream.avail_in = d_stream.avail_out = 1; /* force small buffers */
|
||||
err = inflate(&d_stream, Z_NO_FLUSH);
|
||||
if (err == Z_STREAM_END) break;
|
||||
CHECK_ERR(err, "inflate");
|
||||
}
|
||||
|
||||
err = inflateEnd(&d_stream);
|
||||
CHECK_ERR(err, "inflateEnd");
|
||||
|
||||
if (strcmp((char*)uncompr, hello)) {
|
||||
fprintf(stderr, "bad inflate\n");
|
||||
exit(1);
|
||||
} else {
|
||||
printf("inflate(): %s\n", (char *)uncompr);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Test deflate() with large buffers and dynamic change of compression level
|
||||
*/
|
||||
void test_large_deflate(compr, comprLen, uncompr, uncomprLen)
|
||||
Byte *compr, *uncompr;
|
||||
uLong comprLen, uncomprLen;
|
||||
{
|
||||
z_stream c_stream; /* compression stream */
|
||||
int err;
|
||||
|
||||
c_stream.zalloc = (alloc_func)0;
|
||||
c_stream.zfree = (free_func)0;
|
||||
c_stream.opaque = (voidpf)0;
|
||||
|
||||
err = deflateInit(&c_stream, Z_BEST_SPEED);
|
||||
CHECK_ERR(err, "deflateInit");
|
||||
|
||||
c_stream.next_out = compr;
|
||||
c_stream.avail_out = (uInt)comprLen;
|
||||
|
||||
/* At this point, uncompr is still mostly zeroes, so it should compress
|
||||
* very well:
|
||||
*/
|
||||
c_stream.next_in = uncompr;
|
||||
c_stream.avail_in = (uInt)uncomprLen;
|
||||
err = deflate(&c_stream, Z_NO_FLUSH);
|
||||
CHECK_ERR(err, "deflate");
|
||||
if (c_stream.avail_in != 0) {
|
||||
fprintf(stderr, "deflate not greedy\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Feed in already compressed data and switch to no compression: */
|
||||
deflateParams(&c_stream, Z_NO_COMPRESSION, Z_DEFAULT_STRATEGY);
|
||||
c_stream.next_in = compr;
|
||||
c_stream.avail_in = (uInt)comprLen/2;
|
||||
err = deflate(&c_stream, Z_NO_FLUSH);
|
||||
CHECK_ERR(err, "deflate");
|
||||
|
||||
/* Switch back to compressing mode: */
|
||||
deflateParams(&c_stream, Z_BEST_COMPRESSION, Z_FILTERED);
|
||||
c_stream.next_in = uncompr;
|
||||
c_stream.avail_in = (uInt)uncomprLen;
|
||||
err = deflate(&c_stream, Z_NO_FLUSH);
|
||||
CHECK_ERR(err, "deflate");
|
||||
|
||||
err = deflate(&c_stream, Z_FINISH);
|
||||
if (err != Z_STREAM_END) {
|
||||
fprintf(stderr, "deflate should report Z_STREAM_END\n");
|
||||
exit(1);
|
||||
}
|
||||
err = deflateEnd(&c_stream);
|
||||
CHECK_ERR(err, "deflateEnd");
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Test inflate() with large buffers
|
||||
*/
|
||||
void test_large_inflate(compr, comprLen, uncompr, uncomprLen)
|
||||
Byte *compr, *uncompr;
|
||||
uLong comprLen, uncomprLen;
|
||||
{
|
||||
int err;
|
||||
z_stream d_stream; /* decompression stream */
|
||||
|
||||
strcpy((char*)uncompr, "garbage");
|
||||
|
||||
d_stream.zalloc = (alloc_func)0;
|
||||
d_stream.zfree = (free_func)0;
|
||||
d_stream.opaque = (voidpf)0;
|
||||
|
||||
d_stream.next_in = compr;
|
||||
d_stream.avail_in = (uInt)comprLen;
|
||||
|
||||
err = inflateInit(&d_stream);
|
||||
CHECK_ERR(err, "inflateInit");
|
||||
|
||||
for (;;) {
|
||||
d_stream.next_out = uncompr; /* discard the output */
|
||||
d_stream.avail_out = (uInt)uncomprLen;
|
||||
err = inflate(&d_stream, Z_NO_FLUSH);
|
||||
if (err == Z_STREAM_END) break;
|
||||
CHECK_ERR(err, "large inflate");
|
||||
}
|
||||
|
||||
err = inflateEnd(&d_stream);
|
||||
CHECK_ERR(err, "inflateEnd");
|
||||
|
||||
if (d_stream.total_out != 2*uncomprLen + comprLen/2) {
|
||||
fprintf(stderr, "bad large inflate: %ld\n", d_stream.total_out);
|
||||
exit(1);
|
||||
} else {
|
||||
printf("large_inflate(): OK\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Test deflate() with full flush
|
||||
*/
|
||||
void test_flush(compr, comprLen)
|
||||
Byte *compr;
|
||||
uLong *comprLen;
|
||||
{
|
||||
z_stream c_stream; /* compression stream */
|
||||
int err;
|
||||
uInt len = (uInt)strlen(hello)+1;
|
||||
|
||||
c_stream.zalloc = (alloc_func)0;
|
||||
c_stream.zfree = (free_func)0;
|
||||
c_stream.opaque = (voidpf)0;
|
||||
|
||||
err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
|
||||
CHECK_ERR(err, "deflateInit");
|
||||
|
||||
c_stream.next_in = (Bytef*)hello;
|
||||
c_stream.next_out = compr;
|
||||
c_stream.avail_in = 3;
|
||||
c_stream.avail_out = (uInt)*comprLen;
|
||||
err = deflate(&c_stream, Z_FULL_FLUSH);
|
||||
CHECK_ERR(err, "deflate");
|
||||
|
||||
compr[3]++; /* force an error in first compressed block */
|
||||
c_stream.avail_in = len - 3;
|
||||
|
||||
err = deflate(&c_stream, Z_FINISH);
|
||||
if (err != Z_STREAM_END) {
|
||||
CHECK_ERR(err, "deflate");
|
||||
}
|
||||
err = deflateEnd(&c_stream);
|
||||
CHECK_ERR(err, "deflateEnd");
|
||||
|
||||
*comprLen = c_stream.total_out;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Test inflateSync()
|
||||
*/
|
||||
void test_sync(compr, comprLen, uncompr, uncomprLen)
|
||||
Byte *compr, *uncompr;
|
||||
uLong comprLen, uncomprLen;
|
||||
{
|
||||
int err;
|
||||
z_stream d_stream; /* decompression stream */
|
||||
|
||||
strcpy((char*)uncompr, "garbage");
|
||||
|
||||
d_stream.zalloc = (alloc_func)0;
|
||||
d_stream.zfree = (free_func)0;
|
||||
d_stream.opaque = (voidpf)0;
|
||||
|
||||
d_stream.next_in = compr;
|
||||
d_stream.avail_in = 2; /* just read the zlib header */
|
||||
|
||||
err = inflateInit(&d_stream);
|
||||
CHECK_ERR(err, "inflateInit");
|
||||
|
||||
d_stream.next_out = uncompr;
|
||||
d_stream.avail_out = (uInt)uncomprLen;
|
||||
|
||||
inflate(&d_stream, Z_NO_FLUSH);
|
||||
CHECK_ERR(err, "inflate");
|
||||
|
||||
d_stream.avail_in = (uInt)comprLen-2; /* read all compressed data */
|
||||
err = inflateSync(&d_stream); /* but skip the damaged part */
|
||||
CHECK_ERR(err, "inflateSync");
|
||||
|
||||
err = inflate(&d_stream, Z_FINISH);
|
||||
if (err != Z_DATA_ERROR) {
|
||||
fprintf(stderr, "inflate should report DATA_ERROR\n");
|
||||
/* Because of incorrect adler32 */
|
||||
exit(1);
|
||||
}
|
||||
err = inflateEnd(&d_stream);
|
||||
CHECK_ERR(err, "inflateEnd");
|
||||
|
||||
printf("after inflateSync(): hel%s\n", (char *)uncompr);
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Test deflate() with preset dictionary
|
||||
*/
|
||||
void test_dict_deflate(compr, comprLen)
|
||||
Byte *compr;
|
||||
uLong comprLen;
|
||||
{
|
||||
z_stream c_stream; /* compression stream */
|
||||
int err;
|
||||
|
||||
c_stream.zalloc = (alloc_func)0;
|
||||
c_stream.zfree = (free_func)0;
|
||||
c_stream.opaque = (voidpf)0;
|
||||
|
||||
err = deflateInit(&c_stream, Z_BEST_COMPRESSION);
|
||||
CHECK_ERR(err, "deflateInit");
|
||||
|
||||
err = deflateSetDictionary(&c_stream,
|
||||
(const Bytef*)dictionary, sizeof(dictionary));
|
||||
CHECK_ERR(err, "deflateSetDictionary");
|
||||
|
||||
dictId = c_stream.adler;
|
||||
c_stream.next_out = compr;
|
||||
c_stream.avail_out = (uInt)comprLen;
|
||||
|
||||
c_stream.next_in = (Bytef*)hello;
|
||||
c_stream.avail_in = (uInt)strlen(hello)+1;
|
||||
|
||||
err = deflate(&c_stream, Z_FINISH);
|
||||
if (err != Z_STREAM_END) {
|
||||
fprintf(stderr, "deflate should report Z_STREAM_END\n");
|
||||
exit(1);
|
||||
}
|
||||
err = deflateEnd(&c_stream);
|
||||
CHECK_ERR(err, "deflateEnd");
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Test inflate() with a preset dictionary
|
||||
*/
|
||||
void test_dict_inflate(compr, comprLen, uncompr, uncomprLen)
|
||||
Byte *compr, *uncompr;
|
||||
uLong comprLen, uncomprLen;
|
||||
{
|
||||
int err;
|
||||
z_stream d_stream; /* decompression stream */
|
||||
|
||||
strcpy((char*)uncompr, "garbage");
|
||||
|
||||
d_stream.zalloc = (alloc_func)0;
|
||||
d_stream.zfree = (free_func)0;
|
||||
d_stream.opaque = (voidpf)0;
|
||||
|
||||
d_stream.next_in = compr;
|
||||
d_stream.avail_in = (uInt)comprLen;
|
||||
|
||||
err = inflateInit(&d_stream);
|
||||
CHECK_ERR(err, "inflateInit");
|
||||
|
||||
d_stream.next_out = uncompr;
|
||||
d_stream.avail_out = (uInt)uncomprLen;
|
||||
|
||||
for (;;) {
|
||||
err = inflate(&d_stream, Z_NO_FLUSH);
|
||||
if (err == Z_STREAM_END) break;
|
||||
if (err == Z_NEED_DICT) {
|
||||
if (d_stream.adler != dictId) {
|
||||
fprintf(stderr, "unexpected dictionary");
|
||||
exit(1);
|
||||
}
|
||||
err = inflateSetDictionary(&d_stream, (const Bytef*)dictionary,
|
||||
sizeof(dictionary));
|
||||
}
|
||||
CHECK_ERR(err, "inflate with dict");
|
||||
}
|
||||
|
||||
err = inflateEnd(&d_stream);
|
||||
CHECK_ERR(err, "inflateEnd");
|
||||
|
||||
if (strcmp((char*)uncompr, hello)) {
|
||||
fprintf(stderr, "bad inflate with dict\n");
|
||||
exit(1);
|
||||
} else {
|
||||
printf("inflate with dictionary: %s\n", (char *)uncompr);
|
||||
}
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Usage: example [output.gz [input.gz]]
|
||||
*/
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
Byte *compr, *uncompr;
|
||||
uLong comprLen = 10000*sizeof(int); /* don't overflow on MSDOS */
|
||||
uLong uncomprLen = comprLen;
|
||||
static const char* myVersion = ZLIB_VERSION;
|
||||
|
||||
if (zlibVersion()[0] != myVersion[0]) {
|
||||
fprintf(stderr, "incompatible zlib version\n");
|
||||
exit(1);
|
||||
|
||||
} else if (strcmp(zlibVersion(), ZLIB_VERSION) != 0) {
|
||||
fprintf(stderr, "warning: different zlib version\n");
|
||||
}
|
||||
|
||||
printf("zlib version %s = 0x%04x, compile flags = 0x%lx\n",
|
||||
ZLIB_VERSION, ZLIB_VERNUM, zlibCompileFlags());
|
||||
|
||||
compr = (Byte*)calloc((uInt)comprLen, 1);
|
||||
uncompr = (Byte*)calloc((uInt)uncomprLen, 1);
|
||||
/* compr and uncompr are cleared to avoid reading uninitialized
|
||||
* data and to ensure that uncompr compresses well.
|
||||
*/
|
||||
if (compr == Z_NULL || uncompr == Z_NULL) {
|
||||
printf("out of memory\n");
|
||||
exit(1);
|
||||
}
|
||||
test_compress(compr, comprLen, uncompr, uncomprLen);
|
||||
|
||||
test_gzio((argc > 1 ? argv[1] : TESTFILE),
|
||||
uncompr, uncomprLen);
|
||||
|
||||
test_deflate(compr, comprLen);
|
||||
test_inflate(compr, comprLen, uncompr, uncomprLen);
|
||||
|
||||
test_large_deflate(compr, comprLen, uncompr, uncomprLen);
|
||||
test_large_inflate(compr, comprLen, uncompr, uncomprLen);
|
||||
|
||||
test_flush(compr, &comprLen);
|
||||
test_sync(compr, comprLen, uncompr, uncomprLen);
|
||||
comprLen = uncomprLen;
|
||||
|
||||
test_dict_deflate(compr, comprLen);
|
||||
test_dict_inflate(compr, comprLen, uncompr, uncomprLen);
|
||||
|
||||
free(compr);
|
||||
free(uncompr);
|
||||
|
||||
return 0;
|
||||
}
|
1
common/dist/zlib/gzguts.h
vendored
1
common/dist/zlib/gzguts.h
vendored
@ -21,6 +21,7 @@
|
||||
#include <stdio.h>
|
||||
#include "zlib.h"
|
||||
#ifdef STDC
|
||||
# include <unistd.h>
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
# include <limits.h>
|
||||
|
1037
common/dist/zlib/gzio.c
vendored
1037
common/dist/zlib/gzio.c
vendored
File diff suppressed because it is too large
Load Diff
9
common/dist/zlib/gzwrite.c
vendored
9
common/dist/zlib/gzwrite.c
vendored
@ -74,8 +74,10 @@ local int gz_comp(state, flush)
|
||||
gz_statep state;
|
||||
int flush;
|
||||
{
|
||||
int ret, writ;
|
||||
unsigned have, put, max = ((unsigned)-1 >> 2) + 1;
|
||||
int ret;
|
||||
ssize_t writ;
|
||||
size_t put;
|
||||
unsigned have, max = ((unsigned)-1 >> 2) + 1;
|
||||
z_streamp strm = &(state->strm);
|
||||
|
||||
/* allocate memory if this is the first time through */
|
||||
@ -225,7 +227,7 @@ local z_size_t gz_write(state, buf, len)
|
||||
return 0;
|
||||
|
||||
/* directly compress user buffer to file */
|
||||
state->strm.next_in = (z_const Bytef *)buf;
|
||||
state->strm.next_in = __UNCONST(buf);
|
||||
do {
|
||||
unsigned n = (unsigned)-1;
|
||||
if (n > len)
|
||||
@ -658,6 +660,7 @@ int ZEXPORT gzclose_w(file)
|
||||
}
|
||||
gz_error(state, Z_OK, NULL);
|
||||
free(state->path);
|
||||
/*###661 [cc] error: implicit declaration of function 'close' [-Werror=implicit-function-declaration]%%%*/
|
||||
if (close(state->fd) == -1)
|
||||
ret = Z_ERRNO;
|
||||
free(state);
|
||||
|
109
common/dist/zlib/infback.c
vendored
109
common/dist/zlib/infback.c
vendored
@ -1,7 +1,7 @@
|
||||
/* $NetBSD: infback.c,v 1.2 2006/01/27 00:45:27 christos Exp $ */
|
||||
/* $NetBSD: infback.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* infback.c -- inflate using a call-back interface
|
||||
* Copyright (C) 1995-2005 Mark Adler
|
||||
* Copyright (C) 1995-2016 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -44,20 +44,29 @@ int stream_size;
|
||||
return Z_STREAM_ERROR;
|
||||
strm->msg = Z_NULL; /* in case we return an error */
|
||||
if (strm->zalloc == (alloc_func)0) {
|
||||
#ifdef Z_SOLO
|
||||
return Z_STREAM_ERROR;
|
||||
#else
|
||||
strm->zalloc = zcalloc;
|
||||
strm->opaque = (voidpf)0;
|
||||
#endif
|
||||
}
|
||||
if (strm->zfree == (free_func)0) strm->zfree = zcfree;
|
||||
if (strm->zfree == (free_func)0)
|
||||
#ifdef Z_SOLO
|
||||
return Z_STREAM_ERROR;
|
||||
#else
|
||||
strm->zfree = zcfree;
|
||||
#endif
|
||||
state = (struct inflate_state FAR *)ZALLOC(strm, 1,
|
||||
sizeof(struct inflate_state));
|
||||
if (state == Z_NULL) return Z_MEM_ERROR;
|
||||
Tracev((stderr, "inflate: allocated\n"));
|
||||
strm->state = (struct internal_state FAR *)state;
|
||||
state->dmax = 32768U;
|
||||
state->wbits = windowBits;
|
||||
state->wbits = (uInt)windowBits;
|
||||
state->wsize = 1U << windowBits;
|
||||
state->window = window;
|
||||
state->write = 0;
|
||||
state->wnext = 0;
|
||||
state->whave = 0;
|
||||
return Z_OK;
|
||||
}
|
||||
@ -248,14 +257,14 @@ out_func out;
|
||||
void FAR *out_desc;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
unsigned char FAR *next; /* next input */
|
||||
z_const unsigned char FAR *next; /* next input */
|
||||
unsigned char FAR *put; /* next output */
|
||||
unsigned have, left; /* available input and output */
|
||||
unsigned long hold; /* bit buffer */
|
||||
unsigned bits; /* bits in bit buffer */
|
||||
unsigned copy; /* number of stored or match bytes to copy */
|
||||
unsigned char FAR *from; /* where to copy match bytes from */
|
||||
code this; /* current decoding table entry */
|
||||
code here; /* current decoding table entry */
|
||||
code last; /* parent table entry */
|
||||
unsigned len; /* length to copy for repeats, bits to drop */
|
||||
int ret; /* return code */
|
||||
@ -391,19 +400,18 @@ void FAR *out_desc;
|
||||
state->have = 0;
|
||||
while (state->have < state->nlen + state->ndist) {
|
||||
for (;;) {
|
||||
this = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(this.bits) <= bits) break;
|
||||
here = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
if (this.val < 16) {
|
||||
NEEDBITS(this.bits);
|
||||
DROPBITS(this.bits);
|
||||
state->lens[state->have++] = this.val;
|
||||
if (here.val < 16) {
|
||||
DROPBITS(here.bits);
|
||||
state->lens[state->have++] = here.val;
|
||||
}
|
||||
else {
|
||||
if (this.val == 16) {
|
||||
NEEDBITS(this.bits + 2);
|
||||
DROPBITS(this.bits);
|
||||
if (here.val == 16) {
|
||||
NEEDBITS(here.bits + 2);
|
||||
DROPBITS(here.bits);
|
||||
if (state->have == 0) {
|
||||
strm->msg = __UNCONST("invalid bit length repeat");
|
||||
state->mode = BAD;
|
||||
@ -413,16 +421,16 @@ void FAR *out_desc;
|
||||
copy = 3 + BITS(2);
|
||||
DROPBITS(2);
|
||||
}
|
||||
else if (this.val == 17) {
|
||||
NEEDBITS(this.bits + 3);
|
||||
DROPBITS(this.bits);
|
||||
else if (here.val == 17) {
|
||||
NEEDBITS(here.bits + 3);
|
||||
DROPBITS(here.bits);
|
||||
len = 0;
|
||||
copy = 3 + BITS(3);
|
||||
DROPBITS(3);
|
||||
}
|
||||
else {
|
||||
NEEDBITS(this.bits + 7);
|
||||
DROPBITS(this.bits);
|
||||
NEEDBITS(here.bits + 7);
|
||||
DROPBITS(here.bits);
|
||||
len = 0;
|
||||
copy = 11 + BITS(7);
|
||||
DROPBITS(7);
|
||||
@ -440,7 +448,16 @@ void FAR *out_desc;
|
||||
/* handle error breaks in while */
|
||||
if (state->mode == BAD) break;
|
||||
|
||||
/* build code tables */
|
||||
/* check for end-of-block code (better have one) */
|
||||
if (state->lens[256] == 0) {
|
||||
strm->msg = __UNCONST("invalid code -- missing end-of-block");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
|
||||
/* build code tables -- note: do not change the lenbits or distbits
|
||||
values here (9 and 6) without reading the comments in inftrees.h
|
||||
concerning the ENOUGH constants, which depend on those values */
|
||||
state->next = state->codes;
|
||||
state->lencode = (code const FAR *)(state->next);
|
||||
state->lenbits = 9;
|
||||
@ -476,28 +493,28 @@ void FAR *out_desc;
|
||||
|
||||
/* get a literal, length, or end-of-block code */
|
||||
for (;;) {
|
||||
this = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(this.bits) <= bits) break;
|
||||
here = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
if (this.op && (this.op & 0xf0) == 0) {
|
||||
last = this;
|
||||
if (here.op && (here.op & 0xf0) == 0) {
|
||||
last = here;
|
||||
for (;;) {
|
||||
this = state->lencode[last.val +
|
||||
here = state->lencode[last.val +
|
||||
(BITS(last.bits + last.op) >> last.bits)];
|
||||
if ((unsigned)(last.bits + this.bits) <= bits) break;
|
||||
if ((unsigned)(last.bits + here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
DROPBITS(last.bits);
|
||||
}
|
||||
DROPBITS(this.bits);
|
||||
state->length = (unsigned)this.val;
|
||||
DROPBITS(here.bits);
|
||||
state->length = (unsigned)here.val;
|
||||
|
||||
/* process literal */
|
||||
if (this.op == 0) {
|
||||
Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
|
||||
if (here.op == 0) {
|
||||
Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
|
||||
"inflate: literal '%c'\n" :
|
||||
"inflate: literal 0x%02x\n", this.val));
|
||||
"inflate: literal 0x%02x\n", here.val));
|
||||
ROOM();
|
||||
*put++ = (unsigned char)(state->length);
|
||||
left--;
|
||||
@ -506,21 +523,21 @@ void FAR *out_desc;
|
||||
}
|
||||
|
||||
/* process end of block */
|
||||
if (this.op & 32) {
|
||||
if (here.op & 32) {
|
||||
Tracevv((stderr, "inflate: end of block\n"));
|
||||
state->mode = TYPE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* invalid code */
|
||||
if (this.op & 64) {
|
||||
if (here.op & 64) {
|
||||
strm->msg = __UNCONST("invalid literal/length code");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
|
||||
/* length code -- get extra bits, if any */
|
||||
state->extra = (unsigned)(this.op) & 15;
|
||||
state->extra = (unsigned)(here.op) & 15;
|
||||
if (state->extra != 0) {
|
||||
NEEDBITS(state->extra);
|
||||
state->length += BITS(state->extra);
|
||||
@ -530,30 +547,30 @@ void FAR *out_desc;
|
||||
|
||||
/* get distance code */
|
||||
for (;;) {
|
||||
this = state->distcode[BITS(state->distbits)];
|
||||
if ((unsigned)(this.bits) <= bits) break;
|
||||
here = state->distcode[BITS(state->distbits)];
|
||||
if ((unsigned)(here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
if ((this.op & 0xf0) == 0) {
|
||||
last = this;
|
||||
if ((here.op & 0xf0) == 0) {
|
||||
last = here;
|
||||
for (;;) {
|
||||
this = state->distcode[last.val +
|
||||
here = state->distcode[last.val +
|
||||
(BITS(last.bits + last.op) >> last.bits)];
|
||||
if ((unsigned)(last.bits + this.bits) <= bits) break;
|
||||
if ((unsigned)(last.bits + here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
DROPBITS(last.bits);
|
||||
}
|
||||
DROPBITS(this.bits);
|
||||
if (this.op & 64) {
|
||||
DROPBITS(here.bits);
|
||||
if (here.op & 64) {
|
||||
strm->msg = __UNCONST("invalid distance code");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
state->offset = (unsigned)this.val;
|
||||
state->offset = (unsigned)here.val;
|
||||
|
||||
/* get distance extra bits, if any */
|
||||
state->extra = (unsigned)(this.op) & 15;
|
||||
state->extra = (unsigned)(here.op) & 15;
|
||||
if (state->extra != 0) {
|
||||
NEEDBITS(state->extra);
|
||||
state->offset += BITS(state->extra);
|
||||
|
161
common/dist/zlib/inffast.c
vendored
161
common/dist/zlib/inffast.c
vendored
@ -1,7 +1,7 @@
|
||||
/* $NetBSD: inffast.c,v 1.3 2006/01/27 00:45:27 christos Exp $ */
|
||||
/* $NetBSD: inffast.c,v 1.4 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* inffast.c -- fast decoding
|
||||
* Copyright (C) 1995-2004 Mark Adler
|
||||
* Copyright (C) 1995-2008, 2010, 2013, 2016 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -10,26 +10,9 @@
|
||||
#include "inflate.h"
|
||||
#include "inffast.h"
|
||||
|
||||
#ifndef ASMINF
|
||||
|
||||
/* Allow machine dependent optimization for post-increment or pre-increment.
|
||||
Based on testing to date,
|
||||
Pre-increment preferred for:
|
||||
- PowerPC G3 (Adler)
|
||||
- MIPS R5000 (Randers-Pehrson)
|
||||
Post-increment preferred for:
|
||||
- none
|
||||
No measurable difference:
|
||||
- Pentium III (Anderson)
|
||||
- M68060 (Nikl)
|
||||
*/
|
||||
#ifdef POSTINC
|
||||
# define OFF 0
|
||||
# define PUP(a) *(a)++
|
||||
#ifdef ASMINF
|
||||
# pragma message("Assembler code may have bugs -- use at your own risk")
|
||||
#else
|
||||
# define OFF 1
|
||||
# define PUP(a) *++(a)
|
||||
#endif
|
||||
|
||||
/*
|
||||
Decode literal, length, and distance codes and write out the resulting
|
||||
@ -66,13 +49,13 @@
|
||||
requires strm->avail_out >= 258 for each loop to avoid checking for
|
||||
output space.
|
||||
*/
|
||||
void inflate_fast(strm, start)
|
||||
void ZLIB_INTERNAL inflate_fast(strm, start)
|
||||
z_streamp strm;
|
||||
unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
unsigned char FAR *in; /* local strm->next_in */
|
||||
unsigned char FAR *last; /* while in < last, enough input available */
|
||||
z_const unsigned char FAR *in; /* local strm->next_in */
|
||||
z_const unsigned char FAR *last; /* have enough input while in < last */
|
||||
unsigned char FAR *out; /* local strm->next_out */
|
||||
unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
|
||||
unsigned char FAR *end; /* while out < end, enough space available */
|
||||
@ -81,7 +64,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
#endif
|
||||
unsigned wsize; /* window size or zero if not using window */
|
||||
unsigned whave; /* valid bytes in the window */
|
||||
unsigned wwrite; /* window write index */
|
||||
unsigned wnext; /* window write index */
|
||||
unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
|
||||
unsigned long hold; /* local strm->hold */
|
||||
unsigned bits; /* local strm->bits */
|
||||
@ -89,7 +72,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
code const FAR *dcode; /* local strm->distcode */
|
||||
unsigned lmask; /* mask for first level of length codes */
|
||||
unsigned dmask; /* mask for first level of distance codes */
|
||||
code this; /* retrieved table entry */
|
||||
code here; /* retrieved table entry */
|
||||
unsigned op; /* code bits, operation, extra bits, or */
|
||||
/* window position, window bytes to copy */
|
||||
unsigned len; /* match length, unused bytes */
|
||||
@ -98,9 +81,9 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
|
||||
/* copy state to local variables */
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
in = strm->next_in - OFF;
|
||||
in = strm->next_in;
|
||||
last = in + (strm->avail_in - 5);
|
||||
out = strm->next_out - OFF;
|
||||
out = strm->next_out;
|
||||
beg = out - (start - strm->avail_out);
|
||||
end = out + (strm->avail_out - 257);
|
||||
#ifdef INFLATE_STRICT
|
||||
@ -108,7 +91,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
#endif
|
||||
wsize = state->wsize;
|
||||
whave = state->whave;
|
||||
wwrite = state->write;
|
||||
wnext = state->wnext;
|
||||
window = state->window;
|
||||
hold = state->hold;
|
||||
bits = state->bits;
|
||||
@ -121,29 +104,29 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
input data or output space */
|
||||
do {
|
||||
if (bits < 15) {
|
||||
hold += (unsigned long)(PUP(in)) << bits;
|
||||
hold += (unsigned long)(*in++) << bits;
|
||||
bits += 8;
|
||||
hold += (unsigned long)(PUP(in)) << bits;
|
||||
hold += (unsigned long)(*in++) << bits;
|
||||
bits += 8;
|
||||
}
|
||||
this = lcode[hold & lmask];
|
||||
here = lcode[hold & lmask];
|
||||
dolen:
|
||||
op = (unsigned)(this.bits);
|
||||
op = (unsigned)(here.bits);
|
||||
hold >>= op;
|
||||
bits -= op;
|
||||
op = (unsigned)(this.op);
|
||||
op = (unsigned)(here.op);
|
||||
if (op == 0) { /* literal */
|
||||
Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
|
||||
Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
|
||||
"inflate: literal '%c'\n" :
|
||||
"inflate: literal 0x%02x\n", this.val));
|
||||
PUP(out) = (unsigned char)(this.val);
|
||||
"inflate: literal 0x%02x\n", here.val));
|
||||
*out++ = (unsigned char)(here.val);
|
||||
}
|
||||
else if (op & 16) { /* length base */
|
||||
len = (unsigned)(this.val);
|
||||
len = (unsigned)(here.val);
|
||||
op &= 15; /* number of extra bits */
|
||||
if (op) {
|
||||
if (bits < op) {
|
||||
hold += (unsigned long)(PUP(in)) << bits;
|
||||
hold += (unsigned long)(*in++) << bits;
|
||||
bits += 8;
|
||||
}
|
||||
len += (unsigned)hold & ((1U << op) - 1);
|
||||
@ -152,25 +135,25 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
}
|
||||
Tracevv((stderr, "inflate: length %u\n", len));
|
||||
if (bits < 15) {
|
||||
hold += (unsigned long)(PUP(in)) << bits;
|
||||
hold += (unsigned long)(*in++) << bits;
|
||||
bits += 8;
|
||||
hold += (unsigned long)(PUP(in)) << bits;
|
||||
hold += (unsigned long)(*in++) << bits;
|
||||
bits += 8;
|
||||
}
|
||||
this = dcode[hold & dmask];
|
||||
here = dcode[hold & dmask];
|
||||
dodist:
|
||||
op = (unsigned)(this.bits);
|
||||
op = (unsigned)(here.bits);
|
||||
hold >>= op;
|
||||
bits -= op;
|
||||
op = (unsigned)(this.op);
|
||||
op = (unsigned)(here.op);
|
||||
if (op & 16) { /* distance base */
|
||||
dist = (unsigned)(this.val);
|
||||
dist = (unsigned)(here.val);
|
||||
op &= 15; /* number of extra bits */
|
||||
if (bits < op) {
|
||||
hold += (unsigned long)(PUP(in)) << bits;
|
||||
hold += (unsigned long)(*in++) << bits;
|
||||
bits += 8;
|
||||
if (bits < op) {
|
||||
hold += (unsigned long)(PUP(in)) << bits;
|
||||
hold += (unsigned long)(*in++) << bits;
|
||||
bits += 8;
|
||||
}
|
||||
}
|
||||
@ -189,79 +172,101 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
if (dist > op) { /* see if copy from window */
|
||||
op = dist - op; /* distance back in window */
|
||||
if (op > whave) {
|
||||
strm->msg = __UNCONST("invalid distance too far back");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
if (state->sane) {
|
||||
strm->msg =
|
||||
__UNCONST("invalid distance too far back");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
|
||||
if (len <= op - whave) {
|
||||
do {
|
||||
*out++ = 0;
|
||||
} while (--len);
|
||||
continue;
|
||||
}
|
||||
len -= op - whave;
|
||||
do {
|
||||
*out++ = 0;
|
||||
} while (--op > whave);
|
||||
if (op == 0) {
|
||||
from = out - dist;
|
||||
do {
|
||||
*out++ = *from++;
|
||||
} while (--len);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
from = window - OFF;
|
||||
if (wwrite == 0) { /* very common case */
|
||||
from = window;
|
||||
if (wnext == 0) { /* very common case */
|
||||
from += wsize - op;
|
||||
if (op < len) { /* some from window */
|
||||
len -= op;
|
||||
do {
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
} while (--op);
|
||||
from = out - dist; /* rest from output */
|
||||
}
|
||||
}
|
||||
else if (wwrite < op) { /* wrap around window */
|
||||
from += wsize + wwrite - op;
|
||||
op -= wwrite;
|
||||
else if (wnext < op) { /* wrap around window */
|
||||
from += wsize + wnext - op;
|
||||
op -= wnext;
|
||||
if (op < len) { /* some from end of window */
|
||||
len -= op;
|
||||
do {
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
} while (--op);
|
||||
from = window - OFF;
|
||||
if (wwrite < len) { /* some from start of window */
|
||||
op = wwrite;
|
||||
from = window;
|
||||
if (wnext < len) { /* some from start of window */
|
||||
op = wnext;
|
||||
len -= op;
|
||||
do {
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
} while (--op);
|
||||
from = out - dist; /* rest from output */
|
||||
}
|
||||
}
|
||||
}
|
||||
else { /* contiguous in window */
|
||||
from += wwrite - op;
|
||||
from += wnext - op;
|
||||
if (op < len) { /* some from window */
|
||||
len -= op;
|
||||
do {
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
} while (--op);
|
||||
from = out - dist; /* rest from output */
|
||||
}
|
||||
}
|
||||
while (len > 2) {
|
||||
PUP(out) = PUP(from);
|
||||
PUP(out) = PUP(from);
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
*out++ = *from++;
|
||||
*out++ = *from++;
|
||||
len -= 3;
|
||||
}
|
||||
if (len) {
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
if (len > 1)
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
from = out - dist; /* copy direct from output */
|
||||
do { /* minimum length is three */
|
||||
PUP(out) = PUP(from);
|
||||
PUP(out) = PUP(from);
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
*out++ = *from++;
|
||||
*out++ = *from++;
|
||||
len -= 3;
|
||||
} while (len > 2);
|
||||
if (len) {
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
if (len > 1)
|
||||
PUP(out) = PUP(from);
|
||||
*out++ = *from++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ((op & 64) == 0) { /* 2nd level distance code */
|
||||
this = dcode[this.val + (hold & ((1U << op) - 1))];
|
||||
here = dcode[here.val + (hold & ((1U << op) - 1))];
|
||||
goto dodist;
|
||||
}
|
||||
else {
|
||||
@ -271,7 +276,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
}
|
||||
}
|
||||
else if ((op & 64) == 0) { /* 2nd level length code */
|
||||
this = lcode[this.val + (hold & ((1U << op) - 1))];
|
||||
here = lcode[here.val + (hold & ((1U << op) - 1))];
|
||||
goto dolen;
|
||||
}
|
||||
else if (op & 32) { /* end-of-block */
|
||||
@ -293,8 +298,8 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
hold &= (1U << bits) - 1;
|
||||
|
||||
/* update state and return */
|
||||
strm->next_in = in + OFF;
|
||||
strm->next_out = out + OFF;
|
||||
strm->next_in = in;
|
||||
strm->next_out = out;
|
||||
strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
|
||||
strm->avail_out = (unsigned)(out < end ?
|
||||
257 + (end - out) : 257 - (out - end));
|
||||
@ -307,7 +312,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
||||
inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
|
||||
- Using bit fields for code structure
|
||||
- Different op definition to avoid & for extra bits (do & for table bits)
|
||||
- Three separate decoding do-loops for direct, window, and write == 0
|
||||
- Three separate decoding do-loops for direct, window, and wnext == 0
|
||||
- Special case for distance > 1 copies to do overlapped load and store copy
|
||||
- Explicit branch predictions (based on measured branch probabilities)
|
||||
- Deferring match copy and interspersed it with decoding subsequent codes
|
||||
|
594
common/dist/zlib/inflate.c
vendored
594
common/dist/zlib/inflate.c
vendored
@ -1,7 +1,7 @@
|
||||
/* $NetBSD: inflate.c,v 1.4 2007/12/22 00:52:03 tsutsui Exp $ */
|
||||
/* $NetBSD: inflate.c,v 1.5 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* inflate.c -- zlib decompression
|
||||
* Copyright (C) 1995-2005 Mark Adler
|
||||
* Copyright (C) 1995-2016 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
* - Rearrange window copies in inflate_fast() for speed and simplification
|
||||
* - Unroll last copy for window match in inflate_fast()
|
||||
* - Use local copies of window variables in inflate_fast() for speed
|
||||
* - Pull out common write == 0 case for speed in inflate_fast()
|
||||
* - Pull out common wnext == 0 case for speed in inflate_fast()
|
||||
* - Make op and len in inflate_fast() unsigned for consistency
|
||||
* - Add FAR to lcode and dcode declarations in inflate_fast()
|
||||
* - Simplified bad distance check in inflate_fast()
|
||||
@ -94,37 +94,156 @@
|
||||
#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, unsigned out));
|
||||
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, unsigned char FAR *buf,
|
||||
local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
|
||||
unsigned len));
|
||||
|
||||
local int inflateStateCheck(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
if (strm == Z_NULL ||
|
||||
strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0)
|
||||
return 1;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (state == Z_NULL || state->strm != strm ||
|
||||
state->mode < HEAD || state->mode > SYNC)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateResetKeep(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
strm->total_in = strm->total_out = state->total = 0;
|
||||
strm->msg = Z_NULL;
|
||||
if (state->wrap) /* to support ill-conceived Java test suite */
|
||||
strm->adler = state->wrap & 1;
|
||||
state->mode = HEAD;
|
||||
state->last = 0;
|
||||
state->havedict = 0;
|
||||
state->dmax = 32768U;
|
||||
state->head = Z_NULL;
|
||||
state->hold = 0;
|
||||
state->bits = 0;
|
||||
state->lencode = state->distcode = state->next = state->codes;
|
||||
state->sane = 1;
|
||||
state->back = -1;
|
||||
Tracev((stderr, "inflate: reset\n"));
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateReset(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
strm->total_in = strm->total_out = state->total = 0;
|
||||
strm->msg = Z_NULL;
|
||||
strm->adler = 1; /* to support ill-conceived Java test suite */
|
||||
state->mode = HEAD;
|
||||
state->last = 0;
|
||||
state->havedict = 0;
|
||||
state->dmax = 32768U;
|
||||
state->head = Z_NULL;
|
||||
state->wsize = 0;
|
||||
state->whave = 0;
|
||||
state->write = 0;
|
||||
state->hold = 0;
|
||||
state->bits = 0;
|
||||
state->lencode = state->distcode = state->next = state->codes;
|
||||
Tracev((stderr, "inflate: reset\n"));
|
||||
return Z_OK;
|
||||
state->wnext = 0;
|
||||
return inflateResetKeep(strm);
|
||||
}
|
||||
|
||||
int ZEXPORT inflateReset2(strm, windowBits)
|
||||
z_streamp strm;
|
||||
int windowBits;
|
||||
{
|
||||
int wrap;
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
/* get the state */
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
|
||||
/* extract wrap request from windowBits parameter */
|
||||
if (windowBits < 0) {
|
||||
wrap = 0;
|
||||
windowBits = -windowBits;
|
||||
}
|
||||
else {
|
||||
wrap = (windowBits >> 4) + 5;
|
||||
#ifdef GUNZIP
|
||||
if (windowBits < 48)
|
||||
windowBits &= 15;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* set number of window bits, free window if different */
|
||||
if (windowBits && (windowBits < 8 || windowBits > 15))
|
||||
return Z_STREAM_ERROR;
|
||||
if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
|
||||
ZFREE(strm, state->window);
|
||||
state->window = Z_NULL;
|
||||
}
|
||||
|
||||
/* update state and reset the rest of it */
|
||||
state->wrap = wrap;
|
||||
state->wbits = (unsigned)windowBits;
|
||||
return inflateReset(strm);
|
||||
}
|
||||
|
||||
int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
|
||||
z_streamp strm;
|
||||
int windowBits;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{
|
||||
int ret;
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
|
||||
stream_size != (int)(sizeof(z_stream)))
|
||||
return Z_VERSION_ERROR;
|
||||
if (strm == Z_NULL) return Z_STREAM_ERROR;
|
||||
strm->msg = Z_NULL; /* in case we return an error */
|
||||
if (strm->zalloc == (alloc_func)0) {
|
||||
#ifdef Z_SOLO
|
||||
return Z_STREAM_ERROR;
|
||||
#else
|
||||
strm->zalloc = zcalloc;
|
||||
strm->opaque = (voidpf)0;
|
||||
#endif
|
||||
}
|
||||
if (strm->zfree == (free_func)0)
|
||||
#ifdef Z_SOLO
|
||||
return Z_STREAM_ERROR;
|
||||
#else
|
||||
strm->zfree = zcfree;
|
||||
#endif
|
||||
state = (struct inflate_state FAR *)
|
||||
ZALLOC(strm, 1, sizeof(struct inflate_state));
|
||||
if (state == Z_NULL) return Z_MEM_ERROR;
|
||||
Tracev((stderr, "inflate: allocated\n"));
|
||||
strm->state = (struct internal_state FAR *)state;
|
||||
state->strm = strm;
|
||||
state->window = Z_NULL;
|
||||
state->mode = HEAD; /* to pass state test in inflateReset2() */
|
||||
ret = inflateReset2(strm, windowBits);
|
||||
if (ret != Z_OK) {
|
||||
ZFREE(strm, state);
|
||||
strm->state = Z_NULL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateInit_(strm, version, stream_size)
|
||||
z_streamp strm;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{
|
||||
return inflateInit2_(strm, DEF_WBITS, version, stream_size);
|
||||
}
|
||||
|
||||
int ZEXPORT inflatePrime(strm, bits, value)
|
||||
@ -134,66 +253,20 @@ int value;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
|
||||
if (bits < 0) {
|
||||
state->hold = 0;
|
||||
state->bits = 0;
|
||||
return Z_OK;
|
||||
}
|
||||
if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR;
|
||||
value &= (1L << bits) - 1;
|
||||
state->hold += value << state->bits;
|
||||
state->bits += bits;
|
||||
state->hold += (unsigned)value << state->bits;
|
||||
state->bits += (uInt)bits;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
|
||||
z_streamp strm;
|
||||
int windowBits;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
|
||||
stream_size != (int)(sizeof(z_stream)))
|
||||
return Z_VERSION_ERROR;
|
||||
if (strm == Z_NULL) return Z_STREAM_ERROR;
|
||||
strm->msg = Z_NULL; /* in case we return an error */
|
||||
if (strm->zalloc == (alloc_func)0) {
|
||||
strm->zalloc = zcalloc;
|
||||
strm->opaque = (voidpf)0;
|
||||
}
|
||||
if (strm->zfree == (free_func)0) strm->zfree = zcfree;
|
||||
state = (struct inflate_state FAR *)
|
||||
ZALLOC(strm, 1, sizeof(struct inflate_state));
|
||||
if (state == Z_NULL) return Z_MEM_ERROR;
|
||||
Tracev((stderr, "inflate: allocated\n"));
|
||||
strm->state = (struct internal_state FAR *)state;
|
||||
if (windowBits < 0) {
|
||||
state->wrap = 0;
|
||||
windowBits = -windowBits;
|
||||
}
|
||||
else {
|
||||
state->wrap = (windowBits >> 4) + 1;
|
||||
#ifdef GUNZIP
|
||||
if (windowBits < 48) windowBits &= 15;
|
||||
#endif
|
||||
}
|
||||
if (windowBits < 8 || windowBits > 15) {
|
||||
ZFREE(strm, state);
|
||||
strm->state = Z_NULL;
|
||||
return Z_STREAM_ERROR;
|
||||
}
|
||||
state->wbits = (unsigned)windowBits;
|
||||
state->window = Z_NULL;
|
||||
return inflateReset(strm);
|
||||
}
|
||||
|
||||
int ZEXPORT inflateInit_(strm, version, stream_size)
|
||||
z_streamp strm;
|
||||
const char *version;
|
||||
int stream_size;
|
||||
{
|
||||
return inflateInit2_(strm, DEF_WBITS, version, stream_size);
|
||||
}
|
||||
|
||||
/*
|
||||
Return state with length and distance decoding tables and index sizes set to
|
||||
fixed code decoding. Normally this returns fixed tables from inffixed.h.
|
||||
@ -288,8 +361,8 @@ void makefixed()
|
||||
low = 0;
|
||||
for (;;) {
|
||||
if ((low % 7) == 0) printf("\n ");
|
||||
printf("{%u,%u,%d}", state.lencode[low].op, state.lencode[low].bits,
|
||||
state.lencode[low].val);
|
||||
printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op,
|
||||
state.lencode[low].bits, state.lencode[low].val);
|
||||
if (++low == size) break;
|
||||
putchar(',');
|
||||
}
|
||||
@ -322,12 +395,13 @@ 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, out)
|
||||
local int updatewindow(strm, end, copy)
|
||||
z_streamp strm;
|
||||
unsigned out;
|
||||
const Bytef *end;
|
||||
unsigned copy;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
unsigned copy, dist;
|
||||
unsigned dist;
|
||||
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
|
||||
@ -342,30 +416,29 @@ unsigned out;
|
||||
/* if window not in use yet, initialize */
|
||||
if (state->wsize == 0) {
|
||||
state->wsize = 1U << state->wbits;
|
||||
state->write = 0;
|
||||
state->wnext = 0;
|
||||
state->whave = 0;
|
||||
}
|
||||
|
||||
/* copy state->wsize or less output bytes into the circular window */
|
||||
copy = out - strm->avail_out;
|
||||
if (copy >= state->wsize) {
|
||||
zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
|
||||
state->write = 0;
|
||||
zmemcpy(state->window, end - state->wsize, state->wsize);
|
||||
state->wnext = 0;
|
||||
state->whave = state->wsize;
|
||||
}
|
||||
else {
|
||||
dist = state->wsize - state->write;
|
||||
dist = state->wsize - state->wnext;
|
||||
if (dist > copy) dist = copy;
|
||||
zmemcpy(state->window + state->write, strm->next_out - copy, dist);
|
||||
zmemcpy(state->window + state->wnext, end - copy, dist);
|
||||
copy -= dist;
|
||||
if (copy) {
|
||||
zmemcpy(state->window, strm->next_out - copy, copy);
|
||||
state->write = copy;
|
||||
zmemcpy(state->window, end - copy, copy);
|
||||
state->wnext = copy;
|
||||
state->whave = state->wsize;
|
||||
}
|
||||
else {
|
||||
state->write += dist;
|
||||
if (state->write == state->wsize) state->write = 0;
|
||||
state->wnext += dist;
|
||||
if (state->wnext == state->wsize) state->wnext = 0;
|
||||
if (state->whave < state->wsize) state->whave += dist;
|
||||
}
|
||||
}
|
||||
@ -466,11 +539,6 @@ unsigned out;
|
||||
bits -= bits & 7; \
|
||||
} while (0)
|
||||
|
||||
/* Reverse the bytes in a 32-bit value */
|
||||
#define REVERSE(q) \
|
||||
((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
|
||||
(((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
|
||||
|
||||
/*
|
||||
inflate() uses a state machine to process as much input data and generate as
|
||||
much output data as possible before returning. The state machine is
|
||||
@ -558,7 +626,7 @@ z_streamp strm;
|
||||
int flush;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
unsigned char FAR *next; /* next input */
|
||||
z_const unsigned char FAR *next; /* next input */
|
||||
unsigned char FAR *put; /* next output */
|
||||
unsigned have, left; /* available input and output */
|
||||
unsigned long hold; /* bit buffer */
|
||||
@ -566,7 +634,7 @@ int flush;
|
||||
unsigned in, out; /* save starting available input and output */
|
||||
unsigned copy; /* number of stored or match bytes to copy */
|
||||
unsigned char FAR *from; /* where to copy match bytes from */
|
||||
code this; /* current decoding table entry */
|
||||
code here; /* current decoding table entry */
|
||||
code last; /* parent table entry */
|
||||
unsigned len; /* length to copy for repeats, bits to drop */
|
||||
int ret; /* return code */
|
||||
@ -576,16 +644,9 @@ int flush;
|
||||
static const unsigned short order[19] = /* permutation of code lengths */
|
||||
{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
|
||||
|
||||
#if defined(__NetBSD__) && defined(_STANDALONE)
|
||||
/* Some kernels are loaded at address 0x0 so strm->next_out could be NULL */
|
||||
if (strm == Z_NULL || strm->state == Z_NULL ||
|
||||
if (inflateStateCheck(strm) || strm->next_out == Z_NULL ||
|
||||
(strm->next_in == Z_NULL && strm->avail_in != 0))
|
||||
return Z_STREAM_ERROR;
|
||||
#else
|
||||
if (strm == Z_NULL || strm->state == Z_NULL || strm->next_out == Z_NULL ||
|
||||
(strm->next_in == Z_NULL && strm->avail_in != 0))
|
||||
return Z_STREAM_ERROR;
|
||||
#endif
|
||||
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */
|
||||
@ -603,6 +664,8 @@ int flush;
|
||||
NEEDBITS(16);
|
||||
#ifdef GUNZIP
|
||||
if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */
|
||||
if (state->wbits == 0)
|
||||
state->wbits = 15;
|
||||
state->check = crc32(0L, Z_NULL, 0);
|
||||
CRC2(state->check, hold);
|
||||
INITBITS();
|
||||
@ -628,7 +691,9 @@ int flush;
|
||||
}
|
||||
DROPBITS(4);
|
||||
len = BITS(4) + 8;
|
||||
if (len > state->wbits) {
|
||||
if (state->wbits == 0)
|
||||
state->wbits = len;
|
||||
if (len > 15 || len > state->wbits) {
|
||||
strm->msg = __UNCONST("invalid window size");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
@ -655,14 +720,16 @@ int flush;
|
||||
}
|
||||
if (state->head != Z_NULL)
|
||||
state->head->text = (int)((hold >> 8) & 1);
|
||||
if (state->flags & 0x0200) CRC2(state->check, hold);
|
||||
if ((state->flags & 0x0200) && (state->wrap & 4))
|
||||
CRC2(state->check, hold);
|
||||
INITBITS();
|
||||
state->mode = TIME;
|
||||
case TIME:
|
||||
NEEDBITS(32);
|
||||
if (state->head != Z_NULL)
|
||||
state->head->time = hold;
|
||||
if (state->flags & 0x0200) CRC4(state->check, hold);
|
||||
if ((state->flags & 0x0200) && (state->wrap & 4))
|
||||
CRC4(state->check, hold);
|
||||
INITBITS();
|
||||
state->mode = OS;
|
||||
case OS:
|
||||
@ -671,7 +738,8 @@ int flush;
|
||||
state->head->xflags = (int)(hold & 0xff);
|
||||
state->head->os = (int)(hold >> 8);
|
||||
}
|
||||
if (state->flags & 0x0200) CRC2(state->check, hold);
|
||||
if ((state->flags & 0x0200) && (state->wrap & 4))
|
||||
CRC2(state->check, hold);
|
||||
INITBITS();
|
||||
state->mode = EXLEN;
|
||||
case EXLEN:
|
||||
@ -680,7 +748,8 @@ int flush;
|
||||
state->length = (unsigned)(hold);
|
||||
if (state->head != Z_NULL)
|
||||
state->head->extra_len = (unsigned)hold;
|
||||
if (state->flags & 0x0200) CRC2(state->check, hold);
|
||||
if ((state->flags & 0x0200) && (state->wrap & 4))
|
||||
CRC2(state->check, hold);
|
||||
INITBITS();
|
||||
}
|
||||
else if (state->head != Z_NULL)
|
||||
@ -699,7 +768,7 @@ int flush;
|
||||
len + copy > state->head->extra_max ?
|
||||
state->head->extra_max - len : copy);
|
||||
}
|
||||
if (state->flags & 0x0200)
|
||||
if ((state->flags & 0x0200) && (state->wrap & 4))
|
||||
state->check = crc32(state->check, next, copy);
|
||||
have -= copy;
|
||||
next += copy;
|
||||
@ -718,9 +787,9 @@ int flush;
|
||||
if (state->head != Z_NULL &&
|
||||
state->head->name != Z_NULL &&
|
||||
state->length < state->head->name_max)
|
||||
state->head->name[state->length++] = len;
|
||||
state->head->name[state->length++] = (Bytef)len;
|
||||
} while (len && copy < have);
|
||||
if (state->flags & 0x0200)
|
||||
if ((state->flags & 0x0200) && (state->wrap & 4))
|
||||
state->check = crc32(state->check, next, copy);
|
||||
have -= copy;
|
||||
next += copy;
|
||||
@ -739,9 +808,9 @@ int flush;
|
||||
if (state->head != Z_NULL &&
|
||||
state->head->comment != Z_NULL &&
|
||||
state->length < state->head->comm_max)
|
||||
state->head->comment[state->length++] = len;
|
||||
state->head->comment[state->length++] = (Bytef)len;
|
||||
} while (len && copy < have);
|
||||
if (state->flags & 0x0200)
|
||||
if ((state->flags & 0x0200) && (state->wrap & 4))
|
||||
state->check = crc32(state->check, next, copy);
|
||||
have -= copy;
|
||||
next += copy;
|
||||
@ -753,7 +822,7 @@ int flush;
|
||||
case HCRC:
|
||||
if (state->flags & 0x0200) {
|
||||
NEEDBITS(16);
|
||||
if (hold != (state->check & 0xffff)) {
|
||||
if ((state->wrap & 4) && hold != (state->check & 0xffff)) {
|
||||
strm->msg = __UNCONST("header crc mismatch");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
@ -770,7 +839,7 @@ int flush;
|
||||
#endif
|
||||
case DICTID:
|
||||
NEEDBITS(32);
|
||||
strm->adler = state->check = REVERSE(hold);
|
||||
strm->adler = state->check = ZSWAP32(hold);
|
||||
INITBITS();
|
||||
state->mode = DICT;
|
||||
case DICT:
|
||||
@ -781,7 +850,7 @@ int flush;
|
||||
strm->adler = state->check = adler32(0L, Z_NULL, 0);
|
||||
state->mode = TYPE;
|
||||
case TYPE:
|
||||
if (flush == Z_BLOCK) goto inf_leave;
|
||||
if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
|
||||
case TYPEDO:
|
||||
if (state->last) {
|
||||
BYTEBITS();
|
||||
@ -801,7 +870,11 @@ int flush;
|
||||
fixedtables(state);
|
||||
Tracev((stderr, "inflate: fixed codes block%s\n",
|
||||
state->last ? " (last)" : ""));
|
||||
state->mode = LEN; /* decode codes */
|
||||
state->mode = LEN_; /* decode codes */
|
||||
if (flush == Z_TREES) {
|
||||
DROPBITS(2);
|
||||
goto inf_leave;
|
||||
}
|
||||
break;
|
||||
case 2: /* dynamic block */
|
||||
Tracev((stderr, "inflate: dynamic codes block%s\n",
|
||||
@ -826,6 +899,9 @@ int flush;
|
||||
Tracev((stderr, "inflate: stored length %u\n",
|
||||
state->length));
|
||||
INITBITS();
|
||||
state->mode = COPY_;
|
||||
if (flush == Z_TREES) goto inf_leave;
|
||||
case COPY_:
|
||||
state->mode = COPY;
|
||||
case COPY:
|
||||
copy = state->length;
|
||||
@ -871,7 +947,7 @@ int flush;
|
||||
while (state->have < 19)
|
||||
state->lens[order[state->have++]] = 0;
|
||||
state->next = state->codes;
|
||||
state->lencode = (code const FAR *)(state->next);
|
||||
state->lencode = (const code FAR *)(state->next);
|
||||
state->lenbits = 7;
|
||||
ret = inflate_table(CODES, state->lens, 19, &(state->next),
|
||||
&(state->lenbits), state->work);
|
||||
@ -886,19 +962,18 @@ int flush;
|
||||
case CODELENS:
|
||||
while (state->have < state->nlen + state->ndist) {
|
||||
for (;;) {
|
||||
this = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(this.bits) <= bits) break;
|
||||
here = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
if (this.val < 16) {
|
||||
NEEDBITS(this.bits);
|
||||
DROPBITS(this.bits);
|
||||
state->lens[state->have++] = this.val;
|
||||
if (here.val < 16) {
|
||||
DROPBITS(here.bits);
|
||||
state->lens[state->have++] = here.val;
|
||||
}
|
||||
else {
|
||||
if (this.val == 16) {
|
||||
NEEDBITS(this.bits + 2);
|
||||
DROPBITS(this.bits);
|
||||
if (here.val == 16) {
|
||||
NEEDBITS(here.bits + 2);
|
||||
DROPBITS(here.bits);
|
||||
if (state->have == 0) {
|
||||
strm->msg = __UNCONST("invalid bit length repeat");
|
||||
state->mode = BAD;
|
||||
@ -908,16 +983,16 @@ int flush;
|
||||
copy = 3 + BITS(2);
|
||||
DROPBITS(2);
|
||||
}
|
||||
else if (this.val == 17) {
|
||||
NEEDBITS(this.bits + 3);
|
||||
DROPBITS(this.bits);
|
||||
else if (here.val == 17) {
|
||||
NEEDBITS(here.bits + 3);
|
||||
DROPBITS(here.bits);
|
||||
len = 0;
|
||||
copy = 3 + BITS(3);
|
||||
DROPBITS(3);
|
||||
}
|
||||
else {
|
||||
NEEDBITS(this.bits + 7);
|
||||
DROPBITS(this.bits);
|
||||
NEEDBITS(here.bits + 7);
|
||||
DROPBITS(here.bits);
|
||||
len = 0;
|
||||
copy = 11 + BITS(7);
|
||||
DROPBITS(7);
|
||||
@ -935,9 +1010,18 @@ int flush;
|
||||
/* handle error breaks in while */
|
||||
if (state->mode == BAD) break;
|
||||
|
||||
/* build code tables */
|
||||
/* check for end-of-block code (better have one) */
|
||||
if (state->lens[256] == 0) {
|
||||
strm->msg = __UNCONST("invalid code -- missing end-of-block");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
|
||||
/* build code tables -- note: do not change the lenbits or distbits
|
||||
values here (9 and 6) without reading the comments in inftrees.h
|
||||
concerning the ENOUGH constants, which depend on those values */
|
||||
state->next = state->codes;
|
||||
state->lencode = (code const FAR *)(state->next);
|
||||
state->lencode = (const code FAR *)(state->next);
|
||||
state->lenbits = 9;
|
||||
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
|
||||
&(state->lenbits), state->work);
|
||||
@ -946,7 +1030,7 @@ int flush;
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
state->distcode = (code const FAR *)(state->next);
|
||||
state->distcode = (const code FAR *)(state->next);
|
||||
state->distbits = 6;
|
||||
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
|
||||
&(state->next), &(state->distbits), state->work);
|
||||
@ -956,88 +1040,102 @@ int flush;
|
||||
break;
|
||||
}
|
||||
Tracev((stderr, "inflate: codes ok\n"));
|
||||
state->mode = LEN_;
|
||||
if (flush == Z_TREES) goto inf_leave;
|
||||
case LEN_:
|
||||
state->mode = LEN;
|
||||
case LEN:
|
||||
if (have >= 6 && left >= 258) {
|
||||
RESTORE();
|
||||
inflate_fast(strm, out);
|
||||
LOAD();
|
||||
if (state->mode == TYPE)
|
||||
state->back = -1;
|
||||
break;
|
||||
}
|
||||
state->back = 0;
|
||||
for (;;) {
|
||||
this = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(this.bits) <= bits) break;
|
||||
here = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
if (this.op && (this.op & 0xf0) == 0) {
|
||||
last = this;
|
||||
if (here.op && (here.op & 0xf0) == 0) {
|
||||
last = here;
|
||||
for (;;) {
|
||||
this = state->lencode[last.val +
|
||||
here = state->lencode[last.val +
|
||||
(BITS(last.bits + last.op) >> last.bits)];
|
||||
if ((unsigned)(last.bits + this.bits) <= bits) break;
|
||||
if ((unsigned)(last.bits + here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
DROPBITS(last.bits);
|
||||
state->back += last.bits;
|
||||
}
|
||||
DROPBITS(this.bits);
|
||||
state->length = (unsigned)this.val;
|
||||
if ((int)(this.op) == 0) {
|
||||
Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
|
||||
DROPBITS(here.bits);
|
||||
state->back += here.bits;
|
||||
state->length = (unsigned)here.val;
|
||||
if ((int)(here.op) == 0) {
|
||||
Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
|
||||
"inflate: literal '%c'\n" :
|
||||
"inflate: literal 0x%02x\n", this.val));
|
||||
"inflate: literal 0x%02x\n", here.val));
|
||||
state->mode = LIT;
|
||||
break;
|
||||
}
|
||||
if (this.op & 32) {
|
||||
if (here.op & 32) {
|
||||
Tracevv((stderr, "inflate: end of block\n"));
|
||||
state->back = -1;
|
||||
state->mode = TYPE;
|
||||
break;
|
||||
}
|
||||
if (this.op & 64) {
|
||||
if (here.op & 64) {
|
||||
strm->msg = __UNCONST("invalid literal/length code");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
state->extra = (unsigned)(this.op) & 15;
|
||||
state->extra = (unsigned)(here.op) & 15;
|
||||
state->mode = LENEXT;
|
||||
case LENEXT:
|
||||
if (state->extra) {
|
||||
NEEDBITS(state->extra);
|
||||
state->length += BITS(state->extra);
|
||||
DROPBITS(state->extra);
|
||||
state->back += state->extra;
|
||||
}
|
||||
Tracevv((stderr, "inflate: length %u\n", state->length));
|
||||
state->was = state->length;
|
||||
state->mode = DIST;
|
||||
case DIST:
|
||||
for (;;) {
|
||||
this = state->distcode[BITS(state->distbits)];
|
||||
if ((unsigned)(this.bits) <= bits) break;
|
||||
here = state->distcode[BITS(state->distbits)];
|
||||
if ((unsigned)(here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
if ((this.op & 0xf0) == 0) {
|
||||
last = this;
|
||||
if ((here.op & 0xf0) == 0) {
|
||||
last = here;
|
||||
for (;;) {
|
||||
this = state->distcode[last.val +
|
||||
here = state->distcode[last.val +
|
||||
(BITS(last.bits + last.op) >> last.bits)];
|
||||
if ((unsigned)(last.bits + this.bits) <= bits) break;
|
||||
if ((unsigned)(last.bits + here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
DROPBITS(last.bits);
|
||||
state->back += last.bits;
|
||||
}
|
||||
DROPBITS(this.bits);
|
||||
if (this.op & 64) {
|
||||
DROPBITS(here.bits);
|
||||
state->back += here.bits;
|
||||
if (here.op & 64) {
|
||||
strm->msg = __UNCONST("invalid distance code");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
state->offset = (unsigned)this.val;
|
||||
state->extra = (unsigned)(this.op) & 15;
|
||||
state->offset = (unsigned)here.val;
|
||||
state->extra = (unsigned)(here.op) & 15;
|
||||
state->mode = DISTEXT;
|
||||
case DISTEXT:
|
||||
if (state->extra) {
|
||||
NEEDBITS(state->extra);
|
||||
state->offset += BITS(state->extra);
|
||||
DROPBITS(state->extra);
|
||||
state->back += state->extra;
|
||||
}
|
||||
#ifdef INFLATE_STRICT
|
||||
if (state->offset > state->dmax) {
|
||||
@ -1046,11 +1144,6 @@ int flush;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if (state->offset > state->whave + out - left) {
|
||||
strm->msg = __UNCONST("invalid distance too far back");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
Tracevv((stderr, "inflate: distance %u\n", state->offset));
|
||||
state->mode = MATCH;
|
||||
case MATCH:
|
||||
@ -1058,12 +1151,32 @@ int flush;
|
||||
copy = out - left;
|
||||
if (state->offset > copy) { /* copy from window */
|
||||
copy = state->offset - copy;
|
||||
if (copy > state->write) {
|
||||
copy -= state->write;
|
||||
if (copy > state->whave) {
|
||||
if (state->sane) {
|
||||
strm->msg = __UNCONST("invalid distance too far back");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
|
||||
Trace((stderr, "inflate.c too far\n"));
|
||||
copy -= state->whave;
|
||||
if (copy > state->length) copy = state->length;
|
||||
if (copy > left) copy = left;
|
||||
left -= copy;
|
||||
state->length -= copy;
|
||||
do {
|
||||
*put++ = 0;
|
||||
} while (--copy);
|
||||
if (state->length == 0) state->mode = LEN;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
if (copy > state->wnext) {
|
||||
copy -= state->wnext;
|
||||
from = state->window + (state->wsize - copy);
|
||||
}
|
||||
else
|
||||
from = state->window + (state->write - copy);
|
||||
from = state->window + (state->wnext - copy);
|
||||
if (copy > state->length) copy = state->length;
|
||||
}
|
||||
else { /* copy from output */
|
||||
@ -1090,15 +1203,15 @@ int flush;
|
||||
out -= left;
|
||||
strm->total_out += out;
|
||||
state->total += out;
|
||||
if (out)
|
||||
if ((state->wrap & 4) && out)
|
||||
strm->adler = state->check =
|
||||
UPDATE(state->check, put - out, out);
|
||||
out = left;
|
||||
if ((
|
||||
if ((state->wrap & 4) && (
|
||||
#ifdef GUNZIP
|
||||
state->flags ? hold :
|
||||
#endif
|
||||
REVERSE(hold)) != state->check) {
|
||||
ZSWAP32(hold)) != state->check) {
|
||||
strm->msg = __UNCONST("incorrect data check");
|
||||
state->mode = BAD;
|
||||
break;
|
||||
@ -1142,8 +1255,9 @@ int flush;
|
||||
*/
|
||||
inf_leave:
|
||||
RESTORE();
|
||||
if (state->wsize || (state->mode < CHECK && out != strm->avail_out))
|
||||
if (updatewindow(strm, out)) {
|
||||
if (state->wsize || (out != strm->avail_out && state->mode < BAD &&
|
||||
(state->mode < CHECK || flush != Z_FINISH)))
|
||||
if (updatewindow(strm, strm->next_out, out - strm->avail_out)) {
|
||||
state->mode = MEM;
|
||||
return Z_MEM_ERROR;
|
||||
}
|
||||
@ -1152,11 +1266,12 @@ int flush;
|
||||
strm->total_in += in;
|
||||
strm->total_out += out;
|
||||
state->total += out;
|
||||
if (state->wrap && out)
|
||||
if ((state->wrap & 4) && out)
|
||||
strm->adler = state->check =
|
||||
UPDATE(state->check, strm->next_out - out, out);
|
||||
strm->data_type = state->bits + (state->last ? 64 : 0) +
|
||||
(state->mode == TYPE ? 128 : 0);
|
||||
strm->data_type = (int)state->bits + (state->last ? 64 : 0) +
|
||||
(state->mode == TYPE ? 128 : 0) +
|
||||
(state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
|
||||
if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
|
||||
ret = Z_BUF_ERROR;
|
||||
return ret;
|
||||
@ -1166,7 +1281,7 @@ int ZEXPORT inflateEnd(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
|
||||
if (inflateStateCheck(strm))
|
||||
return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (state->window != Z_NULL) ZFREE(strm, state->window);
|
||||
@ -1176,43 +1291,59 @@ z_streamp strm;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateGetDictionary(strm, dictionary, dictLength)
|
||||
z_streamp strm;
|
||||
Bytef *dictionary;
|
||||
uInt *dictLength;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
/* check state */
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
|
||||
/* copy dictionary */
|
||||
if (state->whave && dictionary != Z_NULL) {
|
||||
zmemcpy(dictionary, state->window + state->wnext,
|
||||
state->whave - state->wnext);
|
||||
zmemcpy(dictionary + state->whave - state->wnext,
|
||||
state->window, state->wnext);
|
||||
}
|
||||
if (dictLength != Z_NULL)
|
||||
*dictLength = state->whave;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateSetDictionary(strm, dictionary, dictLength)
|
||||
z_streamp strm;
|
||||
const Bytef *dictionary;
|
||||
uInt dictLength;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
unsigned long id;
|
||||
unsigned long dictid;
|
||||
int ret;
|
||||
|
||||
/* check state */
|
||||
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (state->wrap != 0 && state->mode != DICT)
|
||||
return Z_STREAM_ERROR;
|
||||
|
||||
/* check for correct dictionary id */
|
||||
/* check for correct dictionary identifier */
|
||||
if (state->mode == DICT) {
|
||||
id = adler32(0L, Z_NULL, 0);
|
||||
id = adler32(id, dictionary, dictLength);
|
||||
if (id != state->check)
|
||||
dictid = adler32(0L, Z_NULL, 0);
|
||||
dictid = adler32(dictid, dictionary, dictLength);
|
||||
if (dictid != state->check)
|
||||
return Z_DATA_ERROR;
|
||||
}
|
||||
|
||||
/* copy dictionary to window */
|
||||
if (updatewindow(strm, strm->avail_out)) {
|
||||
/* copy dictionary to window using updatewindow(), which will amend the
|
||||
existing dictionary if appropriate */
|
||||
ret = updatewindow(strm, dictionary + dictLength, dictLength);
|
||||
if (ret) {
|
||||
state->mode = MEM;
|
||||
return Z_MEM_ERROR;
|
||||
}
|
||||
if (dictLength > state->wsize) {
|
||||
zmemcpy(state->window, dictionary + dictLength - state->wsize,
|
||||
state->wsize);
|
||||
state->whave = state->wsize;
|
||||
}
|
||||
else {
|
||||
zmemcpy(state->window + state->wsize - dictLength, dictionary,
|
||||
dictLength);
|
||||
state->whave = dictLength;
|
||||
}
|
||||
state->havedict = 1;
|
||||
Tracev((stderr, "inflate: dictionary set\n"));
|
||||
return Z_OK;
|
||||
@ -1225,7 +1356,7 @@ gz_headerp head;
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
/* check state */
|
||||
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
|
||||
|
||||
@ -1248,7 +1379,7 @@ gz_headerp head;
|
||||
*/
|
||||
local unsigned syncsearch(have, buf, len)
|
||||
unsigned FAR *have;
|
||||
unsigned char FAR *buf;
|
||||
const unsigned char FAR *buf;
|
||||
unsigned len;
|
||||
{
|
||||
unsigned got;
|
||||
@ -1278,7 +1409,7 @@ z_streamp strm;
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
/* check parameters */
|
||||
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
|
||||
|
||||
@ -1325,7 +1456,7 @@ z_streamp strm;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
return state->mode == STORED && state->bits == 0;
|
||||
}
|
||||
@ -1340,8 +1471,7 @@ z_streamp source;
|
||||
unsigned wsize;
|
||||
|
||||
/* check input */
|
||||
if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
|
||||
source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
|
||||
if (inflateStateCheck(source) || dest == Z_NULL)
|
||||
return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)source->state;
|
||||
|
||||
@ -1360,8 +1490,9 @@ z_streamp source;
|
||||
}
|
||||
|
||||
/* copy state */
|
||||
zmemcpy(dest, source, sizeof(z_stream));
|
||||
zmemcpy(copy, state, sizeof(struct inflate_state));
|
||||
zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream));
|
||||
zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state));
|
||||
copy->strm = dest;
|
||||
if (state->lencode >= state->codes &&
|
||||
state->lencode <= state->codes + ENOUGH - 1) {
|
||||
copy->lencode = copy->codes + (state->lencode - state->codes);
|
||||
@ -1376,3 +1507,58 @@ z_streamp source;
|
||||
dest->state = (struct internal_state FAR *)copy;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
int ZEXPORT inflateUndermine(strm, subvert)
|
||||
z_streamp strm;
|
||||
int subvert;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
|
||||
state->sane = !subvert;
|
||||
return Z_OK;
|
||||
#else
|
||||
(void)subvert;
|
||||
state->sane = 1;
|
||||
return Z_DATA_ERROR;
|
||||
#endif
|
||||
}
|
||||
|
||||
int ZEXPORT inflateValidate(strm, check)
|
||||
z_streamp strm;
|
||||
int check;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
if (check)
|
||||
state->wrap |= 4;
|
||||
else
|
||||
state->wrap &= ~4;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
long ZEXPORT inflateMark(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (inflateStateCheck(strm))
|
||||
return -(1L << 16);
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
return (long)(((unsigned long)((long)state->back)) << 16) +
|
||||
(state->mode == COPY ? state->length :
|
||||
(state->mode == MATCH ? state->was - state->length : 0));
|
||||
}
|
||||
|
||||
unsigned long ZEXPORT inflateCodesUsed(strm)
|
||||
z_streamp strm;
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
if (inflateStateCheck(strm)) return (unsigned long)-1;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
return (unsigned long)(state->next - state->codes);
|
||||
}
|
||||
|
109
common/dist/zlib/inftrees.c
vendored
109
common/dist/zlib/inftrees.c
vendored
@ -1,7 +1,7 @@
|
||||
/* $NetBSD: inftrees.c,v 1.2 2006/01/16 03:23:10 christos Exp $ */
|
||||
/* $NetBSD: inftrees.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* inftrees.c -- generate Huffman trees for efficient decoding
|
||||
* Copyright (C) 1995-2005 Mark Adler
|
||||
* Copyright (C) 1995-2017 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#define MAXBITS 15
|
||||
|
||||
const char inflate_copyright[] =
|
||||
" inflate 1.2.3 Copyright 1995-2005 Mark Adler ";
|
||||
" inflate 1.2.10 Copyright 1995-2017 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
|
||||
@ -31,7 +31,7 @@ const char inflate_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_table(type, lens, codes, table, bits, work)
|
||||
int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
|
||||
codetype type;
|
||||
unsigned short FAR *lens;
|
||||
unsigned codes;
|
||||
@ -52,11 +52,11 @@ unsigned short FAR *work;
|
||||
unsigned fill; /* index for replicating entries */
|
||||
unsigned low; /* low bits for current root entry */
|
||||
unsigned mask; /* mask for low root bits */
|
||||
code this; /* table entry for duplication */
|
||||
code here; /* table entry for duplication */
|
||||
code FAR *next; /* next available space in table */
|
||||
const unsigned short FAR *base; /* base value table to use */
|
||||
const unsigned short FAR *extra; /* extra bits table to use */
|
||||
int end; /* use base and extra for symbol > end */
|
||||
unsigned match; /* use base and extra for symbol >= match */
|
||||
unsigned short count[MAXBITS+1]; /* number of codes of each length */
|
||||
unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
|
||||
static const unsigned short lbase[31] = { /* Length codes 257..285 base */
|
||||
@ -64,7 +64,7 @@ unsigned short FAR *work;
|
||||
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
|
||||
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
|
||||
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
|
||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
|
||||
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 192, 202};
|
||||
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
|
||||
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
|
||||
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
|
||||
@ -117,11 +117,11 @@ unsigned short FAR *work;
|
||||
if (count[mmax] != 0) break;
|
||||
if (root > mmax) root = mmax;
|
||||
if (mmax == 0) { /* no symbols to code at all */
|
||||
this.op = (unsigned char)64; /* invalid code marker */
|
||||
this.bits = (unsigned char)1;
|
||||
this.val = (unsigned short)0;
|
||||
*(*table)++ = this; /* make a table to force an error */
|
||||
*(*table)++ = this;
|
||||
here.op = (unsigned char)64; /* invalid code marker */
|
||||
here.bits = (unsigned char)1;
|
||||
here.val = (unsigned short)0;
|
||||
*(*table)++ = here; /* make a table to force an error */
|
||||
*(*table)++ = here;
|
||||
*bits = 1;
|
||||
return 0; /* no symbols, but wait for decoding to report error */
|
||||
}
|
||||
@ -168,11 +168,10 @@ unsigned short FAR *work;
|
||||
entered in the tables.
|
||||
|
||||
used keeps track of how many table entries have been allocated from the
|
||||
provided *table space. It is checked when a LENS table is being made
|
||||
against the space in *table, ENOUGH, minus the maximum space needed by
|
||||
the worst case distance code, MAXD. This should never happen, but the
|
||||
sufficiency of ENOUGH has not been proven exhaustively, hence the check.
|
||||
This assumes that when type == LENS, bits == 9.
|
||||
provided *table space. It is checked for LENS and DIST tables against
|
||||
the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
|
||||
the initial root table size constants. See the comments in inftrees.h
|
||||
for more information.
|
||||
|
||||
sym increments through all symbols, and the loop terminates when
|
||||
all codes of length mmax, i.e. all codes, have been processed. This
|
||||
@ -184,19 +183,17 @@ unsigned short FAR *work;
|
||||
switch (type) {
|
||||
case CODES:
|
||||
base = extra = work; /* dummy value--not used */
|
||||
end = 19;
|
||||
match = 20;
|
||||
break;
|
||||
case LENS:
|
||||
base = lbase;
|
||||
base -= 257;
|
||||
extra = lext;
|
||||
extra -= 257;
|
||||
end = 256;
|
||||
match = 257;
|
||||
break;
|
||||
default: /* DISTS */
|
||||
default: /* DISTS */
|
||||
base = dbase;
|
||||
extra = dext;
|
||||
end = -1;
|
||||
match = 0;
|
||||
}
|
||||
|
||||
/* initialize state for loop */
|
||||
@ -211,24 +208,25 @@ unsigned short FAR *work;
|
||||
mask = used - 1; /* mask for comparing low */
|
||||
|
||||
/* check available table space */
|
||||
if (type == LENS && used >= ENOUGH - MAXD)
|
||||
if ((type == LENS && used > ENOUGH_LENS) ||
|
||||
(type == DISTS && used > ENOUGH_DISTS))
|
||||
return 1;
|
||||
|
||||
/* process all codes and make table entries */
|
||||
for (;;) {
|
||||
/* create table entry */
|
||||
this.bits = (unsigned char)(len - drop);
|
||||
if ((int)(work[sym]) < end) {
|
||||
this.op = (unsigned char)0;
|
||||
this.val = work[sym];
|
||||
here.bits = (unsigned char)(len - drop);
|
||||
if (work[sym] + 1U < match) {
|
||||
here.op = (unsigned char)0;
|
||||
here.val = work[sym];
|
||||
}
|
||||
else if ((int)(work[sym]) > end) {
|
||||
this.op = (unsigned char)(extra[work[sym]]);
|
||||
this.val = base[work[sym]];
|
||||
else if (work[sym] >= match) {
|
||||
here.op = (unsigned char)(extra[work[sym] - match]);
|
||||
here.val = base[work[sym] - match];
|
||||
}
|
||||
else {
|
||||
this.op = (unsigned char)(32 + 64); /* end of block */
|
||||
this.val = 0;
|
||||
here.op = (unsigned char)(32 + 64); /* end of block */
|
||||
here.val = 0;
|
||||
}
|
||||
|
||||
/* replicate for those indices with low len bits equal to huff */
|
||||
@ -237,7 +235,7 @@ unsigned short FAR *work;
|
||||
mmin = fill; /* save offset to next table */
|
||||
do {
|
||||
fill -= incr;
|
||||
next[(huff >> drop) + fill] = this;
|
||||
next[(huff >> drop) + fill] = here;
|
||||
} while (fill != 0);
|
||||
|
||||
/* backwards increment the len-bit code huff */
|
||||
@ -279,7 +277,8 @@ unsigned short FAR *work;
|
||||
|
||||
/* check for enough space */
|
||||
used += 1U << curr;
|
||||
if (type == LENS && used >= ENOUGH - MAXD)
|
||||
if ((type == LENS && used > ENOUGH_LENS) ||
|
||||
(type == DISTS && used > ENOUGH_DISTS))
|
||||
return 1;
|
||||
|
||||
/* point entry in root table to sub-table */
|
||||
@ -290,38 +289,14 @@ unsigned short FAR *work;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Fill in rest of table for incomplete codes. This loop is similar to the
|
||||
loop above in incrementing huff for table indices. It is assumed that
|
||||
len is equal to curr + drop, so there is no loop needed to increment
|
||||
through high index bits. When the current sub-table is filled, the loop
|
||||
drops back to the root table to fill in any remaining entries there.
|
||||
*/
|
||||
this.op = (unsigned char)64; /* invalid code marker */
|
||||
this.bits = (unsigned char)(len - drop);
|
||||
this.val = (unsigned short)0;
|
||||
while (huff != 0) {
|
||||
/* when done with sub-table, drop back to root table */
|
||||
if (drop != 0 && (huff & mask) != low) {
|
||||
drop = 0;
|
||||
len = root;
|
||||
next = *table;
|
||||
this.bits = (unsigned char)len;
|
||||
}
|
||||
|
||||
/* put invalid code marker in table */
|
||||
next[huff >> drop] = this;
|
||||
|
||||
/* backwards increment the len-bit code huff */
|
||||
incr = 1U << (len - 1);
|
||||
while (huff & incr)
|
||||
incr >>= 1;
|
||||
if (incr != 0) {
|
||||
huff &= incr - 1;
|
||||
huff += incr;
|
||||
}
|
||||
else
|
||||
huff = 0;
|
||||
/* fill in remaining table entry if code is incomplete (guaranteed to have
|
||||
at most one remaining entry, since if the code is incomplete, the
|
||||
maximum code length that was allowed to get this far is one bit) */
|
||||
if (huff != 0) {
|
||||
here.op = (unsigned char)64; /* invalid code marker */
|
||||
here.bits = (unsigned char)(len - drop);
|
||||
here.val = (unsigned short)0;
|
||||
next[huff] = here;
|
||||
}
|
||||
|
||||
/* set return parameters */
|
||||
|
324
common/dist/zlib/minigzip.c
vendored
324
common/dist/zlib/minigzip.c
vendored
@ -1,324 +0,0 @@
|
||||
/* $NetBSD: minigzip.c,v 1.1.1.1 2006/01/14 20:10:31 christos Exp $ */
|
||||
|
||||
/* minigzip.c -- simulate gzip using the zlib compression library
|
||||
* Copyright (C) 1995-2005 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/*
|
||||
* minigzip is a minimal implementation of the gzip utility. This is
|
||||
* only an example of using zlib and isn't meant to replace the
|
||||
* full-featured gzip. No attempt is made to deal with file systems
|
||||
* limiting names to 14 or 8+3 characters, etc... Error checking is
|
||||
* very limited. So use minigzip only for testing; use gzip for the
|
||||
* real thing. On MSDOS, use only on file names without extension
|
||||
* or in pipe mode.
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
|
||||
#include <stdio.h>
|
||||
#include "zlib.h"
|
||||
|
||||
#ifdef STDC
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_MMAP
|
||||
# include <sys/types.h>
|
||||
# include <sys/mman.h>
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
|
||||
# include <fcntl.h>
|
||||
# include <io.h>
|
||||
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
|
||||
#else
|
||||
# define SET_BINARY_MODE(file)
|
||||
#endif
|
||||
|
||||
#ifdef VMS
|
||||
# define unlink delete
|
||||
# define GZ_SUFFIX "-gz"
|
||||
#endif
|
||||
#ifdef RISCOS
|
||||
# define unlink remove
|
||||
# define GZ_SUFFIX "-gz"
|
||||
# define fileno(file) file->__file
|
||||
#endif
|
||||
#if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
||||
# include <unix.h> /* for fileno */
|
||||
#endif
|
||||
|
||||
#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
|
||||
extern int unlink OF((const char *));
|
||||
#endif
|
||||
|
||||
#ifndef GZ_SUFFIX
|
||||
# define GZ_SUFFIX ".gz"
|
||||
#endif
|
||||
#define SUFFIX_LEN (sizeof(GZ_SUFFIX)-1)
|
||||
|
||||
#define BUFLEN 16384
|
||||
#define MAX_NAME_LEN 1024
|
||||
|
||||
#ifdef MAXSEG_64K
|
||||
# define local static
|
||||
/* Needed for systems with limitation on stack size. */
|
||||
#else
|
||||
# define local
|
||||
#endif
|
||||
|
||||
char *prog;
|
||||
|
||||
void error OF((const char *msg));
|
||||
void gz_compress OF((FILE *in, gzFile out));
|
||||
#ifdef USE_MMAP
|
||||
int gz_compress_mmap OF((FILE *in, gzFile out));
|
||||
#endif
|
||||
void gz_uncompress OF((gzFile in, FILE *out));
|
||||
void file_compress OF((char *file, char *mode));
|
||||
void file_uncompress OF((char *file));
|
||||
int main OF((int argc, char *argv[]));
|
||||
|
||||
/* ===========================================================================
|
||||
* Display error message and exit
|
||||
*/
|
||||
void error(msg)
|
||||
const char *msg;
|
||||
{
|
||||
fprintf(stderr, "%s: %s\n", prog, msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Compress input to output then close both files.
|
||||
*/
|
||||
|
||||
void gz_compress(in, out)
|
||||
FILE *in;
|
||||
gzFile out;
|
||||
{
|
||||
local char buf[BUFLEN];
|
||||
int len;
|
||||
int err;
|
||||
|
||||
#ifdef USE_MMAP
|
||||
/* Try first compressing with mmap. If mmap fails (minigzip used in a
|
||||
* pipe), use the normal fread loop.
|
||||
*/
|
||||
if (gz_compress_mmap(in, out) == Z_OK) return;
|
||||
#endif
|
||||
for (;;) {
|
||||
len = (int)fread(buf, 1, sizeof(buf), in);
|
||||
if (ferror(in)) {
|
||||
perror("fread");
|
||||
exit(1);
|
||||
}
|
||||
if (len == 0) break;
|
||||
|
||||
if (gzwrite(out, buf, (unsigned)len) != len) error(gzerror(out, &err));
|
||||
}
|
||||
fclose(in);
|
||||
if (gzclose(out) != Z_OK) error("failed gzclose");
|
||||
}
|
||||
|
||||
#ifdef USE_MMAP /* MMAP version, Miguel Albrecht <malbrech@eso.org> */
|
||||
|
||||
/* Try compressing the input file at once using mmap. Return Z_OK if
|
||||
* if success, Z_ERRNO otherwise.
|
||||
*/
|
||||
int gz_compress_mmap(in, out)
|
||||
FILE *in;
|
||||
gzFile out;
|
||||
{
|
||||
int len;
|
||||
int err;
|
||||
int ifd = fileno(in);
|
||||
caddr_t buf; /* mmap'ed buffer for the entire input file */
|
||||
off_t buf_len; /* length of the input file */
|
||||
struct stat sb;
|
||||
|
||||
/* Determine the size of the file, needed for mmap: */
|
||||
if (fstat(ifd, &sb) < 0) return Z_ERRNO;
|
||||
buf_len = sb.st_size;
|
||||
if (buf_len <= 0) return Z_ERRNO;
|
||||
|
||||
/* Now do the actual mmap: */
|
||||
buf = mmap((caddr_t) 0, buf_len, PROT_READ, MAP_SHARED, ifd, (off_t)0);
|
||||
if (buf == (caddr_t)(-1)) return Z_ERRNO;
|
||||
|
||||
/* Compress the whole file at once: */
|
||||
len = gzwrite(out, (char *)buf, (unsigned)buf_len);
|
||||
|
||||
if (len != (int)buf_len) error(gzerror(out, &err));
|
||||
|
||||
munmap(buf, buf_len);
|
||||
fclose(in);
|
||||
if (gzclose(out) != Z_OK) error("failed gzclose");
|
||||
return Z_OK;
|
||||
}
|
||||
#endif /* USE_MMAP */
|
||||
|
||||
/* ===========================================================================
|
||||
* Uncompress input to output then close both files.
|
||||
*/
|
||||
void gz_uncompress(in, out)
|
||||
gzFile in;
|
||||
FILE *out;
|
||||
{
|
||||
local char buf[BUFLEN];
|
||||
int len;
|
||||
int err;
|
||||
|
||||
for (;;) {
|
||||
len = gzread(in, buf, sizeof(buf));
|
||||
if (len < 0) error (gzerror(in, &err));
|
||||
if (len == 0) break;
|
||||
|
||||
if ((int)fwrite(buf, 1, (unsigned)len, out) != len) {
|
||||
error("failed fwrite");
|
||||
}
|
||||
}
|
||||
if (fclose(out)) error("failed fclose");
|
||||
|
||||
if (gzclose(in) != Z_OK) error("failed gzclose");
|
||||
}
|
||||
|
||||
|
||||
/* ===========================================================================
|
||||
* Compress the given file: create a corresponding .gz file and remove the
|
||||
* original.
|
||||
*/
|
||||
void file_compress(file, mode)
|
||||
char *file;
|
||||
char *mode;
|
||||
{
|
||||
local char outfile[MAX_NAME_LEN];
|
||||
FILE *in;
|
||||
gzFile out;
|
||||
|
||||
strcpy(outfile, file);
|
||||
strcat(outfile, GZ_SUFFIX);
|
||||
|
||||
in = fopen(file, "rb");
|
||||
if (in == NULL) {
|
||||
perror(file);
|
||||
exit(1);
|
||||
}
|
||||
out = gzopen(outfile, mode);
|
||||
if (out == NULL) {
|
||||
fprintf(stderr, "%s: can't gzopen %s\n", prog, outfile);
|
||||
exit(1);
|
||||
}
|
||||
gz_compress(in, out);
|
||||
|
||||
unlink(file);
|
||||
}
|
||||
|
||||
|
||||
/* ===========================================================================
|
||||
* Uncompress the given file and remove the original.
|
||||
*/
|
||||
void file_uncompress(file)
|
||||
char *file;
|
||||
{
|
||||
local char buf[MAX_NAME_LEN];
|
||||
char *infile, *outfile;
|
||||
FILE *out;
|
||||
gzFile in;
|
||||
uInt len = (uInt)strlen(file);
|
||||
|
||||
strcpy(buf, file);
|
||||
|
||||
if (len > SUFFIX_LEN && strcmp(file+len-SUFFIX_LEN, GZ_SUFFIX) == 0) {
|
||||
infile = file;
|
||||
outfile = buf;
|
||||
outfile[len-3] = '\0';
|
||||
} else {
|
||||
outfile = file;
|
||||
infile = buf;
|
||||
strcat(infile, GZ_SUFFIX);
|
||||
}
|
||||
in = gzopen(infile, "rb");
|
||||
if (in == NULL) {
|
||||
fprintf(stderr, "%s: can't gzopen %s\n", prog, infile);
|
||||
exit(1);
|
||||
}
|
||||
out = fopen(outfile, "wb");
|
||||
if (out == NULL) {
|
||||
perror(file);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
gz_uncompress(in, out);
|
||||
|
||||
unlink(infile);
|
||||
}
|
||||
|
||||
|
||||
/* ===========================================================================
|
||||
* Usage: minigzip [-d] [-f] [-h] [-r] [-1 to -9] [files...]
|
||||
* -d : decompress
|
||||
* -f : compress with Z_FILTERED
|
||||
* -h : compress with Z_HUFFMAN_ONLY
|
||||
* -r : compress with Z_RLE
|
||||
* -1 to -9 : compression level
|
||||
*/
|
||||
|
||||
int main(argc, argv)
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
int uncompr = 0;
|
||||
gzFile file;
|
||||
char outmode[20];
|
||||
|
||||
strcpy(outmode, "wb6 ");
|
||||
|
||||
prog = argv[0];
|
||||
argc--, argv++;
|
||||
|
||||
while (argc > 0) {
|
||||
if (strcmp(*argv, "-d") == 0)
|
||||
uncompr = 1;
|
||||
else if (strcmp(*argv, "-f") == 0)
|
||||
outmode[3] = 'f';
|
||||
else if (strcmp(*argv, "-h") == 0)
|
||||
outmode[3] = 'h';
|
||||
else if (strcmp(*argv, "-r") == 0)
|
||||
outmode[3] = 'R';
|
||||
else if ((*argv)[0] == '-' && (*argv)[1] >= '1' && (*argv)[1] <= '9' &&
|
||||
(*argv)[2] == 0)
|
||||
outmode[2] = (*argv)[1];
|
||||
else
|
||||
break;
|
||||
argc--, argv++;
|
||||
}
|
||||
if (outmode[3] == ' ')
|
||||
outmode[3] = 0;
|
||||
if (argc == 0) {
|
||||
SET_BINARY_MODE(stdin);
|
||||
SET_BINARY_MODE(stdout);
|
||||
if (uncompr) {
|
||||
file = gzdopen(fileno(stdin), "rb");
|
||||
if (file == NULL) error("can't gzdopen stdin");
|
||||
gz_uncompress(file, stdout);
|
||||
} else {
|
||||
file = gzdopen(fileno(stdout), outmode);
|
||||
if (file == NULL) error("can't gzdopen stdout");
|
||||
gz_compress(stdin, file);
|
||||
}
|
||||
} else {
|
||||
do {
|
||||
if (uncompr) {
|
||||
file_uncompress(*argv);
|
||||
} else {
|
||||
file_compress(*argv, outmode);
|
||||
}
|
||||
} while (argv++, --argc);
|
||||
}
|
||||
return 0;
|
||||
}
|
971
common/dist/zlib/old/zlib.html
vendored
971
common/dist/zlib/old/zlib.html
vendored
@ -1,971 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
zlib general purpose compression library version 1.1.4
|
||||
</title>
|
||||
</head>
|
||||
<body bgcolor="White" text="Black" vlink="Red" alink="Navy" link="Red">
|
||||
<!-- background="zlibbg.gif" -->
|
||||
|
||||
<h1> zlib 1.1.4 Manual </h1>
|
||||
<hr>
|
||||
<a name="Contents"><h2>Contents</h2>
|
||||
<ol type="I">
|
||||
<li> <a href="#Prologue">Prologue</a>
|
||||
<li> <a href="#Introduction">Introduction</a>
|
||||
<li> <a href="#Utility functions">Utility functions</a>
|
||||
<li> <a href="#Basic functions">Basic functions</a>
|
||||
<li> <a href="#Advanced functions">Advanced functions</a>
|
||||
<li> <a href="#Constants">Constants</a>
|
||||
<li> <a href="#struct z_stream_s">struct z_stream_s</a>
|
||||
<li> <a href="#Checksum functions">Checksum functions</a>
|
||||
<li> <a href="#Misc">Misc</a>
|
||||
</ol>
|
||||
<hr>
|
||||
<a name="Prologue"><h2> Prologue </h2>
|
||||
'zlib' general purpose compression library version 1.1.4, March 11th, 2002
|
||||
<p>
|
||||
Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler
|
||||
<p>
|
||||
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.
|
||||
<p>
|
||||
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:
|
||||
<ol>
|
||||
<li> 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.
|
||||
<li> Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
<li> This notice may not be removed or altered from any source distribution.
|
||||
</ol>
|
||||
|
||||
<dl>
|
||||
<dt>Jean-loup Gailly
|
||||
<dd><a href="mailto:jloup@gzip.org">jloup@gzip.org</a>
|
||||
<dt>Mark Adler
|
||||
<dd><a href="mailto:madler@alumni.caltech.edu">madler@alumni.caltech.edu</a>
|
||||
</dl>
|
||||
|
||||
The data format used by the zlib library is described by RFCs (Request for
|
||||
Comments) 1950 to 1952 in the files
|
||||
<a href="ftp://ds.internic.net/rfc/rfc1950.txt">
|
||||
ftp://ds.internic.net/rfc/rfc1950.txt </a>
|
||||
(zlib format),
|
||||
<a href="ftp://ds.internic.net/rfc/rfc1951.txt">
|
||||
rfc1951.txt </a>
|
||||
(<a href="#deflate">deflate</a> format) and
|
||||
<a href="ftp://ds.internic.net/rfc/rfc1952.txt">
|
||||
rfc1952.txt </a>
|
||||
(gzip format).
|
||||
<p>
|
||||
This manual is converted from zlib.h by
|
||||
<a href="mailto:piaip@csie.ntu.edu.tw"> piaip </a>
|
||||
<p>
|
||||
Visit <a href="http://ftp.cdrom.com/pub/infozip/zlib/">
|
||||
http://ftp.cdrom.com/pub/infozip/zlib/</a>
|
||||
for the official zlib web page.
|
||||
<p>
|
||||
|
||||
<hr>
|
||||
<a name="Introduction"><h2> Introduction </h2>
|
||||
The 'zlib' compression library provides in-memory compression and
|
||||
decompression functions, including integrity checks of the uncompressed
|
||||
data. This version of the library supports only one compression method
|
||||
(deflation) but other algorithms will be added later and will have the same
|
||||
stream interface.
|
||||
<p>
|
||||
|
||||
Compression can be done in a single step if the buffers are large
|
||||
enough (for example if an input file is mmap'ed), or can be done by
|
||||
repeated calls of the compression function. In the latter case, the
|
||||
application must provide more input and/or consume the output
|
||||
(providing more output space) before each call.
|
||||
<p>
|
||||
|
||||
The library also supports reading and writing files in gzip (.gz) format
|
||||
with an interface similar to that of stdio.
|
||||
<p>
|
||||
|
||||
The library does not install any signal handler. The decoder checks
|
||||
the consistency of the compressed data, so the library should never
|
||||
crash even in case of corrupted input.
|
||||
<p>
|
||||
|
||||
<hr>
|
||||
<a name="Utility functions"><h2> Utility functions </h2>
|
||||
The following utility functions are implemented on top of the
|
||||
<a href="#Basic functions">basic stream-oriented functions</a>.
|
||||
To simplify the interface, some
|
||||
default options are assumed (compression level and memory usage,
|
||||
standard memory allocation functions). The source code of these
|
||||
utility functions can easily be modified if you need special options.
|
||||
<h3> Function list </h3>
|
||||
<ul>
|
||||
<li> int <a href="#compress">compress</a> (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
|
||||
<li> int <a href="#compress2">compress2</a> (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level);
|
||||
<li> int <a href="#uncompress">uncompress</a> (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
|
||||
<li> typedef voidp gzFile;
|
||||
<li> gzFile <a href="#gzopen">gzopen</a> (const char *path, const char *mode);
|
||||
<li> gzFile <a href="#gzdopen">gzdopen</a> (int fd, const char *mode);
|
||||
<li> int <a href="#gzsetparams">gzsetparams</a> (gzFile file, int level, int strategy);
|
||||
<li> int <a href="#gzread">gzread</a> (gzFile file, voidp buf, unsigned len);
|
||||
<li> int <a href="#gzwrite">gzwrite</a> (gzFile file, const voidp buf, unsigned len);
|
||||
<li> int VA <a href="#gzprintf">gzprintf</a> (gzFile file, const char *format, ...);
|
||||
<li> int <a href="#gzputs">gzputs</a> (gzFile file, const char *s);
|
||||
<li> char * <a href="#gzgets">gzgets</a> (gzFile file, char *buf, int len);
|
||||
<li> int <a href="#gzputc">gzputc</a> (gzFile file, int c);
|
||||
<li> int <a href="#gzgetc">gzgetc</a> (gzFile file);
|
||||
<li> int <a href="#gzflush">gzflush</a> (gzFile file, int flush);
|
||||
<li> z_off_t <a href="#gzseek">gzseek</a> (gzFile file, z_off_t offset, int whence);
|
||||
<li> z_off_t <a href="#gztell">gztell</a> (gzFile file);
|
||||
<li> int <a href="#gzrewind">gzrewind</a> (gzFile file);
|
||||
<li> int <a href="#gzeof">gzeof</a> (gzFile file);
|
||||
<li> int <a href="#gzclose">gzclose</a> (gzFile file);
|
||||
<li> const char * <a href="#gzerror">gzerror</a> (gzFile file, int *errnum);
|
||||
</ul>
|
||||
<h3> Function description </h3>
|
||||
<dl>
|
||||
<font color="Blue"><dt> int <a name="compress">compress</a> (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);</font>
|
||||
<dd>
|
||||
Compresses the source buffer into the destination buffer. sourceLen is
|
||||
the byte length of the source buffer. Upon entry, destLen is the total
|
||||
size of the destination buffer, which must be at least 0.1% larger than
|
||||
sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
|
||||
compressed buffer.<p>
|
||||
This function can be used to <a href="#compress">compress</a> a whole file at once if the
|
||||
input file is mmap'ed.<p>
|
||||
<a href="#compress">compress</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
|
||||
enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output
|
||||
buffer.<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="compress2">compress2</a> (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level);</font>
|
||||
<dd>
|
||||
Compresses the source buffer into the destination buffer. The level
|
||||
parameter has the same meaning as in <a href="#deflateInit">deflateInit</a>. sourceLen is the byte
|
||||
length of the source buffer. Upon entry, destLen is the total size of the
|
||||
destination buffer, which must be at least 0.1% larger than sourceLen plus
|
||||
12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
|
||||
<p>
|
||||
|
||||
<a href="#compress2">compress2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
|
||||
memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output buffer,
|
||||
<a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the level parameter is invalid.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="uncompress">uncompress</a> (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);</font>
|
||||
<dd>
|
||||
Decompresses the source buffer into the destination buffer. sourceLen is
|
||||
the byte length of the source buffer. Upon entry, destLen is the total
|
||||
size of the destination buffer, which must be large enough to hold the
|
||||
entire uncompressed data. (The size of the uncompressed data must have
|
||||
been saved previously by the compressor and transmitted to the decompressor
|
||||
by some mechanism outside the scope of this compression library.)
|
||||
Upon exit, destLen is the actual size of the compressed buffer. <p>
|
||||
This function can be used to decompress a whole file at once if the
|
||||
input file is mmap'ed.
|
||||
<p>
|
||||
|
||||
<a href="#uncompress">uncompress</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
|
||||
enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if there was not enough room in the output
|
||||
buffer, or <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the input data was corrupted.
|
||||
<p>
|
||||
|
||||
<dt> typedef voidp gzFile;
|
||||
<dd> <p>
|
||||
|
||||
<font color="Blue"><dt> gzFile <a name="gzopen">gzopen</a> (const char *path, const char *mode);</font>
|
||||
<dd>
|
||||
Opens a gzip (.gz) file for reading or writing. The mode parameter
|
||||
is as in fopen ("rb" or "wb") but can also include a compression level
|
||||
("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
|
||||
Huffman only compression as in "wb1h". (See the description
|
||||
of <a href="#deflateInit2">deflateInit2</a> for more information about the strategy parameter.)
|
||||
<p>
|
||||
|
||||
<a href="#gzopen">gzopen</a> can be used to read a file which is not in gzip format ; in this
|
||||
case <a href="#gzread">gzread</a> will directly read from the file without decompression.
|
||||
<p>
|
||||
|
||||
<a href="#gzopen">gzopen</a> returns NULL if the file could not be opened or if there was
|
||||
insufficient memory to allocate the (de)compression <a href="#state">state</a> ; errno
|
||||
can be checked to distinguish the two cases (if errno is zero, the
|
||||
zlib error is <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a>).
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> gzFile <a name="gzdopen">gzdopen</a> (int fd, const char *mode);</font>
|
||||
<dd>
|
||||
<a href="#gzdopen">gzdopen</a>() associates a gzFile with the file descriptor fd. File
|
||||
descriptors are obtained from calls like open, dup, creat, pipe or
|
||||
fileno (in the file has been previously opened with fopen).
|
||||
The mode parameter is as in <a href="#gzopen">gzopen</a>.
|
||||
<p>
|
||||
The next call of <a href="#gzclose">gzclose</a> on the returned gzFile will also close the
|
||||
file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
|
||||
descriptor fd. If you want to keep fd open, use <a href="#gzdopen">gzdopen</a>(dup(fd), mode).
|
||||
<p>
|
||||
<a href="#gzdopen">gzdopen</a> returns NULL if there was insufficient memory to allocate
|
||||
the (de)compression <a href="#state">state</a>.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzsetparams">gzsetparams</a> (gzFile file, int level, int strategy);</font>
|
||||
<dd>
|
||||
Dynamically update the compression level or strategy. See the description
|
||||
of <a href="#deflateInit2">deflateInit2</a> for the meaning of these parameters.
|
||||
<p>
|
||||
<a href="#gzsetparams">gzsetparams</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the file was not
|
||||
opened for writing.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzread">gzread</a> (gzFile file, voidp buf, unsigned len);</font>
|
||||
<dd>
|
||||
Reads the given number of uncompressed bytes from the compressed file.
|
||||
If the input file was not in gzip format, <a href="#gzread">gzread</a> copies the given number
|
||||
of bytes into the buffer.
|
||||
<p>
|
||||
<a href="#gzread">gzread</a> returns the number of uncompressed bytes actually read (0 for
|
||||
end of file, -1 for error).
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzwrite">gzwrite</a> (gzFile file, const voidp buf, unsigned len);</font>
|
||||
<dd>
|
||||
Writes the given number of uncompressed bytes into the compressed file.
|
||||
<a href="#gzwrite">gzwrite</a> returns the number of uncompressed bytes actually written
|
||||
(0 in case of error).
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int VA <a name="gzprintf">gzprintf</a> (gzFile file, const char *format, ...);</font>
|
||||
<dd>
|
||||
Converts, formats, and writes the args to the compressed file under
|
||||
control of the format string, as in fprintf. <a href="#gzprintf">gzprintf</a> returns the number of
|
||||
uncompressed bytes actually written (0 in case of error).
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzputs">gzputs</a> (gzFile file, const char *s);</font>
|
||||
<dd>
|
||||
Writes the given null-terminated string to the compressed file, excluding
|
||||
the terminating null character.
|
||||
<p>
|
||||
<a href="#gzputs">gzputs</a> returns the number of characters written, or -1 in case of error.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> char * <a name="gzgets">gzgets</a> (gzFile file, char *buf, int len);</font>
|
||||
<dd>
|
||||
Reads bytes from the compressed file until len-1 characters are read, or
|
||||
a newline character is read and transferred to buf, or an end-of-file
|
||||
condition is encountered. The string is then terminated with a null
|
||||
character.
|
||||
<p>
|
||||
<a href="#gzgets">gzgets</a> returns buf, or <a href="#Z_NULL">Z_NULL</a> in case of error.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzputc">gzputc</a> (gzFile file, int c);</font>
|
||||
<dd>
|
||||
Writes c, converted to an unsigned char, into the compressed file.
|
||||
<a href="#gzputc">gzputc</a> returns the value that was written, or -1 in case of error.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzgetc">gzgetc</a> (gzFile file);</font>
|
||||
<dd>
|
||||
Reads one byte from the compressed file. <a href="#gzgetc">gzgetc</a> returns this byte
|
||||
or -1 in case of end of file or error.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzflush">gzflush</a> (gzFile file, int flush);</font>
|
||||
<dd>
|
||||
Flushes all pending output into the compressed file. The parameter
|
||||
flush is as in the <a href="#deflate">deflate</a>() function. The return value is the zlib
|
||||
error number (see function <a href="#gzerror">gzerror</a> below). <a href="#gzflush">gzflush</a> returns <a href="#Z_OK">Z_OK</a> if
|
||||
the flush parameter is <a href="#Z_FINISH">Z_FINISH</a> and all output could be flushed.
|
||||
<p>
|
||||
<a href="#gzflush">gzflush</a> should be called only when strictly necessary because it can
|
||||
degrade compression.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> z_off_t <a name="gzseek">gzseek</a> (gzFile file, z_off_t offset, int whence);</font>
|
||||
<dd>
|
||||
Sets the starting position for the next <a href="#gzread">gzread</a> or <a href="#gzwrite">gzwrite</a> on the
|
||||
given compressed file. The offset represents a number of bytes in the
|
||||
uncompressed data stream. The whence parameter is defined as in lseek(2);
|
||||
the value SEEK_END is not supported.
|
||||
<p>
|
||||
If the file is opened for reading, this function is emulated but can be
|
||||
extremely slow. If the file is opened for writing, only forward seeks are
|
||||
supported ; <a href="#gzseek">gzseek</a> then compresses a sequence of zeroes up to the new
|
||||
starting position.
|
||||
<p>
|
||||
<a href="#gzseek">gzseek</a> returns the resulting offset location as measured in bytes from
|
||||
the beginning of the uncompressed stream, or -1 in case of error, in
|
||||
particular if the file is opened for writing and the new starting position
|
||||
would be before the current position.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzrewind">gzrewind</a> (gzFile file);</font>
|
||||
<dd>
|
||||
Rewinds the given file. This function is supported only for reading.
|
||||
<p>
|
||||
<a href="#gzrewind">gzrewind</a>(file) is equivalent to (int)<a href="#gzseek">gzseek</a>(file, 0L, SEEK_SET)
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> z_off_t <a name="gztell">gztell</a> (gzFile file);</font>
|
||||
<dd>
|
||||
Returns the starting position for the next <a href="#gzread">gzread</a> or <a href="#gzwrite">gzwrite</a> on the
|
||||
given compressed file. This position represents a number of bytes in the
|
||||
uncompressed data stream.
|
||||
<p>
|
||||
|
||||
<a href="#gztell">gztell</a>(file) is equivalent to <a href="#gzseek">gzseek</a>(file, 0L, SEEK_CUR)
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzeof">gzeof</a> (gzFile file);</font>
|
||||
<dd>
|
||||
Returns 1 when EOF has previously been detected reading the given
|
||||
input stream, otherwise zero.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="gzclose">gzclose</a> (gzFile file);</font>
|
||||
<dd>
|
||||
Flushes all pending output if necessary, closes the compressed file
|
||||
and deallocates all the (de)compression <a href="#state">state</a>. The return value is the zlib
|
||||
error number (see function <a href="#gzerror">gzerror</a> below).
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> const char * <a name="gzerror">gzerror</a> (gzFile file, int *errnum);</font>
|
||||
<dd>
|
||||
Returns the error message for the last error which occurred on the
|
||||
given compressed file. errnum is set to zlib error number. If an
|
||||
error occurred in the file system and not in the compression library,
|
||||
errnum is set to <a href="#Z_ERRNO">Z_ERRNO</a> and the application may consult errno
|
||||
to get the exact error code.
|
||||
<p>
|
||||
</dl>
|
||||
<hr>
|
||||
<a name="Basic functions"><h2> Basic functions </h2>
|
||||
<h3> Function list </h3>
|
||||
<ul>
|
||||
<li> const char * <a href="#zlibVersion">zlibVersion</a> (void);
|
||||
<li> int <a href="#deflateInit">deflateInit</a> (<a href="#z_streamp">z_streamp</a> strm, int level);
|
||||
<li> int <a href="#deflate">deflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);
|
||||
<li> int <a href="#deflateEnd">deflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);
|
||||
<li> int <a href="#inflateInit">inflateInit</a> (<a href="#z_streamp">z_streamp</a> strm);
|
||||
<li> int <a href="#inflate">inflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);
|
||||
<li> int <a href="#inflateEnd">inflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);
|
||||
</ul>
|
||||
|
||||
<h3> Function description </h3>
|
||||
<dl>
|
||||
<font color="Blue"><dt> const char * <a name="zlibVersion">zlibVersion</a> (void);</font>
|
||||
<dd> The application can compare <a href="#zlibVersion">zlibVersion</a> and ZLIB_VERSION for consistency.
|
||||
If the first character differs, the library code actually used is
|
||||
not compatible with the zlib.h header file used by the application.
|
||||
This check is automatically made by <a href="#deflateInit">deflateInit</a> and <a href="#inflateInit">inflateInit</a>.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="deflateInit">deflateInit</a> (<a href="#z_streamp">z_streamp</a> strm, int level);</font>
|
||||
<dd>
|
||||
Initializes the internal stream <a href="#state">state</a> for compression. The fields
|
||||
<a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by the caller.
|
||||
If <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> are set to <a href="#Z_NULL">Z_NULL</a>, <a href="#deflateInit">deflateInit</a> updates them to
|
||||
use default allocation functions.
|
||||
<p>
|
||||
|
||||
The compression level must be <a href="#Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a>, or between 0 and 9:
|
||||
1 gives best speed, 9 gives best compression, 0 gives no compression at
|
||||
all (the input data is simply copied a block at a time).
|
||||
<p>
|
||||
|
||||
<a href="#Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a> requests a default compromise between speed and
|
||||
compression (currently equivalent to level 6).
|
||||
<p>
|
||||
|
||||
<a href="#deflateInit">deflateInit</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
|
||||
enough memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if level is not a valid compression level,
|
||||
<a href="#Z_VERSION_ERROR">Z_VERSION_ERROR</a> if the zlib library version (<a href="#zlib_version">zlib_version</a>) is incompatible
|
||||
with the version assumed by the caller (ZLIB_VERSION).
|
||||
<a href="#msg">msg</a> is set to null if there is no error message. <a href="#deflateInit">deflateInit</a> does not
|
||||
perform any compression: this will be done by <a href="#deflate">deflate</a>().
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="deflate">deflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);</font>
|
||||
<dd>
|
||||
<a href="#deflate">deflate</a> compresses as much data as possible, and stops when the input
|
||||
buffer becomes empty or the output buffer becomes full. It may introduce some
|
||||
output latency (reading input without producing any output) except when
|
||||
forced to flush.<p>
|
||||
|
||||
The detailed semantics are as follows. <a href="#deflate">deflate</a> performs one or both of the
|
||||
following actions:
|
||||
|
||||
<ul>
|
||||
<li> Compress more input starting at <a href="#next_in">next_in</a> and update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a>
|
||||
accordingly. If not all input can be processed (because there is not
|
||||
enough room in the output buffer), <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> are updated and
|
||||
processing will resume at this point for the next call of <a href="#deflate">deflate</a>().
|
||||
|
||||
<li>
|
||||
Provide more output starting at <a href="#next_out">next_out</a> and update <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a>
|
||||
accordingly. This action is forced if the parameter flush is non zero.
|
||||
Forcing flush frequently degrades the compression ratio, so this parameter
|
||||
should be set only when necessary (in interactive applications).
|
||||
Some output may be provided even if flush is not set.
|
||||
</ul> <p>
|
||||
|
||||
Before the call of <a href="#deflate">deflate</a>(), the application should ensure that at least
|
||||
one of the actions is possible, by providing more input and/or consuming
|
||||
more output, and updating <a href="#avail_in">avail_in</a> or <a href="#avail_out">avail_out</a> accordingly ; <a href="#avail_out">avail_out</a>
|
||||
should never be zero before the call. The application can consume the
|
||||
compressed output when it wants, for example when the output buffer is full
|
||||
(<a href="#avail_out">avail_out</a> == 0), or after each call of <a href="#deflate">deflate</a>(). If <a href="#deflate">deflate</a> returns <a href="#Z_OK">Z_OK</a>
|
||||
and with zero <a href="#avail_out">avail_out</a>, it must be called again after making room in the
|
||||
output buffer because there might be more output pending.
|
||||
<p>
|
||||
|
||||
If the parameter flush is set to <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, all pending output is
|
||||
flushed to the output buffer and the output is aligned on a byte boundary, so
|
||||
that the decompressor can get all input data available so far. (In particular
|
||||
<a href="#avail_in">avail_in</a> is zero after the call if enough output space has been provided
|
||||
before the call.) Flushing may degrade compression for some compression
|
||||
algorithms and so it should be used only when necessary.
|
||||
<p>
|
||||
|
||||
If flush is set to <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a>, all output is flushed as with
|
||||
<a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, and the compression <a href="#state">state</a> is reset so that decompression can
|
||||
restart from this point if previous compressed data has been damaged or if
|
||||
random access is desired. Using <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a> too often can seriously degrade
|
||||
the compression.
|
||||
<p>
|
||||
|
||||
If <a href="#deflate">deflate</a> returns with <a href="#avail_out">avail_out</a> == 0, this function must be called again
|
||||
with the same value of the flush parameter and more output space (updated
|
||||
<a href="#avail_out">avail_out</a>), until the flush is complete (<a href="#deflate">deflate</a> returns with non-zero
|
||||
<a href="#avail_out">avail_out</a>).
|
||||
<p>
|
||||
|
||||
If the parameter flush is set to <a href="#Z_FINISH">Z_FINISH</a>, pending input is processed,
|
||||
pending output is flushed and <a href="#deflate">deflate</a> returns with <a href="#Z_STREAM_END">Z_STREAM_END</a> if there
|
||||
was enough output space ; if <a href="#deflate">deflate</a> returns with <a href="#Z_OK">Z_OK</a>, this function must be
|
||||
called again with <a href="#Z_FINISH">Z_FINISH</a> and more output space (updated <a href="#avail_out">avail_out</a>) but no
|
||||
more input data, until it returns with <a href="#Z_STREAM_END">Z_STREAM_END</a> or an error. After
|
||||
<a href="#deflate">deflate</a> has returned <a href="#Z_STREAM_END">Z_STREAM_END</a>, the only possible operations on the
|
||||
stream are <a href="#deflateReset">deflateReset</a> or <a href="#deflateEnd">deflateEnd</a>.
|
||||
<p>
|
||||
|
||||
<a href="#Z_FINISH">Z_FINISH</a> can be used immediately after <a href="#deflateInit">deflateInit</a> if all the compression
|
||||
is to be done in a single step. In this case, <a href="#avail_out">avail_out</a> must be at least
|
||||
0.1% larger than <a href="#avail_in">avail_in</a> plus 12 bytes. If <a href="#deflate">deflate</a> does not return
|
||||
<a href="#Z_STREAM_END">Z_STREAM_END</a>, then it must be called again as described above.
|
||||
<p>
|
||||
|
||||
<a href="#deflate">deflate</a>() sets strm-> <a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of all input read
|
||||
so far (that is, <a href="#total_in">total_in</a> bytes).
|
||||
<p>
|
||||
|
||||
<a href="#deflate">deflate</a>() may update <a href="#data_type">data_type</a> if it can make a good guess about
|
||||
the input data type (<a href="#Z_ASCII">Z_ASCII</a> or <a href="#Z_BINARY">Z_BINARY</a>). In doubt, the data is considered
|
||||
binary. This field is only for information purposes and does not affect
|
||||
the compression algorithm in any manner.
|
||||
<p>
|
||||
|
||||
<a href="#deflate">deflate</a>() returns <a href="#Z_OK">Z_OK</a> if some progress has been made (more input
|
||||
processed or more output produced), <a href="#Z_STREAM_END">Z_STREAM_END</a> if all input has been
|
||||
consumed and all output has been produced (only when flush is set to
|
||||
<a href="#Z_FINISH">Z_FINISH</a>), <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream <a href="#state">state</a> was inconsistent (for example
|
||||
if <a href="#next_in">next_in</a> or <a href="#next_out">next_out</a> was NULL), <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if no progress is possible
|
||||
(for example <a href="#avail_in">avail_in</a> or <a href="#avail_out">avail_out</a> was zero).
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="deflateEnd">deflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
|
||||
<dd>
|
||||
All dynamically allocated data structures for this stream are freed.
|
||||
This function discards any unprocessed input and does not flush any
|
||||
pending output.
|
||||
<p>
|
||||
|
||||
<a href="#deflateEnd">deflateEnd</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the
|
||||
stream <a href="#state">state</a> was inconsistent, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the stream was freed
|
||||
prematurely (some input or output was discarded). In the error case,
|
||||
<a href="#msg">msg</a> may be set but then points to a static string (which must not be
|
||||
deallocated).
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="inflateInit">inflateInit</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
|
||||
<dd>
|
||||
Initializes the internal stream <a href="#state">state</a> for decompression. The fields
|
||||
<a href="#next_in">next_in</a>, <a href="#avail_in">avail_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by
|
||||
the caller. If <a href="#next_in">next_in</a> is not <a href="#Z_NULL">Z_NULL</a> and <a href="#avail_in">avail_in</a> is large enough (the exact
|
||||
value depends on the compression method), <a href="#inflateInit">inflateInit</a> determines the
|
||||
compression method from the zlib header and allocates all data structures
|
||||
accordingly ; otherwise the allocation will be deferred to the first call of
|
||||
<a href="#inflate">inflate</a>. If <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> are set to <a href="#Z_NULL">Z_NULL</a>, <a href="#inflateInit">inflateInit</a> updates them to
|
||||
use default allocation functions.
|
||||
<p>
|
||||
|
||||
<a href="#inflateInit">inflateInit</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
|
||||
memory, <a href="#Z_VERSION_ERROR">Z_VERSION_ERROR</a> if the zlib library version is incompatible with the
|
||||
version assumed by the caller. <a href="#msg">msg</a> is set to null if there is no error
|
||||
message. <a href="#inflateInit">inflateInit</a> does not perform any decompression apart from reading
|
||||
the zlib header if present: this will be done by <a href="#inflate">inflate</a>(). (So <a href="#next_in">next_in</a> and
|
||||
<a href="#avail_in">avail_in</a> may be modified, but <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> are unchanged.)
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="inflate">inflate</a> (<a href="#z_streamp">z_streamp</a> strm, int flush);</font>
|
||||
<dd>
|
||||
<a href="#inflate">inflate</a> decompresses as much data as possible, and stops when the input
|
||||
buffer becomes empty or the output buffer becomes full. It may some
|
||||
introduce some output latency (reading input without producing any output)
|
||||
except when forced to flush.
|
||||
<p>
|
||||
|
||||
The detailed semantics are as follows. <a href="#inflate">inflate</a> performs one or both of the
|
||||
following actions:
|
||||
|
||||
<ul>
|
||||
<li> Decompress more input starting at <a href="#next_in">next_in</a> and update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a>
|
||||
accordingly. If not all input can be processed (because there is not
|
||||
enough room in the output buffer), <a href="#next_in">next_in</a> is updated and processing
|
||||
will resume at this point for the next call of <a href="#inflate">inflate</a>().
|
||||
|
||||
<li> Provide more output starting at <a href="#next_out">next_out</a> and update <a href="#next_out">next_out</a> and
|
||||
<a href="#avail_out">avail_out</a> accordingly. <a href="#inflate">inflate</a>() provides as much output as possible,
|
||||
until there is no more input data or no more space in the output buffer
|
||||
(see below about the flush parameter).
|
||||
</ul> <p>
|
||||
|
||||
Before the call of <a href="#inflate">inflate</a>(), the application should ensure that at least
|
||||
one of the actions is possible, by providing more input and/or consuming
|
||||
more output, and updating the next_* and avail_* values accordingly.
|
||||
The application can consume the uncompressed output when it wants, for
|
||||
example when the output buffer is full (<a href="#avail_out">avail_out</a> == 0), or after each
|
||||
call of <a href="#inflate">inflate</a>(). If <a href="#inflate">inflate</a> returns <a href="#Z_OK">Z_OK</a> and with zero <a href="#avail_out">avail_out</a>, it
|
||||
must be called again after making room in the output buffer because there
|
||||
might be more output pending.
|
||||
<p>
|
||||
|
||||
If the parameter flush is set to <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>, <a href="#inflate">inflate</a> flushes as much
|
||||
output as possible to the output buffer. The flushing behavior of <a href="#inflate">inflate</a> is
|
||||
not specified for values of the flush parameter other than <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a>
|
||||
and <a href="#Z_FINISH">Z_FINISH</a>, but the current implementation actually flushes as much output
|
||||
as possible anyway.
|
||||
<p>
|
||||
|
||||
<a href="#inflate">inflate</a>() should normally be called until it returns <a href="#Z_STREAM_END">Z_STREAM_END</a> or an
|
||||
error. However if all decompression is to be performed in a single step
|
||||
(a single call of <a href="#inflate">inflate</a>), the parameter flush should be set to
|
||||
<a href="#Z_FINISH">Z_FINISH</a>. In this case all pending input is processed and all pending
|
||||
output is flushed ; <a href="#avail_out">avail_out</a> must be large enough to hold all the
|
||||
uncompressed data. (The size of the uncompressed data may have been saved
|
||||
by the compressor for this purpose.) The next operation on this stream must
|
||||
be <a href="#inflateEnd">inflateEnd</a> to deallocate the decompression <a href="#state">state</a>. The use of <a href="#Z_FINISH">Z_FINISH</a>
|
||||
is never required, but can be used to inform <a href="#inflate">inflate</a> that a faster routine
|
||||
may be used for the single <a href="#inflate">inflate</a>() call.
|
||||
<p>
|
||||
|
||||
If a preset dictionary is needed at this point (see <a href="#inflateSetDictionary">inflateSetDictionary</a>
|
||||
below), <a href="#inflate">inflate</a> sets strm-<a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of the
|
||||
dictionary chosen by the compressor and returns <a href="#Z_NEED_DICT">Z_NEED_DICT</a> ; otherwise
|
||||
it sets strm-> <a href="#adler">adler</a> to the <a href="#adler32">adler32</a> checksum of all output produced
|
||||
so far (that is, <a href="#total_out">total_out</a> bytes) and returns <a href="#Z_OK">Z_OK</a>, <a href="#Z_STREAM_END">Z_STREAM_END</a> or
|
||||
an error code as described below. At the end of the stream, <a href="#inflate">inflate</a>()
|
||||
checks that its computed <a href="#adler32">adler32</a> checksum is equal to that saved by the
|
||||
compressor and returns <a href="#Z_STREAM_END">Z_STREAM_END</a> only if the checksum is correct.
|
||||
<p>
|
||||
|
||||
<a href="#inflate">inflate</a>() returns <a href="#Z_OK">Z_OK</a> if some progress has been made (more input processed
|
||||
or more output produced), <a href="#Z_STREAM_END">Z_STREAM_END</a> if the end of the compressed data has
|
||||
been reached and all uncompressed output has been produced, <a href="#Z_NEED_DICT">Z_NEED_DICT</a> if a
|
||||
preset dictionary is needed at this point, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the input data was
|
||||
corrupted (input stream not conforming to the zlib format or incorrect
|
||||
<a href="#adler32">adler32</a> checksum), <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream structure was inconsistent
|
||||
(for example if <a href="#next_in">next_in</a> or <a href="#next_out">next_out</a> was NULL), <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
|
||||
enough memory, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a> if no progress is possible or if there was not
|
||||
enough room in the output buffer when <a href="#Z_FINISH">Z_FINISH</a> is used. In the <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a>
|
||||
case, the application may then call <a href="#inflateSync">inflateSync</a> to look for a good
|
||||
compression block.
|
||||
<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="inflateEnd">inflateEnd</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
|
||||
<dd>
|
||||
All dynamically allocated data structures for this stream are freed.
|
||||
This function discards any unprocessed input and does not flush any
|
||||
pending output.
|
||||
<p>
|
||||
|
||||
<a href="#inflateEnd">inflateEnd</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream <a href="#state">state</a>
|
||||
was inconsistent. In the error case, <a href="#msg">msg</a> may be set but then points to a
|
||||
static string (which must not be deallocated).
|
||||
</dl>
|
||||
<hr>
|
||||
<a name="Advanced functions"><h2> Advanced functions </h2>
|
||||
The following functions are needed only in some special applications.
|
||||
<h3> Function list </h3>
|
||||
<ul>
|
||||
<li> int <a href="#deflateInit2">deflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm,
|
||||
<li> int <a href="#deflateSetDictionary">deflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt dictLength);
|
||||
<li> int <a href="#deflateCopy">deflateCopy</a> (<a href="#z_streamp">z_streamp</a> dest, <a href="#z_streamp">z_streamp</a> source);
|
||||
<li> int <a href="#deflateReset">deflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);
|
||||
<li> int <a href="#deflateParams">deflateParams</a> (<a href="#z_streamp">z_streamp</a> strm, int level, int strategy);
|
||||
<li> int <a href="#inflateInit2">inflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int windowBits);
|
||||
<li> int <a href="#inflateSetDictionary">inflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt dictLength);
|
||||
<li> int <a href="#inflateSync">inflateSync</a> (<a href="#z_streamp">z_streamp</a> strm);
|
||||
<li> int <a href="#inflateReset">inflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);
|
||||
|
||||
</ul>
|
||||
<h3> Function description </h3>
|
||||
<dl>
|
||||
<font color="Blue"><dt> int <a name="deflateInit2">deflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int level, int method, int windowBits, int memLevel, int strategy);</font>
|
||||
|
||||
<dd> This is another version of <a href="#deflateInit">deflateInit</a> with more compression options. The
|
||||
fields <a href="#next_in">next_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized before by
|
||||
the caller.<p>
|
||||
|
||||
The method parameter is the compression method. It must be <a href="#Z_DEFLATED">Z_DEFLATED</a> in
|
||||
this version of the library.<p>
|
||||
|
||||
The windowBits parameter is the base two logarithm of the window size
|
||||
(the size of the history buffer). It should be in the range 8..15 for this
|
||||
version of the library. Larger values of this parameter result in better
|
||||
compression at the expense of memory usage. The default value is 15 if
|
||||
<a href="#deflateInit">deflateInit</a> is used instead.<p>
|
||||
|
||||
The memLevel parameter specifies how much memory should be allocated
|
||||
for the internal compression <a href="#state">state</a>. memLevel=1 uses minimum memory but
|
||||
is slow and reduces compression ratio ; memLevel=9 uses maximum memory
|
||||
for optimal speed. The default value is 8. See zconf.h for total memory
|
||||
usage as a function of windowBits and memLevel.<p>
|
||||
|
||||
The strategy parameter is used to tune the compression algorithm. Use the
|
||||
value <a href="#Z_DEFAULT_STRATEGY">Z_DEFAULT_STRATEGY</a> for normal data, <a href="#Z_FILTERED">Z_FILTERED</a> for data produced by a
|
||||
filter (or predictor), or <a href="#Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a> to force Huffman encoding only (no
|
||||
string match). Filtered data consists mostly of small values with a
|
||||
somewhat random distribution. In this case, the compression algorithm is
|
||||
tuned to <a href="#compress">compress</a> them better. The effect of <a href="#Z_FILTERED">Z_FILTERED</a> is to force more
|
||||
Huffman coding and less string matching ; it is somewhat intermediate
|
||||
between Z_DEFAULT and <a href="#Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a>. The strategy parameter only affects
|
||||
the compression ratio but not the correctness of the compressed output even
|
||||
if it is not set appropriately.<p>
|
||||
|
||||
<a href="#deflateInit2">deflateInit2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
|
||||
memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a parameter is invalid (such as an invalid
|
||||
method). <a href="#msg">msg</a> is set to null if there is no error message. <a href="#deflateInit2">deflateInit2</a> does
|
||||
not perform any compression: this will be done by <a href="#deflate">deflate</a>().<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="deflateSetDictionary">deflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt dictLength);</font>
|
||||
<dd>
|
||||
Initializes the compression dictionary from the given byte sequence
|
||||
without producing any compressed output. This function must be called
|
||||
immediately after <a href="#deflateInit">deflateInit</a>, <a href="#deflateInit2">deflateInit2</a> or <a href="#deflateReset">deflateReset</a>, before any
|
||||
call of <a href="#deflate">deflate</a>. The compressor and decompressor must use exactly the same
|
||||
dictionary (see <a href="#inflateSetDictionary">inflateSetDictionary</a>).<p>
|
||||
|
||||
The dictionary should consist of strings (byte sequences) that are likely
|
||||
to be encountered later in the data to be compressed, with the most commonly
|
||||
used strings preferably put towards the end of the dictionary. Using a
|
||||
dictionary is most useful when the data to be compressed is short and can be
|
||||
predicted with good accuracy ; the data can then be compressed better than
|
||||
with the default empty dictionary.<p>
|
||||
|
||||
Depending on the size of the compression data structures selected by
|
||||
<a href="#deflateInit">deflateInit</a> or <a href="#deflateInit2">deflateInit2</a>, a part of the dictionary may in effect be
|
||||
discarded, for example if the dictionary is larger than the window size in
|
||||
<a href="#deflate">deflate</a> or deflate2. Thus the strings most likely to be useful should be
|
||||
put at the end of the dictionary, not at the front.<p>
|
||||
|
||||
Upon return of this function, strm-> <a href="#adler">adler</a> is set to the Adler32 value
|
||||
of the dictionary ; the decompressor may later use this value to determine
|
||||
which dictionary has been used by the compressor. (The Adler32 value
|
||||
applies to the whole dictionary even if only a subset of the dictionary is
|
||||
actually used by the compressor.)<p>
|
||||
|
||||
<a href="#deflateSetDictionary">deflateSetDictionary</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a
|
||||
parameter is invalid (such as NULL dictionary) or the stream <a href="#state">state</a> is
|
||||
inconsistent (for example if <a href="#deflate">deflate</a> has already been called for this stream
|
||||
or if the compression method is bsort). <a href="#deflateSetDictionary">deflateSetDictionary</a> does not
|
||||
perform any compression: this will be done by <a href="#deflate">deflate</a>().<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="deflateCopy">deflateCopy</a> (<a href="#z_streamp">z_streamp</a> dest, <a href="#z_streamp">z_streamp</a> source);</font>
|
||||
<dd>
|
||||
Sets the destination stream as a complete copy of the source stream.<p>
|
||||
|
||||
This function can be useful when several compression strategies will be
|
||||
tried, for example when there are several ways of pre-processing the input
|
||||
data with a filter. The streams that will be discarded should then be freed
|
||||
by calling <a href="#deflateEnd">deflateEnd</a>. Note that <a href="#deflateCopy">deflateCopy</a> duplicates the internal
|
||||
compression <a href="#state">state</a> which can be quite large, so this strategy is slow and
|
||||
can consume lots of memory.<p>
|
||||
|
||||
<a href="#deflateCopy">deflateCopy</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not
|
||||
enough memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source stream <a href="#state">state</a> was inconsistent
|
||||
(such as <a href="#zalloc">zalloc</a> being NULL). <a href="#msg">msg</a> is left unchanged in both source and
|
||||
destination.<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="deflateReset">deflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
|
||||
<dd> This function is equivalent to <a href="#deflateEnd">deflateEnd</a> followed by <a href="#deflateInit">deflateInit</a>,
|
||||
but does not free and reallocate all the internal compression <a href="#state">state</a>.
|
||||
The stream will keep the same compression level and any other attributes
|
||||
that may have been set by <a href="#deflateInit2">deflateInit2</a>.<p>
|
||||
|
||||
<a href="#deflateReset">deflateReset</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
|
||||
stream <a href="#state">state</a> was inconsistent (such as <a href="#zalloc">zalloc</a> or <a href="#state">state</a> being NULL).<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="deflateParams">deflateParams</a> (<a href="#z_streamp">z_streamp</a> strm, int level, int strategy);</font>
|
||||
<dd>
|
||||
Dynamically update the compression level and compression strategy. The
|
||||
interpretation of level and strategy is as in <a href="#deflateInit2">deflateInit2</a>. This can be
|
||||
used to switch between compression and straight copy of the input data, or
|
||||
to switch to a different kind of input data requiring a different
|
||||
strategy. If the compression level is changed, the input available so far
|
||||
is compressed with the old level (and may be flushed); the new level will
|
||||
take effect only at the next call of <a href="#deflate">deflate</a>().<p>
|
||||
|
||||
Before the call of <a href="#deflateParams">deflateParams</a>, the stream <a href="#state">state</a> must be set as for
|
||||
a call of <a href="#deflate">deflate</a>(), since the currently available input may have to
|
||||
be compressed and flushed. In particular, strm-> <a href="#avail_out">avail_out</a> must be
|
||||
non-zero.<p>
|
||||
|
||||
<a href="#deflateParams">deflateParams</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
|
||||
stream <a href="#state">state</a> was inconsistent or if a parameter was invalid, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a>
|
||||
if strm->avail_out was zero.<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="inflateInit2">inflateInit2</a> (<a href="#z_streamp">z_streamp</a> strm, int windowBits);</font>
|
||||
|
||||
<dd> This is another version of <a href="#inflateInit">inflateInit</a> with an extra parameter. The
|
||||
fields <a href="#next_in">next_in</a>, <a href="#avail_in">avail_in</a>, <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and <a href="#opaque">opaque</a> must be initialized
|
||||
before by the caller.<p>
|
||||
|
||||
The windowBits parameter is the base two logarithm of the maximum window
|
||||
size (the size of the history buffer). It should be in the range 8..15 for
|
||||
this version of the library. The default value is 15 if <a href="#inflateInit">inflateInit</a> is used
|
||||
instead. If a compressed stream with a larger window size is given as
|
||||
input, <a href="#inflate">inflate</a>() will return with the error code <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> instead of
|
||||
trying to allocate a larger window.<p>
|
||||
|
||||
<a href="#inflateInit2">inflateInit2</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_MEM_ERROR">Z_MEM_ERROR</a> if there was not enough
|
||||
memory, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a parameter is invalid (such as a negative
|
||||
memLevel). <a href="#msg">msg</a> is set to null if there is no error message. <a href="#inflateInit2">inflateInit2</a>
|
||||
does not perform any decompression apart from reading the zlib header if
|
||||
present: this will be done by <a href="#inflate">inflate</a>(). (So <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> may be
|
||||
modified, but <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> are unchanged.)<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="inflateSetDictionary">inflateSetDictionary</a> (<a href="#z_streamp">z_streamp</a> strm, const Bytef *dictionary, uInt dictLength);</font>
|
||||
<dd>
|
||||
Initializes the decompression dictionary from the given uncompressed byte
|
||||
sequence. This function must be called immediately after a call of <a href="#inflate">inflate</a>
|
||||
if this call returned <a href="#Z_NEED_DICT">Z_NEED_DICT</a>. The dictionary chosen by the compressor
|
||||
can be determined from the Adler32 value returned by this call of
|
||||
<a href="#inflate">inflate</a>. The compressor and decompressor must use exactly the same
|
||||
dictionary (see <a href="#deflateSetDictionary">deflateSetDictionary</a>).<p>
|
||||
|
||||
<a href="#inflateSetDictionary">inflateSetDictionary</a> returns <a href="#Z_OK">Z_OK</a> if success, <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if a
|
||||
parameter is invalid (such as NULL dictionary) or the stream <a href="#state">state</a> is
|
||||
inconsistent, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if the given dictionary doesn't match the
|
||||
expected one (incorrect Adler32 value). <a href="#inflateSetDictionary">inflateSetDictionary</a> does not
|
||||
perform any decompression: this will be done by subsequent calls of
|
||||
<a href="#inflate">inflate</a>().<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="inflateSync">inflateSync</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
|
||||
|
||||
<dd> Skips invalid compressed data until a full flush point (see above the
|
||||
description of <a href="#deflate">deflate</a> with <a href="#Z_FULL_FLUSH">Z_FULL_FLUSH</a>) can be found, or until all
|
||||
available input is skipped. No output is provided.<p>
|
||||
|
||||
<a href="#inflateSync">inflateSync</a> returns <a href="#Z_OK">Z_OK</a> if a full flush point has been found, <a href="#Z_BUF_ERROR">Z_BUF_ERROR</a>
|
||||
if no more input was provided, <a href="#Z_DATA_ERROR">Z_DATA_ERROR</a> if no flush point has been found,
|
||||
or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the stream structure was inconsistent. In the success
|
||||
case, the application may save the current current value of <a href="#total_in">total_in</a> which
|
||||
indicates where valid compressed data was found. In the error case, the
|
||||
application may repeatedly call <a href="#inflateSync">inflateSync</a>, providing more input each time,
|
||||
until success or end of the input data.<p>
|
||||
|
||||
<font color="Blue"><dt> int <a name="inflateReset">inflateReset</a> (<a href="#z_streamp">z_streamp</a> strm);</font>
|
||||
<dd>
|
||||
This function is equivalent to <a href="#inflateEnd">inflateEnd</a> followed by <a href="#inflateInit">inflateInit</a>,
|
||||
but does not free and reallocate all the internal decompression <a href="#state">state</a>.
|
||||
The stream will keep attributes that may have been set by <a href="#inflateInit2">inflateInit2</a>.
|
||||
<p>
|
||||
|
||||
<a href="#inflateReset">inflateReset</a> returns <a href="#Z_OK">Z_OK</a> if success, or <a href="#Z_STREAM_ERROR">Z_STREAM_ERROR</a> if the source
|
||||
stream <a href="#state">state</a> was inconsistent (such as <a href="#zalloc">zalloc</a> or <a href="#state">state</a> being NULL).
|
||||
<p>
|
||||
</dl>
|
||||
|
||||
<hr>
|
||||
<a name="Checksum functions"><h2> Checksum functions </h2>
|
||||
These functions are not related to compression but are exported
|
||||
anyway because they might be useful in applications using the
|
||||
compression library.
|
||||
<h3> Function list </h3>
|
||||
<ul>
|
||||
<li> uLong <a href="#adler32">adler32</a> (uLong <a href="#adler">adler</a>, const Bytef *buf, uInt len);
|
||||
<li> uLong <a href="#crc32">crc32</a> (uLong crc, const Bytef *buf, uInt len);
|
||||
</ul>
|
||||
<h3> Function description </h3>
|
||||
<dl>
|
||||
<font color="Blue"><dt> uLong <a name="adler32">adler32</a> (uLong <a href="#adler">adler</a>, const Bytef *buf, uInt len);</font>
|
||||
<dd>
|
||||
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
|
||||
return the updated checksum. If buf is NULL, this function returns
|
||||
the required initial value for the checksum.
|
||||
<p>
|
||||
An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
|
||||
much faster. Usage example:
|
||||
<pre>
|
||||
|
||||
uLong <a href="#adler">adler</a> = <a href="#adler32">adler32</a>(0L, <a href="#Z_NULL">Z_NULL</a>, 0);
|
||||
|
||||
while (read_buffer(buffer, length) != EOF) {
|
||||
<a href="#adler">adler</a> = <a href="#adler32">adler32</a>(<a href="#adler">adler</a>, buffer, length);
|
||||
}
|
||||
if (<a href="#adler">adler</a> != original_adler) error();
|
||||
</pre>
|
||||
|
||||
<font color="Blue"><dt> uLong <a name="crc32">crc32</a> (uLong crc, const Bytef *buf, uInt len);</font>
|
||||
<dd>
|
||||
Update a running crc with the bytes buf[0..len-1] and return the updated
|
||||
crc. If buf is NULL, this function returns the required initial value
|
||||
for the crc. Pre- and post-conditioning (one's complement) is performed
|
||||
within this function so it shouldn't be done by the application.
|
||||
Usage example:
|
||||
<pre>
|
||||
|
||||
uLong crc = <a href="#crc32">crc32</a>(0L, <a href="#Z_NULL">Z_NULL</a>, 0);
|
||||
|
||||
while (read_buffer(buffer, length) != EOF) {
|
||||
crc = <a href="#crc32">crc32</a>(crc, buffer, length);
|
||||
}
|
||||
if (crc != original_crc) error();
|
||||
</pre>
|
||||
</dl>
|
||||
<hr>
|
||||
<a name="struct z_stream_s"><h2> struct z_stream_s </h2>
|
||||
<font color="Blue">
|
||||
<a name="z_stream_s">
|
||||
<pre>
|
||||
typedef struct z_stream_s {
|
||||
Bytef *<a name="next_in">next_in</a>; /* next input byte */
|
||||
uInt <a name="avail_in">avail_in</a>; /* number of bytes available at <a href="#next_in">next_in</a> */
|
||||
uLong <a name="total_in">total_in</a>; /* total nb of input bytes read so far */
|
||||
|
||||
Bytef *<a name="next_out">next_out</a>; /* next output byte should be put there */
|
||||
uInt <a name="avail_out">avail_out</a>; /* remaining free space at <a href="#next_out">next_out</a> */
|
||||
uLong <a name="total_out">total_out</a>; /* total nb of bytes output so far */
|
||||
|
||||
char *<a name="msg">msg</a>; /* last error message, NULL if no error */
|
||||
struct internal_state FAR *<a name="state">state</a>; /* not visible by applications */
|
||||
|
||||
alloc_func <a name="zalloc">zalloc</a>; /* used to allocate the internal <a href="#state">state</a> */
|
||||
free_func <a name="zfree">zfree</a>; /* used to free the internal <a href="#state">state</a> */
|
||||
voidpf <a name="opaque">opaque</a>; /* private data object passed to <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> */
|
||||
|
||||
int <a name="data_type">data_type</a>; /* best guess about the data type: ascii or binary */
|
||||
uLong <a name="adler">adler</a>; /* <a href="#adler32">adler32</a> value of the uncompressed data */
|
||||
uLong <a name="reserved">reserved</a>; /* <a href="#reserved">reserved</a> for future use */
|
||||
} <a href="#z_stream_s">z_stream</a> ;
|
||||
|
||||
typedef <a href="#z_stream_s">z_stream</a> FAR * <a name="z_streamp">z_streamp</a>; ÿ
|
||||
</pre>
|
||||
</font>
|
||||
The application must update <a href="#next_in">next_in</a> and <a href="#avail_in">avail_in</a> when <a href="#avail_in">avail_in</a> has
|
||||
dropped to zero. It must update <a href="#next_out">next_out</a> and <a href="#avail_out">avail_out</a> when <a href="#avail_out">avail_out</a>
|
||||
has dropped to zero. The application must initialize <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a> and
|
||||
<a href="#opaque">opaque</a> before calling the init function. All other fields are set by the
|
||||
compression library and must not be updated by the application. <p>
|
||||
|
||||
The <a href="#opaque">opaque</a> value provided by the application will be passed as the first
|
||||
parameter for calls of <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a>. This can be useful for custom
|
||||
memory management. The compression library attaches no meaning to the
|
||||
<a href="#opaque">opaque</a> value. <p>
|
||||
|
||||
<a href="#zalloc">zalloc</a> must return <a href="#Z_NULL">Z_NULL</a> if there is not enough memory for the object.
|
||||
If zlib is used in a multi-threaded application, <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> must be
|
||||
thread safe. <p>
|
||||
|
||||
On 16-bit systems, the functions <a href="#zalloc">zalloc</a> and <a href="#zfree">zfree</a> must be able to allocate
|
||||
exactly 65536 bytes, but will not be required to allocate more than this
|
||||
if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
|
||||
pointers returned by <a href="#zalloc">zalloc</a> for objects of exactly 65536 bytes *must*
|
||||
have their offset normalized to zero. The default allocation function
|
||||
provided by this library ensures this (see zutil.c). To reduce memory
|
||||
requirements and avoid any allocation of 64K objects, at the expense of
|
||||
compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
|
||||
<p>
|
||||
|
||||
The fields <a href="#total_in">total_in</a> and <a href="#total_out">total_out</a> can be used for statistics or
|
||||
progress reports. After compression, <a href="#total_in">total_in</a> holds the total size of
|
||||
the uncompressed data and may be saved for use in the decompressor
|
||||
(particularly if the decompressor wants to decompress everything in
|
||||
a single step). <p>
|
||||
|
||||
<hr>
|
||||
<a name="Constants"><h2> Constants </h2>
|
||||
<font color="Blue">
|
||||
<pre>
|
||||
#define <a name="Z_NO_FLUSH">Z_NO_FLUSH</a> 0
|
||||
#define <a name="Z_PARTIAL_FLUSH">Z_PARTIAL_FLUSH</a> 1
|
||||
/* will be removed, use <a href="#Z_SYNC_FLUSH">Z_SYNC_FLUSH</a> instead */
|
||||
#define <a name="Z_SYNC_FLUSH">Z_SYNC_FLUSH</a> 2
|
||||
#define <a name="Z_FULL_FLUSH">Z_FULL_FLUSH</a> 3
|
||||
#define <a name="Z_FINISH">Z_FINISH</a> 4
|
||||
/* Allowed flush values ; see <a href="#deflate">deflate</a>() below for details */
|
||||
|
||||
#define <a name="Z_OK">Z_OK</a> 0
|
||||
#define <a name="Z_STREAM_END">Z_STREAM_END</a> 1
|
||||
#define <a name="Z_NEED_DICT">Z_NEED_DICT</a> 2
|
||||
#define <a name="Z_ERRNO">Z_ERRNO</a> (-1)
|
||||
#define <a name="Z_STREAM_ERROR">Z_STREAM_ERROR</a> (-2)
|
||||
#define <a name="Z_DATA_ERROR">Z_DATA_ERROR</a> (-3)
|
||||
#define <a name="Z_MEM_ERROR">Z_MEM_ERROR</a> (-4)
|
||||
#define <a name="Z_BUF_ERROR">Z_BUF_ERROR</a> (-5)
|
||||
#define <a name="Z_VERSION_ERROR">Z_VERSION_ERROR</a> (-6)
|
||||
/* Return codes for the compression/decompression functions. Negative
|
||||
* values are errors, positive values are used for special but normal events.
|
||||
*/
|
||||
|
||||
#define <a name="Z_NO_COMPRESSION">Z_NO_COMPRESSION</a> 0
|
||||
#define <a name="Z_BEST_SPEED">Z_BEST_SPEED</a> 1
|
||||
#define <a name="Z_BEST_COMPRESSION">Z_BEST_COMPRESSION</a> 9
|
||||
#define <a name="Z_DEFAULT_COMPRESSION">Z_DEFAULT_COMPRESSION</a> (-1)
|
||||
/* compression levels */
|
||||
|
||||
#define <a name="Z_FILTERED">Z_FILTERED</a> 1
|
||||
#define <a name="Z_HUFFMAN_ONLY">Z_HUFFMAN_ONLY</a> 2
|
||||
#define <a name="Z_DEFAULT_STRATEGY">Z_DEFAULT_STRATEGY</a> 0
|
||||
/* compression strategy ; see <a href="#deflateInit2">deflateInit2</a>() below for details */
|
||||
|
||||
#define <a name="Z_BINARY">Z_BINARY</a> 0
|
||||
#define <a name="Z_ASCII">Z_ASCII</a> 1
|
||||
#define <a name="Z_UNKNOWN">Z_UNKNOWN</a> 2
|
||||
/* Possible values of the <a href="#data_type">data_type</a> field */
|
||||
|
||||
#define <a name="Z_DEFLATED">Z_DEFLATED</a> 8
|
||||
/* The <a href="#deflate">deflate</a> compression method (the only one supported in this version) */
|
||||
|
||||
#define <a name="Z_NULL">Z_NULL</a> 0 /* for initializing <a href="#zalloc">zalloc</a>, <a href="#zfree">zfree</a>, <a href="#opaque">opaque</a> */
|
||||
|
||||
#define <a name="zlib_version">zlib_version</a> <a href="#zlibVersion">zlibVersion</a>()
|
||||
/* for compatibility with versions less than 1.0.2 */
|
||||
</pre>
|
||||
</font>
|
||||
|
||||
<hr>
|
||||
<a name="Misc"><h2> Misc </h2>
|
||||
<a href="#deflateInit">deflateInit</a> and <a href="#inflateInit">inflateInit</a> are macros to allow checking the zlib version
|
||||
and the compiler's view of <a href="#z_stream_s">z_stream</a>.
|
||||
<p>
|
||||
Other functions:
|
||||
<dl>
|
||||
<font color="Blue"><dt> const char * <a name="zError">zError</a> (int err);</font>
|
||||
<font color="Blue"><dt> int <a name="inflateSyncPoint">inflateSyncPoint</a> (<a href="#z_streamp">z_streamp</a> z);</font>
|
||||
<font color="Blue"><dt> const uLongf * <a name="get_crc_table">get_crc_table</a> (void);</font>
|
||||
</dl>
|
||||
<hr>
|
||||
<font size="-1">
|
||||
Last update: Wed Oct 13 20:42:34 1999<br>
|
||||
piapi@csie.ntu.edu.tw
|
||||
</font>
|
||||
|
||||
</body>
|
||||
</html>
|
41
common/dist/zlib/projects/README.projects
vendored
41
common/dist/zlib/projects/README.projects
vendored
@ -1,41 +0,0 @@
|
||||
This directory contains project files for building zlib under various
|
||||
Integrated Development Environments (IDE).
|
||||
|
||||
If you wish to submit a new project to this directory, you should comply
|
||||
to the following requirements. Otherwise (e.g. if you wish to integrate
|
||||
a custom piece of code that changes the zlib interface or its behavior),
|
||||
please consider submitting the project to the contrib directory.
|
||||
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
- The project must build zlib using the source files from the official
|
||||
zlib source distribution, exclusively.
|
||||
|
||||
- If the project produces redistributable builds (e.g. shared objects
|
||||
or DLL files), these builds must be compatible to those produced by
|
||||
makefiles, if such makefiles exist in the zlib distribution.
|
||||
In particular, if the project produces a DLL build for the Win32
|
||||
platform, this build must comply to the officially-ammended Win32 DLL
|
||||
Application Binary Interface (ABI), described in win32/DLL_FAQ.txt.
|
||||
|
||||
- The project may provide additional build targets, which depend on
|
||||
3rd-party (unofficially-supported) software, present in the contrib
|
||||
directory. For example, it is possible to provide an "ASM build",
|
||||
besides the officially-supported build, and have ASM source files
|
||||
among its dependencies.
|
||||
|
||||
- If there are significant differences between the project files created
|
||||
by different versions of an IDE (e.g. Visual C++ 6.0 vs. 7.0), the name
|
||||
of the project directory should contain the version number of the IDE
|
||||
for which the project is intended (e.g. "visualc6" for Visual C++ 6.0,
|
||||
or "visualc7" for Visual C++ 7.0 and 7.1).
|
||||
|
||||
|
||||
Current projects
|
||||
================
|
||||
|
||||
visualc6/ by Simon-Pierre Cadieux <methodex@methodex.ca>
|
||||
and Cosmin Truta <cosmint@cs.ubbcluj.ro>
|
||||
Project for Microsoft Visual C++ 6.0
|
73
common/dist/zlib/projects/visualc6/README.txt
vendored
73
common/dist/zlib/projects/visualc6/README.txt
vendored
@ -1,73 +0,0 @@
|
||||
Microsoft Developer Studio Project Files, Format Version 6.00 for zlib.
|
||||
|
||||
Copyright (C) 2000-2004 Simon-Pierre Cadieux.
|
||||
Copyright (C) 2004 Cosmin Truta.
|
||||
For conditions of distribution and use, see copyright notice in zlib.h.
|
||||
|
||||
|
||||
This project builds the zlib binaries as follows:
|
||||
|
||||
* Win32_DLL_Release\zlib1.dll DLL build
|
||||
* Win32_DLL_Debug\zlib1d.dll DLL build (debug version)
|
||||
* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code
|
||||
* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version)
|
||||
* Win32_LIB_Release\zlib.lib static build
|
||||
* Win32_LIB_Debug\zlibd.lib static build (debug version)
|
||||
* Win32_LIB_ASM_Release\zlib.lib static build using ASM code
|
||||
* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version)
|
||||
|
||||
|
||||
For more information regarding the DLL builds, please see the DLL FAQ
|
||||
in ..\..\win32\DLL_FAQ.txt.
|
||||
|
||||
|
||||
To build and test:
|
||||
|
||||
1) On the main menu, select "File | Open Workspace".
|
||||
Open "zlib.dsw".
|
||||
|
||||
2) Select "Build | Set Active Configuration".
|
||||
Choose the configuration you wish to build.
|
||||
|
||||
3) Select "Build | Clean".
|
||||
|
||||
4) Select "Build | Build ... (F7)". Ignore warning messages about
|
||||
not being able to find certain include files (e.g. alloc.h).
|
||||
|
||||
5) If you built one of the sample programs (example or minigzip),
|
||||
select "Build | Execute ... (Ctrl+F5)".
|
||||
|
||||
|
||||
To use:
|
||||
|
||||
1) Select "Project | Settings (Alt+F7)".
|
||||
Make note of the configuration names used in your project.
|
||||
Usually, these names are "Win32 Release" and "Win32 Debug".
|
||||
|
||||
2) In the Workspace window, select the "FileView" tab.
|
||||
Right-click on the root item "Workspace '...'".
|
||||
Select "Insert Project into Workspace".
|
||||
Switch on the checkbox "Dependency of:", and select the name
|
||||
of your project. Open "zlib.dsp".
|
||||
|
||||
3) Select "Build | Configurations".
|
||||
For each configuration of your project:
|
||||
3.1) Choose the zlib configuration you wish to use.
|
||||
3.2) Click on "Add".
|
||||
3.3) Set the new zlib configuration name to the name used by
|
||||
the configuration from the current iteration.
|
||||
|
||||
4) Select "Build | Set Active Configuration".
|
||||
Choose the configuration you wish to build.
|
||||
|
||||
5) Select "Build | Build ... (F7)".
|
||||
|
||||
6) If you built an executable program, select
|
||||
"Build | Execute ... (Ctrl+F5)".
|
||||
|
||||
|
||||
Note:
|
||||
|
||||
To build the ASM-enabled code, you need Microsoft Assembler
|
||||
(ML.EXE). You can get it by downloading and installing the
|
||||
latest Processor Pack for Visual C++ 6.0.
|
278
common/dist/zlib/projects/visualc6/example.dsp
vendored
278
common/dist/zlib/projects/visualc6/example.dsp
vendored
@ -1,278 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=example - Win32 LIB Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "example.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "example - Win32 DLL Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "example___Win32_DLL_Release"
|
||||
# PROP BASE Intermediate_Dir "example___Win32_DLL_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_DLL_Release"
|
||||
# PROP Intermediate_Dir "Win32_DLL_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "example - Win32 DLL Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "example___Win32_DLL_Debug"
|
||||
# PROP BASE Intermediate_Dir "example___Win32_DLL_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_DLL_Debug"
|
||||
# PROP Intermediate_Dir "Win32_DLL_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "example___Win32_DLL_ASM_Release"
|
||||
# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_DLL_ASM_Release"
|
||||
# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug"
|
||||
# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_DLL_ASM_Debug"
|
||||
# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "example - Win32 LIB Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "example___Win32_LIB_Release"
|
||||
# PROP BASE Intermediate_Dir "example___Win32_LIB_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_LIB_Release"
|
||||
# PROP Intermediate_Dir "Win32_LIB_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "example - Win32 LIB Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "example___Win32_LIB_Debug"
|
||||
# PROP BASE Intermediate_Dir "example___Win32_LIB_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_LIB_Debug"
|
||||
# PROP Intermediate_Dir "Win32_LIB_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "example___Win32_LIB_ASM_Release"
|
||||
# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_LIB_ASM_Release"
|
||||
# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug"
|
||||
# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_LIB_ASM_Debug"
|
||||
# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "example - Win32 DLL Release"
|
||||
# Name "example - Win32 DLL Debug"
|
||||
# Name "example - Win32 DLL ASM Release"
|
||||
# Name "example - Win32 DLL ASM Debug"
|
||||
# Name "example - Win32 LIB Release"
|
||||
# Name "example - Win32 LIB Debug"
|
||||
# Name "example - Win32 LIB ASM Release"
|
||||
# Name "example - Win32 LIB ASM Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\example.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\zconf.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\zlib.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
278
common/dist/zlib/projects/visualc6/minigzip.dsp
vendored
278
common/dist/zlib/projects/visualc6/minigzip.dsp
vendored
@ -1,278 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="minigzip" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=minigzip - Win32 LIB Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "minigzip.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "minigzip - Win32 DLL Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "minigzip___Win32_DLL_Release"
|
||||
# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_DLL_Release"
|
||||
# PROP Intermediate_Dir "Win32_DLL_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "minigzip___Win32_DLL_Debug"
|
||||
# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_DLL_Debug"
|
||||
# PROP Intermediate_Dir "Win32_DLL_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release"
|
||||
# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_DLL_ASM_Release"
|
||||
# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug"
|
||||
# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_DLL_ASM_Debug"
|
||||
# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "minigzip___Win32_LIB_Release"
|
||||
# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_LIB_Release"
|
||||
# PROP Intermediate_Dir "Win32_LIB_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "minigzip___Win32_LIB_Debug"
|
||||
# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_LIB_Debug"
|
||||
# PROP Intermediate_Dir "Win32_LIB_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release"
|
||||
# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_LIB_ASM_Release"
|
||||
# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug"
|
||||
# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_LIB_ASM_Debug"
|
||||
# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "minigzip - Win32 DLL Release"
|
||||
# Name "minigzip - Win32 DLL Debug"
|
||||
# Name "minigzip - Win32 DLL ASM Release"
|
||||
# Name "minigzip - Win32 DLL ASM Debug"
|
||||
# Name "minigzip - Win32 LIB Release"
|
||||
# Name "minigzip - Win32 LIB Debug"
|
||||
# Name "minigzip - Win32 LIB ASM Release"
|
||||
# Name "minigzip - Win32 LIB ASM Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\minigzip.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\zconf.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\zlib.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
609
common/dist/zlib/projects/visualc6/zlib.dsp
vendored
609
common/dist/zlib/projects/visualc6/zlib.dsp
vendored
@ -1,609 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=zlib - Win32 LIB Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "zlib.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
|
||||
!IF "$(CFG)" == "zlib - Win32 DLL Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "zlib___Win32_DLL_Release"
|
||||
# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_DLL_Release"
|
||||
# PROP Intermediate_Dir "Win32_DLL_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
MTL=midl.exe
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "zlib___Win32_DLL_Debug"
|
||||
# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_DLL_Debug"
|
||||
# PROP Intermediate_Dir "Win32_DLL_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
MTL=midl.exe
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release"
|
||||
# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_DLL_ASM_Release"
|
||||
# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
MTL=midl.exe
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug"
|
||||
# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_DLL_ASM_Debug"
|
||||
# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
MTL=midl.exe
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "zlib___Win32_LIB_Release"
|
||||
# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_LIB_Release"
|
||||
# PROP Intermediate_Dir "Win32_LIB_Release"
|
||||
# PROP Target_Dir ""
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "zlib___Win32_LIB_Debug"
|
||||
# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_LIB_Debug"
|
||||
# PROP Intermediate_Dir "Win32_LIB_Debug"
|
||||
# PROP Target_Dir ""
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release"
|
||||
# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Win32_LIB_ASM_Release"
|
||||
# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
|
||||
# PROP Target_Dir ""
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug"
|
||||
# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Win32_LIB_ASM_Debug"
|
||||
# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
|
||||
# PROP Target_Dir ""
|
||||
CPP=cl.exe
|
||||
# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
|
||||
# SUBTRACT BASE CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
RSC=rc.exe
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "zlib - Win32 DLL Release"
|
||||
# Name "zlib - Win32 DLL Debug"
|
||||
# Name "zlib - Win32 DLL ASM Release"
|
||||
# Name "zlib - Win32 DLL ASM Debug"
|
||||
# Name "zlib - Win32 LIB Release"
|
||||
# Name "zlib - Win32 LIB Debug"
|
||||
# Name "zlib - Win32 LIB ASM Release"
|
||||
# Name "zlib - Win32 LIB ASM Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\adler32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\compress.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\crc32.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\deflate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\gzio.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\infback.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\inffast.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\inflate.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\inftrees.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\trees.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\uncompr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\win32\zlib.def
|
||||
|
||||
!IF "$(CFG)" == "zlib - Win32 DLL Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\zutil.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\crc32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\deflate.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\inffast.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\inffixed.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\inflate.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\inftrees.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\trees.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\zconf.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\zlib.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\zutil.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\win32\zlib1.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Assembler Files (Unsupported)"
|
||||
|
||||
# PROP Default_Filter "asm;obj;c;cpp;cxx;h;hpp;hxx"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\contrib\masmx86\gvmat32.asm
|
||||
|
||||
!IF "$(CFG)" == "zlib - Win32 DLL Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
|
||||
|
||||
# Begin Custom Build - Assembling...
|
||||
IntDir=.\Win32_DLL_ASM_Release
|
||||
InputPath=..\..\contrib\masmx86\gvmat32.asm
|
||||
InputName=gvmat32
|
||||
|
||||
"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
|
||||
|
||||
# Begin Custom Build - Assembling...
|
||||
IntDir=.\Win32_DLL_ASM_Debug
|
||||
InputPath=..\..\contrib\masmx86\gvmat32.asm
|
||||
InputName=gvmat32
|
||||
|
||||
"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
|
||||
|
||||
# Begin Custom Build - Assembling...
|
||||
IntDir=.\Win32_LIB_ASM_Release
|
||||
InputPath=..\..\contrib\masmx86\gvmat32.asm
|
||||
InputName=gvmat32
|
||||
|
||||
"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
|
||||
|
||||
# Begin Custom Build - Assembling...
|
||||
IntDir=.\Win32_LIB_ASM_Debug
|
||||
InputPath=..\..\contrib\masmx86\gvmat32.asm
|
||||
InputName=gvmat32
|
||||
|
||||
"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\contrib\masmx86\gvmat32c.c
|
||||
|
||||
!IF "$(CFG)" == "zlib - Win32 DLL Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
# ADD CPP /I "..\.."
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
# ADD CPP /I "..\.."
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
|
||||
|
||||
# ADD CPP /I "..\.."
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
|
||||
|
||||
# ADD CPP /I "..\.."
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
# ADD CPP /I "..\.."
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
# ADD CPP /I "..\.."
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
|
||||
|
||||
# ADD CPP /I "..\.."
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
|
||||
|
||||
# ADD CPP /I "..\.."
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\contrib\masmx86\inffas32.asm
|
||||
|
||||
!IF "$(CFG)" == "zlib - Win32 DLL Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
|
||||
|
||||
# Begin Custom Build - Assembling...
|
||||
IntDir=.\Win32_DLL_ASM_Release
|
||||
InputPath=..\..\contrib\masmx86\inffas32.asm
|
||||
InputName=inffas32
|
||||
|
||||
"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
|
||||
|
||||
# Begin Custom Build - Assembling...
|
||||
IntDir=.\Win32_DLL_ASM_Debug
|
||||
InputPath=..\..\contrib\masmx86\inffas32.asm
|
||||
InputName=inffas32
|
||||
|
||||
"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
|
||||
|
||||
# Begin Custom Build - Assembling...
|
||||
IntDir=.\Win32_LIB_ASM_Release
|
||||
InputPath=..\..\contrib\masmx86\inffas32.asm
|
||||
InputName=inffas32
|
||||
|
||||
"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
|
||||
|
||||
# Begin Custom Build - Assembling...
|
||||
IntDir=.\Win32_LIB_ASM_Debug
|
||||
InputPath=..\..\contrib\masmx86\inffas32.asm
|
||||
InputName=inffas32
|
||||
|
||||
"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\README.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
59
common/dist/zlib/projects/visualc6/zlib.dsw
vendored
59
common/dist/zlib/projects/visualc6/zlib.dsw
vendored
@ -1,59 +0,0 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "example"=.\example.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name zlib
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "minigzip"=.\minigzip.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name zlib
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "zlib"=.\zlib.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
219
common/dist/zlib/trees.c
vendored
219
common/dist/zlib/trees.c
vendored
@ -1,7 +1,8 @@
|
||||
/* $NetBSD: trees.c,v 1.3 2006/01/27 00:45:27 christos Exp $ */
|
||||
/* $NetBSD: trees.c,v 1.4 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* trees.c -- output deflated data using Huffman coding
|
||||
* Copyright (C) 1995-2005 Jean-loup Gailly
|
||||
* Copyright (C) 1995-2016 Jean-loup Gailly
|
||||
* detect_data_type() function provided freely by Cosmin Truta, 2006
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -31,7 +32,7 @@
|
||||
* Addison-Wesley, 1983. ISBN 0-201-06672-6.
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
/* @(#) $Id: trees.c,v 1.4 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* #define GEN_TREES_H */
|
||||
|
||||
@ -75,11 +76,6 @@ local const uch bl_order[BL_CODES]
|
||||
* probability, to avoid transmitting the lengths for unused bit length codes.
|
||||
*/
|
||||
|
||||
#define Buf_size (8 * 2*sizeof(char))
|
||||
/* Number of bits used within bi_buf. (bi_buf might be implemented on
|
||||
* more than 16 bits on some systems.)
|
||||
*/
|
||||
|
||||
/* ===========================================================================
|
||||
* Local data. These are initialized only once.
|
||||
*/
|
||||
@ -128,13 +124,13 @@ struct static_tree_desc_s {
|
||||
int max_length; /* max bit length for the codes */
|
||||
};
|
||||
|
||||
local static_tree_desc static_l_desc =
|
||||
local const static_tree_desc static_l_desc =
|
||||
{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS};
|
||||
|
||||
local static_tree_desc static_d_desc =
|
||||
local const static_tree_desc static_d_desc =
|
||||
{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS};
|
||||
|
||||
local static_tree_desc static_bl_desc =
|
||||
local const static_tree_desc static_bl_desc =
|
||||
{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS};
|
||||
|
||||
/* ===========================================================================
|
||||
@ -152,14 +148,12 @@ local void send_tree OF((deflate_state *s, ct_data *tree, int max_code));
|
||||
local int build_bl_tree OF((deflate_state *s));
|
||||
local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
|
||||
int blcodes));
|
||||
local void compress_block OF((deflate_state *s, ct_data *ltree,
|
||||
ct_data *dtree));
|
||||
local void set_data_type OF((deflate_state *s));
|
||||
local void compress_block OF((deflate_state *s, const ct_data *ltree,
|
||||
const ct_data *dtree));
|
||||
local int detect_data_type OF((deflate_state *s));
|
||||
local unsigned bi_reverse OF((unsigned value, int length));
|
||||
local void bi_windup OF((deflate_state *s));
|
||||
local void bi_flush OF((deflate_state *s));
|
||||
local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
|
||||
int header));
|
||||
|
||||
#ifdef GEN_TREES_H
|
||||
local void gen_trees_header OF((void));
|
||||
@ -169,7 +163,7 @@ local void gen_trees_header OF((void));
|
||||
# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
|
||||
/* Send a code of the given tree. c and tree must not have side effects */
|
||||
|
||||
#else /* ZLIB_DEBUG */
|
||||
#else /* !ZLIB_DEBUG */
|
||||
# define send_code(s, c, tree) \
|
||||
{ if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
|
||||
send_bits(s, tree[c].Code, tree[c].Len); }
|
||||
@ -205,12 +199,12 @@ local void send_bits(s, value, length)
|
||||
* unused bits in value.
|
||||
*/
|
||||
if (s->bi_valid > (int)Buf_size - length) {
|
||||
s->bi_buf |= (value << s->bi_valid);
|
||||
s->bi_buf |= (ush)value << s->bi_valid;
|
||||
put_short(s, s->bi_buf);
|
||||
s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
|
||||
s->bi_valid += length - Buf_size;
|
||||
} else {
|
||||
s->bi_buf |= value << s->bi_valid;
|
||||
s->bi_buf |= (ush)value << s->bi_valid;
|
||||
s->bi_valid += length;
|
||||
}
|
||||
}
|
||||
@ -219,13 +213,13 @@ local void send_bits(s, value, length)
|
||||
#define send_bits(s, value, length) \
|
||||
{ int len = length;\
|
||||
if (s->bi_valid > (int)Buf_size - len) {\
|
||||
int val = value;\
|
||||
s->bi_buf |= (val << s->bi_valid);\
|
||||
int val = (int)value;\
|
||||
s->bi_buf |= (ush)val << s->bi_valid;\
|
||||
put_short(s, s->bi_buf);\
|
||||
s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
|
||||
s->bi_valid += len - Buf_size;\
|
||||
} else {\
|
||||
s->bi_buf |= (value) << s->bi_valid;\
|
||||
s->bi_buf |= (ush)(value) << s->bi_valid;\
|
||||
s->bi_valid += len;\
|
||||
}\
|
||||
}
|
||||
@ -252,11 +246,13 @@ local void tr_static_init()
|
||||
if (static_init_done) return;
|
||||
|
||||
/* For some embedded targets, global variables are not initialized: */
|
||||
#ifdef NO_INIT_GLOBAL_POINTERS
|
||||
static_l_desc.static_tree = static_ltree;
|
||||
static_l_desc.extra_bits = extra_lbits;
|
||||
static_d_desc.static_tree = static_dtree;
|
||||
static_d_desc.extra_bits = extra_dbits;
|
||||
static_bl_desc.extra_bits = extra_blbits;
|
||||
#endif
|
||||
|
||||
/* Initialize the mapping length (0..255) -> length code (0..28) */
|
||||
length = 0;
|
||||
@ -350,13 +346,14 @@ void gen_trees_header()
|
||||
static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
|
||||
}
|
||||
|
||||
fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
|
||||
fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n");
|
||||
for (i = 0; i < DIST_CODE_LEN; i++) {
|
||||
fprintf(header, "%2u%s", _dist_code[i],
|
||||
SEPARATOR(i, DIST_CODE_LEN-1, 20));
|
||||
}
|
||||
|
||||
fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
|
||||
fprintf(header,
|
||||
"const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
|
||||
for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
|
||||
fprintf(header, "%2u%s", _length_code[i],
|
||||
SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
|
||||
@ -381,7 +378,7 @@ void gen_trees_header()
|
||||
/* ===========================================================================
|
||||
* Initialize the tree data structures for a new zlib stream.
|
||||
*/
|
||||
void _tr_init(s)
|
||||
void ZLIB_INTERNAL _tr_init(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
tr_static_init();
|
||||
@ -397,7 +394,6 @@ void _tr_init(s)
|
||||
|
||||
s->bi_buf = 0;
|
||||
s->bi_valid = 0;
|
||||
s->last_eob_len = 8; /* enough lookahead for inflate */
|
||||
#ifdef ZLIB_DEBUG
|
||||
s->compressed_len = 0L;
|
||||
s->bits_sent = 0L;
|
||||
@ -526,12 +522,12 @@ local void gen_bitlen(s, desc)
|
||||
xbits = 0;
|
||||
if (n >= base) xbits = extra[n-base];
|
||||
f = tree[n].Freq;
|
||||
s->opt_len += (ulg)f * (bits + xbits);
|
||||
if (stree) s->static_len += (ulg)f * (stree[n].Len + xbits);
|
||||
s->opt_len += (ulg)f * (unsigned)(bits + xbits);
|
||||
if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits);
|
||||
}
|
||||
if (overflow == 0) return;
|
||||
|
||||
Trace((stderr,"\nbit length overflow\n"));
|
||||
Tracev((stderr,"\nbit length overflow\n"));
|
||||
/* This happens for example on obj2 and pic of the Calgary corpus */
|
||||
|
||||
/* Find the first bit length which could increase: */
|
||||
@ -558,9 +554,8 @@ local void gen_bitlen(s, desc)
|
||||
m = s->heap[--h];
|
||||
if (m > max_code) continue;
|
||||
if ((unsigned) tree[m].Len != (unsigned) bits) {
|
||||
Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
|
||||
s->opt_len += ((long)bits - (long)tree[m].Len)
|
||||
*(long)tree[m].Freq;
|
||||
Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
|
||||
s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
|
||||
tree[m].Len = (ush)bits;
|
||||
}
|
||||
n--;
|
||||
@ -582,7 +577,7 @@ local void gen_codes (tree, max_code, bl_count)
|
||||
ushf *bl_count; /* number of codes at each bit length */
|
||||
{
|
||||
ush next_code[MAX_BITS+1]; /* next code value for each bit length */
|
||||
ush code = 0; /* running code value */
|
||||
unsigned code = 0; /* running code value */
|
||||
int bits; /* bit index */
|
||||
int n; /* code index */
|
||||
|
||||
@ -590,7 +585,8 @@ local void gen_codes (tree, max_code, bl_count)
|
||||
* without bit reversal.
|
||||
*/
|
||||
for (bits = 1; bits <= MAX_BITS; bits++) {
|
||||
next_code[bits] = code = (code + bl_count[bits-1]) << 1;
|
||||
code = (code + bl_count[bits-1]) << 1;
|
||||
next_code[bits] = (ush)code;
|
||||
}
|
||||
/* Check that the bit counts in bl_count are consistent. The last code
|
||||
* must be all ones.
|
||||
@ -603,7 +599,7 @@ local void gen_codes (tree, max_code, bl_count)
|
||||
int len = tree[n].Len;
|
||||
if (len == 0) continue;
|
||||
/* Now reverse the bits */
|
||||
tree[n].Code = bi_reverse(next_code[len]++, len);
|
||||
tree[n].Code = (ush)bi_reverse(next_code[len]++, len);
|
||||
|
||||
Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
|
||||
n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
|
||||
@ -825,7 +821,7 @@ local int build_bl_tree(s)
|
||||
if (s->bl_tree[bl_order[max_blindex]].Len != 0) break;
|
||||
}
|
||||
/* Update opt_len to include the bit length tree and counts */
|
||||
s->opt_len += 3*(max_blindex+1) + 5+5+4;
|
||||
s->opt_len += 3*((ulg)max_blindex+1) + 5+5+4;
|
||||
Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
|
||||
s->opt_len, s->static_len));
|
||||
|
||||
@ -866,32 +862,40 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
|
||||
/* ===========================================================================
|
||||
* Send a stored block
|
||||
*/
|
||||
void _tr_stored_block(s, buf, stored_len, eof)
|
||||
void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
|
||||
deflate_state *s;
|
||||
charf *buf; /* input block */
|
||||
ulg stored_len; /* length of input block */
|
||||
int eof; /* true if this is the last block for a file */
|
||||
int last; /* one if this is the last block for a file */
|
||||
{
|
||||
send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
|
||||
send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */
|
||||
bi_windup(s); /* align on byte boundary */
|
||||
put_short(s, (ush)stored_len);
|
||||
put_short(s, (ush)~stored_len);
|
||||
zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
|
||||
s->pending += stored_len;
|
||||
#ifdef ZLIB_DEBUG
|
||||
s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
|
||||
s->compressed_len += (stored_len + 4) << 3;
|
||||
s->bits_sent += 2*16;
|
||||
s->bits_sent += stored_len<<3;
|
||||
#endif
|
||||
copy_block(s, buf, (unsigned)stored_len, 1); /* with header */
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Flush the bits in the bit buffer to pending output (leaves at most 7 bits)
|
||||
*/
|
||||
void ZLIB_INTERNAL _tr_flush_bits(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
bi_flush(s);
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Send one empty static block to give enough lookahead for inflate.
|
||||
* This takes 10 bits, of which 7 may remain in the bit buffer.
|
||||
* The current inflate code requires 9 bits of lookahead. If the
|
||||
* last two codes for the previous block (real code plus EOB) were coded
|
||||
* on 5 bits or less, inflate may have only 5+3 bits of lookahead to decode
|
||||
* the last real code. In this case we send two empty static blocks instead
|
||||
* of one. (There are no problems if the previous block is stored or fixed.)
|
||||
* To simplify the code, we assume the worst case of last real code encoded
|
||||
* on one bit only.
|
||||
*/
|
||||
void _tr_align(s)
|
||||
void ZLIB_INTERNAL _tr_align(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
send_bits(s, STATIC_TREES<<1, 3);
|
||||
@ -900,31 +904,17 @@ void _tr_align(s)
|
||||
s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
|
||||
#endif
|
||||
bi_flush(s);
|
||||
/* Of the 10 bits for the empty block, we have already sent
|
||||
* (10 - bi_valid) bits. The lookahead for the last real code (before
|
||||
* the EOB of the previous block) was thus at least one plus the length
|
||||
* of the EOB plus what we have just sent of the empty static block.
|
||||
*/
|
||||
if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
|
||||
send_bits(s, STATIC_TREES<<1, 3);
|
||||
send_code(s, END_BLOCK, static_ltree);
|
||||
#ifdef ZLIB_DEBUG
|
||||
s->compressed_len += 10L;
|
||||
#endif
|
||||
bi_flush(s);
|
||||
}
|
||||
s->last_eob_len = 7;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Determine the best encoding for the current block: dynamic trees, static
|
||||
* trees or store, and output the encoded block to the zip file.
|
||||
*/
|
||||
void _tr_flush_block(s, buf, stored_len, eof)
|
||||
void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
|
||||
deflate_state *s;
|
||||
charf *buf; /* input block, or NULL if too old */
|
||||
ulg stored_len; /* length of input block */
|
||||
int eof; /* true if this is the last block for a file */
|
||||
int last; /* one if this is the last block for a file */
|
||||
{
|
||||
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
|
||||
int max_blindex = 0; /* index of last bit length code of non zero freq */
|
||||
@ -933,8 +923,8 @@ void _tr_flush_block(s, buf, stored_len, eof)
|
||||
if (s->level > 0) {
|
||||
|
||||
/* Check if the file is binary or text */
|
||||
if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN)
|
||||
set_data_type(s);
|
||||
if (s->strm->data_type == Z_UNKNOWN)
|
||||
s->strm->data_type = detect_data_type(s);
|
||||
|
||||
/* Construct the literal and distance trees */
|
||||
build_tree(s, (tree_desc *)(&(s->l_desc)));
|
||||
@ -980,24 +970,25 @@ void _tr_flush_block(s, buf, stored_len, eof)
|
||||
* successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
|
||||
* transform a block into a stored block.
|
||||
*/
|
||||
_tr_stored_block(s, buf, stored_len, eof);
|
||||
_tr_stored_block(s, buf, stored_len, last);
|
||||
|
||||
#ifdef FORCE_STATIC
|
||||
} else if (static_lenb >= 0) { /* force static trees */
|
||||
#else
|
||||
} else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
|
||||
#endif
|
||||
send_bits(s, (STATIC_TREES<<1)+eof, 3);
|
||||
compress_block(s, (ct_data *)__UNCONST(static_ltree),
|
||||
(ct_data *)__UNCONST(static_dtree));
|
||||
send_bits(s, (STATIC_TREES<<1)+last, 3);
|
||||
compress_block(s, (const ct_data *)static_ltree,
|
||||
(const ct_data *)static_dtree);
|
||||
#ifdef ZLIB_DEBUG
|
||||
s->compressed_len += 3 + s->static_len;
|
||||
#endif
|
||||
} else {
|
||||
send_bits(s, (DYN_TREES<<1)+eof, 3);
|
||||
send_bits(s, (DYN_TREES<<1)+last, 3);
|
||||
send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
|
||||
max_blindex+1);
|
||||
compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
|
||||
compress_block(s, (const ct_data *)s->dyn_ltree,
|
||||
(const ct_data *)s->dyn_dtree);
|
||||
#ifdef ZLIB_DEBUG
|
||||
s->compressed_len += 3 + s->opt_len;
|
||||
#endif
|
||||
@ -1008,21 +999,21 @@ void _tr_flush_block(s, buf, stored_len, eof)
|
||||
*/
|
||||
init_block(s);
|
||||
|
||||
if (eof) {
|
||||
if (last) {
|
||||
bi_windup(s);
|
||||
#ifdef ZLIB_DEBUG
|
||||
s->compressed_len += 7; /* align on byte boundary */
|
||||
#endif
|
||||
}
|
||||
Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
|
||||
s->compressed_len-7*eof));
|
||||
s->compressed_len-7*last));
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Save the match info and tally the frequency counts. Return true if
|
||||
* the current block must be flushed.
|
||||
*/
|
||||
int _tr_tally (s, dist, lc)
|
||||
int ZLIB_INTERNAL _tr_tally (s, dist, lc)
|
||||
deflate_state *s;
|
||||
unsigned dist; /* distance of matched string */
|
||||
unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
|
||||
@ -1074,8 +1065,8 @@ int _tr_tally (s, dist, lc)
|
||||
*/
|
||||
local void compress_block(s, ltree, dtree)
|
||||
deflate_state *s;
|
||||
ct_data *ltree; /* literal tree */
|
||||
ct_data *dtree; /* distance tree */
|
||||
const ct_data *ltree; /* literal tree */
|
||||
const ct_data *dtree; /* distance tree */
|
||||
{
|
||||
unsigned dist; /* distance of matched string */
|
||||
int lc; /* match length or unmatched char (if dist == 0) */
|
||||
@ -1105,7 +1096,7 @@ local void compress_block(s, ltree, dtree)
|
||||
send_code(s, code, dtree); /* send the distance code */
|
||||
extra = extra_dbits[code];
|
||||
if (extra != 0) {
|
||||
dist -= base_dist[code];
|
||||
dist -= (unsigned)base_dist[code];
|
||||
send_bits(s, dist, extra); /* send the extra distance bits */
|
||||
}
|
||||
} /* literal or match pair ? */
|
||||
@ -1117,28 +1108,48 @@ local void compress_block(s, ltree, dtree)
|
||||
} while (lx < s->last_lit);
|
||||
|
||||
send_code(s, END_BLOCK, ltree);
|
||||
s->last_eob_len = ltree[END_BLOCK].Len;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Set the data type to BINARY or TEXT, using a crude approximation:
|
||||
* set it to Z_TEXT if all symbols are either printable characters (33 to 255)
|
||||
* or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise.
|
||||
* Check if the data type is TEXT or BINARY, using the following algorithm:
|
||||
* - TEXT if the two conditions below are satisfied:
|
||||
* a) There are no non-portable control characters belonging to the
|
||||
* "black list" (0..6, 14..25, 28..31).
|
||||
* b) There is at least one printable character belonging to the
|
||||
* "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
|
||||
* - BINARY otherwise.
|
||||
* - The following partially-portable control characters form a
|
||||
* "gray list" that is ignored in this detection algorithm:
|
||||
* (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
|
||||
* IN assertion: the fields Freq of dyn_ltree are set.
|
||||
*/
|
||||
local void set_data_type(s)
|
||||
local int detect_data_type(s)
|
||||
deflate_state *s;
|
||||
{
|
||||
/* black_mask is the bit mask of black-listed bytes
|
||||
* set bits 0..6, 14..25, and 28..31
|
||||
* 0xf3ffc07f = binary 11110011111111111100000001111111
|
||||
*/
|
||||
unsigned long black_mask = 0xf3ffc07fUL;
|
||||
int n;
|
||||
|
||||
for (n = 0; n < 9; n++)
|
||||
/* Check for non-textual ("black-listed") bytes. */
|
||||
for (n = 0; n <= 31; n++, black_mask >>= 1)
|
||||
if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0))
|
||||
return Z_BINARY;
|
||||
|
||||
/* Check for textual ("white-listed") bytes. */
|
||||
if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
|
||||
|| s->dyn_ltree[13].Freq != 0)
|
||||
return Z_TEXT;
|
||||
for (n = 32; n < LITERALS; n++)
|
||||
if (s->dyn_ltree[n].Freq != 0)
|
||||
break;
|
||||
if (n == 9)
|
||||
for (n = 14; n < 32; n++)
|
||||
if (s->dyn_ltree[n].Freq != 0)
|
||||
break;
|
||||
s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY;
|
||||
return Z_TEXT;
|
||||
|
||||
/* There are no "black-listed" or "white-listed" bytes:
|
||||
* this stream either is empty or has tolerated ("gray-listed") bytes only.
|
||||
*/
|
||||
return Z_BINARY;
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
@ -1192,31 +1203,3 @@ local void bi_windup(s)
|
||||
s->bits_sent = (s->bits_sent+7) & ~7;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ===========================================================================
|
||||
* Copy a stored block, storing first the length and its
|
||||
* one's complement if requested.
|
||||
*/
|
||||
local void copy_block(s, buf, len, header)
|
||||
deflate_state *s;
|
||||
charf *buf; /* the input data */
|
||||
unsigned len; /* its length */
|
||||
int header; /* true if block header must be written */
|
||||
{
|
||||
bi_windup(s); /* align on byte boundary */
|
||||
s->last_eob_len = 8; /* enough lookahead for inflate */
|
||||
|
||||
if (header) {
|
||||
put_short(s, (ush)len);
|
||||
put_short(s, (ush)~len);
|
||||
#ifdef ZLIB_DEBUG
|
||||
s->bits_sent += 2*16;
|
||||
#endif
|
||||
}
|
||||
#ifdef ZLIB_DEBUG
|
||||
s->bits_sent += (ulg)len<<3;
|
||||
#endif
|
||||
while (len--) {
|
||||
put_byte(s, *buf++);
|
||||
}
|
||||
}
|
||||
|
120
common/dist/zlib/uncompr.c
vendored
120
common/dist/zlib/uncompr.c
vendored
@ -1,63 +1,95 @@
|
||||
/* $NetBSD: uncompr.c,v 1.2 2006/01/27 00:45:27 christos Exp $ */
|
||||
/* $NetBSD: uncompr.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* uncompr.c -- decompress a memory buffer
|
||||
* Copyright (C) 1995-2003 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
/* @(#) $Id: uncompr.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
#define ZLIB_INTERNAL
|
||||
#include "zlib.h"
|
||||
|
||||
/* ===========================================================================
|
||||
Decompresses the source buffer into the destination buffer. sourceLen is
|
||||
the byte length of the source buffer. Upon entry, destLen is the total
|
||||
size of the destination buffer, which must be large enough to hold the
|
||||
entire uncompressed data. (The size of the uncompressed data must have
|
||||
been saved previously by the compressor and transmitted to the decompressor
|
||||
by some mechanism outside the scope of this compression library.)
|
||||
Upon exit, destLen is the actual size of the compressed buffer.
|
||||
This function can be used to decompress a whole file at once if the
|
||||
input file is mmap'ed.
|
||||
Decompresses the source buffer into the destination buffer. *sourceLen is
|
||||
the byte length of the source buffer. Upon entry, *destLen is the total size
|
||||
of the destination buffer, which must be large enough to hold the entire
|
||||
uncompressed data. (The size of the uncompressed data must have been saved
|
||||
previously by the compressor and transmitted to the decompressor by some
|
||||
mechanism outside the scope of this compression library.) Upon exit,
|
||||
*destLen is the size of the decompressed data and *sourceLen is the number
|
||||
of source bytes consumed. Upon return, source + *sourceLen points to the
|
||||
first unused input byte.
|
||||
|
||||
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
|
||||
enough memory, Z_BUF_ERROR if there was not enough room in the output
|
||||
buffer, or Z_DATA_ERROR if the input data was corrupted.
|
||||
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough
|
||||
memory, Z_BUF_ERROR if there was not enough room in the output buffer, or
|
||||
Z_DATA_ERROR if the input data was corrupted, including if the input data is
|
||||
an incomplete zlib stream.
|
||||
*/
|
||||
int ZEXPORT uncompress2 (dest, destLen, source, sourceLen)
|
||||
Bytef *dest;
|
||||
uLongf *destLen;
|
||||
const Bytef *source;
|
||||
uLong *sourceLen;
|
||||
{
|
||||
z_stream stream;
|
||||
int err;
|
||||
const uInt max = (uInt)-1;
|
||||
uLong len, left;
|
||||
Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */
|
||||
|
||||
len = *sourceLen;
|
||||
if (*destLen) {
|
||||
left = *destLen;
|
||||
*destLen = 0;
|
||||
}
|
||||
else {
|
||||
left = 1;
|
||||
dest = buf;
|
||||
}
|
||||
|
||||
stream.next_in = __UNCONST(source);
|
||||
stream.avail_in = 0;
|
||||
stream.zalloc = (alloc_func)0;
|
||||
stream.zfree = (free_func)0;
|
||||
stream.opaque = (voidpf)0;
|
||||
|
||||
err = inflateInit(&stream);
|
||||
if (err != Z_OK) return err;
|
||||
|
||||
stream.next_out = dest;
|
||||
stream.avail_out = 0;
|
||||
|
||||
do {
|
||||
if (stream.avail_out == 0) {
|
||||
stream.avail_out = left > (uLong)max ? max : (uInt)left;
|
||||
left -= stream.avail_out;
|
||||
}
|
||||
if (stream.avail_in == 0) {
|
||||
stream.avail_in = len > (uLong)max ? max : (uInt)len;
|
||||
len -= stream.avail_in;
|
||||
}
|
||||
err = inflate(&stream, Z_NO_FLUSH);
|
||||
} while (err == Z_OK);
|
||||
|
||||
*sourceLen -= len + stream.avail_in;
|
||||
if (dest != buf)
|
||||
*destLen = stream.total_out;
|
||||
else if (stream.total_out && err == Z_BUF_ERROR)
|
||||
left = 1;
|
||||
|
||||
inflateEnd(&stream);
|
||||
return err == Z_STREAM_END ? Z_OK :
|
||||
err == Z_NEED_DICT ? Z_DATA_ERROR :
|
||||
err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR :
|
||||
err;
|
||||
}
|
||||
|
||||
int ZEXPORT uncompress (dest, destLen, source, sourceLen)
|
||||
Bytef *dest;
|
||||
uLongf *destLen;
|
||||
const Bytef *source;
|
||||
uLong sourceLen;
|
||||
{
|
||||
z_stream stream;
|
||||
int err;
|
||||
|
||||
stream.next_in = (Bytef*)__UNCONST(source);
|
||||
stream.avail_in = (uInt)sourceLen;
|
||||
/* Check for source > 64K on 16-bit machine: */
|
||||
if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;
|
||||
|
||||
stream.next_out = dest;
|
||||
stream.avail_out = (uInt)*destLen;
|
||||
if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR;
|
||||
|
||||
stream.zalloc = (alloc_func)0;
|
||||
stream.zfree = (free_func)0;
|
||||
|
||||
err = inflateInit(&stream);
|
||||
if (err != Z_OK) return err;
|
||||
|
||||
err = inflate(&stream, Z_FINISH);
|
||||
if (err != Z_STREAM_END) {
|
||||
inflateEnd(&stream);
|
||||
if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
|
||||
return Z_DATA_ERROR;
|
||||
return err;
|
||||
}
|
||||
*destLen = stream.total_out;
|
||||
|
||||
err = inflateEnd(&stream);
|
||||
return err;
|
||||
return uncompress2(dest, destLen, source, &sourceLen);
|
||||
}
|
||||
|
69
common/dist/zlib/win32/Makefile.emx
vendored
69
common/dist/zlib/win32/Makefile.emx
vendored
@ -1,69 +0,0 @@
|
||||
# Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98.
|
||||
# Copyright (C) 1995-1998 Jean-loup Gailly.
|
||||
# For conditions of distribution and use, see copyright notice in zlib.h
|
||||
|
||||
# To compile, or to compile and test, type:
|
||||
#
|
||||
# make -fmakefile.emx; make test -fmakefile.emx
|
||||
#
|
||||
|
||||
CC=gcc -Zwin32
|
||||
|
||||
#CFLAGS=-MMD -O
|
||||
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
|
||||
#CFLAGS=-MMD -g -DDEBUG
|
||||
CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
|
||||
-Wstrict-prototypes -Wmissing-prototypes
|
||||
|
||||
# If cp.exe is available, replace "copy /Y" with "cp -fp" .
|
||||
CP=copy /Y
|
||||
# If gnu install.exe is available, replace $(CP) with ginstall.
|
||||
INSTALL=$(CP)
|
||||
# The default value of RM is "rm -f." If "rm.exe" is found, comment out:
|
||||
RM=del
|
||||
LDLIBS=-L. -lzlib
|
||||
LD=$(CC) -s -o
|
||||
LDSHARED=$(CC)
|
||||
|
||||
INCL=zlib.h zconf.h
|
||||
LIBS=zlib.a
|
||||
|
||||
AR=ar rcs
|
||||
|
||||
prefix=/usr/local
|
||||
exec_prefix = $(prefix)
|
||||
|
||||
OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
|
||||
zutil.o inflate.o infback.o inftrees.o inffast.o
|
||||
|
||||
TEST_OBJS = example.o minigzip.o
|
||||
|
||||
all: example.exe minigzip.exe
|
||||
|
||||
test: all
|
||||
./example
|
||||
echo hello world | .\minigzip | .\minigzip -d
|
||||
|
||||
%.o : %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
zlib.a: $(OBJS)
|
||||
$(AR) $@ $(OBJS)
|
||||
|
||||
%.exe : %.o $(LIBS)
|
||||
$(LD) $@ $< $(LDLIBS)
|
||||
|
||||
|
||||
.PHONY : clean
|
||||
|
||||
clean:
|
||||
$(RM) *.d
|
||||
$(RM) *.o
|
||||
$(RM) *.exe
|
||||
$(RM) zlib.a
|
||||
$(RM) foo.gz
|
||||
|
||||
DEPS := $(wildcard *.d)
|
||||
ifneq ($(DEPS),)
|
||||
include $(DEPS)
|
||||
endif
|
343
common/dist/zlib/zconf.h
vendored
343
common/dist/zlib/zconf.h
vendored
@ -1,11 +1,11 @@
|
||||
/* $NetBSD: zconf.h,v 1.2 2006/01/14 20:27:34 christos Exp $ */
|
||||
/* $NetBSD: zconf.h,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2005 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
/* @(#) $Id: zconf.h,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
@ -15,52 +15,158 @@
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX
|
||||
# define deflateInit_ z_deflateInit_
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols and init macros */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# define adler32_z z_adler32_z
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define crc32_z z_crc32_z
|
||||
# define deflate z_deflate
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflate z_inflate
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateGetDictionary z_deflateGetDictionary
|
||||
# define deflateInit z_deflateInit
|
||||
# define deflateInit2 z_deflateInit2
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzfread z_gzfread
|
||||
# define gzfwrite z_gzfwrite
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit z_inflateBackInit
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCodesUsed z_inflateCodesUsed
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit z_inflateInit
|
||||
# define inflateInit2 z_inflateInit2
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# define uncompress z_uncompress
|
||||
# define adler32 z_adler32
|
||||
# define crc32 z_crc32
|
||||
# define get_crc_table z_get_crc_table
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateValidate z_inflateValidate
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# define uncompress2 z_uncompress2
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
# define alloc_func z_alloc_func
|
||||
# define free_func z_free_func
|
||||
# define in_func z_in_func
|
||||
# define out_func z_out_func
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define uInt z_uInt
|
||||
# define uLong z_uLong
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidpf z_voidpf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
@ -129,9 +235,29 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
#ifdef Z_SOLO
|
||||
typedef unsigned long z_size_t;
|
||||
#else
|
||||
# define z_longlong long long
|
||||
# if defined(NO_SIZE_T)
|
||||
typedef unsigned NO_SIZE_T z_size_t;
|
||||
# elif defined(STDC)
|
||||
# if defined(_KERNEL) || defined(_STANDALONE)
|
||||
# include <lib/libkern/libkern.h>
|
||||
# else
|
||||
# include <stddef.h>
|
||||
# endif
|
||||
typedef size_t z_size_t;
|
||||
# else
|
||||
typedef unsigned long z_size_t;
|
||||
# endif
|
||||
# undef z_longlong
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
@ -161,7 +287,7 @@
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
that is, 32K for windowBits=15 (default value) plus about 7 kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
@ -175,6 +301,14 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
@ -288,20 +422,100 @@ typedef uLong FAR uLongf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_UNISTD_H) || (defined(__NetBSD__) && (!defined(_KERNEL) && !defined(_STANDALONE)))
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# include <unistd.h> /* for SEEK_* and off_t */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# if defined(_KERNEL) || defined(_STANDALONE)
|
||||
# include <machine/limits.h>
|
||||
# else
|
||||
# include <limits.h>
|
||||
# endif
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
# define z_off_t off_t
|
||||
# define z_ptrdiff_t ptrdiff_t
|
||||
#endif
|
||||
#ifndef SEEK_SET
|
||||
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# if defined(_KERNEL) || defined(_STANDALONE)
|
||||
# include <sys/stdarg.h> /* for va_list */
|
||||
# else
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
@ -309,32 +523,31 @@ typedef uLong FAR uLongf;
|
||||
# define z_ptrdiff_t long
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__)
|
||||
# define NO_vsnprintf
|
||||
#endif
|
||||
|
||||
#if defined(__MVS__)
|
||||
# define NO_vsnprintf
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
# pragma map(deflateInit_,"DEIN")
|
||||
# pragma map(deflateInit2_,"DEIN2")
|
||||
# pragma map(deflateEnd,"DEEND")
|
||||
# pragma map(deflateBound,"DEBND")
|
||||
# pragma map(inflateInit_,"ININ")
|
||||
# pragma map(inflateInit2_,"ININ2")
|
||||
# pragma map(inflateEnd,"INEND")
|
||||
# pragma map(inflateSync,"INSY")
|
||||
# pragma map(inflateSetDictionary,"INSEDI")
|
||||
# pragma map(compressBound,"CMBND")
|
||||
# pragma map(inflate_table,"INTABL")
|
||||
# pragma map(inflate_fast,"INFA")
|
||||
# pragma map(inflate_copyright,"INCOPY")
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
||||
|
334
common/dist/zlib/zconf.in.h
vendored
334
common/dist/zlib/zconf.in.h
vendored
@ -1,334 +0,0 @@
|
||||
/* $NetBSD: zconf.in.h,v 1.1.1.1 2006/01/14 20:10:33 christos Exp $ */
|
||||
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2005 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
*/
|
||||
#ifdef Z_PREFIX
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflate z_deflate
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflate z_inflate
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# define uncompress z_uncompress
|
||||
# define adler32 z_adler32
|
||||
# define crc32 z_crc32
|
||||
# define get_crc_table z_get_crc_table
|
||||
# define zError z_zError
|
||||
|
||||
# define alloc_func z_alloc_func
|
||||
# define free_func z_free_func
|
||||
# define in_func z_in_func
|
||||
# define out_func z_out_func
|
||||
# define Byte z_Byte
|
||||
# define uInt z_uInt
|
||||
# define uLong z_uLong
|
||||
# define Bytef z_Bytef
|
||||
# define charf z_charf
|
||||
# define intf z_intf
|
||||
# define uIntf z_uIntf
|
||||
# define uLongf z_uLongf
|
||||
# define voidpf z_voidpf
|
||||
# define voidp z_voidp
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
# ifdef ZLIB_DLL
|
||||
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXTERN extern __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXTERN extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ZLIB_DLL */
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# define ZEXPORT WINAPI
|
||||
# ifdef WIN32
|
||||
# define ZEXPORTVA WINAPIV
|
||||
# else
|
||||
# define ZEXPORTVA FAR CDECL
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (__BEOS__)
|
||||
# ifdef ZLIB_DLL
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXPORT __declspec(dllexport)
|
||||
# define ZEXPORTVA __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXPORT __declspec(dllimport)
|
||||
# define ZEXPORTVA __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ZEXTERN
|
||||
# define ZEXTERN extern
|
||||
#endif
|
||||
#ifndef ZEXPORT
|
||||
# define ZEXPORT
|
||||
#endif
|
||||
#ifndef ZEXPORTVA
|
||||
# define ZEXPORTVA
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# include <unistd.h> /* for SEEK_* and off_t */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# define z_off_t off_t
|
||||
#endif
|
||||
#ifndef SEEK_SET
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__)
|
||||
# define NO_vsnprintf
|
||||
#endif
|
||||
|
||||
#if defined(__MVS__)
|
||||
# define NO_vsnprintf
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
# pragma map(deflateInit_,"DEIN")
|
||||
# pragma map(deflateInit2_,"DEIN2")
|
||||
# pragma map(deflateEnd,"DEEND")
|
||||
# pragma map(deflateBound,"DEBND")
|
||||
# pragma map(inflateInit_,"ININ")
|
||||
# pragma map(inflateInit2_,"ININ2")
|
||||
# pragma map(inflateEnd,"INEND")
|
||||
# pragma map(inflateSync,"INSY")
|
||||
# pragma map(inflateSetDictionary,"INSEDI")
|
||||
# pragma map(compressBound,"CMBND")
|
||||
# pragma map(inflate_table,"INTABL")
|
||||
# pragma map(inflate_fast,"INFA")
|
||||
# pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
1610
common/dist/zlib/zlib.h
vendored
1610
common/dist/zlib/zlib.h
vendored
File diff suppressed because it is too large
Load Diff
101
common/dist/zlib/zutil.c
vendored
101
common/dist/zlib/zutil.c
vendored
@ -1,29 +1,29 @@
|
||||
/* $NetBSD: zutil.c,v 1.2 2006/01/16 17:02:29 christos Exp $ */
|
||||
/* $NetBSD: zutil.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* zutil.c -- target dependent utility functions for the compression library
|
||||
* Copyright (C) 1995-2005 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2005, 2010, 2011, 2012, 2016 Jean-loup Gailly
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
/* @(#) $Id: zutil.c,v 1.3 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
#include "zutil.h"
|
||||
|
||||
#ifndef NO_DUMMY_DECL
|
||||
struct internal_state {int dummy;}; /* for buggy compilers */
|
||||
#ifndef Z_SOLO
|
||||
# include "gzguts.h"
|
||||
#endif
|
||||
|
||||
const char * const z_errmsg[10] = {
|
||||
"need dictionary", /* Z_NEED_DICT 2 */
|
||||
"stream end", /* Z_STREAM_END 1 */
|
||||
"", /* Z_OK 0 */
|
||||
"file error", /* Z_ERRNO (-1) */
|
||||
"stream error", /* Z_STREAM_ERROR (-2) */
|
||||
"data error", /* Z_DATA_ERROR (-3) */
|
||||
"insufficient memory", /* Z_MEM_ERROR (-4) */
|
||||
"buffer error", /* Z_BUF_ERROR (-5) */
|
||||
"incompatible version",/* Z_VERSION_ERROR (-6) */
|
||||
""};
|
||||
z_const char * const z_errmsg[10] = {
|
||||
__UNCONST("need dictionary"), /* Z_NEED_DICT 2 */
|
||||
__UNCONST("stream end"), /* Z_STREAM_END 1 */
|
||||
__UNCONST(""), /* Z_OK 0 */
|
||||
__UNCONST("file error"), /* Z_ERRNO (-1) */
|
||||
__UNCONST("stream error"), /* Z_STREAM_ERROR (-2) */
|
||||
__UNCONST("data error"), /* Z_DATA_ERROR (-3) */
|
||||
__UNCONST("insufficient memory"), /* Z_MEM_ERROR (-4) */
|
||||
__UNCONST("buffer error"), /* Z_BUF_ERROR (-5) */
|
||||
__UNCONST("incompatible version"),/* Z_VERSION_ERROR (-6) */
|
||||
__UNCONST(""),
|
||||
};
|
||||
|
||||
|
||||
const char * ZEXPORT zlibVersion()
|
||||
@ -36,25 +36,25 @@ uLong ZEXPORT zlibCompileFlags()
|
||||
uLong flags;
|
||||
|
||||
flags = 0;
|
||||
switch (sizeof(uInt)) {
|
||||
switch ((int)(sizeof(uInt))) {
|
||||
case 2: break;
|
||||
case 4: flags += 1; break;
|
||||
case 8: flags += 2; break;
|
||||
default: flags += 3;
|
||||
}
|
||||
switch (sizeof(uLong)) {
|
||||
switch ((int)(sizeof(uLong))) {
|
||||
case 2: break;
|
||||
case 4: flags += 1 << 2; break;
|
||||
case 8: flags += 2 << 2; break;
|
||||
default: flags += 3 << 2;
|
||||
}
|
||||
switch (sizeof(voidpf)) {
|
||||
switch ((int)(sizeof(voidpf))) {
|
||||
case 2: break;
|
||||
case 4: flags += 1 << 4; break;
|
||||
case 8: flags += 2 << 4; break;
|
||||
default: flags += 3 << 4;
|
||||
}
|
||||
switch (sizeof(z_off_t)) {
|
||||
switch ((int)(sizeof(z_off_t))) {
|
||||
case 2: break;
|
||||
case 4: flags += 1 << 6; break;
|
||||
case 8: flags += 2 << 6; break;
|
||||
@ -87,27 +87,27 @@ uLong ZEXPORT zlibCompileFlags()
|
||||
#ifdef FASTEST
|
||||
flags += 1L << 21;
|
||||
#endif
|
||||
#ifdef STDC
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifdef NO_vsnprintf
|
||||
flags += 1L << 25;
|
||||
flags += 1L << 25;
|
||||
# ifdef HAS_vsprintf_void
|
||||
flags += 1L << 26;
|
||||
flags += 1L << 26;
|
||||
# endif
|
||||
# else
|
||||
# ifdef HAS_vsnprintf_void
|
||||
flags += 1L << 26;
|
||||
flags += 1L << 26;
|
||||
# endif
|
||||
# endif
|
||||
#else
|
||||
flags += 1L << 24;
|
||||
flags += 1L << 24;
|
||||
# ifdef NO_snprintf
|
||||
flags += 1L << 25;
|
||||
flags += 1L << 25;
|
||||
# ifdef HAS_sprintf_void
|
||||
flags += 1L << 26;
|
||||
flags += 1L << 26;
|
||||
# endif
|
||||
# else
|
||||
# ifdef HAS_snprintf_void
|
||||
flags += 1L << 26;
|
||||
flags += 1L << 26;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
@ -115,13 +115,13 @@ uLong ZEXPORT zlibCompileFlags()
|
||||
}
|
||||
|
||||
#ifdef ZLIB_DEBUG
|
||||
|
||||
#include <stdlib.h>
|
||||
# ifndef verbose
|
||||
# define verbose 0
|
||||
# endif
|
||||
int z_verbose = verbose;
|
||||
int ZLIB_INTERNAL z_verbose = verbose;
|
||||
|
||||
void z_error (m)
|
||||
void ZLIB_INTERNAL z_error (m)
|
||||
char *m;
|
||||
{
|
||||
fprintf(stderr, "%s\n", m);
|
||||
@ -148,7 +148,7 @@ const char * ZEXPORT zError(err)
|
||||
|
||||
#ifndef HAVE_MEMCPY
|
||||
|
||||
void zmemcpy(dest, source, len)
|
||||
void ZLIB_INTERNAL zmemcpy(dest, source, len)
|
||||
Bytef* dest;
|
||||
const Bytef* source;
|
||||
uInt len;
|
||||
@ -159,7 +159,7 @@ void zmemcpy(dest, source, len)
|
||||
} while (--len != 0);
|
||||
}
|
||||
|
||||
int zmemcmp(s1, s2, len)
|
||||
int ZLIB_INTERNAL zmemcmp(s1, s2, len)
|
||||
const Bytef* s1;
|
||||
const Bytef* s2;
|
||||
uInt len;
|
||||
@ -172,7 +172,7 @@ int zmemcmp(s1, s2, len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void zmemzero(dest, len)
|
||||
void ZLIB_INTERNAL zmemzero(dest, len)
|
||||
Bytef* dest;
|
||||
uInt len;
|
||||
{
|
||||
@ -183,6 +183,7 @@ void zmemzero(dest, len)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef Z_SOLO
|
||||
|
||||
#ifdef SYS16BIT
|
||||
|
||||
@ -215,11 +216,13 @@ local ptr_table table[MAX_PTR];
|
||||
* a protected system like OS/2. Use Microsoft C instead.
|
||||
*/
|
||||
|
||||
voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
|
||||
voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
|
||||
{
|
||||
voidpf buf = opaque; /* just to make some compilers happy */
|
||||
voidpf buf;
|
||||
ulg bsize = (ulg)items*size;
|
||||
|
||||
(void)opaque;
|
||||
|
||||
/* If we allocate less than 65520 bytes, we assume that farmalloc
|
||||
* will return a usable pointer which doesn't have to be normalized.
|
||||
*/
|
||||
@ -239,9 +242,12 @@ voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
|
||||
return buf;
|
||||
}
|
||||
|
||||
void zcfree (voidpf opaque, voidpf ptr)
|
||||
void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
|
||||
{
|
||||
int n;
|
||||
|
||||
(void)opaque;
|
||||
|
||||
if (*(ush*)&ptr != 0) { /* object < 64K */
|
||||
farfree(ptr);
|
||||
return;
|
||||
@ -257,7 +263,6 @@ void zcfree (voidpf opaque, voidpf ptr)
|
||||
next_ptr--;
|
||||
return;
|
||||
}
|
||||
ptr = opaque; /* just to make some compilers happy */
|
||||
Assert(0, "zcfree: ptr not found");
|
||||
}
|
||||
|
||||
@ -274,15 +279,15 @@ void zcfree (voidpf opaque, voidpf ptr)
|
||||
# define _hfree hfree
|
||||
#endif
|
||||
|
||||
voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
|
||||
voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
|
||||
{
|
||||
if (opaque) opaque = 0; /* to make compiler happy */
|
||||
(void)opaque;
|
||||
return _halloc((long)items, size);
|
||||
}
|
||||
|
||||
void zcfree (voidpf opaque, voidpf ptr)
|
||||
void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
|
||||
{
|
||||
if (opaque) opaque = 0; /* to make compiler happy */
|
||||
(void)opaque;
|
||||
_hfree(ptr);
|
||||
}
|
||||
|
||||
@ -299,22 +304,24 @@ extern voidp calloc OF((uInt items, uInt size));
|
||||
extern void free OF((voidpf ptr));
|
||||
#endif
|
||||
|
||||
voidpf zcalloc (opaque, items, size)
|
||||
voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
|
||||
voidpf opaque;
|
||||
unsigned items;
|
||||
unsigned size;
|
||||
{
|
||||
if (opaque) items += size - size; /* make compiler happy */
|
||||
(void)opaque;
|
||||
return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) :
|
||||
(voidpf)calloc(items, size);
|
||||
}
|
||||
|
||||
void zcfree (opaque, ptr)
|
||||
void ZLIB_INTERNAL zcfree (opaque, ptr)
|
||||
voidpf opaque;
|
||||
voidpf ptr;
|
||||
{
|
||||
(void)opaque;
|
||||
free(ptr);
|
||||
if (opaque) return; /* make compiler happy */
|
||||
}
|
||||
|
||||
#endif /* MY_ZCALLOC */
|
||||
|
||||
#endif /* !Z_SOLO */
|
||||
|
213
common/dist/zlib/zutil.h
vendored
213
common/dist/zlib/zutil.h
vendored
@ -1,7 +1,7 @@
|
||||
/* $NetBSD: zutil.h,v 1.4 2006/01/27 00:45:27 christos Exp $ */
|
||||
/* $NetBSD: zutil.h,v 1.5 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
/* zutil.h -- internal interface and configuration of the compression library
|
||||
* Copyright (C) 1995-2005 Jean-loup Gailly.
|
||||
* Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
@ -10,48 +10,41 @@
|
||||
subject to change. Applications should only use zlib.h.
|
||||
*/
|
||||
|
||||
/* @(#) Id */
|
||||
/* @(#) $Id: zutil.h,v 1.5 2017/01/10 01:27:41 christos Exp $ */
|
||||
|
||||
#ifndef ZUTIL_H
|
||||
#define ZUTIL_H
|
||||
|
||||
#define ZLIB_INTERNAL
|
||||
#ifdef HAVE_HIDDEN
|
||||
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
||||
#else
|
||||
# define ZLIB_INTERNAL
|
||||
#endif
|
||||
|
||||
#include "zlib.h"
|
||||
|
||||
#if defined(__NetBSD__) && (defined(_KERNEL) || defined(_STANDALONE))
|
||||
|
||||
/* XXX doesn't seem to need anything at all, but this is for consistency. */
|
||||
# include <lib/libkern/libkern.h>
|
||||
|
||||
#else
|
||||
#ifdef STDC
|
||||
# ifndef _WIN32_WCE
|
||||
# include <stddef.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
#ifdef NO_ERRNO_H
|
||||
# ifdef _WIN32_WCE
|
||||
/* The Microsoft C Run-Time Library for Windows CE doesn't have
|
||||
* errno. We define it as a global variable to simplify porting.
|
||||
* Its value is always 0 and should not be used. We rename it to
|
||||
* avoid conflict with other libraries that use the same workaround.
|
||||
*/
|
||||
# define errno z_errno
|
||||
# endif
|
||||
extern int errno;
|
||||
#else
|
||||
# ifndef _WIN32_WCE
|
||||
# include <errno.h>
|
||||
#if defined(STDC) && !defined(Z_SOLO)
|
||||
# if defined(_KERNEL) || defined(_STANDALONE)
|
||||
# include <lib/libkern/libkern.h>
|
||||
# else
|
||||
# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
|
||||
# include <stddef.h>
|
||||
# endif
|
||||
# include <string.h>
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
#endif
|
||||
#endif /* __NetBSD__ && (_KERNEL || _STANDALONE) */
|
||||
|
||||
#ifdef Z_SOLO
|
||||
typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */
|
||||
#endif
|
||||
|
||||
#ifndef local
|
||||
# define local static
|
||||
#endif
|
||||
/* compile with -Dlocal if your debugger can't find static symbols */
|
||||
/* since "static" is used to mean two completely different things in C, we
|
||||
define "local" for the non-static meaning of "static", for readability
|
||||
(compile with -Dlocal if your debugger can't find static symbols) */
|
||||
|
||||
typedef unsigned char uch;
|
||||
typedef uch FAR uchf;
|
||||
@ -59,7 +52,7 @@ typedef unsigned short ush;
|
||||
typedef ush FAR ushf;
|
||||
typedef unsigned long ulg;
|
||||
|
||||
extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
/* (size given to avoid silly warnings with Visual C++) */
|
||||
|
||||
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
|
||||
@ -97,70 +90,90 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
|
||||
#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
|
||||
# define OS_CODE 0x00
|
||||
# if defined(__TURBOC__) || defined(__BORLANDC__)
|
||||
# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
|
||||
/* Allow compilation with ANSI keywords only enabled */
|
||||
void _Cdecl farfree( void *block );
|
||||
void *_Cdecl farmalloc( unsigned long nbytes );
|
||||
# else
|
||||
# include <alloc.h>
|
||||
# ifndef Z_SOLO
|
||||
# if defined(__TURBOC__) || defined(__BORLANDC__)
|
||||
# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
|
||||
/* Allow compilation with ANSI keywords only enabled */
|
||||
void _Cdecl farfree( void *block );
|
||||
void *_Cdecl farmalloc( unsigned long nbytes );
|
||||
# else
|
||||
# include <alloc.h>
|
||||
# endif
|
||||
# else /* MSC or DJGPP */
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
# else /* MSC or DJGPP */
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef AMIGA
|
||||
# define OS_CODE 0x01
|
||||
# define OS_CODE 1
|
||||
#endif
|
||||
|
||||
#if defined(VAXC) || defined(VMS)
|
||||
# define OS_CODE 0x02
|
||||
# define OS_CODE 2
|
||||
# define F_OPEN(name, mode) \
|
||||
fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512")
|
||||
#endif
|
||||
|
||||
#ifdef __370__
|
||||
# if __TARGET_LIB__ < 0x20000000
|
||||
# define OS_CODE 4
|
||||
# elif __TARGET_LIB__ < 0x40000000
|
||||
# define OS_CODE 11
|
||||
# else
|
||||
# define OS_CODE 8
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ATARI) || defined(atarist)
|
||||
# define OS_CODE 0x05
|
||||
# define OS_CODE 5
|
||||
#endif
|
||||
|
||||
#ifdef OS2
|
||||
# define OS_CODE 0x06
|
||||
# ifdef M_I86
|
||||
#include <malloc.h>
|
||||
# define OS_CODE 6
|
||||
# if defined(M_I86) && !defined(Z_SOLO)
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(MACOS) || defined(TARGET_OS_MAC)
|
||||
# define OS_CODE 0x07
|
||||
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
||||
# include <unix.h> /* for fdopen */
|
||||
# else
|
||||
# ifndef fdopen
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# define OS_CODE 7
|
||||
# ifndef Z_SOLO
|
||||
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
||||
# include <unix.h> /* for fdopen */
|
||||
# else
|
||||
# ifndef fdopen
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef TOPS20
|
||||
# define OS_CODE 0x0a
|
||||
#ifdef __acorn
|
||||
# define OS_CODE 13
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
|
||||
# define OS_CODE 0x0b
|
||||
# endif
|
||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||
# define OS_CODE 10
|
||||
#endif
|
||||
|
||||
#ifdef __50SERIES /* Prime/PRIMOS */
|
||||
# define OS_CODE 0x0f
|
||||
#ifdef _BEOS_
|
||||
# define OS_CODE 16
|
||||
#endif
|
||||
|
||||
#ifdef __TOS_OS400__
|
||||
# define OS_CODE 18
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
# define OS_CODE 19
|
||||
#endif
|
||||
|
||||
#if defined(_BEOS_) || defined(RISCOS)
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER > 600))
|
||||
#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
|
||||
# if defined(_WIN32_WCE)
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# ifndef _PTRDIFF_T_DEFINED
|
||||
@ -172,10 +185,23 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && !defined(MSDOS)
|
||||
#pragma warn -8004
|
||||
#pragma warn -8008
|
||||
#pragma warn -8066
|
||||
#endif
|
||||
|
||||
/* provide prototypes for these when building zlib without LFS */
|
||||
#if !defined(_WIN32) && \
|
||||
(!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0)
|
||||
ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
|
||||
ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
|
||||
#endif
|
||||
|
||||
/* common defaults */
|
||||
|
||||
#ifndef OS_CODE
|
||||
# define OS_CODE 0x03 /* assume Unix */
|
||||
# define OS_CODE 3 /* assume Unix */
|
||||
#endif
|
||||
|
||||
#ifndef F_OPEN
|
||||
@ -184,40 +210,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
|
||||
/* functions */
|
||||
|
||||
#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550)
|
||||
# ifndef HAVE_VSNPRINTF
|
||||
# define HAVE_VSNPRINTF
|
||||
# endif
|
||||
#endif
|
||||
#if defined(__CYGWIN__)
|
||||
# ifndef HAVE_VSNPRINTF
|
||||
# define HAVE_VSNPRINTF
|
||||
# endif
|
||||
#endif
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
# ifdef MSDOS
|
||||
/* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
|
||||
but for now we just assume it doesn't. */
|
||||
# define NO_vsnprintf
|
||||
# endif
|
||||
# ifdef __TURBOC__
|
||||
# define NO_vsnprintf
|
||||
# endif
|
||||
# ifdef WIN32
|
||||
/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
|
||||
# if !defined(vsnprintf) && !defined(NO_vsnprintf)
|
||||
# define vsnprintf _vsnprintf
|
||||
# endif
|
||||
# endif
|
||||
# ifdef __SASC
|
||||
# define NO_vsnprintf
|
||||
# endif
|
||||
#endif
|
||||
#ifdef VMS
|
||||
# define NO_vsnprintf
|
||||
#endif
|
||||
|
||||
#if defined(pyr)
|
||||
#if defined(pyr) || defined(Z_SOLO)
|
||||
# define NO_MEMCPY
|
||||
#endif
|
||||
#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__)
|
||||
@ -241,16 +234,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
# define zmemzero(dest, len) memset(dest, 0, len)
|
||||
# endif
|
||||
#else
|
||||
extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
|
||||
extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
|
||||
extern void zmemzero OF((Bytef* dest, uInt len));
|
||||
void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
|
||||
int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
|
||||
void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
|
||||
#endif
|
||||
|
||||
/* Diagnostic functions */
|
||||
#if defined(ZLIB_DEBUG) && !(defined(_KERNEL) || defined(_STANDALONE))
|
||||
#ifdef ZLIB_DEBUG
|
||||
# include <stdio.h>
|
||||
extern int z_verbose;
|
||||
extern void z_error OF((char *m));
|
||||
extern int ZLIB_INTERNAL z_verbose;
|
||||
extern void ZLIB_INTERNAL z_error OF((char *m));
|
||||
# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
|
||||
# define Trace(x) {if (z_verbose>=0) fprintf x ;}
|
||||
# define Tracev(x) {if (z_verbose>0) fprintf x ;}
|
||||
@ -266,13 +259,19 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
# define Tracecv(c,x)
|
||||
#endif
|
||||
|
||||
|
||||
voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
|
||||
void zcfree OF((voidpf opaque, voidpf ptr));
|
||||
#ifndef Z_SOLO
|
||||
voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
|
||||
unsigned size));
|
||||
void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
|
||||
#endif
|
||||
|
||||
#define ZALLOC(strm, items, size) \
|
||||
(*((strm)->zalloc))((strm)->opaque, (items), (size))
|
||||
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
|
||||
#define TRY_FREE(s, p) {if (p) ZFREE(s, p);}
|
||||
|
||||
/* Reverse the bytes in a 32-bit value */
|
||||
#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \
|
||||
(((q) & 0xff00) << 8) + (((q) & 0xff) << 24))
|
||||
|
||||
#endif /* ZUTIL_H */
|
||||
|
Loading…
Reference in New Issue
Block a user