diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:34:30 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:34:30 -0700 |
commit | 7147f24cd7b27dd95f6e841851a111cb311a9c07 (patch) | |
tree | 1492bbbb8828513c8ad129adff414b2ba724aa03 /contrib | |
parent | 05d47d2627a68a15ba23fb10b17fbc73551aeec1 (diff) | |
download | zlib-1.2.4.2.tar.gz zlib-1.2.4.2.tar.bz2 zlib-1.2.4.2.zip |
zlib 1.2.4.2v1.2.4.2
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/delphi/ZLib.pas | 2 | ||||
-rw-r--r-- | contrib/dotzlib/DotZLib/UnitTests.cs | 2 | ||||
-rw-r--r-- | contrib/infback9/inftree9.c | 4 | ||||
-rw-r--r-- | contrib/masmx64/readme.txt | 8 | ||||
-rw-r--r-- | contrib/masmx86/readme.txt | 52 | ||||
-rw-r--r-- | contrib/pascal/zlibpas.pas | 2 | ||||
-rw-r--r-- | contrib/puff/puff.c | 29 | ||||
-rw-r--r-- | contrib/puff/puff.h | 4 | ||||
-rw-r--r-- | contrib/vstudio/vc10/zlib.rc | 6 | ||||
-rw-r--r-- | contrib/vstudio/vc9/zlib.rc | 6 |
10 files changed, 64 insertions, 51 deletions
diff --git a/contrib/delphi/ZLib.pas b/contrib/delphi/ZLib.pas index 03450e7..72ef99f 100644 --- a/contrib/delphi/ZLib.pas +++ b/contrib/delphi/ZLib.pas | |||
@@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer; | |||
152 | const OutBuf: Pointer; BufSize: Integer); | 152 | const OutBuf: Pointer; BufSize: Integer); |
153 | 153 | ||
154 | const | 154 | const |
155 | zlib_version = '1.2.4.1'; | 155 | zlib_version = '1.2.4.2'; |
156 | 156 | ||
157 | type | 157 | type |
158 | EZlibError = class(Exception); | 158 | EZlibError = class(Exception); |
diff --git a/contrib/dotzlib/DotZLib/UnitTests.cs b/contrib/dotzlib/DotZLib/UnitTests.cs index 82c749e..6cfdaa7 100644 --- a/contrib/dotzlib/DotZLib/UnitTests.cs +++ b/contrib/dotzlib/DotZLib/UnitTests.cs | |||
@@ -156,7 +156,7 @@ namespace DotZLibTests | |||
156 | public void Info_Version() | 156 | public void Info_Version() |
157 | { | 157 | { |
158 | Info info = new Info(); | 158 | Info info = new Info(); |
159 | Assert.AreEqual("1.2.4.1", Info.Version); | 159 | Assert.AreEqual("1.2.4.2", Info.Version); |
160 | Assert.AreEqual(32, info.SizeOfUInt); | 160 | Assert.AreEqual(32, info.SizeOfUInt); |
161 | Assert.AreEqual(32, info.SizeOfULong); | 161 | Assert.AreEqual(32, info.SizeOfULong); |
162 | Assert.AreEqual(32, info.SizeOfPointer); | 162 | Assert.AreEqual(32, info.SizeOfPointer); |
diff --git a/contrib/infback9/inftree9.c b/contrib/infback9/inftree9.c index e898893..362008c 100644 --- a/contrib/infback9/inftree9.c +++ b/contrib/infback9/inftree9.c | |||
@@ -9,7 +9,7 @@ | |||
9 | #define MAXBITS 15 | 9 | #define MAXBITS 15 |
10 | 10 | ||
11 | const char inflate9_copyright[] = | 11 | const char inflate9_copyright[] = |
12 | " inflate9 1.2.4.1 Copyright 1995-2010 Mark Adler "; | 12 | " inflate9 1.2.4.2 Copyright 1995-2010 Mark Adler "; |
13 | /* | 13 | /* |
14 | If you use the zlib library in a product, an acknowledgment is welcome | 14 | If you use the zlib library in a product, an acknowledgment is welcome |
15 | in the documentation of your product. If for some reason you cannot | 15 | in the documentation of your product. If for some reason you cannot |
@@ -64,7 +64,7 @@ unsigned short FAR *work; | |||
64 | static const unsigned short lext[31] = { /* Length codes 257..285 extra */ | 64 | static const unsigned short lext[31] = { /* Length codes 257..285 extra */ |
65 | 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, | 65 | 128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129, |
66 | 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, | 66 | 130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132, |
67 | 133, 133, 133, 133, 144, 67, 206}; | 67 | 133, 133, 133, 133, 144, 202, 75}; |
68 | static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ | 68 | static const unsigned short dbase[32] = { /* Distance codes 0..31 base */ |
69 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, | 69 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, |
70 | 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, | 70 | 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, |
diff --git a/contrib/masmx64/readme.txt b/contrib/masmx64/readme.txt index 1115d9b..2da6733 100644 --- a/contrib/masmx64/readme.txt +++ b/contrib/masmx64/readme.txt | |||
@@ -12,10 +12,10 @@ inffasx64.asm and inffas8664.c were written by Chris Anderson, by optimizing | |||
12 | 12 | ||
13 | Use instructions | 13 | Use instructions |
14 | ---------------- | 14 | ---------------- |
15 | Assemble the .asm files using MASM and put the object files into the zlib source | 15 | Assemble the .asm files using MASM and put the object files into the zlib source |
16 | directory. You can also get object files here: | 16 | directory. You can also get object files here: |
17 | 17 | ||
18 | http://www.winimage.com/zLibDll/zlib124_masm_obj.zip | 18 | http://www.winimage.com/zLibDll/zlib124_masm_obj.zip |
19 | 19 | ||
20 | define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, | 20 | define ASMV and ASMINF in your project. Include inffas8664.c in your source tree, |
21 | and inffasx64.obj and gvmat64.obj as object to link. | 21 | and inffasx64.obj and gvmat64.obj as object to link. |
diff --git a/contrib/masmx86/readme.txt b/contrib/masmx86/readme.txt index 90230f2..3271f72 100644 --- a/contrib/masmx86/readme.txt +++ b/contrib/masmx86/readme.txt | |||
@@ -1,27 +1,27 @@ | |||
1 | 1 | ||
2 | Summary | 2 | Summary |
3 | ------- | 3 | ------- |
4 | This directory contains ASM implementations of the functions | 4 | This directory contains ASM implementations of the functions |
5 | longest_match() and inflate_fast(). | 5 | longest_match() and inflate_fast(). |
6 | 6 | ||
7 | 7 | ||
8 | Use instructions | 8 | Use instructions |
9 | ---------------- | 9 | ---------------- |
10 | Assemble using MASM, and copy the object files into the zlib source | 10 | Assemble using MASM, and copy the object files into the zlib source |
11 | directory, then run the appropriate makefile, as suggested below. You can | 11 | directory, then run the appropriate makefile, as suggested below. You can |
12 | donwload MASM from here: | 12 | donwload MASM from here: |
13 | 13 | ||
14 | http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 | 14 | http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64 |
15 | 15 | ||
16 | You can also get objects files here: | 16 | You can also get objects files here: |
17 | 17 | ||
18 | http://www.winimage.com/zLibDll/zlib124_masm_obj.zip | 18 | http://www.winimage.com/zLibDll/zlib124_masm_obj.zip |
19 | 19 | ||
20 | Build instructions | 20 | Build instructions |
21 | ------------------ | 21 | ------------------ |
22 | * With Microsoft C and MASM: | 22 | * With Microsoft C and MASM: |
23 | nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" | 23 | nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" |
24 | 24 | ||
25 | * With Borland C and TASM: | 25 | * With Borland C and TASM: |
26 | make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" | 26 | make -f win32/Makefile.bor LOCAL_ZLIB="-DASMV -DASMINF" OBJA="match686.obj inffas32.obj" OBJPA="+match686c.obj+match686.obj+inffas32.obj" |
27 | 27 | ||
diff --git a/contrib/pascal/zlibpas.pas b/contrib/pascal/zlibpas.pas index 9772f11..e0bc74b 100644 --- a/contrib/pascal/zlibpas.pas +++ b/contrib/pascal/zlibpas.pas | |||
@@ -10,7 +10,7 @@ unit zlibpas; | |||
10 | interface | 10 | interface |
11 | 11 | ||
12 | const | 12 | const |
13 | ZLIB_VERSION = '1.2.4.1'; | 13 | ZLIB_VERSION = '1.2.4.2'; |
14 | 14 | ||
15 | type | 15 | type |
16 | alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; | 16 | alloc_func = function(opaque: Pointer; items, size: Integer): Pointer; |
diff --git a/contrib/puff/puff.c b/contrib/puff/puff.c index df5b79f..650694e 100644 --- a/contrib/puff/puff.c +++ b/contrib/puff/puff.c | |||
@@ -1,8 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | * puff.c | 2 | * puff.c |
3 | * Copyright (C) 2002-2008 Mark Adler | 3 | * Copyright (C) 2002-2010 Mark Adler |
4 | * For conditions of distribution and use, see copyright notice in puff.h | 4 | * For conditions of distribution and use, see copyright notice in puff.h |
5 | * version 2.0, 25 Jul 2008 | 5 | * version 2.1, 4 Apr 2010 |
6 | * | 6 | * |
7 | * puff.c is a simple inflate written to be an unambiguous way to specify the | 7 | * puff.c is a simple inflate written to be an unambiguous way to specify the |
8 | * deflate format. It is not written for speed but rather simplicity. As a | 8 | * deflate format. It is not written for speed but rather simplicity. As a |
@@ -67,6 +67,8 @@ | |||
67 | * - Add option in TEST code for puff to write the data | 67 | * - Add option in TEST code for puff to write the data |
68 | * - Add option in TEST code to skip input bytes | 68 | * - Add option in TEST code to skip input bytes |
69 | * - Allow TEST code to read from piped stdin | 69 | * - Allow TEST code to read from piped stdin |
70 | * 2.1 4 Apr 2010 - Avoid variable initialization for happier compilers | ||
71 | * - Avoid unsigned comparisons for even happier compilers | ||
70 | */ | 72 | */ |
71 | 73 | ||
72 | #include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ | 74 | #include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ |
@@ -516,8 +518,7 @@ local int fixed(struct state *s) | |||
516 | static int virgin = 1; | 518 | static int virgin = 1; |
517 | static short lencnt[MAXBITS+1], lensym[FIXLCODES]; | 519 | static short lencnt[MAXBITS+1], lensym[FIXLCODES]; |
518 | static short distcnt[MAXBITS+1], distsym[MAXDCODES]; | 520 | static short distcnt[MAXBITS+1], distsym[MAXDCODES]; |
519 | static struct huffman lencode = {lencnt, lensym}; | 521 | static struct huffman lencode, distcode; |
520 | static struct huffman distcode = {distcnt, distsym}; | ||
521 | 522 | ||
522 | /* build fixed huffman tables if first call (may not be thread safe) */ | 523 | /* build fixed huffman tables if first call (may not be thread safe) */ |
523 | if (virgin) { | 524 | if (virgin) { |
@@ -540,6 +541,12 @@ local int fixed(struct state *s) | |||
540 | lengths[symbol] = 5; | 541 | lengths[symbol] = 5; |
541 | construct(&distcode, lengths, MAXDCODES); | 542 | construct(&distcode, lengths, MAXDCODES); |
542 | 543 | ||
544 | /* construct lencode and distcode */ | ||
545 | lencode.count = lencnt; | ||
546 | lencode.symbol = lensym; | ||
547 | distcode.count = distcnt; | ||
548 | distcode.symbol = distsym; | ||
549 | |||
543 | /* do this just once */ | 550 | /* do this just once */ |
544 | virgin = 0; | 551 | virgin = 0; |
545 | } | 552 | } |
@@ -643,11 +650,16 @@ local int dynamic(struct state *s) | |||
643 | short lengths[MAXCODES]; /* descriptor code lengths */ | 650 | short lengths[MAXCODES]; /* descriptor code lengths */ |
644 | short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */ | 651 | short lencnt[MAXBITS+1], lensym[MAXLCODES]; /* lencode memory */ |
645 | short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */ | 652 | short distcnt[MAXBITS+1], distsym[MAXDCODES]; /* distcode memory */ |
646 | struct huffman lencode = {lencnt, lensym}; /* length code */ | 653 | struct huffman lencode, distcode; /* length and distance codes */ |
647 | struct huffman distcode = {distcnt, distsym}; /* distance code */ | ||
648 | static const short order[19] = /* permutation of code length codes */ | 654 | static const short order[19] = /* permutation of code length codes */ |
649 | {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; | 655 | {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; |
650 | 656 | ||
657 | /* construct lencode and distcode */ | ||
658 | lencode.count = lencnt; | ||
659 | lencode.symbol = lensym; | ||
660 | distcode.count = distcnt; | ||
661 | distcode.symbol = distsym; | ||
662 | |||
651 | /* get number of lengths in each table, check lengths */ | 663 | /* get number of lengths in each table, check lengths */ |
652 | nlen = bits(s, 5) + 257; | 664 | nlen = bits(s, 5) + 257; |
653 | ndist = bits(s, 5) + 1; | 665 | ndist = bits(s, 5) + 1; |
@@ -869,7 +881,8 @@ local void *load(char *name, size_t *len) | |||
869 | 881 | ||
870 | int main(int argc, char **argv) | 882 | int main(int argc, char **argv) |
871 | { | 883 | { |
872 | int ret, skip = 0, put = 0; | 884 | int ret, put = 0; |
885 | unsigned skip = 0; | ||
873 | char *arg, *name = NULL; | 886 | char *arg, *name = NULL; |
874 | unsigned char *source = NULL, *dest; | 887 | unsigned char *source = NULL, *dest; |
875 | size_t len = 0; | 888 | size_t len = 0; |
@@ -881,7 +894,7 @@ int main(int argc, char **argv) | |||
881 | if (arg[1] == 'w' && arg[2] == 0) | 894 | if (arg[1] == 'w' && arg[2] == 0) |
882 | put = 1; | 895 | put = 1; |
883 | else if (arg[1] >= '0' && arg[1] <= '9') | 896 | else if (arg[1] >= '0' && arg[1] <= '9') |
884 | skip = atoi(arg + 1); | 897 | skip = (unsigned)atoi(arg + 1); |
885 | else { | 898 | else { |
886 | fprintf(stderr, "invalid option %s\n", arg); | 899 | fprintf(stderr, "invalid option %s\n", arg); |
887 | return 3; | 900 | return 3; |
diff --git a/contrib/puff/puff.h b/contrib/puff/puff.h index 8d7f5f8..88d1b38 100644 --- a/contrib/puff/puff.h +++ b/contrib/puff/puff.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* puff.h | 1 | /* puff.h |
2 | Copyright (C) 2002-2008 Mark Adler, all rights reserved | 2 | Copyright (C) 2002-2010 Mark Adler, all rights reserved |
3 | version 1.9, 10 Jan 2008 | 3 | version 2.1, 4 Apr 2010 |
4 | 4 | ||
5 | This software is provided 'as-is', without any express or implied | 5 | This software is provided 'as-is', without any express or implied |
6 | warranty. In no event will the author be held liable for any damages | 6 | warranty. In no event will the author be held liable for any damages |
diff --git a/contrib/vstudio/vc10/zlib.rc b/contrib/vstudio/vc10/zlib.rc index d6b9991..38615f0 100644 --- a/contrib/vstudio/vc10/zlib.rc +++ b/contrib/vstudio/vc10/zlib.rc | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | #define IDR_VERSION1 1 | 3 | #define IDR_VERSION1 1 |
4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE | 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE |
5 | FILEVERSION 1,2,4,1 | 5 | FILEVERSION 1,2,4,2 |
6 | PRODUCTVERSION 1,2,4,1 | 6 | PRODUCTVERSION 1,2,4,2 |
7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK |
8 | FILEFLAGS 0 | 8 | FILEFLAGS 0 |
9 | FILEOS VOS_DOS_WINDOWS32 | 9 | FILEOS VOS_DOS_WINDOWS32 |
@@ -17,7 +17,7 @@ BEGIN | |||
17 | 17 | ||
18 | BEGIN | 18 | BEGIN |
19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" | 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" |
20 | VALUE "FileVersion", "1.2.4.1\0" | 20 | VALUE "FileVersion", "1.2.4.2\0" |
21 | VALUE "InternalName", "zlib\0" | 21 | VALUE "InternalName", "zlib\0" |
22 | VALUE "OriginalFilename", "zlib.dll\0" | 22 | VALUE "OriginalFilename", "zlib.dll\0" |
23 | VALUE "ProductName", "ZLib.DLL\0" | 23 | VALUE "ProductName", "ZLib.DLL\0" |
diff --git a/contrib/vstudio/vc9/zlib.rc b/contrib/vstudio/vc9/zlib.rc index d6b9991..38615f0 100644 --- a/contrib/vstudio/vc9/zlib.rc +++ b/contrib/vstudio/vc9/zlib.rc | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | #define IDR_VERSION1 1 | 3 | #define IDR_VERSION1 1 |
4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE | 4 | IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE |
5 | FILEVERSION 1,2,4,1 | 5 | FILEVERSION 1,2,4,2 |
6 | PRODUCTVERSION 1,2,4,1 | 6 | PRODUCTVERSION 1,2,4,2 |
7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | 7 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK |
8 | FILEFLAGS 0 | 8 | FILEFLAGS 0 |
9 | FILEOS VOS_DOS_WINDOWS32 | 9 | FILEOS VOS_DOS_WINDOWS32 |
@@ -17,7 +17,7 @@ BEGIN | |||
17 | 17 | ||
18 | BEGIN | 18 | BEGIN |
19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" | 19 | VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0" |
20 | VALUE "FileVersion", "1.2.4.1\0" | 20 | VALUE "FileVersion", "1.2.4.2\0" |
21 | VALUE "InternalName", "zlib\0" | 21 | VALUE "InternalName", "zlib\0" |
22 | VALUE "OriginalFilename", "zlib.dll\0" | 22 | VALUE "OriginalFilename", "zlib.dll\0" |
23 | VALUE "ProductName", "ZLib.DLL\0" | 23 | VALUE "ProductName", "ZLib.DLL\0" |