diff options
50 files changed, 3641 insertions, 495 deletions
@@ -1,6 +1,66 @@ | |||
1 | 1 | ||
2 | ChangeLog file for zlib | 2 | ChangeLog file for zlib |
3 | 3 | ||
4 | Changes in 1.2.3.1 (16 August 2006) | ||
5 | - Add watcom directory with OpenWatcom make files [Daniel] | ||
6 | - Remove #undef of FAR in zconf.in.h for MVS [Fedtke] | ||
7 | - Update make_vms.com [Zinser] | ||
8 | - Use -fPIC for shared build in configure [Teredesai, Nicholson] | ||
9 | - Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen] | ||
10 | - Use fdopen() (not _fdopen()) for Interix in zutil.h [BŠck] | ||
11 | - Add some FAQ entries about the contrib directory | ||
12 | - Update the MVS question in the FAQ | ||
13 | - Avoid extraneous reads after EOF in gzio.c [Brown] | ||
14 | - Correct spelling of "successfully" in gzio.c [Randers-Pehrson] | ||
15 | - Add comments to zlib.h about gzerror() usage [Brown] | ||
16 | - Set extra flags in gzip header in gzopen() like deflate() does | ||
17 | - Make configure options more compatible with double-dash conventions | ||
18 | [Weigelt] | ||
19 | - Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen] | ||
20 | - Fix uninstall target in Makefile.in [Truta] | ||
21 | - Add pkgconfig support [Weigelt] | ||
22 | - Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt] | ||
23 | - Replace set_data_type() with a more accurate detect_data_type() in | ||
24 | trees.c, according to the txtvsbin.txt document [Truta] | ||
25 | - Swap the order of #include <stdio.h> and #include "zlib.h" in | ||
26 | gzio.c, example.c and minigzip.c [Truta] | ||
27 | - Shut up annoying VS2005 warnings about standard C deprecation [Rowe, | ||
28 | Truta] (where?) | ||
29 | - Fix target "clean" from win32/Makefile.bor [Truta] | ||
30 | - Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe] | ||
31 | - Update zlib www home address in win32/DLL_FAQ.txt [Truta] | ||
32 | - Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove] | ||
33 | - Enable browse info in the "Debug" and "ASM Debug" configurations in | ||
34 | the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta] | ||
35 | - Add pkgconfig support [Weigelt] | ||
36 | - Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h, | ||
37 | for use in win32/zlib1.rc [Polushin, Rowe, Truta] | ||
38 | - Add a document that explains the new text detection scheme to | ||
39 | doc/txtvsbin.txt [Truta] | ||
40 | - Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta] | ||
41 | - Move algorithm.txt into doc/ [Truta] | ||
42 | - Synchronize FAQ with website | ||
43 | - Fix compressBound(), was low for some pathological cases [Fearnley] | ||
44 | - Take into account wrapper variations in deflateBound() | ||
45 | - Set examples/zpipe.c input and output to binary mode for Windows | ||
46 | - Update examples/zlib_how.html with new zpipe.c (also web site) | ||
47 | - Fix some warnings in examples/gzlog.c and examples/zran.c (it seems | ||
48 | that gcc became pickier in 4.0) | ||
49 | - Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain | ||
50 | un-versioned, the patch adds versioning only for symbols introduced in | ||
51 | zlib-1.2.0 or later. It also declares as local those symbols which are | ||
52 | not designed to be exported." [Levin] | ||
53 | - Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure | ||
54 | - Do not initialize global static by default in trees.c, add a response | ||
55 | NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess] | ||
56 | - Don't use strerror() in gzio.c under WinCE [Yakimov] | ||
57 | - Don't use errno.h in zutil.h under WinCE [Yakimov] | ||
58 | - Move arguments for AR to its usage to allow replacing ar [Marot] | ||
59 | - Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson] | ||
60 | - Improve inflateInit() and inflateInit2() documentation | ||
61 | - Fix structure size comment in inflate.h | ||
62 | - Change configure help option from --h* to --help [Santos] | ||
63 | |||
4 | Changes in 1.2.3 (18 July 2005) | 64 | Changes in 1.2.3 (18 July 2005) |
5 | - Apply security vulnerability fixes to contrib/infback9 as well | 65 | - Apply security vulnerability fixes to contrib/infback9 as well |
6 | - Clean up some text files (carriage returns, trailing space) | 66 | - Clean up some text files (carriage returns, trailing space) |
@@ -77,7 +77,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html | |||
77 | 77 | ||
78 | 11. Can zlib handle .zip archives? | 78 | 11. Can zlib handle .zip archives? |
79 | 79 | ||
80 | Not by itself, no. See the directory contrib/minizip in the zlib | 80 | Not by itself, no. See the directory contrib/minizip in the zlib |
81 | distribution. | 81 | distribution. |
82 | 82 | ||
83 | 12. Can zlib handle .Z files? | 83 | 12. Can zlib handle .Z files? |
@@ -217,10 +217,14 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html | |||
217 | 217 | ||
218 | 29. Does zlib work on MVS, OS/390, CICS, etc.? | 218 | 29. Does zlib work on MVS, OS/390, CICS, etc.? |
219 | 219 | ||
220 | We don't know for sure. We have heard occasional reports of success on | 220 | Yes, there are working ports of zlib 1.1.4 to MVS which you can find |
221 | these systems. If you do use it on one of these, please provide us with | 221 | here: |
222 | a report, instructions, and patches that we can reference when we get | 222 | |
223 | these questions. Thanks. | 223 | http://www.homerow.net/asm/zlib390.htm |
224 | http://www.homerow.net/asm/zlibLE.htm | ||
225 | |||
226 | If these are updated to more recent versions of zlib, please let us | ||
227 | know. Thanks. | ||
224 | 228 | ||
225 | 30. Is there some simpler, easier to read version of inflate I can look at | 229 | 30. Is there some simpler, easier to read version of inflate I can look at |
226 | to understand the deflate format? | 230 | to understand the deflate format? |
@@ -271,7 +275,9 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html | |||
271 | http://www.ijs.si/software/snprintf/ | 275 | http://www.ijs.si/software/snprintf/ |
272 | 276 | ||
273 | Note that you should be using the most recent version of zlib. Versions | 277 | Note that you should be using the most recent version of zlib. Versions |
274 | 1.1.3 and before were subject to a double-free vulnerability. | 278 | 1.1.3 and before were subject to a double-free vulnerability, and version |
279 | 1.2.1 was subject to an access exception when decompressing invalid | ||
280 | compressed data. | ||
275 | 281 | ||
276 | 34. Is there a Java version of zlib? | 282 | 34. Is there a Java version of zlib? |
277 | 283 | ||
@@ -292,8 +298,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html | |||
292 | performing a conditional jump that depends on an uninitialized value. | 298 | performing a conditional jump that depends on an uninitialized value. |
293 | Isn't that a bug? | 299 | Isn't that a bug? |
294 | 300 | ||
295 | No. That is intentional for performance reasons, and the output of | 301 | No. That is intentional for performance reasons, and the output of |
296 | deflate is not affected. This only started showing up recently since | 302 | deflate is not affected. This only started showing up recently since |
297 | zlib 1.2.x uses malloc() by default for allocations, whereas earlier | 303 | zlib 1.2.x uses malloc() by default for allocations, whereas earlier |
298 | versions used calloc(), which zeros out the allocated memory. | 304 | versions used calloc(), which zeros out the allocated memory. |
299 | 305 | ||
@@ -333,7 +339,23 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html | |||
333 | In any case, the compression improvements are so modest compared to other | 339 | In any case, the compression improvements are so modest compared to other |
334 | more modern approaches, that it's not worth the effort to implement. | 340 | more modern approaches, that it's not worth the effort to implement. |
335 | 341 | ||
336 | 41. Can you please sign these lengthy legal documents and fax them back to us | 342 | 41. I'm having a problem with the zip functions in zlib, can you help? |
343 | |||
344 | There are no zip functions in zlib. You are probably using minizip by | ||
345 | Giles Vollant, which is found in the contrib directory of zlib. It is not | ||
346 | part of zlib. In fact none of the stuff in contrib is part of zlib. The | ||
347 | files in there are not supported by the zlib authors. You need to contact | ||
348 | the authors of the contribution for help. | ||
349 | |||
350 | 42. The match.asm code in contrib is under the GNU General Public License. | ||
351 | Since it's part of zlib, doesn't that mean that all of zlib falls under the | ||
352 | GNU GPL? | ||
353 | |||
354 | No. The files in contrib are not part of zlib. They were contributed by | ||
355 | other authors and are provided as a convenience to the user within the zlib | ||
356 | distribution. Each of the items in contrib have their own license. | ||
357 | |||
358 | 43. Can you please sign these lengthy legal documents and fax them back to us | ||
337 | so that we can use your software in our product? | 359 | so that we can use your software in our product? |
338 | 360 | ||
339 | No. Go away. Shoo. | 361 | No. Go away. Shoo. |
@@ -4,20 +4,26 @@ INDEX this file | |||
4 | Makefile makefile for Unix (generated by configure) | 4 | Makefile makefile for Unix (generated by configure) |
5 | Makefile.in makefile for Unix (template for configure) | 5 | Makefile.in makefile for Unix (template for configure) |
6 | README guess what | 6 | README guess what |
7 | algorithm.txt description of the (de)compression algorithm | ||
8 | configure configure script for Unix | 7 | configure configure script for Unix |
8 | make_vms.com makefile for VMS | ||
9 | zconf.in.h template for zconf.h (used by configure) | 9 | zconf.in.h template for zconf.h (used by configure) |
10 | zlib.3 Man page for zlib | ||
11 | zlib.map Linux symbol information | ||
12 | zlib.pc.in ?? | ||
10 | 13 | ||
11 | amiga/ makefiles for Amiga SAS C | 14 | amiga/ makefiles for Amiga SAS C |
12 | as400/ makefiles for IBM AS/400 | 15 | as400/ makefiles for IBM AS/400 |
16 | doc/ documentation for formats and algorithms | ||
13 | msdos/ makefiles for MSDOS | 17 | msdos/ makefiles for MSDOS |
14 | old/ makefiles for various architectures and zlib documentation | 18 | old/ makefiles for various architectures and zlib documentation |
15 | files that have not yet been updated for zlib 1.2.x | 19 | files that have not yet been updated for zlib 1.2.x |
16 | projects/ projects for various Integrated Development Environments | 20 | projects/ projects for various Integrated Development Environments |
17 | qnx/ makefiles for QNX | 21 | qnx/ makefiles for QNX |
22 | todo/ works in progress | ||
23 | watcom/ makefiles for OpenWatcom | ||
18 | win32/ makefiles for Windows | 24 | win32/ makefiles for Windows |
19 | 25 | ||
20 | zlib public header files (must be kept): | 26 | zlib public header files (required for library use): |
21 | zconf.h | 27 | zconf.h |
22 | zlib.h | 28 | zlib.h |
23 | 29 | ||
@@ -46,6 +52,7 @@ zutil.h | |||
46 | source files for sample programs: | 52 | source files for sample programs: |
47 | example.c | 53 | example.c |
48 | minigzip.c | 54 | minigzip.c |
55 | See examples/README.examples for more | ||
49 | 56 | ||
50 | unsupported contribution by third parties | 57 | unsupported contribution by third parties |
51 | See contrib/README.contrib | 58 | See contrib/README.contrib |
@@ -1,5 +1,5 @@ | |||
1 | # Makefile for zlib | 1 | # Makefile for zlib |
2 | # Copyright (C) 1995-2005 Jean-loup Gailly. | 2 | # Copyright (C) 1995-2006 Jean-loup Gailly. |
3 | # For conditions of distribution and use, see copyright notice in zlib.h | 3 | # For conditions of distribution and use, see copyright notice in zlib.h |
4 | 4 | ||
5 | # To compile and test, type: | 5 | # To compile and test, type: |
@@ -30,10 +30,10 @@ CPP=$(CC) -E | |||
30 | 30 | ||
31 | LIBS=libz.a | 31 | LIBS=libz.a |
32 | SHAREDLIB=libz.so | 32 | SHAREDLIB=libz.so |
33 | SHAREDLIBV=libz.so.1.2.3 | 33 | SHAREDLIBV=libz.so.1.2.3.1 |
34 | SHAREDLIBM=libz.so.1 | 34 | SHAREDLIBM=libz.so.1 |
35 | 35 | ||
36 | AR=ar rc | 36 | AR=ar |
37 | RANLIB=ranlib | 37 | RANLIB=ranlib |
38 | TAR=tar | 38 | TAR=tar |
39 | SHELL=/bin/sh | 39 | SHELL=/bin/sh |
@@ -45,6 +45,7 @@ libdir = ${exec_prefix}/lib | |||
45 | includedir = ${prefix}/include | 45 | includedir = ${prefix}/include |
46 | mandir = ${prefix}/share/man | 46 | mandir = ${prefix}/share/man |
47 | man3dir = ${mandir}/man3 | 47 | man3dir = ${mandir}/man3 |
48 | pkgconfigdir = ${libdir}/pkgconfig | ||
48 | 49 | ||
49 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | 50 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ |
50 | zutil.o inflate.o infback.o inftrees.o inffast.o | 51 | zutil.o inflate.o infback.o inftrees.o inffast.o |
@@ -90,33 +91,37 @@ minigzip$(EXE): minigzip.o $(LIBS) | |||
90 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | 91 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) |
91 | 92 | ||
92 | install: $(LIBS) | 93 | install: $(LIBS) |
93 | -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi | 94 | -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi |
94 | -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi | 95 | -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi |
95 | -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi | 96 | -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi |
96 | -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi | 97 | -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi |
97 | cp zlib.h zconf.h $(includedir) | 98 | -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi |
98 | chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h | 99 | cp zlib.h zconf.h $(DESTDIR)$(includedir) |
99 | cp $(LIBS) $(libdir) | 100 | chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h |
100 | cd $(libdir); chmod 755 $(LIBS) | 101 | cp $(LIBS) $(DESTDIR)$(libdir) |
101 | -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 | 102 | cd $(DESTDIR)$(libdir); chmod 755 $(LIBS) |
102 | cd $(libdir); if test -f $(SHAREDLIBV); then \ | 103 | -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 |
104 | cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \ | ||
103 | rm -f $(SHAREDLIB) $(SHAREDLIBM); \ | 105 | rm -f $(SHAREDLIB) $(SHAREDLIBM); \ |
104 | ln -s $(SHAREDLIBV) $(SHAREDLIB); \ | 106 | ln -s $(SHAREDLIBV) $(SHAREDLIB); \ |
105 | ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ | 107 | ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ |
106 | (ldconfig || true) >/dev/null 2>&1; \ | 108 | (ldconfig || true) >/dev/null 2>&1; \ |
107 | fi | 109 | fi |
108 | cp zlib.3 $(man3dir) | 110 | cp zlib.3 $(DESTDIR)$(man3dir) |
109 | chmod 644 $(man3dir)/zlib.3 | 111 | chmod 644 $(DESTDIR)$(man3dir)/zlib.3 |
112 | cp zlib.pc $(DESTDIR)$(pkgconfigdir) | ||
113 | chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc | ||
110 | # The ranlib in install is needed on NeXTSTEP which checks file times | 114 | # The ranlib in install is needed on NeXTSTEP which checks file times |
111 | # ldconfig is for Linux | 115 | # ldconfig is for Linux |
112 | 116 | ||
113 | uninstall: | 117 | uninstall: |
114 | cd $(includedir); \ | 118 | cd $(DESTDIR)$(includedir); rm -f zlib.h zconf.h |
115 | cd $(libdir); rm -f libz.a; \ | 119 | cd $(DESTDIR)$(libdir); rm -f libz.a; \ |
116 | if test -f $(SHAREDLIBV); then \ | 120 | if test -f $(SHAREDLIBV); then \ |
117 | rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ | 121 | rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ |
118 | fi | 122 | fi |
119 | cd $(man3dir); rm -f zlib.3 | 123 | cd $(DESTDIR)$(man3dir); rm -f zlib.3 |
124 | cd $(DESTDIR)$(pkgconfigdir); rm -f zlib.pc | ||
120 | 125 | ||
121 | mostlyclean: clean | 126 | mostlyclean: clean |
122 | clean: | 127 | clean: |
@@ -128,7 +133,7 @@ maintainer-clean: distclean | |||
128 | distclean: clean | 133 | distclean: clean |
129 | cp -p Makefile.in Makefile | 134 | cp -p Makefile.in Makefile |
130 | cp -p zconf.in.h zconf.h | 135 | cp -p zconf.in.h zconf.h |
131 | rm -f .DS_Store | 136 | rm -f zlib.pc .DS_Store |
132 | 137 | ||
133 | tags: | 138 | tags: |
134 | etags *.[ch] | 139 | etags *.[ch] |
diff --git a/Makefile.in b/Makefile.in index 2fd6e45..460471b 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -1,5 +1,5 @@ | |||
1 | # Makefile for zlib | 1 | # Makefile for zlib |
2 | # Copyright (C) 1995-2005 Jean-loup Gailly. | 2 | # Copyright (C) 1995-2006 Jean-loup Gailly. |
3 | # For conditions of distribution and use, see copyright notice in zlib.h | 3 | # For conditions of distribution and use, see copyright notice in zlib.h |
4 | 4 | ||
5 | # To compile and test, type: | 5 | # To compile and test, type: |
@@ -30,10 +30,10 @@ CPP=$(CC) -E | |||
30 | 30 | ||
31 | LIBS=libz.a | 31 | LIBS=libz.a |
32 | SHAREDLIB=libz.so | 32 | SHAREDLIB=libz.so |
33 | SHAREDLIBV=libz.so.1.2.3 | 33 | SHAREDLIBV=libz.so.1.2.3.1 |
34 | SHAREDLIBM=libz.so.1 | 34 | SHAREDLIBM=libz.so.1 |
35 | 35 | ||
36 | AR=ar rc | 36 | AR=ar |
37 | RANLIB=ranlib | 37 | RANLIB=ranlib |
38 | TAR=tar | 38 | TAR=tar |
39 | SHELL=/bin/sh | 39 | SHELL=/bin/sh |
@@ -45,6 +45,7 @@ libdir = ${exec_prefix}/lib | |||
45 | includedir = ${prefix}/include | 45 | includedir = ${prefix}/include |
46 | mandir = ${prefix}/share/man | 46 | mandir = ${prefix}/share/man |
47 | man3dir = ${mandir}/man3 | 47 | man3dir = ${mandir}/man3 |
48 | pkgconfigdir = ${libdir}/pkgconfig | ||
48 | 49 | ||
49 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | 50 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ |
50 | zutil.o inflate.o infback.o inftrees.o inffast.o | 51 | zutil.o inflate.o infback.o inftrees.o inffast.o |
@@ -90,33 +91,37 @@ minigzip$(EXE): minigzip.o $(LIBS) | |||
90 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | 91 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) |
91 | 92 | ||
92 | install: $(LIBS) | 93 | install: $(LIBS) |
93 | -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi | 94 | -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi |
94 | -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi | 95 | -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi |
95 | -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi | 96 | -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi |
96 | -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi | 97 | -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi |
97 | cp zlib.h zconf.h $(includedir) | 98 | -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi |
98 | chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h | 99 | cp zlib.h zconf.h $(DESTDIR)$(includedir) |
99 | cp $(LIBS) $(libdir) | 100 | chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h |
100 | cd $(libdir); chmod 755 $(LIBS) | 101 | cp $(LIBS) $(DESTDIR)$(libdir) |
101 | -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 | 102 | cd $(DESTDIR)$(libdir); chmod 755 $(LIBS) |
102 | cd $(libdir); if test -f $(SHAREDLIBV); then \ | 103 | -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 |
104 | cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \ | ||
103 | rm -f $(SHAREDLIB) $(SHAREDLIBM); \ | 105 | rm -f $(SHAREDLIB) $(SHAREDLIBM); \ |
104 | ln -s $(SHAREDLIBV) $(SHAREDLIB); \ | 106 | ln -s $(SHAREDLIBV) $(SHAREDLIB); \ |
105 | ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ | 107 | ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ |
106 | (ldconfig || true) >/dev/null 2>&1; \ | 108 | (ldconfig || true) >/dev/null 2>&1; \ |
107 | fi | 109 | fi |
108 | cp zlib.3 $(man3dir) | 110 | cp zlib.3 $(DESTDIR)$(man3dir) |
109 | chmod 644 $(man3dir)/zlib.3 | 111 | chmod 644 $(DESTDIR)$(man3dir)/zlib.3 |
112 | cp zlib.pc $(DESTDIR)$(pkgconfigdir) | ||
113 | chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc | ||
110 | # The ranlib in install is needed on NeXTSTEP which checks file times | 114 | # The ranlib in install is needed on NeXTSTEP which checks file times |
111 | # ldconfig is for Linux | 115 | # ldconfig is for Linux |
112 | 116 | ||
113 | uninstall: | 117 | uninstall: |
114 | cd $(includedir); \ | 118 | cd $(DESTDIR)$(includedir); rm -f zlib.h zconf.h |
115 | cd $(libdir); rm -f libz.a; \ | 119 | cd $(DESTDIR)$(libdir); rm -f libz.a; \ |
116 | if test -f $(SHAREDLIBV); then \ | 120 | if test -f $(SHAREDLIBV); then \ |
117 | rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ | 121 | rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ |
118 | fi | 122 | fi |
119 | cd $(man3dir); rm -f zlib.3 | 123 | cd $(DESTDIR)$(man3dir); rm -f zlib.3 |
124 | cd $(DESTDIR)$(pkgconfigdir); rm -f zlib.pc | ||
120 | 125 | ||
121 | mostlyclean: clean | 126 | mostlyclean: clean |
122 | clean: | 127 | clean: |
@@ -128,7 +133,7 @@ maintainer-clean: distclean | |||
128 | distclean: clean | 133 | distclean: clean |
129 | cp -p Makefile.in Makefile | 134 | cp -p Makefile.in Makefile |
130 | cp -p zconf.in.h zconf.h | 135 | cp -p zconf.in.h zconf.h |
131 | rm -f .DS_Store | 136 | rm -f zlib.pc .DS_Store |
132 | 137 | ||
133 | tags: | 138 | tags: |
134 | etags *.[ch] | 139 | etags *.[ch] |
@@ -1,6 +1,6 @@ | |||
1 | ZLIB DATA COMPRESSION LIBRARY | 1 | ZLIB DATA COMPRESSION LIBRARY |
2 | 2 | ||
3 | zlib 1.2.3 is a general purpose data compression library. All the code is | 3 | zlib 1.2.3.1 is a general purpose data compression library. All the code is |
4 | thread safe. The data format used by the zlib library is described by RFCs | 4 | thread safe. The data format used by the zlib library is described by RFCs |
5 | (Request for Comments) 1950 to 1952 in the files | 5 | (Request for Comments) 1950 to 1952 in the files |
6 | http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) | 6 | http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) |
@@ -33,7 +33,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997 | |||
33 | issue of Dr. Dobb's Journal; a copy of the article is available in | 33 | issue of Dr. Dobb's Journal; a copy of the article is available in |
34 | http://dogma.net/markn/articles/zlibtool/zlibtool.htm | 34 | http://dogma.net/markn/articles/zlibtool/zlibtool.htm |
35 | 35 | ||
36 | The changes made in version 1.2.3 are documented in the file ChangeLog. | 36 | The changes made in version 1.2.3.1 are documented in the file ChangeLog. |
37 | 37 | ||
38 | Unsupported third party contributions are provided in directory "contrib". | 38 | Unsupported third party contributions are provided in directory "contrib". |
39 | 39 | ||
diff --git a/as400/zlib.inc b/as400/zlib.inc index 7bbfb7e..c782d73 100644 --- a/as400/zlib.inc +++ b/as400/zlib.inc | |||
@@ -1,7 +1,7 @@ | |||
1 | * ZLIB.INC - Interface to the general purpose compression library | 1 | * ZLIB.INC - Interface to the general purpose compression library |
2 | * | 2 | * |
3 | * ILE RPG400 version by Patrick Monnerat, DATASPHERE. | 3 | * ILE RPG400 version by Patrick Monnerat, DATASPHERE. |
4 | * Version 1.2.3 | 4 | * Version 1.2.3.1 |
5 | * | 5 | * |
6 | * | 6 | * |
7 | * WARNING: | 7 | * WARNING: |
@@ -22,8 +22,8 @@ | |||
22 | * | 22 | * |
23 | * Versioning information. | 23 | * Versioning information. |
24 | * | 24 | * |
25 | D ZLIB_VERSION C '1.2.3' | 25 | D ZLIB_VERSION C '1.2.3.1' |
26 | D ZLIB_VERNUM C X'1230' | 26 | D ZLIB_VERNUM C X'1231' |
27 | * | 27 | * |
28 | * Other equates. | 28 | * Other equates. |
29 | * | 29 | * |
@@ -1,5 +1,5 @@ | |||
1 | /* compress.c -- compress a memory buffer | 1 | /* compress.c -- compress a memory buffer |
2 | * Copyright (C) 1995-2003 Jean-loup Gailly. | 2 | * Copyright (C) 1995-2005 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -75,5 +75,6 @@ int ZEXPORT compress (dest, destLen, source, sourceLen) | |||
75 | uLong ZEXPORT compressBound (sourceLen) | 75 | uLong ZEXPORT compressBound (sourceLen) |
76 | uLong sourceLen; | 76 | uLong sourceLen; |
77 | { | 77 | { |
78 | return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11; | 78 | return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + |
79 | (sourceLen >> 25) + 13; | ||
79 | } | 80 | } |
@@ -23,7 +23,8 @@ LDFLAGS="-L. ${LIBS}" | |||
23 | VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` | 23 | VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h` |
24 | VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` | 24 | VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h` |
25 | VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` | 25 | VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h` |
26 | AR=${AR-"ar rc"} | 26 | AR=${AR-"ar"} |
27 | AR_RC="${AR} rc" | ||
27 | RANLIB=${RANLIB-"ranlib"} | 28 | RANLIB=${RANLIB-"ranlib"} |
28 | prefix=${prefix-/usr/local} | 29 | prefix=${prefix-/usr/local} |
29 | exec_prefix=${exec_prefix-'${prefix}'} | 30 | exec_prefix=${exec_prefix-'${prefix}'} |
@@ -32,6 +33,7 @@ includedir=${includedir-'${prefix}/include'} | |||
32 | mandir=${mandir-'${prefix}/share/man'} | 33 | mandir=${mandir-'${prefix}/share/man'} |
33 | shared_ext='.so' | 34 | shared_ext='.so' |
34 | shared=0 | 35 | shared=0 |
36 | zprefix=0 | ||
35 | gcc=0 | 37 | gcc=0 |
36 | old_cc="$CC" | 38 | old_cc="$CC" |
37 | old_cflags="$CFLAGS" | 39 | old_cflags="$CFLAGS" |
@@ -39,20 +41,23 @@ old_cflags="$CFLAGS" | |||
39 | while test $# -ge 1 | 41 | while test $# -ge 1 |
40 | do | 42 | do |
41 | case "$1" in | 43 | case "$1" in |
42 | -h* | --h*) | 44 | -h* | --help) |
43 | echo 'usage:' | 45 | echo 'usage:' |
44 | echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]' | 46 | echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]' |
45 | echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR]' | 47 | echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR] [--zprefix]' |
46 | exit 0;; | 48 | exit 0;; |
47 | -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; | 49 | -p*=* | --prefix=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; |
48 | -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; | 50 | -e*=* | --eprefix=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; |
49 | -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; | 51 | -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;; |
50 | -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;; | 52 | -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;; |
51 | -p* | --p*) prefix="$2"; shift; shift;; | 53 | -p* | --prefix) prefix="$2"; shift; shift;; |
52 | -e* | --e*) exec_prefix="$2"; shift; shift;; | 54 | -e* | --eprefix) exec_prefix="$2"; shift; shift;; |
53 | -l* | --l*) libdir="$2"; shift; shift;; | 55 | -l* | --libdir) libdir="$2"; shift; shift;; |
54 | -i* | --i*) includedir="$2"; shift; shift;; | 56 | -i* | --includedir) includedir="$2"; shift; shift;; |
55 | -s* | --s*) shared=1; shift;; | 57 | -s* | --shared | --enable-shared) shared=1; shift;; |
58 | -z* | --zprefix) zprefix=1; shift;; | ||
59 | --sysconfdir=*) echo "ignored option: --sysconfdir"; shift;; | ||
60 | --localstatedir=*) echo "ignored option: --localstatedir"; shift;; | ||
56 | *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;; | 61 | *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;; |
57 | esac | 62 | esac |
58 | done | 63 | done |
@@ -73,10 +78,10 @@ esac | |||
73 | 78 | ||
74 | if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then | 79 | if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then |
75 | CC="$cc" | 80 | CC="$cc" |
76 | SFLAGS=${CFLAGS-"-fPIC -O3"} | 81 | SFLAGS="${CFLAGS-"-O3"} -fPIC" |
77 | CFLAGS="$cflags" | 82 | CFLAGS="$cflags" |
78 | case `(uname -s || echo unknown) 2>/dev/null` in | 83 | case `(uname -s || echo unknown) 2>/dev/null` in |
79 | Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};; | 84 | Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"};; |
80 | CYGWIN* | Cygwin* | cygwin* | OS/2* ) | 85 | CYGWIN* | Cygwin* | cygwin* | OS/2* ) |
81 | EXE='.exe';; | 86 | EXE='.exe';; |
82 | QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 | 87 | QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4 |
@@ -117,24 +122,30 @@ else | |||
117 | esac;; | 122 | esac;; |
118 | IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} | 123 | IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."} |
119 | CFLAGS=${CFLAGS-"-ansi -O2"} | 124 | CFLAGS=${CFLAGS-"-ansi -O2"} |
120 | LDSHARED=${LDSHARED-"cc -shared"};; | 125 | LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"};; |
121 | OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} | 126 | OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"} |
122 | CFLAGS=${CFLAGS-"-O -std1"} | 127 | CFLAGS=${CFLAGS-"-O -std1"} |
123 | LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; | 128 | LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};; |
124 | OSF1*) SFLAGS=${CFLAGS-"-O -std1"} | 129 | OSF1*) SFLAGS=${CFLAGS-"-O -std1"} |
125 | CFLAGS=${CFLAGS-"-O -std1"} | 130 | CFLAGS=${CFLAGS-"-O -std1"} |
126 | LDSHARED=${LDSHARED-"cc -shared"};; | 131 | LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"};; |
127 | QNX*) SFLAGS=${CFLAGS-"-4 -O"} | 132 | QNX*) SFLAGS=${CFLAGS-"-4 -O"} |
128 | CFLAGS=${CFLAGS-"-4 -O"} | 133 | CFLAGS=${CFLAGS-"-4 -O"} |
129 | LDSHARED=${LDSHARED-"cc"} | 134 | LDSHARED=${LDSHARED-"cc"} |
130 | RANLIB=${RANLIB-"true"} | 135 | RANLIB=${RANLIB-"true"} |
131 | AR="cc -A";; | 136 | AR_RC="cc -A";; |
132 | SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} | 137 | SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "} |
133 | CFLAGS=${CFLAGS-"-O3"} | 138 | CFLAGS=${CFLAGS-"-O3"} |
134 | LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; | 139 | LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};; |
135 | SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."} | 140 | SunOS\ 5*) LDSHARED=${LDSHARED-"cc -G"} |
136 | CFLAGS=${CFLAGS-"-fast -xcg89"} | 141 | case `(uname -m || echo unknown) 2>/dev/null` in |
137 | LDSHARED=${LDSHARED-"cc -G"};; | 142 | i86*) |
143 | SFLAGS=${CFLAGS-"-xpentium -fast -KPIC -R."} | ||
144 | CFLAGS=${CFLAGS-"-xpentium -fast"};; | ||
145 | *) | ||
146 | SFLAGS=${CFLAGS-"-fast -xcg92 -KPIC -R."} | ||
147 | CFLAGS=${CFLAGS-"-fast -xcg92"};; | ||
148 | esac;; | ||
138 | SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} | 149 | SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"} |
139 | CFLAGS=${CFLAGS-"-O2"} | 150 | CFLAGS=${CFLAGS-"-O2"} |
140 | LDSHARED=${LDSHARED-"ld"};; | 151 | LDSHARED=${LDSHARED-"ld"};; |
@@ -180,6 +191,10 @@ if test $shared -eq 1; then | |||
180 | echo No shared library support. | 191 | echo No shared library support. |
181 | shared=0; | 192 | shared=0; |
182 | else | 193 | else |
194 | echo Tested $CC -c $SFLAGS $test.c | ||
195 | $CC -c $SFLAGS $test.c | ||
196 | echo Tested $LDSHARED -o $test$shared_ext $test.o | ||
197 | $LDSHARED -o $test$shared_ext $test.o | ||
183 | echo 'No shared library support; try without defining CC and CFLAGS' | 198 | echo 'No shared library support; try without defining CC and CFLAGS' |
184 | shared=0; | 199 | shared=0; |
185 | fi | 200 | fi |
@@ -203,6 +218,12 @@ else | |||
203 | echo "Checking for unistd.h... No." | 218 | echo "Checking for unistd.h... No." |
204 | fi | 219 | fi |
205 | 220 | ||
221 | if test $zprefix -eq 1; then | ||
222 | sed < zconf.h "/#ifdef Z_PREFIX/s/def Z_PREFIX/ 1/" > zconf.temp.h | ||
223 | mv zconf.temp.h zconf.h | ||
224 | echo "Using z_ prefix on all symbols." | ||
225 | fi | ||
226 | |||
206 | cat > $test.c <<EOF | 227 | cat > $test.c <<EOF |
207 | #include <stdio.h> | 228 | #include <stdio.h> |
208 | #include <stdarg.h> | 229 | #include <stdarg.h> |
@@ -219,7 +240,7 @@ int main() | |||
219 | EOF | 240 | EOF |
220 | 241 | ||
221 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then | 242 | if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then |
222 | echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()" | 243 | echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()." |
223 | 244 | ||
224 | cat > $test.c <<EOF | 245 | cat > $test.c <<EOF |
225 | #include <stdio.h> | 246 | #include <stdio.h> |
@@ -316,7 +337,7 @@ EOF | |||
316 | fi | 337 | fi |
317 | fi | 338 | fi |
318 | else | 339 | else |
319 | echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()" | 340 | echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()." |
320 | 341 | ||
321 | cat >$test.c <<EOF | 342 | cat >$test.c <<EOF |
322 | #include <stdio.h> | 343 | #include <stdio.h> |
@@ -447,7 +468,7 @@ sed < Makefile.in " | |||
447 | /^SHAREDLIB *=/s#=.*#=$SHAREDLIB# | 468 | /^SHAREDLIB *=/s#=.*#=$SHAREDLIB# |
448 | /^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# | 469 | /^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# |
449 | /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# | 470 | /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# |
450 | /^AR *=/s#=.*#=$AR# | 471 | /^AR *=/s#=.*#=$AR_RC# |
451 | /^RANLIB *=/s#=.*#=$RANLIB# | 472 | /^RANLIB *=/s#=.*#=$RANLIB# |
452 | /^EXE *=/s#=.*#=$EXE# | 473 | /^EXE *=/s#=.*#=$EXE# |
453 | /^prefix *=/s#=.*#=$prefix# | 474 | /^prefix *=/s#=.*#=$prefix# |
@@ -457,3 +478,25 @@ sed < Makefile.in " | |||
457 | /^mandir *=/s#=.*#=$mandir# | 478 | /^mandir *=/s#=.*#=$mandir# |
458 | /^LDFLAGS *=/s#=.*#=$LDFLAGS# | 479 | /^LDFLAGS *=/s#=.*#=$LDFLAGS# |
459 | " > Makefile | 480 | " > Makefile |
481 | |||
482 | sed < zlib.pc.in " | ||
483 | /^CC *=/s#=.*#=$CC# | ||
484 | /^CFLAGS *=/s#=.*#=$CFLAGS# | ||
485 | /^CPP *=/s#=.*#=$CPP# | ||
486 | /^LDSHARED *=/s#=.*#=$LDSHARED# | ||
487 | /^LIBS *=/s#=.*#=$LIBS# | ||
488 | /^SHAREDLIB *=/s#=.*#=$SHAREDLIB# | ||
489 | /^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV# | ||
490 | /^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM# | ||
491 | /^AR *=/s#=.*#=$AR_RC# | ||
492 | /^RANLIB *=/s#=.*#=$RANLIB# | ||
493 | /^EXE *=/s#=.*#=$EXE# | ||
494 | /^prefix *=/s#=.*#=$prefix# | ||
495 | /^exec_prefix *=/s#=.*#=$exec_prefix# | ||
496 | /^libdir *=/s#=.*#=$libdir# | ||
497 | /^includedir *=/s#=.*#=$includedir# | ||
498 | /^mandir *=/s#=.*#=$mandir# | ||
499 | /^LDFLAGS *=/s#=.*#=$LDFLAGS# | ||
500 | " | sed -e " | ||
501 | s/\@VERSION\@/$VER/g; | ||
502 | " > zlib.pc | ||
diff --git a/contrib/infback9/inftree9.c b/contrib/infback9/inftree9.c index 0993f75..658f87f 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.3 Copyright 1995-2005 Mark Adler "; | 12 | " inflate9 1.2.3.1 Copyright 1995-2005 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, 201, 196}; | 67 | 133, 133, 133, 133, 144, 74, 196}; |
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/masmx86/inffas32.asm b/contrib/masmx86/inffas32.asm index 4a20512..05c46dd 100644 --- a/contrib/masmx86/inffas32.asm +++ b/contrib/masmx86/inffas32.asm | |||
@@ -644,9 +644,9 @@ L_init_mmx: | |||
644 | movd mm0,ebp | 644 | movd mm0,ebp |
645 | mov ebp,ebx | 645 | mov ebp,ebx |
646 | ; 896 "inffast.S" | 646 | ; 896 "inffast.S" |
647 | movd mm4,[esp+0] | 647 | movd mm4,dword ptr [esp+0] |
648 | movq mm3,mm4 | 648 | movq mm3,mm4 |
649 | movd mm5,[esp+4] | 649 | movd mm5,dword ptr [esp+4] |
650 | movq mm2,mm5 | 650 | movq mm2,mm5 |
651 | pxor mm1,mm1 | 651 | pxor mm1,mm1 |
652 | mov ebx, [esp+8] | 652 | mov ebx, [esp+8] |
@@ -660,7 +660,7 @@ L_do_loop_mmx: | |||
660 | ja L_get_length_code_mmx | 660 | ja L_get_length_code_mmx |
661 | 661 | ||
662 | movd mm6,ebp | 662 | movd mm6,ebp |
663 | movd mm7,[esi] | 663 | movd mm7,dword ptr [esi] |
664 | add esi,4 | 664 | add esi,4 |
665 | psllq mm7,mm6 | 665 | psllq mm7,mm6 |
666 | add ebp,32 | 666 | add ebp,32 |
@@ -717,7 +717,7 @@ L_decode_distance_mmx: | |||
717 | ja L_get_dist_code_mmx | 717 | ja L_get_dist_code_mmx |
718 | 718 | ||
719 | movd mm6,ebp | 719 | movd mm6,ebp |
720 | movd mm7,[esi] | 720 | movd mm7,dword ptr [esi] |
721 | add esi,4 | 721 | add esi,4 |
722 | psllq mm7,mm6 | 722 | psllq mm7,mm6 |
723 | add ebp,32 | 723 | add ebp,32 |
diff --git a/contrib/vstudio/vc7/zlib.rc b/contrib/vstudio/vc7/zlib.rc index 72cb8b4..c27d0fa 100644 --- a/contrib/vstudio/vc7/zlib.rc +++ b/contrib/vstudio/vc7/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,3,0 | 5 | FILEVERSION 1,2,3,1 |
6 | PRODUCTVERSION 1,2,3,0 | 6 | PRODUCTVERSION 1,2,3,1 |
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 library\0" | 19 | VALUE "FileDescription", "zlib data compression library\0" |
20 | VALUE "FileVersion", "1.2.3.0\0" | 20 | VALUE "FileVersion", "1.2.3.1\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" |
@@ -52,7 +52,7 @@ | |||
52 | #include "deflate.h" | 52 | #include "deflate.h" |
53 | 53 | ||
54 | const char deflate_copyright[] = | 54 | const char deflate_copyright[] = |
55 | " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly "; | 55 | " deflate 1.2.3.1 Copyright 1995-2005 Jean-loup Gailly "; |
56 | /* | 56 | /* |
57 | If you use the zlib library in a product, an acknowledgment is welcome | 57 | If you use the zlib library in a product, an acknowledgment is welcome |
58 | in the documentation of your product. If for some reason you cannot | 58 | in the documentation of your product. If for some reason you cannot |
@@ -481,33 +481,65 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain) | |||
481 | * resulting from using fixed blocks instead of stored blocks, which deflate | 481 | * resulting from using fixed blocks instead of stored blocks, which deflate |
482 | * can emit on compressed data for some combinations of the parameters. | 482 | * can emit on compressed data for some combinations of the parameters. |
483 | * | 483 | * |
484 | * This function could be more sophisticated to provide closer upper bounds | 484 | * This function could be more sophisticated to provide closer upper bounds for |
485 | * for every combination of windowBits and memLevel, as well as wrap. | 485 | * every combination of windowBits and memLevel. But even the conservative |
486 | * But even the conservative upper bound of about 14% expansion does not | 486 | * upper bound of about 14% expansion does not seem onerous for output buffer |
487 | * seem onerous for output buffer allocation. | 487 | * allocation. |
488 | */ | 488 | */ |
489 | uLong ZEXPORT deflateBound(strm, sourceLen) | 489 | uLong ZEXPORT deflateBound(strm, sourceLen) |
490 | z_streamp strm; | 490 | z_streamp strm; |
491 | uLong sourceLen; | 491 | uLong sourceLen; |
492 | { | 492 | { |
493 | deflate_state *s; | 493 | deflate_state *s; |
494 | uLong destLen; | 494 | uLong complen, wraplen; |
495 | Bytef *str; | ||
495 | 496 | ||
496 | /* conservative upper bound */ | 497 | /* conservative upper bound for compressed data */ |
497 | destLen = sourceLen + | 498 | complen = sourceLen + |
498 | ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11; | 499 | ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; |
499 | 500 | ||
500 | /* if can't get parameters, return conservative bound */ | 501 | /* if can't get parameters, return conservative bound plus zlib wrapper */ |
501 | if (strm == Z_NULL || strm->state == Z_NULL) | 502 | if (strm == Z_NULL || strm->state == Z_NULL) |
502 | return destLen; | 503 | return complen + 6; |
503 | 504 | ||
504 | /* if not default parameters, return conservative bound */ | 505 | /* compute wrapper length */ |
505 | s = strm->state; | 506 | s = strm->state; |
507 | switch (s->wrap) { | ||
508 | case 0: /* raw deflate */ | ||
509 | wraplen = 0; | ||
510 | break; | ||
511 | case 1: /* zlib wrapper */ | ||
512 | wraplen = 6 + (s->strstart ? 4 : 0); | ||
513 | break; | ||
514 | case 2: /* gzip wrapper */ | ||
515 | wraplen = 18; | ||
516 | if (s->gzhead != NULL) { /* user-supplied gzip header */ | ||
517 | if (s->gzhead->extra != NULL) | ||
518 | wraplen += 2 + s->gzhead->extra_len; | ||
519 | str = s->gzhead->name; | ||
520 | if (str != NULL) | ||
521 | do { | ||
522 | wraplen++; | ||
523 | } while (*str++); | ||
524 | str = s->gzhead->comment; | ||
525 | if (str != NULL) | ||
526 | do { | ||
527 | wraplen++; | ||
528 | } while (*str++); | ||
529 | if (s->gzhead->hcrc) | ||
530 | wraplen += 2; | ||
531 | } | ||
532 | break; | ||
533 | default: /* for compiler happiness */ | ||
534 | wraplen = 6; | ||
535 | } | ||
536 | |||
537 | /* if not default parameters, return conservative bound */ | ||
506 | if (s->w_bits != 15 || s->hash_bits != 8 + 7) | 538 | if (s->w_bits != 15 || s->hash_bits != 8 + 7) |
507 | return destLen; | 539 | return complen + wraplen; |
508 | 540 | ||
509 | /* default settings: return tight bound for that case */ | 541 | /* default settings: return tight bound for that case */ |
510 | return compressBound(sourceLen); | 542 | return compressBound(sourceLen) - 6 + wraplen; |
511 | } | 543 | } |
512 | 544 | ||
513 | /* ========================================================================= | 545 | /* ========================================================================= |
@@ -1,5 +1,5 @@ | |||
1 | /* deflate.h -- internal compression state | 1 | /* deflate.h -- internal compression state |
2 | * Copyright (C) 1995-2004 Jean-loup Gailly | 2 | * Copyright (C) 1995-2005 Jean-loup Gailly |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
diff --git a/algorithm.txt b/doc/algorithm.txt index b022dde..b022dde 100644 --- a/algorithm.txt +++ b/doc/algorithm.txt | |||
diff --git a/doc/rfc1950.txt b/doc/rfc1950.txt new file mode 100644 index 0000000..ce6428a --- /dev/null +++ b/doc/rfc1950.txt | |||
@@ -0,0 +1,619 @@ | |||
1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | Network Working Group P. Deutsch | ||
8 | Request for Comments: 1950 Aladdin Enterprises | ||
9 | Category: Informational J-L. Gailly | ||
10 | Info-ZIP | ||
11 | May 1996 | ||
12 | |||
13 | |||
14 | ZLIB Compressed Data Format Specification version 3.3 | ||
15 | |||
16 | Status of This Memo | ||
17 | |||
18 | This memo provides information for the Internet community. This memo | ||
19 | does not specify an Internet standard of any kind. Distribution of | ||
20 | this memo is unlimited. | ||
21 | |||
22 | IESG Note: | ||
23 | |||
24 | The IESG takes no position on the validity of any Intellectual | ||
25 | Property Rights statements contained in this document. | ||
26 | |||
27 | Notices | ||
28 | |||
29 | Copyright (c) 1996 L. Peter Deutsch and Jean-Loup Gailly | ||
30 | |||
31 | Permission is granted to copy and distribute this document for any | ||
32 | purpose and without charge, including translations into other | ||
33 | languages and incorporation into compilations, provided that the | ||
34 | copyright notice and this notice are preserved, and that any | ||
35 | substantive changes or deletions from the original are clearly | ||
36 | marked. | ||
37 | |||
38 | A pointer to the latest version of this and related documentation in | ||
39 | HTML format can be found at the URL | ||
40 | <ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>. | ||
41 | |||
42 | Abstract | ||
43 | |||
44 | This specification defines a lossless compressed data format. The | ||
45 | data can be produced or consumed, even for an arbitrarily long | ||
46 | sequentially presented input data stream, using only an a priori | ||
47 | bounded amount of intermediate storage. The format presently uses | ||
48 | the DEFLATE compression method but can be easily extended to use | ||
49 | other compression methods. It can be implemented readily in a manner | ||
50 | not covered by patents. This specification also defines the ADLER-32 | ||
51 | checksum (an extension and improvement of the Fletcher checksum), | ||
52 | used for detection of data corruption, and provides an algorithm for | ||
53 | computing it. | ||
54 | |||
55 | |||
56 | |||
57 | |||
58 | Deutsch & Gailly Informational [Page 1] | ||
59 | |||
60 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
61 | |||
62 | |||
63 | Table of Contents | ||
64 | |||
65 | 1. Introduction ................................................... 2 | ||
66 | 1.1. Purpose ................................................... 2 | ||
67 | 1.2. Intended audience ......................................... 3 | ||
68 | 1.3. Scope ..................................................... 3 | ||
69 | 1.4. Compliance ................................................ 3 | ||
70 | 1.5. Definitions of terms and conventions used ................ 3 | ||
71 | 1.6. Changes from previous versions ............................ 3 | ||
72 | 2. Detailed specification ......................................... 3 | ||
73 | 2.1. Overall conventions ....................................... 3 | ||
74 | 2.2. Data format ............................................... 4 | ||
75 | 2.3. Compliance ................................................ 7 | ||
76 | 3. References ..................................................... 7 | ||
77 | 4. Source code .................................................... 8 | ||
78 | 5. Security Considerations ........................................ 8 | ||
79 | 6. Acknowledgements ............................................... 8 | ||
80 | 7. Authors' Addresses ............................................. 8 | ||
81 | 8. Appendix: Rationale ............................................ 9 | ||
82 | 9. Appendix: Sample code ..........................................10 | ||
83 | |||
84 | 1. Introduction | ||
85 | |||
86 | 1.1. Purpose | ||
87 | |||
88 | The purpose of this specification is to define a lossless | ||
89 | compressed data format that: | ||
90 | |||
91 | * Is independent of CPU type, operating system, file system, | ||
92 | and character set, and hence can be used for interchange; | ||
93 | |||
94 | * Can be produced or consumed, even for an arbitrarily long | ||
95 | sequentially presented input data stream, using only an a | ||
96 | priori bounded amount of intermediate storage, and hence can | ||
97 | be used in data communications or similar structures such as | ||
98 | Unix filters; | ||
99 | |||
100 | * Can use a number of different compression methods; | ||
101 | |||
102 | * Can be implemented readily in a manner not covered by | ||
103 | patents, and hence can be practiced freely. | ||
104 | |||
105 | The data format defined by this specification does not attempt to | ||
106 | allow random access to compressed data. | ||
107 | |||
108 | |||
109 | |||
110 | |||
111 | |||
112 | |||
113 | |||
114 | Deutsch & Gailly Informational [Page 2] | ||
115 | |||
116 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
117 | |||
118 | |||
119 | 1.2. Intended audience | ||
120 | |||
121 | This specification is intended for use by implementors of software | ||
122 | to compress data into zlib format and/or decompress data from zlib | ||
123 | format. | ||
124 | |||
125 | The text of the specification assumes a basic background in | ||
126 | programming at the level of bits and other primitive data | ||
127 | representations. | ||
128 | |||
129 | 1.3. Scope | ||
130 | |||
131 | The specification specifies a compressed data format that can be | ||
132 | used for in-memory compression of a sequence of arbitrary bytes. | ||
133 | |||
134 | 1.4. Compliance | ||
135 | |||
136 | Unless otherwise indicated below, a compliant decompressor must be | ||
137 | able to accept and decompress any data set that conforms to all | ||
138 | the specifications presented here; a compliant compressor must | ||
139 | produce data sets that conform to all the specifications presented | ||
140 | here. | ||
141 | |||
142 | 1.5. Definitions of terms and conventions used | ||
143 | |||
144 | byte: 8 bits stored or transmitted as a unit (same as an octet). | ||
145 | (For this specification, a byte is exactly 8 bits, even on | ||
146 | machines which store a character on a number of bits different | ||
147 | from 8.) See below, for the numbering of bits within a byte. | ||
148 | |||
149 | 1.6. Changes from previous versions | ||
150 | |||
151 | Version 3.1 was the first public release of this specification. | ||
152 | In version 3.2, some terminology was changed and the Adler-32 | ||
153 | sample code was rewritten for clarity. In version 3.3, the | ||
154 | support for a preset dictionary was introduced, and the | ||
155 | specification was converted to RFC style. | ||
156 | |||
157 | 2. Detailed specification | ||
158 | |||
159 | 2.1. Overall conventions | ||
160 | |||
161 | In the diagrams below, a box like this: | ||
162 | |||
163 | +---+ | ||
164 | | | <-- the vertical bars might be missing | ||
165 | +---+ | ||
166 | |||
167 | |||
168 | |||
169 | |||
170 | Deutsch & Gailly Informational [Page 3] | ||
171 | |||
172 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
173 | |||
174 | |||
175 | represents one byte; a box like this: | ||
176 | |||
177 | +==============+ | ||
178 | | | | ||
179 | +==============+ | ||
180 | |||
181 | represents a variable number of bytes. | ||
182 | |||
183 | Bytes stored within a computer do not have a "bit order", since | ||
184 | they are always treated as a unit. However, a byte considered as | ||
185 | an integer between 0 and 255 does have a most- and least- | ||
186 | significant bit, and since we write numbers with the most- | ||
187 | significant digit on the left, we also write bytes with the most- | ||
188 | significant bit on the left. In the diagrams below, we number the | ||
189 | bits of a byte so that bit 0 is the least-significant bit, i.e., | ||
190 | the bits are numbered: | ||
191 | |||
192 | +--------+ | ||
193 | |76543210| | ||
194 | +--------+ | ||
195 | |||
196 | Within a computer, a number may occupy multiple bytes. All | ||
197 | multi-byte numbers in the format described here are stored with | ||
198 | the MOST-significant byte first (at the lower memory address). | ||
199 | For example, the decimal number 520 is stored as: | ||
200 | |||
201 | 0 1 | ||
202 | +--------+--------+ | ||
203 | |00000010|00001000| | ||
204 | +--------+--------+ | ||
205 | ^ ^ | ||
206 | | | | ||
207 | | + less significant byte = 8 | ||
208 | + more significant byte = 2 x 256 | ||
209 | |||
210 | 2.2. Data format | ||
211 | |||
212 | A zlib stream has the following structure: | ||
213 | |||
214 | 0 1 | ||
215 | +---+---+ | ||
216 | |CMF|FLG| (more-->) | ||
217 | +---+---+ | ||
218 | |||
219 | |||
220 | |||
221 | |||
222 | |||
223 | |||
224 | |||
225 | |||
226 | Deutsch & Gailly Informational [Page 4] | ||
227 | |||
228 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
229 | |||
230 | |||
231 | (if FLG.FDICT set) | ||
232 | |||
233 | 0 1 2 3 | ||
234 | +---+---+---+---+ | ||
235 | | DICTID | (more-->) | ||
236 | +---+---+---+---+ | ||
237 | |||
238 | +=====================+---+---+---+---+ | ||
239 | |...compressed data...| ADLER32 | | ||
240 | +=====================+---+---+---+---+ | ||
241 | |||
242 | Any data which may appear after ADLER32 are not part of the zlib | ||
243 | stream. | ||
244 | |||
245 | CMF (Compression Method and flags) | ||
246 | This byte is divided into a 4-bit compression method and a 4- | ||
247 | bit information field depending on the compression method. | ||
248 | |||
249 | bits 0 to 3 CM Compression method | ||
250 | bits 4 to 7 CINFO Compression info | ||
251 | |||
252 | CM (Compression method) | ||
253 | This identifies the compression method used in the file. CM = 8 | ||
254 | denotes the "deflate" compression method with a window size up | ||
255 | to 32K. This is the method used by gzip and PNG (see | ||
256 | references [1] and [2] in Chapter 3, below, for the reference | ||
257 | documents). CM = 15 is reserved. It might be used in a future | ||
258 | version of this specification to indicate the presence of an | ||
259 | extra field before the compressed data. | ||
260 | |||
261 | CINFO (Compression info) | ||
262 | For CM = 8, CINFO is the base-2 logarithm of the LZ77 window | ||
263 | size, minus eight (CINFO=7 indicates a 32K window size). Values | ||
264 | of CINFO above 7 are not allowed in this version of the | ||
265 | specification. CINFO is not defined in this specification for | ||
266 | CM not equal to 8. | ||
267 | |||
268 | FLG (FLaGs) | ||
269 | This flag byte is divided as follows: | ||
270 | |||
271 | bits 0 to 4 FCHECK (check bits for CMF and FLG) | ||
272 | bit 5 FDICT (preset dictionary) | ||
273 | bits 6 to 7 FLEVEL (compression level) | ||
274 | |||
275 | The FCHECK value must be such that CMF and FLG, when viewed as | ||
276 | a 16-bit unsigned integer stored in MSB order (CMF*256 + FLG), | ||
277 | is a multiple of 31. | ||
278 | |||
279 | |||
280 | |||
281 | |||
282 | Deutsch & Gailly Informational [Page 5] | ||
283 | |||
284 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
285 | |||
286 | |||
287 | FDICT (Preset dictionary) | ||
288 | If FDICT is set, a DICT dictionary identifier is present | ||
289 | immediately after the FLG byte. The dictionary is a sequence of | ||
290 | bytes which are initially fed to the compressor without | ||
291 | producing any compressed output. DICT is the Adler-32 checksum | ||
292 | of this sequence of bytes (see the definition of ADLER32 | ||
293 | below). The decompressor can use this identifier to determine | ||
294 | which dictionary has been used by the compressor. | ||
295 | |||
296 | FLEVEL (Compression level) | ||
297 | These flags are available for use by specific compression | ||
298 | methods. The "deflate" method (CM = 8) sets these flags as | ||
299 | follows: | ||
300 | |||
301 | 0 - compressor used fastest algorithm | ||
302 | 1 - compressor used fast algorithm | ||
303 | 2 - compressor used default algorithm | ||
304 | 3 - compressor used maximum compression, slowest algorithm | ||
305 | |||
306 | The information in FLEVEL is not needed for decompression; it | ||
307 | is there to indicate if recompression might be worthwhile. | ||
308 | |||
309 | compressed data | ||
310 | For compression method 8, the compressed data is stored in the | ||
311 | deflate compressed data format as described in the document | ||
312 | "DEFLATE Compressed Data Format Specification" by L. Peter | ||
313 | Deutsch. (See reference [3] in Chapter 3, below) | ||
314 | |||
315 | Other compressed data formats are not specified in this version | ||
316 | of the zlib specification. | ||
317 | |||
318 | ADLER32 (Adler-32 checksum) | ||
319 | This contains a checksum value of the uncompressed data | ||
320 | (excluding any dictionary data) computed according to Adler-32 | ||
321 | algorithm. This algorithm is a 32-bit extension and improvement | ||
322 | of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073 | ||
323 | standard. See references [4] and [5] in Chapter 3, below) | ||
324 | |||
325 | Adler-32 is composed of two sums accumulated per byte: s1 is | ||
326 | the sum of all bytes, s2 is the sum of all s1 values. Both sums | ||
327 | are done modulo 65521. s1 is initialized to 1, s2 to zero. The | ||
328 | Adler-32 checksum is stored as s2*65536 + s1 in most- | ||
329 | significant-byte first (network) order. | ||
330 | |||
331 | |||
332 | |||
333 | |||
334 | |||
335 | |||
336 | |||
337 | |||
338 | Deutsch & Gailly Informational [Page 6] | ||
339 | |||
340 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
341 | |||
342 | |||
343 | 2.3. Compliance | ||
344 | |||
345 | A compliant compressor must produce streams with correct CMF, FLG | ||
346 | and ADLER32, but need not support preset dictionaries. When the | ||
347 | zlib data format is used as part of another standard data format, | ||
348 | the compressor may use only preset dictionaries that are specified | ||
349 | by this other data format. If this other format does not use the | ||
350 | preset dictionary feature, the compressor must not set the FDICT | ||
351 | flag. | ||
352 | |||
353 | A compliant decompressor must check CMF, FLG, and ADLER32, and | ||
354 | provide an error indication if any of these have incorrect values. | ||
355 | A compliant decompressor must give an error indication if CM is | ||
356 | not one of the values defined in this specification (only the | ||
357 | value 8 is permitted in this version), since another value could | ||
358 | indicate the presence of new features that would cause subsequent | ||
359 | data to be interpreted incorrectly. A compliant decompressor must | ||
360 | give an error indication if FDICT is set and DICTID is not the | ||
361 | identifier of a known preset dictionary. A decompressor may | ||
362 | ignore FLEVEL and still be compliant. When the zlib data format | ||
363 | is being used as a part of another standard format, a compliant | ||
364 | decompressor must support all the preset dictionaries specified by | ||
365 | the other format. When the other format does not use the preset | ||
366 | dictionary feature, a compliant decompressor must reject any | ||
367 | stream in which the FDICT flag is set. | ||
368 | |||
369 | 3. References | ||
370 | |||
371 | [1] Deutsch, L.P.,"GZIP Compressed Data Format Specification", | ||
372 | available in ftp://ftp.uu.net/pub/archiving/zip/doc/ | ||
373 | |||
374 | [2] Thomas Boutell, "PNG (Portable Network Graphics) specification", | ||
375 | available in ftp://ftp.uu.net/graphics/png/documents/ | ||
376 | |||
377 | [3] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification", | ||
378 | available in ftp://ftp.uu.net/pub/archiving/zip/doc/ | ||
379 | |||
380 | [4] Fletcher, J. G., "An Arithmetic Checksum for Serial | ||
381 | Transmissions," IEEE Transactions on Communications, Vol. COM-30, | ||
382 | No. 1, January 1982, pp. 247-252. | ||
383 | |||
384 | [5] ITU-T Recommendation X.224, Annex D, "Checksum Algorithms," | ||
385 | November, 1993, pp. 144, 145. (Available from | ||
386 | gopher://info.itu.ch). ITU-T X.244 is also the same as ISO 8073. | ||
387 | |||
388 | |||
389 | |||
390 | |||
391 | |||
392 | |||
393 | |||
394 | Deutsch & Gailly Informational [Page 7] | ||
395 | |||
396 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
397 | |||
398 | |||
399 | 4. Source code | ||
400 | |||
401 | Source code for a C language implementation of a "zlib" compliant | ||
402 | library is available at ftp://ftp.uu.net/pub/archiving/zip/zlib/. | ||
403 | |||
404 | 5. Security Considerations | ||
405 | |||
406 | A decoder that fails to check the ADLER32 checksum value may be | ||
407 | subject to undetected data corruption. | ||
408 | |||
409 | 6. Acknowledgements | ||
410 | |||
411 | Trademarks cited in this document are the property of their | ||
412 | respective owners. | ||
413 | |||
414 | Jean-Loup Gailly and Mark Adler designed the zlib format and wrote | ||
415 | the related software described in this specification. Glenn | ||
416 | Randers-Pehrson converted this document to RFC and HTML format. | ||
417 | |||
418 | 7. Authors' Addresses | ||
419 | |||
420 | L. Peter Deutsch | ||
421 | Aladdin Enterprises | ||
422 | 203 Santa Margarita Ave. | ||
423 | Menlo Park, CA 94025 | ||
424 | |||
425 | Phone: (415) 322-0103 (AM only) | ||
426 | FAX: (415) 322-1734 | ||
427 | EMail: <ghost@aladdin.com> | ||
428 | |||
429 | |||
430 | Jean-Loup Gailly | ||
431 | |||
432 | EMail: <gzip@prep.ai.mit.edu> | ||
433 | |||
434 | Questions about the technical content of this specification can be | ||
435 | sent by email to | ||
436 | |||
437 | Jean-Loup Gailly <gzip@prep.ai.mit.edu> and | ||
438 | Mark Adler <madler@alumni.caltech.edu> | ||
439 | |||
440 | Editorial comments on this specification can be sent by email to | ||
441 | |||
442 | L. Peter Deutsch <ghost@aladdin.com> and | ||
443 | Glenn Randers-Pehrson <randeg@alumni.rpi.edu> | ||
444 | |||
445 | |||
446 | |||
447 | |||
448 | |||
449 | |||
450 | Deutsch & Gailly Informational [Page 8] | ||
451 | |||
452 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
453 | |||
454 | |||
455 | 8. Appendix: Rationale | ||
456 | |||
457 | 8.1. Preset dictionaries | ||
458 | |||
459 | A preset dictionary is specially useful to compress short input | ||
460 | sequences. The compressor can take advantage of the dictionary | ||
461 | context to encode the input in a more compact manner. The | ||
462 | decompressor can be initialized with the appropriate context by | ||
463 | virtually decompressing a compressed version of the dictionary | ||
464 | without producing any output. However for certain compression | ||
465 | algorithms such as the deflate algorithm this operation can be | ||
466 | achieved without actually performing any decompression. | ||
467 | |||
468 | The compressor and the decompressor must use exactly the same | ||
469 | dictionary. The dictionary may be fixed or may be chosen among a | ||
470 | certain number of predefined dictionaries, according to the kind | ||
471 | of input data. The decompressor can determine which dictionary has | ||
472 | been chosen by the compressor by checking the dictionary | ||
473 | identifier. This document does not specify the contents of | ||
474 | predefined dictionaries, since the optimal dictionaries are | ||
475 | application specific. Standard data formats using this feature of | ||
476 | the zlib specification must precisely define the allowed | ||
477 | dictionaries. | ||
478 | |||
479 | 8.2. The Adler-32 algorithm | ||
480 | |||
481 | The Adler-32 algorithm is much faster than the CRC32 algorithm yet | ||
482 | still provides an extremely low probability of undetected errors. | ||
483 | |||
484 | The modulo on unsigned long accumulators can be delayed for 5552 | ||
485 | bytes, so the modulo operation time is negligible. If the bytes | ||
486 | are a, b, c, the second sum is 3a + 2b + c + 3, and so is position | ||
487 | and order sensitive, unlike the first sum, which is just a | ||
488 | checksum. That 65521 is prime is important to avoid a possible | ||
489 | large class of two-byte errors that leave the check unchanged. | ||
490 | (The Fletcher checksum uses 255, which is not prime and which also | ||
491 | makes the Fletcher check insensitive to single byte changes 0 <-> | ||
492 | 255.) | ||
493 | |||
494 | The sum s1 is initialized to 1 instead of zero to make the length | ||
495 | of the sequence part of s2, so that the length does not have to be | ||
496 | checked separately. (Any sequence of zeroes has a Fletcher | ||
497 | checksum of zero.) | ||
498 | |||
499 | |||
500 | |||
501 | |||
502 | |||
503 | |||
504 | |||
505 | |||
506 | Deutsch & Gailly Informational [Page 9] | ||
507 | |||
508 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
509 | |||
510 | |||
511 | 9. Appendix: Sample code | ||
512 | |||
513 | The following C code computes the Adler-32 checksum of a data buffer. | ||
514 | It is written for clarity, not for speed. The sample code is in the | ||
515 | ANSI C programming language. Non C users may find it easier to read | ||
516 | with these hints: | ||
517 | |||
518 | & Bitwise AND operator. | ||
519 | >> Bitwise right shift operator. When applied to an | ||
520 | unsigned quantity, as here, right shift inserts zero bit(s) | ||
521 | at the left. | ||
522 | << Bitwise left shift operator. Left shift inserts zero | ||
523 | bit(s) at the right. | ||
524 | ++ "n++" increments the variable n. | ||
525 | % modulo operator: a % b is the remainder of a divided by b. | ||
526 | |||
527 | #define BASE 65521 /* largest prime smaller than 65536 */ | ||
528 | |||
529 | /* | ||
530 | Update a running Adler-32 checksum with the bytes buf[0..len-1] | ||
531 | and return the updated checksum. The Adler-32 checksum should be | ||
532 | initialized to 1. | ||
533 | |||
534 | Usage example: | ||
535 | |||
536 | unsigned long adler = 1L; | ||
537 | |||
538 | while (read_buffer(buffer, length) != EOF) { | ||
539 | adler = update_adler32(adler, buffer, length); | ||
540 | } | ||
541 | if (adler != original_adler) error(); | ||
542 | */ | ||
543 | unsigned long update_adler32(unsigned long adler, | ||
544 | unsigned char *buf, int len) | ||
545 | { | ||
546 | unsigned long s1 = adler & 0xffff; | ||
547 | unsigned long s2 = (adler >> 16) & 0xffff; | ||
548 | int n; | ||
549 | |||
550 | for (n = 0; n < len; n++) { | ||
551 | s1 = (s1 + buf[n]) % BASE; | ||
552 | s2 = (s2 + s1) % BASE; | ||
553 | } | ||
554 | return (s2 << 16) + s1; | ||
555 | } | ||
556 | |||
557 | /* Return the adler32 of the bytes buf[0..len-1] */ | ||
558 | |||
559 | |||
560 | |||
561 | |||
562 | Deutsch & Gailly Informational [Page 10] | ||
563 | |||
564 | RFC 1950 ZLIB Compressed Data Format Specification May 1996 | ||
565 | |||
566 | |||
567 | unsigned long adler32(unsigned char *buf, int len) | ||
568 | { | ||
569 | return update_adler32(1L, buf, len); | ||
570 | } | ||
571 | |||
572 | |||
573 | |||
574 | |||
575 | |||
576 | |||
577 | |||
578 | |||
579 | |||
580 | |||
581 | |||
582 | |||
583 | |||
584 | |||
585 | |||
586 | |||
587 | |||
588 | |||
589 | |||
590 | |||
591 | |||
592 | |||
593 | |||
594 | |||
595 | |||
596 | |||
597 | |||
598 | |||
599 | |||
600 | |||
601 | |||
602 | |||
603 | |||
604 | |||
605 | |||
606 | |||
607 | |||
608 | |||
609 | |||
610 | |||
611 | |||
612 | |||
613 | |||
614 | |||
615 | |||
616 | |||
617 | |||
618 | Deutsch & Gailly Informational [Page 11] | ||
619 | |||
diff --git a/doc/rfc1951.txt b/doc/rfc1951.txt new file mode 100644 index 0000000..403c8c7 --- /dev/null +++ b/doc/rfc1951.txt | |||
@@ -0,0 +1,955 @@ | |||
1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | Network Working Group P. Deutsch | ||
8 | Request for Comments: 1951 Aladdin Enterprises | ||
9 | Category: Informational May 1996 | ||
10 | |||
11 | |||
12 | DEFLATE Compressed Data Format Specification version 1.3 | ||
13 | |||
14 | Status of This Memo | ||
15 | |||
16 | This memo provides information for the Internet community. This memo | ||
17 | does not specify an Internet standard of any kind. Distribution of | ||
18 | this memo is unlimited. | ||
19 | |||
20 | IESG Note: | ||
21 | |||
22 | The IESG takes no position on the validity of any Intellectual | ||
23 | Property Rights statements contained in this document. | ||
24 | |||
25 | Notices | ||
26 | |||
27 | Copyright (c) 1996 L. Peter Deutsch | ||
28 | |||
29 | Permission is granted to copy and distribute this document for any | ||
30 | purpose and without charge, including translations into other | ||
31 | languages and incorporation into compilations, provided that the | ||
32 | copyright notice and this notice are preserved, and that any | ||
33 | substantive changes or deletions from the original are clearly | ||
34 | marked. | ||
35 | |||
36 | A pointer to the latest version of this and related documentation in | ||
37 | HTML format can be found at the URL | ||
38 | <ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>. | ||
39 | |||
40 | Abstract | ||
41 | |||
42 | This specification defines a lossless compressed data format that | ||
43 | compresses data using a combination of the LZ77 algorithm and Huffman | ||
44 | coding, with efficiency comparable to the best currently available | ||
45 | general-purpose compression methods. The data can be produced or | ||
46 | consumed, even for an arbitrarily long sequentially presented input | ||
47 | data stream, using only an a priori bounded amount of intermediate | ||
48 | storage. The format can be implemented readily in a manner not | ||
49 | covered by patents. | ||
50 | |||
51 | |||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
57 | |||
58 | Deutsch Informational [Page 1] | ||
59 | |||
60 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
61 | |||
62 | |||
63 | Table of Contents | ||
64 | |||
65 | 1. Introduction ................................................... 2 | ||
66 | 1.1. Purpose ................................................... 2 | ||
67 | 1.2. Intended audience ......................................... 3 | ||
68 | 1.3. Scope ..................................................... 3 | ||
69 | 1.4. Compliance ................................................ 3 | ||
70 | 1.5. Definitions of terms and conventions used ................ 3 | ||
71 | 1.6. Changes from previous versions ............................ 4 | ||
72 | 2. Compressed representation overview ............................. 4 | ||
73 | 3. Detailed specification ......................................... 5 | ||
74 | 3.1. Overall conventions ....................................... 5 | ||
75 | 3.1.1. Packing into bytes .................................. 5 | ||
76 | 3.2. Compressed block format ................................... 6 | ||
77 | 3.2.1. Synopsis of prefix and Huffman coding ............... 6 | ||
78 | 3.2.2. Use of Huffman coding in the "deflate" format ....... 7 | ||
79 | 3.2.3. Details of block format ............................. 9 | ||
80 | 3.2.4. Non-compressed blocks (BTYPE=00) ................... 11 | ||
81 | 3.2.5. Compressed blocks (length and distance codes) ...... 11 | ||
82 | 3.2.6. Compression with fixed Huffman codes (BTYPE=01) .... 12 | ||
83 | 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) .. 13 | ||
84 | 3.3. Compliance ............................................... 14 | ||
85 | 4. Compression algorithm details ................................. 14 | ||
86 | 5. References .................................................... 16 | ||
87 | 6. Security Considerations ....................................... 16 | ||
88 | 7. Source code ................................................... 16 | ||
89 | 8. Acknowledgements .............................................. 16 | ||
90 | 9. Author's Address .............................................. 17 | ||
91 | |||
92 | 1. Introduction | ||
93 | |||
94 | 1.1. Purpose | ||
95 | |||
96 | The purpose of this specification is to define a lossless | ||
97 | compressed data format that: | ||
98 | * Is independent of CPU type, operating system, file system, | ||
99 | and character set, and hence can be used for interchange; | ||
100 | * Can be produced or consumed, even for an arbitrarily long | ||
101 | sequentially presented input data stream, using only an a | ||
102 | priori bounded amount of intermediate storage, and hence | ||
103 | can be used in data communications or similar structures | ||
104 | such as Unix filters; | ||
105 | * Compresses data with efficiency comparable to the best | ||
106 | currently available general-purpose compression methods, | ||
107 | and in particular considerably better than the "compress" | ||
108 | program; | ||
109 | * Can be implemented readily in a manner not covered by | ||
110 | patents, and hence can be practiced freely; | ||
111 | |||
112 | |||
113 | |||
114 | Deutsch Informational [Page 2] | ||
115 | |||
116 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
117 | |||
118 | |||
119 | * Is compatible with the file format produced by the current | ||
120 | widely used gzip utility, in that conforming decompressors | ||
121 | will be able to read data produced by the existing gzip | ||
122 | compressor. | ||
123 | |||
124 | The data format defined by this specification does not attempt to: | ||
125 | |||
126 | * Allow random access to compressed data; | ||
127 | * Compress specialized data (e.g., raster graphics) as well | ||
128 | as the best currently available specialized algorithms. | ||
129 | |||
130 | A simple counting argument shows that no lossless compression | ||
131 | algorithm can compress every possible input data set. For the | ||
132 | format defined here, the worst case expansion is 5 bytes per 32K- | ||
133 | byte block, i.e., a size increase of 0.015% for large data sets. | ||
134 | English text usually compresses by a factor of 2.5 to 3; | ||
135 | executable files usually compress somewhat less; graphical data | ||
136 | such as raster images may compress much more. | ||
137 | |||
138 | 1.2. Intended audience | ||
139 | |||
140 | This specification is intended for use by implementors of software | ||
141 | to compress data into "deflate" format and/or decompress data from | ||
142 | "deflate" format. | ||
143 | |||
144 | The text of the specification assumes a basic background in | ||
145 | programming at the level of bits and other primitive data | ||
146 | representations. Familiarity with the technique of Huffman coding | ||
147 | is helpful but not required. | ||
148 | |||
149 | 1.3. Scope | ||
150 | |||
151 | The specification specifies a method for representing a sequence | ||
152 | of bytes as a (usually shorter) sequence of bits, and a method for | ||
153 | packing the latter bit sequence into bytes. | ||
154 | |||
155 | 1.4. Compliance | ||
156 | |||
157 | Unless otherwise indicated below, a compliant decompressor must be | ||
158 | able to accept and decompress any data set that conforms to all | ||
159 | the specifications presented here; a compliant compressor must | ||
160 | produce data sets that conform to all the specifications presented | ||
161 | here. | ||
162 | |||
163 | 1.5. Definitions of terms and conventions used | ||
164 | |||
165 | Byte: 8 bits stored or transmitted as a unit (same as an octet). | ||
166 | For this specification, a byte is exactly 8 bits, even on machines | ||
167 | |||
168 | |||
169 | |||
170 | Deutsch Informational [Page 3] | ||
171 | |||
172 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
173 | |||
174 | |||
175 | which store a character on a number of bits different from eight. | ||
176 | See below, for the numbering of bits within a byte. | ||
177 | |||
178 | String: a sequence of arbitrary bytes. | ||
179 | |||
180 | 1.6. Changes from previous versions | ||
181 | |||
182 | There have been no technical changes to the deflate format since | ||
183 | version 1.1 of this specification. In version 1.2, some | ||
184 | terminology was changed. Version 1.3 is a conversion of the | ||
185 | specification to RFC style. | ||
186 | |||
187 | 2. Compressed representation overview | ||
188 | |||
189 | A compressed data set consists of a series of blocks, corresponding | ||
190 | to successive blocks of input data. The block sizes are arbitrary, | ||
191 | except that non-compressible blocks are limited to 65,535 bytes. | ||
192 | |||
193 | Each block is compressed using a combination of the LZ77 algorithm | ||
194 | and Huffman coding. The Huffman trees for each block are independent | ||
195 | of those for previous or subsequent blocks; the LZ77 algorithm may | ||
196 | use a reference to a duplicated string occurring in a previous block, | ||
197 | up to 32K input bytes before. | ||
198 | |||
199 | Each block consists of two parts: a pair of Huffman code trees that | ||
200 | describe the representation of the compressed data part, and a | ||
201 | compressed data part. (The Huffman trees themselves are compressed | ||
202 | using Huffman encoding.) The compressed data consists of a series of | ||
203 | elements of two types: literal bytes (of strings that have not been | ||
204 | detected as duplicated within the previous 32K input bytes), and | ||
205 | pointers to duplicated strings, where a pointer is represented as a | ||
206 | pair <length, backward distance>. The representation used in the | ||
207 | "deflate" format limits distances to 32K bytes and lengths to 258 | ||
208 | bytes, but does not limit the size of a block, except for | ||
209 | uncompressible blocks, which are limited as noted above. | ||
210 | |||
211 | Each type of value (literals, distances, and lengths) in the | ||
212 | compressed data is represented using a Huffman code, using one code | ||
213 | tree for literals and lengths and a separate code tree for distances. | ||
214 | The code trees for each block appear in a compact form just before | ||
215 | the compressed data for that block. | ||
216 | |||
217 | |||
218 | |||
219 | |||
220 | |||
221 | |||
222 | |||
223 | |||
224 | |||
225 | |||
226 | Deutsch Informational [Page 4] | ||
227 | |||
228 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
229 | |||
230 | |||
231 | 3. Detailed specification | ||
232 | |||
233 | 3.1. Overall conventions In the diagrams below, a box like this: | ||
234 | |||
235 | +---+ | ||
236 | | | <-- the vertical bars might be missing | ||
237 | +---+ | ||
238 | |||
239 | represents one byte; a box like this: | ||
240 | |||
241 | +==============+ | ||
242 | | | | ||
243 | +==============+ | ||
244 | |||
245 | represents a variable number of bytes. | ||
246 | |||
247 | Bytes stored within a computer do not have a "bit order", since | ||
248 | they are always treated as a unit. However, a byte considered as | ||
249 | an integer between 0 and 255 does have a most- and least- | ||
250 | significant bit, and since we write numbers with the most- | ||
251 | significant digit on the left, we also write bytes with the most- | ||
252 | significant bit on the left. In the diagrams below, we number the | ||
253 | bits of a byte so that bit 0 is the least-significant bit, i.e., | ||
254 | the bits are numbered: | ||
255 | |||
256 | +--------+ | ||
257 | |76543210| | ||
258 | +--------+ | ||
259 | |||
260 | Within a computer, a number may occupy multiple bytes. All | ||
261 | multi-byte numbers in the format described here are stored with | ||
262 | the least-significant byte first (at the lower memory address). | ||
263 | For example, the decimal number 520 is stored as: | ||
264 | |||
265 | 0 1 | ||
266 | +--------+--------+ | ||
267 | |00001000|00000010| | ||
268 | +--------+--------+ | ||
269 | ^ ^ | ||
270 | | | | ||
271 | | + more significant byte = 2 x 256 | ||
272 | + less significant byte = 8 | ||
273 | |||
274 | 3.1.1. Packing into bytes | ||
275 | |||
276 | This document does not address the issue of the order in which | ||
277 | bits of a byte are transmitted on a bit-sequential medium, | ||
278 | since the final data format described here is byte- rather than | ||
279 | |||
280 | |||
281 | |||
282 | Deutsch Informational [Page 5] | ||
283 | |||
284 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
285 | |||
286 | |||
287 | bit-oriented. However, we describe the compressed block format | ||
288 | in below, as a sequence of data elements of various bit | ||
289 | lengths, not a sequence of bytes. We must therefore specify | ||
290 | how to pack these data elements into bytes to form the final | ||
291 | compressed byte sequence: | ||
292 | |||
293 | * Data elements are packed into bytes in order of | ||
294 | increasing bit number within the byte, i.e., starting | ||
295 | with the least-significant bit of the byte. | ||
296 | * Data elements other than Huffman codes are packed | ||
297 | starting with the least-significant bit of the data | ||
298 | element. | ||
299 | * Huffman codes are packed starting with the most- | ||
300 | significant bit of the code. | ||
301 | |||
302 | In other words, if one were to print out the compressed data as | ||
303 | a sequence of bytes, starting with the first byte at the | ||
304 | *right* margin and proceeding to the *left*, with the most- | ||
305 | significant bit of each byte on the left as usual, one would be | ||
306 | able to parse the result from right to left, with fixed-width | ||
307 | elements in the correct MSB-to-LSB order and Huffman codes in | ||
308 | bit-reversed order (i.e., with the first bit of the code in the | ||
309 | relative LSB position). | ||
310 | |||
311 | 3.2. Compressed block format | ||
312 | |||
313 | 3.2.1. Synopsis of prefix and Huffman coding | ||
314 | |||
315 | Prefix coding represents symbols from an a priori known | ||
316 | alphabet by bit sequences (codes), one code for each symbol, in | ||
317 | a manner such that different symbols may be represented by bit | ||
318 | sequences of different lengths, but a parser can always parse | ||
319 | an encoded string unambiguously symbol-by-symbol. | ||
320 | |||
321 | We define a prefix code in terms of a binary tree in which the | ||
322 | two edges descending from each non-leaf node are labeled 0 and | ||
323 | 1 and in which the leaf nodes correspond one-for-one with (are | ||
324 | labeled with) the symbols of the alphabet; then the code for a | ||
325 | symbol is the sequence of 0's and 1's on the edges leading from | ||
326 | the root to the leaf labeled with that symbol. For example: | ||
327 | |||
328 | |||
329 | |||
330 | |||
331 | |||
332 | |||
333 | |||
334 | |||
335 | |||
336 | |||
337 | |||
338 | Deutsch Informational [Page 6] | ||
339 | |||
340 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
341 | |||
342 | |||
343 | /\ Symbol Code | ||
344 | 0 1 ------ ---- | ||
345 | / \ A 00 | ||
346 | /\ B B 1 | ||
347 | 0 1 C 011 | ||
348 | / \ D 010 | ||
349 | A /\ | ||
350 | 0 1 | ||
351 | / \ | ||
352 | D C | ||
353 | |||
354 | A parser can decode the next symbol from an encoded input | ||
355 | stream by walking down the tree from the root, at each step | ||
356 | choosing the edge corresponding to the next input bit. | ||
357 | |||
358 | Given an alphabet with known symbol frequencies, the Huffman | ||
359 | algorithm allows the construction of an optimal prefix code | ||
360 | (one which represents strings with those symbol frequencies | ||
361 | using the fewest bits of any possible prefix codes for that | ||
362 | alphabet). Such a code is called a Huffman code. (See | ||
363 | reference [1] in Chapter 5, references for additional | ||
364 | information on Huffman codes.) | ||
365 | |||
366 | Note that in the "deflate" format, the Huffman codes for the | ||
367 | various alphabets must not exceed certain maximum code lengths. | ||
368 | This constraint complicates the algorithm for computing code | ||
369 | lengths from symbol frequencies. Again, see Chapter 5, | ||
370 | references for details. | ||
371 | |||
372 | 3.2.2. Use of Huffman coding in the "deflate" format | ||
373 | |||
374 | The Huffman codes used for each alphabet in the "deflate" | ||
375 | format have two additional rules: | ||
376 | |||
377 | * All codes of a given bit length have lexicographically | ||
378 | consecutive values, in the same order as the symbols | ||
379 | they represent; | ||
380 | |||
381 | * Shorter codes lexicographically precede longer codes. | ||
382 | |||
383 | |||
384 | |||
385 | |||
386 | |||
387 | |||
388 | |||
389 | |||
390 | |||
391 | |||
392 | |||
393 | |||
394 | Deutsch Informational [Page 7] | ||
395 | |||
396 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
397 | |||
398 | |||
399 | We could recode the example above to follow this rule as | ||
400 | follows, assuming that the order of the alphabet is ABCD: | ||
401 | |||
402 | Symbol Code | ||
403 | ------ ---- | ||
404 | A 10 | ||
405 | B 0 | ||
406 | C 110 | ||
407 | D 111 | ||
408 | |||
409 | I.e., 0 precedes 10 which precedes 11x, and 110 and 111 are | ||
410 | lexicographically consecutive. | ||
411 | |||
412 | Given this rule, we can define the Huffman code for an alphabet | ||
413 | just by giving the bit lengths of the codes for each symbol of | ||
414 | the alphabet in order; this is sufficient to determine the | ||
415 | actual codes. In our example, the code is completely defined | ||
416 | by the sequence of bit lengths (2, 1, 3, 3). The following | ||
417 | algorithm generates the codes as integers, intended to be read | ||
418 | from most- to least-significant bit. The code lengths are | ||
419 | initially in tree[I].Len; the codes are produced in | ||
420 | tree[I].Code. | ||
421 | |||
422 | 1) Count the number of codes for each code length. Let | ||
423 | bl_count[N] be the number of codes of length N, N >= 1. | ||
424 | |||
425 | 2) Find the numerical value of the smallest code for each | ||
426 | code length: | ||
427 | |||
428 | code = 0; | ||
429 | bl_count[0] = 0; | ||
430 | for (bits = 1; bits <= MAX_BITS; bits++) { | ||
431 | code = (code + bl_count[bits-1]) << 1; | ||
432 | next_code[bits] = code; | ||
433 | } | ||
434 | |||
435 | 3) Assign numerical values to all codes, using consecutive | ||
436 | values for all codes of the same length with the base | ||
437 | values determined at step 2. Codes that are never used | ||
438 | (which have a bit length of zero) must not be assigned a | ||
439 | value. | ||
440 | |||
441 | for (n = 0; n <= max_code; n++) { | ||
442 | len = tree[n].Len; | ||
443 | if (len != 0) { | ||
444 | tree[n].Code = next_code[len]; | ||
445 | next_code[len]++; | ||
446 | } | ||
447 | |||
448 | |||
449 | |||
450 | Deutsch Informational [Page 8] | ||
451 | |||
452 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
453 | |||
454 | |||
455 | } | ||
456 | |||
457 | Example: | ||
458 | |||
459 | Consider the alphabet ABCDEFGH, with bit lengths (3, 3, 3, 3, | ||
460 | 3, 2, 4, 4). After step 1, we have: | ||
461 | |||
462 | N bl_count[N] | ||
463 | - ----------- | ||
464 | 2 1 | ||
465 | 3 5 | ||
466 | 4 2 | ||
467 | |||
468 | Step 2 computes the following next_code values: | ||
469 | |||
470 | N next_code[N] | ||
471 | - ------------ | ||
472 | 1 0 | ||
473 | 2 0 | ||
474 | 3 2 | ||
475 | 4 14 | ||
476 | |||
477 | Step 3 produces the following code values: | ||
478 | |||
479 | Symbol Length Code | ||
480 | ------ ------ ---- | ||
481 | A 3 010 | ||
482 | B 3 011 | ||
483 | C 3 100 | ||
484 | D 3 101 | ||
485 | E 3 110 | ||
486 | F 2 00 | ||
487 | G 4 1110 | ||
488 | H 4 1111 | ||
489 | |||
490 | 3.2.3. Details of block format | ||
491 | |||
492 | Each block of compressed data begins with 3 header bits | ||
493 | containing the following data: | ||
494 | |||
495 | first bit BFINAL | ||
496 | next 2 bits BTYPE | ||
497 | |||
498 | Note that the header bits do not necessarily begin on a byte | ||
499 | boundary, since a block does not necessarily occupy an integral | ||
500 | number of bytes. | ||
501 | |||
502 | |||
503 | |||
504 | |||
505 | |||
506 | Deutsch Informational [Page 9] | ||
507 | |||
508 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
509 | |||
510 | |||
511 | BFINAL is set if and only if this is the last block of the data | ||
512 | set. | ||
513 | |||
514 | BTYPE specifies how the data are compressed, as follows: | ||
515 | |||
516 | 00 - no compression | ||
517 | 01 - compressed with fixed Huffman codes | ||
518 | 10 - compressed with dynamic Huffman codes | ||
519 | 11 - reserved (error) | ||
520 | |||
521 | The only difference between the two compressed cases is how the | ||
522 | Huffman codes for the literal/length and distance alphabets are | ||
523 | defined. | ||
524 | |||
525 | In all cases, the decoding algorithm for the actual data is as | ||
526 | follows: | ||
527 | |||
528 | do | ||
529 | read block header from input stream. | ||
530 | if stored with no compression | ||
531 | skip any remaining bits in current partially | ||
532 | processed byte | ||
533 | read LEN and NLEN (see next section) | ||
534 | copy LEN bytes of data to output | ||
535 | otherwise | ||
536 | if compressed with dynamic Huffman codes | ||
537 | read representation of code trees (see | ||
538 | subsection below) | ||
539 | loop (until end of block code recognized) | ||
540 | decode literal/length value from input stream | ||
541 | if value < 256 | ||
542 | copy value (literal byte) to output stream | ||
543 | otherwise | ||
544 | if value = end of block (256) | ||
545 | break from loop | ||
546 | otherwise (value = 257..285) | ||
547 | decode distance from input stream | ||
548 | |||
549 | move backwards distance bytes in the output | ||
550 | stream, and copy length bytes from this | ||
551 | position to the output stream. | ||
552 | end loop | ||
553 | while not last block | ||
554 | |||
555 | Note that a duplicated string reference may refer to a string | ||
556 | in a previous block; i.e., the backward distance may cross one | ||
557 | or more block boundaries. However a distance cannot refer past | ||
558 | the beginning of the output stream. (An application using a | ||
559 | |||
560 | |||
561 | |||
562 | Deutsch Informational [Page 10] | ||
563 | |||
564 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
565 | |||
566 | |||
567 | preset dictionary might discard part of the output stream; a | ||
568 | distance can refer to that part of the output stream anyway) | ||
569 | Note also that the referenced string may overlap the current | ||
570 | position; for example, if the last 2 bytes decoded have values | ||
571 | X and Y, a string reference with <length = 5, distance = 2> | ||
572 | adds X,Y,X,Y,X to the output stream. | ||
573 | |||
574 | We now specify each compression method in turn. | ||
575 | |||
576 | 3.2.4. Non-compressed blocks (BTYPE=00) | ||
577 | |||
578 | Any bits of input up to the next byte boundary are ignored. | ||
579 | The rest of the block consists of the following information: | ||
580 | |||
581 | 0 1 2 3 4... | ||
582 | +---+---+---+---+================================+ | ||
583 | | LEN | NLEN |... LEN bytes of literal data...| | ||
584 | +---+---+---+---+================================+ | ||
585 | |||
586 | LEN is the number of data bytes in the block. NLEN is the | ||
587 | one's complement of LEN. | ||
588 | |||
589 | 3.2.5. Compressed blocks (length and distance codes) | ||
590 | |||
591 | As noted above, encoded data blocks in the "deflate" format | ||
592 | consist of sequences of symbols drawn from three conceptually | ||
593 | distinct alphabets: either literal bytes, from the alphabet of | ||
594 | byte values (0..255), or <length, backward distance> pairs, | ||
595 | where the length is drawn from (3..258) and the distance is | ||
596 | drawn from (1..32,768). In fact, the literal and length | ||
597 | alphabets are merged into a single alphabet (0..285), where | ||
598 | values 0..255 represent literal bytes, the value 256 indicates | ||
599 | end-of-block, and values 257..285 represent length codes | ||
600 | (possibly in conjunction with extra bits following the symbol | ||
601 | code) as follows: | ||
602 | |||
603 | |||
604 | |||
605 | |||
606 | |||
607 | |||
608 | |||
609 | |||
610 | |||
611 | |||
612 | |||
613 | |||
614 | |||
615 | |||
616 | |||
617 | |||
618 | Deutsch Informational [Page 11] | ||
619 | |||
620 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
621 | |||
622 | |||
623 | Extra Extra Extra | ||
624 | Code Bits Length(s) Code Bits Lengths Code Bits Length(s) | ||
625 | ---- ---- ------ ---- ---- ------- ---- ---- ------- | ||
626 | 257 0 3 267 1 15,16 277 4 67-82 | ||
627 | 258 0 4 268 1 17,18 278 4 83-98 | ||
628 | 259 0 5 269 2 19-22 279 4 99-114 | ||
629 | 260 0 6 270 2 23-26 280 4 115-130 | ||
630 | 261 0 7 271 2 27-30 281 5 131-162 | ||
631 | 262 0 8 272 2 31-34 282 5 163-194 | ||
632 | 263 0 9 273 3 35-42 283 5 195-226 | ||
633 | 264 0 10 274 3 43-50 284 5 227-257 | ||
634 | 265 1 11,12 275 3 51-58 285 0 258 | ||
635 | 266 1 13,14 276 3 59-66 | ||
636 | |||
637 | The extra bits should be interpreted as a machine integer | ||
638 | stored with the most-significant bit first, e.g., bits 1110 | ||
639 | represent the value 14. | ||
640 | |||
641 | Extra Extra Extra | ||
642 | Code Bits Dist Code Bits Dist Code Bits Distance | ||
643 | ---- ---- ---- ---- ---- ------ ---- ---- -------- | ||
644 | 0 0 1 10 4 33-48 20 9 1025-1536 | ||
645 | 1 0 2 11 4 49-64 21 9 1537-2048 | ||
646 | 2 0 3 12 5 65-96 22 10 2049-3072 | ||
647 | 3 0 4 13 5 97-128 23 10 3073-4096 | ||
648 | 4 1 5,6 14 6 129-192 24 11 4097-6144 | ||
649 | 5 1 7,8 15 6 193-256 25 11 6145-8192 | ||
650 | 6 2 9-12 16 7 257-384 26 12 8193-12288 | ||
651 | 7 2 13-16 17 7 385-512 27 12 12289-16384 | ||
652 | 8 3 17-24 18 8 513-768 28 13 16385-24576 | ||
653 | 9 3 25-32 19 8 769-1024 29 13 24577-32768 | ||
654 | |||
655 | 3.2.6. Compression with fixed Huffman codes (BTYPE=01) | ||
656 | |||
657 | The Huffman codes for the two alphabets are fixed, and are not | ||
658 | represented explicitly in the data. The Huffman code lengths | ||
659 | for the literal/length alphabet are: | ||
660 | |||
661 | Lit Value Bits Codes | ||
662 | --------- ---- ----- | ||
663 | 0 - 143 8 00110000 through | ||
664 | 10111111 | ||
665 | 144 - 255 9 110010000 through | ||
666 | 111111111 | ||
667 | 256 - 279 7 0000000 through | ||
668 | 0010111 | ||
669 | 280 - 287 8 11000000 through | ||
670 | 11000111 | ||
671 | |||
672 | |||
673 | |||
674 | Deutsch Informational [Page 12] | ||
675 | |||
676 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
677 | |||
678 | |||
679 | The code lengths are sufficient to generate the actual codes, | ||
680 | as described above; we show the codes in the table for added | ||
681 | clarity. Literal/length values 286-287 will never actually | ||
682 | occur in the compressed data, but participate in the code | ||
683 | construction. | ||
684 | |||
685 | Distance codes 0-31 are represented by (fixed-length) 5-bit | ||
686 | codes, with possible additional bits as shown in the table | ||
687 | shown in Paragraph 3.2.5, above. Note that distance codes 30- | ||
688 | 31 will never actually occur in the compressed data. | ||
689 | |||
690 | 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) | ||
691 | |||
692 | The Huffman codes for the two alphabets appear in the block | ||
693 | immediately after the header bits and before the actual | ||
694 | compressed data, first the literal/length code and then the | ||
695 | distance code. Each code is defined by a sequence of code | ||
696 | lengths, as discussed in Paragraph 3.2.2, above. For even | ||
697 | greater compactness, the code length sequences themselves are | ||
698 | compressed using a Huffman code. The alphabet for code lengths | ||
699 | is as follows: | ||
700 | |||
701 | 0 - 15: Represent code lengths of 0 - 15 | ||
702 | 16: Copy the previous code length 3 - 6 times. | ||
703 | The next 2 bits indicate repeat length | ||
704 | (0 = 3, ... , 3 = 6) | ||
705 | Example: Codes 8, 16 (+2 bits 11), | ||
706 | 16 (+2 bits 10) will expand to | ||
707 | 12 code lengths of 8 (1 + 6 + 5) | ||
708 | 17: Repeat a code length of 0 for 3 - 10 times. | ||
709 | (3 bits of length) | ||
710 | 18: Repeat a code length of 0 for 11 - 138 times | ||
711 | (7 bits of length) | ||
712 | |||
713 | A code length of 0 indicates that the corresponding symbol in | ||
714 | the literal/length or distance alphabet will not occur in the | ||
715 | block, and should not participate in the Huffman code | ||
716 | construction algorithm given earlier. If only one distance | ||
717 | code is used, it is encoded using one bit, not zero bits; in | ||
718 | this case there is a single code length of one, with one unused | ||
719 | code. One distance code of zero bits means that there are no | ||
720 | distance codes used at all (the data is all literals). | ||
721 | |||
722 | We can now define the format of the block: | ||
723 | |||
724 | 5 Bits: HLIT, # of Literal/Length codes - 257 (257 - 286) | ||
725 | 5 Bits: HDIST, # of Distance codes - 1 (1 - 32) | ||
726 | 4 Bits: HCLEN, # of Code Length codes - 4 (4 - 19) | ||
727 | |||
728 | |||
729 | |||
730 | Deutsch Informational [Page 13] | ||
731 | |||
732 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
733 | |||
734 | |||
735 | (HCLEN + 4) x 3 bits: code lengths for the code length | ||
736 | alphabet given just above, in the order: 16, 17, 18, | ||
737 | 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 | ||
738 | |||
739 | These code lengths are interpreted as 3-bit integers | ||
740 | (0-7); as above, a code length of 0 means the | ||
741 | corresponding symbol (literal/length or distance code | ||
742 | length) is not used. | ||
743 | |||
744 | HLIT + 257 code lengths for the literal/length alphabet, | ||
745 | encoded using the code length Huffman code | ||
746 | |||
747 | HDIST + 1 code lengths for the distance alphabet, | ||
748 | encoded using the code length Huffman code | ||
749 | |||
750 | The actual compressed data of the block, | ||
751 | encoded using the literal/length and distance Huffman | ||
752 | codes | ||
753 | |||
754 | The literal/length symbol 256 (end of data), | ||
755 | encoded using the literal/length Huffman code | ||
756 | |||
757 | The code length repeat codes can cross from HLIT + 257 to the | ||
758 | HDIST + 1 code lengths. In other words, all code lengths form | ||
759 | a single sequence of HLIT + HDIST + 258 values. | ||
760 | |||
761 | 3.3. Compliance | ||
762 | |||
763 | A compressor may limit further the ranges of values specified in | ||
764 | the previous section and still be compliant; for example, it may | ||
765 | limit the range of backward pointers to some value smaller than | ||
766 | 32K. Similarly, a compressor may limit the size of blocks so that | ||
767 | a compressible block fits in memory. | ||
768 | |||
769 | A compliant decompressor must accept the full range of possible | ||
770 | values defined in the previous section, and must accept blocks of | ||
771 | arbitrary size. | ||
772 | |||
773 | 4. Compression algorithm details | ||
774 | |||
775 | While it is the intent of this document to define the "deflate" | ||
776 | compressed data format without reference to any particular | ||
777 | compression algorithm, the format is related to the compressed | ||
778 | formats produced by LZ77 (Lempel-Ziv 1977, see reference [2] below); | ||
779 | since many variations of LZ77 are patented, it is strongly | ||
780 | recommended that the implementor of a compressor follow the general | ||
781 | algorithm presented here, which is known not to be patented per se. | ||
782 | The material in this section is not part of the definition of the | ||
783 | |||
784 | |||
785 | |||
786 | Deutsch Informational [Page 14] | ||
787 | |||
788 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
789 | |||
790 | |||
791 | specification per se, and a compressor need not follow it in order to | ||
792 | be compliant. | ||
793 | |||
794 | The compressor terminates a block when it determines that starting a | ||
795 | new block with fresh trees would be useful, or when the block size | ||
796 | fills up the compressor's block buffer. | ||
797 | |||
798 | The compressor uses a chained hash table to find duplicated strings, | ||
799 | using a hash function that operates on 3-byte sequences. At any | ||
800 | given point during compression, let XYZ be the next 3 input bytes to | ||
801 | be examined (not necessarily all different, of course). First, the | ||
802 | compressor examines the hash chain for XYZ. If the chain is empty, | ||
803 | the compressor simply writes out X as a literal byte and advances one | ||
804 | byte in the input. If the hash chain is not empty, indicating that | ||
805 | the sequence XYZ (or, if we are unlucky, some other 3 bytes with the | ||
806 | same hash function value) has occurred recently, the compressor | ||
807 | compares all strings on the XYZ hash chain with the actual input data | ||
808 | sequence starting at the current point, and selects the longest | ||
809 | match. | ||
810 | |||
811 | The compressor searches the hash chains starting with the most recent | ||
812 | strings, to favor small distances and thus take advantage of the | ||
813 | Huffman encoding. The hash chains are singly linked. There are no | ||
814 | deletions from the hash chains; the algorithm simply discards matches | ||
815 | that are too old. To avoid a worst-case situation, very long hash | ||
816 | chains are arbitrarily truncated at a certain length, determined by a | ||
817 | run-time parameter. | ||
818 | |||
819 | To improve overall compression, the compressor optionally defers the | ||
820 | selection of matches ("lazy matching"): after a match of length N has | ||
821 | been found, the compressor searches for a longer match starting at | ||
822 | the next input byte. If it finds a longer match, it truncates the | ||
823 | previous match to a length of one (thus producing a single literal | ||
824 | byte) and then emits the longer match. Otherwise, it emits the | ||
825 | original match, and, as described above, advances N bytes before | ||
826 | continuing. | ||
827 | |||
828 | Run-time parameters also control this "lazy match" procedure. If | ||
829 | compression ratio is most important, the compressor attempts a | ||
830 | complete second search regardless of the length of the first match. | ||
831 | In the normal case, if the current match is "long enough", the | ||
832 | compressor reduces the search for a longer match, thus speeding up | ||
833 | the process. If speed is most important, the compressor inserts new | ||
834 | strings in the hash table only when no match was found, or when the | ||
835 | match is not "too long". This degrades the compression ratio but | ||
836 | saves time since there are both fewer insertions and fewer searches. | ||
837 | |||
838 | |||
839 | |||
840 | |||
841 | |||
842 | Deutsch Informational [Page 15] | ||
843 | |||
844 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
845 | |||
846 | |||
847 | 5. References | ||
848 | |||
849 | [1] Huffman, D. A., "A Method for the Construction of Minimum | ||
850 | Redundancy Codes", Proceedings of the Institute of Radio | ||
851 | Engineers, September 1952, Volume 40, Number 9, pp. 1098-1101. | ||
852 | |||
853 | [2] Ziv J., Lempel A., "A Universal Algorithm for Sequential Data | ||
854 | Compression", IEEE Transactions on Information Theory, Vol. 23, | ||
855 | No. 3, pp. 337-343. | ||
856 | |||
857 | [3] Gailly, J.-L., and Adler, M., ZLIB documentation and sources, | ||
858 | available in ftp://ftp.uu.net/pub/archiving/zip/doc/ | ||
859 | |||
860 | [4] Gailly, J.-L., and Adler, M., GZIP documentation and sources, | ||
861 | available as gzip-*.tar in ftp://prep.ai.mit.edu/pub/gnu/ | ||
862 | |||
863 | [5] Schwartz, E. S., and Kallick, B. "Generating a canonical prefix | ||
864 | encoding." Comm. ACM, 7,3 (Mar. 1964), pp. 166-169. | ||
865 | |||
866 | [6] Hirschberg and Lelewer, "Efficient decoding of prefix codes," | ||
867 | Comm. ACM, 33,4, April 1990, pp. 449-459. | ||
868 | |||
869 | 6. Security Considerations | ||
870 | |||
871 | Any data compression method involves the reduction of redundancy in | ||
872 | the data. Consequently, any corruption of the data is likely to have | ||
873 | severe effects and be difficult to correct. Uncompressed text, on | ||
874 | the other hand, will probably still be readable despite the presence | ||
875 | of some corrupted bytes. | ||
876 | |||
877 | It is recommended that systems using this data format provide some | ||
878 | means of validating the integrity of the compressed data. See | ||
879 | reference [3], for example. | ||
880 | |||
881 | 7. Source code | ||
882 | |||
883 | Source code for a C language implementation of a "deflate" compliant | ||
884 | compressor and decompressor is available within the zlib package at | ||
885 | ftp://ftp.uu.net/pub/archiving/zip/zlib/. | ||
886 | |||
887 | 8. Acknowledgements | ||
888 | |||
889 | Trademarks cited in this document are the property of their | ||
890 | respective owners. | ||
891 | |||
892 | Phil Katz designed the deflate format. Jean-Loup Gailly and Mark | ||
893 | Adler wrote the related software described in this specification. | ||
894 | Glenn Randers-Pehrson converted this document to RFC and HTML format. | ||
895 | |||
896 | |||
897 | |||
898 | Deutsch Informational [Page 16] | ||
899 | |||
900 | RFC 1951 DEFLATE Compressed Data Format Specification May 1996 | ||
901 | |||
902 | |||
903 | 9. Author's Address | ||
904 | |||
905 | L. Peter Deutsch | ||
906 | Aladdin Enterprises | ||
907 | 203 Santa Margarita Ave. | ||
908 | Menlo Park, CA 94025 | ||
909 | |||
910 | Phone: (415) 322-0103 (AM only) | ||
911 | FAX: (415) 322-1734 | ||
912 | EMail: <ghost@aladdin.com> | ||
913 | |||
914 | Questions about the technical content of this specification can be | ||
915 | sent by email to: | ||
916 | |||
917 | Jean-Loup Gailly <gzip@prep.ai.mit.edu> and | ||
918 | Mark Adler <madler@alumni.caltech.edu> | ||
919 | |||
920 | Editorial comments on this specification can be sent by email to: | ||
921 | |||
922 | L. Peter Deutsch <ghost@aladdin.com> and | ||
923 | Glenn Randers-Pehrson <randeg@alumni.rpi.edu> | ||
924 | |||
925 | |||
926 | |||
927 | |||
928 | |||
929 | |||
930 | |||
931 | |||
932 | |||
933 | |||
934 | |||
935 | |||
936 | |||
937 | |||
938 | |||
939 | |||
940 | |||
941 | |||
942 | |||
943 | |||
944 | |||
945 | |||
946 | |||
947 | |||
948 | |||
949 | |||
950 | |||
951 | |||
952 | |||
953 | |||
954 | Deutsch Informational [Page 17] | ||
955 | |||
diff --git a/doc/rfc1952.txt b/doc/rfc1952.txt new file mode 100644 index 0000000..a8e51b4 --- /dev/null +++ b/doc/rfc1952.txt | |||
@@ -0,0 +1,675 @@ | |||
1 | |||
2 | |||
3 | |||
4 | |||
5 | |||
6 | |||
7 | Network Working Group P. Deutsch | ||
8 | Request for Comments: 1952 Aladdin Enterprises | ||
9 | Category: Informational May 1996 | ||
10 | |||
11 | |||
12 | GZIP file format specification version 4.3 | ||
13 | |||
14 | Status of This Memo | ||
15 | |||
16 | This memo provides information for the Internet community. This memo | ||
17 | does not specify an Internet standard of any kind. Distribution of | ||
18 | this memo is unlimited. | ||
19 | |||
20 | IESG Note: | ||
21 | |||
22 | The IESG takes no position on the validity of any Intellectual | ||
23 | Property Rights statements contained in this document. | ||
24 | |||
25 | Notices | ||
26 | |||
27 | Copyright (c) 1996 L. Peter Deutsch | ||
28 | |||
29 | Permission is granted to copy and distribute this document for any | ||
30 | purpose and without charge, including translations into other | ||
31 | languages and incorporation into compilations, provided that the | ||
32 | copyright notice and this notice are preserved, and that any | ||
33 | substantive changes or deletions from the original are clearly | ||
34 | marked. | ||
35 | |||
36 | A pointer to the latest version of this and related documentation in | ||
37 | HTML format can be found at the URL | ||
38 | <ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>. | ||
39 | |||
40 | Abstract | ||
41 | |||
42 | This specification defines a lossless compressed data format that is | ||
43 | compatible with the widely used GZIP utility. The format includes a | ||
44 | cyclic redundancy check value for detecting data corruption. The | ||
45 | format presently uses the DEFLATE method of compression but can be | ||
46 | easily extended to use other compression methods. The format can be | ||
47 | implemented readily in a manner not covered by patents. | ||
48 | |||
49 | |||
50 | |||
51 | |||
52 | |||
53 | |||
54 | |||
55 | |||
56 | |||
57 | |||
58 | Deutsch Informational [Page 1] | ||
59 | |||
60 | RFC 1952 GZIP File Format Specification May 1996 | ||
61 | |||
62 | |||
63 | Table of Contents | ||
64 | |||
65 | 1. Introduction ................................................... 2 | ||
66 | 1.1. Purpose ................................................... 2 | ||
67 | 1.2. Intended audience ......................................... 3 | ||
68 | 1.3. Scope ..................................................... 3 | ||
69 | 1.4. Compliance ................................................ 3 | ||
70 | 1.5. Definitions of terms and conventions used ................. 3 | ||
71 | 1.6. Changes from previous versions ............................ 3 | ||
72 | 2. Detailed specification ......................................... 4 | ||
73 | 2.1. Overall conventions ....................................... 4 | ||
74 | 2.2. File format ............................................... 5 | ||
75 | 2.3. Member format ............................................. 5 | ||
76 | 2.3.1. Member header and trailer ........................... 6 | ||
77 | 2.3.1.1. Extra field ................................... 8 | ||
78 | 2.3.1.2. Compliance .................................... 9 | ||
79 | 3. References .................................................. 9 | ||
80 | 4. Security Considerations .................................... 10 | ||
81 | 5. Acknowledgements ........................................... 10 | ||
82 | 6. Author's Address ........................................... 10 | ||
83 | 7. Appendix: Jean-Loup Gailly's gzip utility .................. 11 | ||
84 | 8. Appendix: Sample CRC Code .................................. 11 | ||
85 | |||
86 | 1. Introduction | ||
87 | |||
88 | 1.1. Purpose | ||
89 | |||
90 | The purpose of this specification is to define a lossless | ||
91 | compressed data format that: | ||
92 | |||
93 | * Is independent of CPU type, operating system, file system, | ||
94 | and character set, and hence can be used for interchange; | ||
95 | * Can compress or decompress a data stream (as opposed to a | ||
96 | randomly accessible file) to produce another data stream, | ||
97 | using only an a priori bounded amount of intermediate | ||
98 | storage, and hence can be used in data communications or | ||
99 | similar structures such as Unix filters; | ||
100 | * Compresses data with efficiency comparable to the best | ||
101 | currently available general-purpose compression methods, | ||
102 | and in particular considerably better than the "compress" | ||
103 | program; | ||
104 | * Can be implemented readily in a manner not covered by | ||
105 | patents, and hence can be practiced freely; | ||
106 | * Is compatible with the file format produced by the current | ||
107 | widely used gzip utility, in that conforming decompressors | ||
108 | will be able to read data produced by the existing gzip | ||
109 | compressor. | ||
110 | |||
111 | |||
112 | |||
113 | |||
114 | Deutsch Informational [Page 2] | ||
115 | |||
116 | RFC 1952 GZIP File Format Specification May 1996 | ||
117 | |||
118 | |||
119 | The data format defined by this specification does not attempt to: | ||
120 | |||
121 | * Provide random access to compressed data; | ||
122 | * Compress specialized data (e.g., raster graphics) as well as | ||
123 | the best currently available specialized algorithms. | ||
124 | |||
125 | 1.2. Intended audience | ||
126 | |||
127 | This specification is intended for use by implementors of software | ||
128 | to compress data into gzip format and/or decompress data from gzip | ||
129 | format. | ||
130 | |||
131 | The text of the specification assumes a basic background in | ||
132 | programming at the level of bits and other primitive data | ||
133 | representations. | ||
134 | |||
135 | 1.3. Scope | ||
136 | |||
137 | The specification specifies a compression method and a file format | ||
138 | (the latter assuming only that a file can store a sequence of | ||
139 | arbitrary bytes). It does not specify any particular interface to | ||
140 | a file system or anything about character sets or encodings | ||
141 | (except for file names and comments, which are optional). | ||
142 | |||
143 | 1.4. Compliance | ||
144 | |||
145 | Unless otherwise indicated below, a compliant decompressor must be | ||
146 | able to accept and decompress any file that conforms to all the | ||
147 | specifications presented here; a compliant compressor must produce | ||
148 | files that conform to all the specifications presented here. The | ||
149 | material in the appendices is not part of the specification per se | ||
150 | and is not relevant to compliance. | ||
151 | |||
152 | 1.5. Definitions of terms and conventions used | ||
153 | |||
154 | byte: 8 bits stored or transmitted as a unit (same as an octet). | ||
155 | (For this specification, a byte is exactly 8 bits, even on | ||
156 | machines which store a character on a number of bits different | ||
157 | from 8.) See below for the numbering of bits within a byte. | ||
158 | |||
159 | 1.6. Changes from previous versions | ||
160 | |||
161 | There have been no technical changes to the gzip format since | ||
162 | version 4.1 of this specification. In version 4.2, some | ||
163 | terminology was changed, and the sample CRC code was rewritten for | ||
164 | clarity and to eliminate the requirement for the caller to do pre- | ||
165 | and post-conditioning. Version 4.3 is a conversion of the | ||
166 | specification to RFC style. | ||
167 | |||
168 | |||
169 | |||
170 | Deutsch Informational [Page 3] | ||
171 | |||
172 | RFC 1952 GZIP File Format Specification May 1996 | ||
173 | |||
174 | |||
175 | 2. Detailed specification | ||
176 | |||
177 | 2.1. Overall conventions | ||
178 | |||
179 | In the diagrams below, a box like this: | ||
180 | |||
181 | +---+ | ||
182 | | | <-- the vertical bars might be missing | ||
183 | +---+ | ||
184 | |||
185 | represents one byte; a box like this: | ||
186 | |||
187 | +==============+ | ||
188 | | | | ||
189 | +==============+ | ||
190 | |||
191 | represents a variable number of bytes. | ||
192 | |||
193 | Bytes stored within a computer do not have a "bit order", since | ||
194 | they are always treated as a unit. However, a byte considered as | ||
195 | an integer between 0 and 255 does have a most- and least- | ||
196 | significant bit, and since we write numbers with the most- | ||
197 | significant digit on the left, we also write bytes with the most- | ||
198 | significant bit on the left. In the diagrams below, we number the | ||
199 | bits of a byte so that bit 0 is the least-significant bit, i.e., | ||
200 | the bits are numbered: | ||
201 | |||
202 | +--------+ | ||
203 | |76543210| | ||
204 | +--------+ | ||
205 | |||
206 | This document does not address the issue of the order in which | ||
207 | bits of a byte are transmitted on a bit-sequential medium, since | ||
208 | the data format described here is byte- rather than bit-oriented. | ||
209 | |||
210 | Within a computer, a number may occupy multiple bytes. All | ||
211 | multi-byte numbers in the format described here are stored with | ||
212 | the least-significant byte first (at the lower memory address). | ||
213 | For example, the decimal number 520 is stored as: | ||
214 | |||
215 | 0 1 | ||
216 | +--------+--------+ | ||
217 | |00001000|00000010| | ||
218 | +--------+--------+ | ||
219 | ^ ^ | ||
220 | | | | ||
221 | | + more significant byte = 2 x 256 | ||
222 | + less significant byte = 8 | ||
223 | |||
224 | |||
225 | |||
226 | Deutsch Informational [Page 4] | ||
227 | |||
228 | RFC 1952 GZIP File Format Specification May 1996 | ||
229 | |||
230 | |||
231 | 2.2. File format | ||
232 | |||
233 | A gzip file consists of a series of "members" (compressed data | ||
234 | sets). The format of each member is specified in the following | ||
235 | section. The members simply appear one after another in the file, | ||
236 | with no additional information before, between, or after them. | ||
237 | |||
238 | 2.3. Member format | ||
239 | |||
240 | Each member has the following structure: | ||
241 | |||
242 | +---+---+---+---+---+---+---+---+---+---+ | ||
243 | |ID1|ID2|CM |FLG| MTIME |XFL|OS | (more-->) | ||
244 | +---+---+---+---+---+---+---+---+---+---+ | ||
245 | |||
246 | (if FLG.FEXTRA set) | ||
247 | |||
248 | +---+---+=================================+ | ||
249 | | XLEN |...XLEN bytes of "extra field"...| (more-->) | ||
250 | +---+---+=================================+ | ||
251 | |||
252 | (if FLG.FNAME set) | ||
253 | |||
254 | +=========================================+ | ||
255 | |...original file name, zero-terminated...| (more-->) | ||
256 | +=========================================+ | ||
257 | |||
258 | (if FLG.FCOMMENT set) | ||
259 | |||
260 | +===================================+ | ||
261 | |...file comment, zero-terminated...| (more-->) | ||
262 | +===================================+ | ||
263 | |||
264 | (if FLG.FHCRC set) | ||
265 | |||
266 | +---+---+ | ||
267 | | CRC16 | | ||
268 | +---+---+ | ||
269 | |||
270 | +=======================+ | ||
271 | |...compressed blocks...| (more-->) | ||
272 | +=======================+ | ||
273 | |||
274 | 0 1 2 3 4 5 6 7 | ||
275 | +---+---+---+---+---+---+---+---+ | ||
276 | | CRC32 | ISIZE | | ||
277 | +---+---+---+---+---+---+---+---+ | ||
278 | |||
279 | |||
280 | |||
281 | |||
282 | Deutsch Informational [Page 5] | ||
283 | |||
284 | RFC 1952 GZIP File Format Specification May 1996 | ||
285 | |||
286 | |||
287 | 2.3.1. Member header and trailer | ||
288 | |||
289 | ID1 (IDentification 1) | ||
290 | ID2 (IDentification 2) | ||
291 | These have the fixed values ID1 = 31 (0x1f, \037), ID2 = 139 | ||
292 | (0x8b, \213), to identify the file as being in gzip format. | ||
293 | |||
294 | CM (Compression Method) | ||
295 | This identifies the compression method used in the file. CM | ||
296 | = 0-7 are reserved. CM = 8 denotes the "deflate" | ||
297 | compression method, which is the one customarily used by | ||
298 | gzip and which is documented elsewhere. | ||
299 | |||
300 | FLG (FLaGs) | ||
301 | This flag byte is divided into individual bits as follows: | ||
302 | |||
303 | bit 0 FTEXT | ||
304 | bit 1 FHCRC | ||
305 | bit 2 FEXTRA | ||
306 | bit 3 FNAME | ||
307 | bit 4 FCOMMENT | ||
308 | bit 5 reserved | ||
309 | bit 6 reserved | ||
310 | bit 7 reserved | ||
311 | |||
312 | If FTEXT is set, the file is probably ASCII text. This is | ||
313 | an optional indication, which the compressor may set by | ||
314 | checking a small amount of the input data to see whether any | ||
315 | non-ASCII characters are present. In case of doubt, FTEXT | ||
316 | is cleared, indicating binary data. For systems which have | ||
317 | different file formats for ascii text and binary data, the | ||
318 | decompressor can use FTEXT to choose the appropriate format. | ||
319 | We deliberately do not specify the algorithm used to set | ||
320 | this bit, since a compressor always has the option of | ||
321 | leaving it cleared and a decompressor always has the option | ||
322 | of ignoring it and letting some other program handle issues | ||
323 | of data conversion. | ||
324 | |||
325 | If FHCRC is set, a CRC16 for the gzip header is present, | ||
326 | immediately before the compressed data. The CRC16 consists | ||
327 | of the two least significant bytes of the CRC32 for all | ||
328 | bytes of the gzip header up to and not including the CRC16. | ||
329 | [The FHCRC bit was never set by versions of gzip up to | ||
330 | 1.2.4, even though it was documented with a different | ||
331 | meaning in gzip 1.2.4.] | ||
332 | |||
333 | If FEXTRA is set, optional extra fields are present, as | ||
334 | described in a following section. | ||
335 | |||
336 | |||
337 | |||
338 | Deutsch Informational [Page 6] | ||
339 | |||
340 | RFC 1952 GZIP File Format Specification May 1996 | ||
341 | |||
342 | |||
343 | If FNAME is set, an original file name is present, | ||
344 | terminated by a zero byte. The name must consist of ISO | ||
345 | 8859-1 (LATIN-1) characters; on operating systems using | ||
346 | EBCDIC or any other character set for file names, the name | ||
347 | must be translated to the ISO LATIN-1 character set. This | ||
348 | is the original name of the file being compressed, with any | ||
349 | directory components removed, and, if the file being | ||
350 | compressed is on a file system with case insensitive names, | ||
351 | forced to lower case. There is no original file name if the | ||
352 | data was compressed from a source other than a named file; | ||
353 | for example, if the source was stdin on a Unix system, there | ||
354 | is no file name. | ||
355 | |||
356 | If FCOMMENT is set, a zero-terminated file comment is | ||
357 | present. This comment is not interpreted; it is only | ||
358 | intended for human consumption. The comment must consist of | ||
359 | ISO 8859-1 (LATIN-1) characters. Line breaks should be | ||
360 | denoted by a single line feed character (10 decimal). | ||
361 | |||
362 | Reserved FLG bits must be zero. | ||
363 | |||
364 | MTIME (Modification TIME) | ||
365 | This gives the most recent modification time of the original | ||
366 | file being compressed. The time is in Unix format, i.e., | ||
367 | seconds since 00:00:00 GMT, Jan. 1, 1970. (Note that this | ||
368 | may cause problems for MS-DOS and other systems that use | ||
369 | local rather than Universal time.) If the compressed data | ||
370 | did not come from a file, MTIME is set to the time at which | ||
371 | compression started. MTIME = 0 means no time stamp is | ||
372 | available. | ||
373 | |||
374 | XFL (eXtra FLags) | ||
375 | These flags are available for use by specific compression | ||
376 | methods. The "deflate" method (CM = 8) sets these flags as | ||
377 | follows: | ||
378 | |||
379 | XFL = 2 - compressor used maximum compression, | ||
380 | slowest algorithm | ||
381 | XFL = 4 - compressor used fastest algorithm | ||
382 | |||
383 | OS (Operating System) | ||
384 | This identifies the type of file system on which compression | ||
385 | took place. This may be useful in determining end-of-line | ||
386 | convention for text files. The currently defined values are | ||
387 | as follows: | ||
388 | |||
389 | |||
390 | |||
391 | |||
392 | |||
393 | |||
394 | Deutsch Informational [Page 7] | ||
395 | |||
396 | RFC 1952 GZIP File Format Specification May 1996 | ||
397 | |||
398 | |||
399 | 0 - FAT filesystem (MS-DOS, OS/2, NT/Win32) | ||
400 | 1 - Amiga | ||
401 | 2 - VMS (or OpenVMS) | ||
402 | 3 - Unix | ||
403 | 4 - VM/CMS | ||
404 | 5 - Atari TOS | ||
405 | 6 - HPFS filesystem (OS/2, NT) | ||
406 | 7 - Macintosh | ||
407 | 8 - Z-System | ||
408 | 9 - CP/M | ||
409 | 10 - TOPS-20 | ||
410 | 11 - NTFS filesystem (NT) | ||
411 | 12 - QDOS | ||
412 | 13 - Acorn RISCOS | ||
413 | 255 - unknown | ||
414 | |||
415 | XLEN (eXtra LENgth) | ||
416 | If FLG.FEXTRA is set, this gives the length of the optional | ||
417 | extra field. See below for details. | ||
418 | |||
419 | CRC32 (CRC-32) | ||
420 | This contains a Cyclic Redundancy Check value of the | ||
421 | uncompressed data computed according to CRC-32 algorithm | ||
422 | used in the ISO 3309 standard and in section 8.1.1.6.2 of | ||
423 | ITU-T recommendation V.42. (See http://www.iso.ch for | ||
424 | ordering ISO documents. See gopher://info.itu.ch for an | ||
425 | online version of ITU-T V.42.) | ||
426 | |||
427 | ISIZE (Input SIZE) | ||
428 | This contains the size of the original (uncompressed) input | ||
429 | data modulo 2^32. | ||
430 | |||
431 | 2.3.1.1. Extra field | ||
432 | |||
433 | If the FLG.FEXTRA bit is set, an "extra field" is present in | ||
434 | the header, with total length XLEN bytes. It consists of a | ||
435 | series of subfields, each of the form: | ||
436 | |||
437 | +---+---+---+---+==================================+ | ||
438 | |SI1|SI2| LEN |... LEN bytes of subfield data ...| | ||
439 | +---+---+---+---+==================================+ | ||
440 | |||
441 | SI1 and SI2 provide a subfield ID, typically two ASCII letters | ||
442 | with some mnemonic value. Jean-Loup Gailly | ||
443 | <gzip@prep.ai.mit.edu> is maintaining a registry of subfield | ||
444 | IDs; please send him any subfield ID you wish to use. Subfield | ||
445 | IDs with SI2 = 0 are reserved for future use. The following | ||
446 | IDs are currently defined: | ||
447 | |||
448 | |||
449 | |||
450 | Deutsch Informational [Page 8] | ||
451 | |||
452 | RFC 1952 GZIP File Format Specification May 1996 | ||
453 | |||
454 | |||
455 | SI1 SI2 Data | ||
456 | ---------- ---------- ---- | ||
457 | 0x41 ('A') 0x70 ('P') Apollo file type information | ||
458 | |||
459 | LEN gives the length of the subfield data, excluding the 4 | ||
460 | initial bytes. | ||
461 | |||
462 | 2.3.1.2. Compliance | ||
463 | |||
464 | A compliant compressor must produce files with correct ID1, | ||
465 | ID2, CM, CRC32, and ISIZE, but may set all the other fields in | ||
466 | the fixed-length part of the header to default values (255 for | ||
467 | OS, 0 for all others). The compressor must set all reserved | ||
468 | bits to zero. | ||
469 | |||
470 | A compliant decompressor must check ID1, ID2, and CM, and | ||
471 | provide an error indication if any of these have incorrect | ||
472 | values. It must examine FEXTRA/XLEN, FNAME, FCOMMENT and FHCRC | ||
473 | at least so it can skip over the optional fields if they are | ||
474 | present. It need not examine any other part of the header or | ||
475 | trailer; in particular, a decompressor may ignore FTEXT and OS | ||
476 | and always produce binary output, and still be compliant. A | ||
477 | compliant decompressor must give an error indication if any | ||
478 | reserved bit is non-zero, since such a bit could indicate the | ||
479 | presence of a new field that would cause subsequent data to be | ||
480 | interpreted incorrectly. | ||
481 | |||
482 | 3. References | ||
483 | |||
484 | [1] "Information Processing - 8-bit single-byte coded graphic | ||
485 | character sets - Part 1: Latin alphabet No.1" (ISO 8859-1:1987). | ||
486 | The ISO 8859-1 (Latin-1) character set is a superset of 7-bit | ||
487 | ASCII. Files defining this character set are available as | ||
488 | iso_8859-1.* in ftp://ftp.uu.net/graphics/png/documents/ | ||
489 | |||
490 | [2] ISO 3309 | ||
491 | |||
492 | [3] ITU-T recommendation V.42 | ||
493 | |||
494 | [4] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification", | ||
495 | available in ftp://ftp.uu.net/pub/archiving/zip/doc/ | ||
496 | |||
497 | [5] Gailly, J.-L., GZIP documentation, available as gzip-*.tar in | ||
498 | ftp://prep.ai.mit.edu/pub/gnu/ | ||
499 | |||
500 | [6] Sarwate, D.V., "Computation of Cyclic Redundancy Checks via Table | ||
501 | Look-Up", Communications of the ACM, 31(8), pp.1008-1013. | ||
502 | |||
503 | |||
504 | |||
505 | |||
506 | Deutsch Informational [Page 9] | ||
507 | |||
508 | RFC 1952 GZIP File Format Specification May 1996 | ||
509 | |||
510 | |||
511 | [7] Schwaderer, W.D., "CRC Calculation", April 85 PC Tech Journal, | ||
512 | pp.118-133. | ||
513 | |||
514 | [8] ftp://ftp.adelaide.edu.au/pub/rocksoft/papers/crc_v3.txt, | ||
515 | describing the CRC concept. | ||
516 | |||
517 | 4. Security Considerations | ||
518 | |||
519 | Any data compression method involves the reduction of redundancy in | ||
520 | the data. Consequently, any corruption of the data is likely to have | ||
521 | severe effects and be difficult to correct. Uncompressed text, on | ||
522 | the other hand, will probably still be readable despite the presence | ||
523 | of some corrupted bytes. | ||
524 | |||
525 | It is recommended that systems using this data format provide some | ||
526 | means of validating the integrity of the compressed data, such as by | ||
527 | setting and checking the CRC-32 check value. | ||
528 | |||
529 | 5. Acknowledgements | ||
530 | |||
531 | Trademarks cited in this document are the property of their | ||
532 | respective owners. | ||
533 | |||
534 | Jean-Loup Gailly designed the gzip format and wrote, with Mark Adler, | ||
535 | the related software described in this specification. Glenn | ||
536 | Randers-Pehrson converted this document to RFC and HTML format. | ||
537 | |||
538 | 6. Author's Address | ||
539 | |||
540 | L. Peter Deutsch | ||
541 | Aladdin Enterprises | ||
542 | 203 Santa Margarita Ave. | ||
543 | Menlo Park, CA 94025 | ||
544 | |||
545 | Phone: (415) 322-0103 (AM only) | ||
546 | FAX: (415) 322-1734 | ||
547 | EMail: <ghost@aladdin.com> | ||
548 | |||
549 | Questions about the technical content of this specification can be | ||
550 | sent by email to: | ||
551 | |||
552 | Jean-Loup Gailly <gzip@prep.ai.mit.edu> and | ||
553 | Mark Adler <madler@alumni.caltech.edu> | ||
554 | |||
555 | Editorial comments on this specification can be sent by email to: | ||
556 | |||
557 | L. Peter Deutsch <ghost@aladdin.com> and | ||
558 | Glenn Randers-Pehrson <randeg@alumni.rpi.edu> | ||
559 | |||
560 | |||
561 | |||
562 | Deutsch Informational [Page 10] | ||
563 | |||
564 | RFC 1952 GZIP File Format Specification May 1996 | ||
565 | |||
566 | |||
567 | 7. Appendix: Jean-Loup Gailly's gzip utility | ||
568 | |||
569 | The most widely used implementation of gzip compression, and the | ||
570 | original documentation on which this specification is based, were | ||
571 | created by Jean-Loup Gailly <gzip@prep.ai.mit.edu>. Since this | ||
572 | implementation is a de facto standard, we mention some more of its | ||
573 | features here. Again, the material in this section is not part of | ||
574 | the specification per se, and implementations need not follow it to | ||
575 | be compliant. | ||
576 | |||
577 | When compressing or decompressing a file, gzip preserves the | ||
578 | protection, ownership, and modification time attributes on the local | ||
579 | file system, since there is no provision for representing protection | ||
580 | attributes in the gzip file format itself. Since the file format | ||
581 | includes a modification time, the gzip decompressor provides a | ||
582 | command line switch that assigns the modification time from the file, | ||
583 | rather than the local modification time of the compressed input, to | ||
584 | the decompressed output. | ||
585 | |||
586 | 8. Appendix: Sample CRC Code | ||
587 | |||
588 | The following sample code represents a practical implementation of | ||
589 | the CRC (Cyclic Redundancy Check). (See also ISO 3309 and ITU-T V.42 | ||
590 | for a formal specification.) | ||
591 | |||
592 | The sample code is in the ANSI C programming language. Non C users | ||
593 | may find it easier to read with these hints: | ||
594 | |||
595 | & Bitwise AND operator. | ||
596 | ^ Bitwise exclusive-OR operator. | ||
597 | >> Bitwise right shift operator. When applied to an | ||
598 | unsigned quantity, as here, right shift inserts zero | ||
599 | bit(s) at the left. | ||
600 | ! Logical NOT operator. | ||
601 | ++ "n++" increments the variable n. | ||
602 | 0xNNN 0x introduces a hexadecimal (base 16) constant. | ||
603 | Suffix L indicates a long value (at least 32 bits). | ||
604 | |||
605 | /* Table of CRCs of all 8-bit messages. */ | ||
606 | unsigned long crc_table[256]; | ||
607 | |||
608 | /* Flag: has the table been computed? Initially false. */ | ||
609 | int crc_table_computed = 0; | ||
610 | |||
611 | /* Make the table for a fast CRC. */ | ||
612 | void make_crc_table(void) | ||
613 | { | ||
614 | unsigned long c; | ||
615 | |||
616 | |||
617 | |||
618 | Deutsch Informational [Page 11] | ||
619 | |||
620 | RFC 1952 GZIP File Format Specification May 1996 | ||
621 | |||
622 | |||
623 | int n, k; | ||
624 | for (n = 0; n < 256; n++) { | ||
625 | c = (unsigned long) n; | ||
626 | for (k = 0; k < 8; k++) { | ||
627 | if (c & 1) { | ||
628 | c = 0xedb88320L ^ (c >> 1); | ||
629 | } else { | ||
630 | c = c >> 1; | ||
631 | } | ||
632 | } | ||
633 | crc_table[n] = c; | ||
634 | } | ||
635 | crc_table_computed = 1; | ||
636 | } | ||
637 | |||
638 | /* | ||
639 | Update a running crc with the bytes buf[0..len-1] and return | ||
640 | the updated crc. The crc should be initialized to zero. Pre- and | ||
641 | post-conditioning (one's complement) is performed within this | ||
642 | function so it shouldn't be done by the caller. Usage example: | ||
643 | |||
644 | unsigned long crc = 0L; | ||
645 | |||
646 | while (read_buffer(buffer, length) != EOF) { | ||
647 | crc = update_crc(crc, buffer, length); | ||
648 | } | ||
649 | if (crc != original_crc) error(); | ||
650 | */ | ||
651 | unsigned long update_crc(unsigned long crc, | ||
652 | unsigned char *buf, int len) | ||
653 | { | ||
654 | unsigned long c = crc ^ 0xffffffffL; | ||
655 | int n; | ||
656 | |||
657 | if (!crc_table_computed) | ||
658 | make_crc_table(); | ||
659 | for (n = 0; n < len; n++) { | ||
660 | c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8); | ||
661 | } | ||
662 | return c ^ 0xffffffffL; | ||
663 | } | ||
664 | |||
665 | /* Return the CRC of the bytes buf[0..len-1]. */ | ||
666 | unsigned long crc(unsigned char *buf, int len) | ||
667 | { | ||
668 | return update_crc(0L, buf, len); | ||
669 | } | ||
670 | |||
671 | |||
672 | |||
673 | |||
674 | Deutsch Informational [Page 12] | ||
675 | |||
diff --git a/doc/txtvsbin.txt b/doc/txtvsbin.txt new file mode 100644 index 0000000..3d0f063 --- /dev/null +++ b/doc/txtvsbin.txt | |||
@@ -0,0 +1,107 @@ | |||
1 | A Fast Method for Identifying Plain Text Files | ||
2 | ============================================== | ||
3 | |||
4 | |||
5 | Introduction | ||
6 | ------------ | ||
7 | |||
8 | Given a file coming from an unknown source, it is sometimes desirable | ||
9 | to find out whether the format of that file is plain text. Although | ||
10 | this may appear like a simple task, a fully accurate detection of the | ||
11 | file type requires heavy-duty semantic analysis on the file contents. | ||
12 | It is, however, possible to obtain satisfactory results by employing | ||
13 | various heuristics. | ||
14 | |||
15 | Previous versions of PKZip and other zip-compatible compression tools | ||
16 | were using a crude detection scheme: if more than 80% (4/5) of the bytes | ||
17 | found in a certain buffer are within the range [7..127], the file is | ||
18 | labeled as plain text, otherwise it is labeled as binary. A prominent | ||
19 | limitation of this scheme is the restriction to Latin-based alphabets. | ||
20 | Other alphabets, like Greek, Cyrillic or Asian, make extensive use of | ||
21 | the bytes within the range [128..255], and texts using these alphabets | ||
22 | are most often misidentified by this scheme; in other words, the rate | ||
23 | of false negatives is sometimes too high, which means that the recall | ||
24 | is low. Another weakness of this scheme is a reduced precision, due to | ||
25 | the false positives that may occur when binary files containing large | ||
26 | amounts of textual characters are misidentified as plain text. | ||
27 | |||
28 | In this article we propose a new, simple detection scheme that features | ||
29 | a much increased precision and a near-100% recall. This scheme is | ||
30 | designed to work on ASCII, Unicode and other ASCII-derived alphabets, | ||
31 | and it handles single-byte encodings (ISO-8859, MacRoman, KOI8, etc.) | ||
32 | and variable-sized encodings (ISO-2022, UTF-8, etc.). Wider encodings | ||
33 | (UCS-2/UTF-16 and UCS-4/UTF-32) are not handled, however. | ||
34 | |||
35 | |||
36 | The Algorithm | ||
37 | ------------- | ||
38 | |||
39 | The algorithm works by dividing the set of bytecodes [0..255] into three | ||
40 | categories: | ||
41 | - The white list of textual bytecodes: | ||
42 | 9 (TAB), 10 (LF), 13 (CR), 32 (SPACE) to 255. | ||
43 | - The gray list of tolerated bytecodes: | ||
44 | 7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB), 27 (ESC). | ||
45 | - The black list of undesired, non-textual bytecodes: | ||
46 | 0 (NUL) to 6, 14 to 31. | ||
47 | |||
48 | If a file contains at least one byte that belongs to the white list and | ||
49 | no byte that belongs to the black list, then the file is categorized as | ||
50 | plain text; otherwise, it is categorized as binary. (The boundary case, | ||
51 | when the file is empty, automatically falls into the latter category.) | ||
52 | |||
53 | |||
54 | Rationale | ||
55 | --------- | ||
56 | |||
57 | The idea behind this algorithm relies on two observations. | ||
58 | |||
59 | The first observation is that, although the full range of 7-bit codes | ||
60 | [0..127] is properly specified by the ASCII standard, most control | ||
61 | characters in the range [0..31] are not used in practice. The only | ||
62 | widely-used, almost universally-portable control codes are 9 (TAB), | ||
63 | 10 (LF) and 13 (CR). There are a few more control codes that are | ||
64 | recognized on a reduced range of platforms and text viewers/editors: | ||
65 | 7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB) and 27 (ESC); but these | ||
66 | codes are rarely (if ever) used alone, without being accompanied by | ||
67 | some printable text. Even the newer, portable text formats such as | ||
68 | XML avoid using control characters outside the list mentioned here. | ||
69 | |||
70 | The second observation is that most of the binary files tend to contain | ||
71 | control characters, especially 0 (NUL). Even though the older text | ||
72 | detection schemes observe the presence of non-ASCII codes from the range | ||
73 | [128..255], the precision rarely has to suffer if this upper range is | ||
74 | labeled as textual, because the files that are genuinely binary tend to | ||
75 | contain both control characters and codes from the upper range. On the | ||
76 | other hand, the upper range needs to be labeled as textual, because it | ||
77 | is used by virtually all ASCII extensions. In particular, this range is | ||
78 | used for encoding non-Latin scripts. | ||
79 | |||
80 | Since there is no counting involved, other than simply observing the | ||
81 | presence or the absence of some byte values, the algorithm produces | ||
82 | consistent results, regardless what alphabet encoding is being used. | ||
83 | (If counting were involved, it could be possible to obtain different | ||
84 | results on a text encoded, say, using ISO-8859-16 versus UTF-8.) | ||
85 | |||
86 | There is an extra category of plain text files that are "polluted" with | ||
87 | one or more black-listed codes, either by mistake or by peculiar design | ||
88 | considerations. In such cases, a scheme that tolerates a small fraction | ||
89 | of black-listed codes would provide an increased recall (i.e. more true | ||
90 | positives). This, however, incurs a reduced precision overall, since | ||
91 | false positives are more likely to appear in binary files that contain | ||
92 | large chunks of textual data. Furthermore, "polluted" plain text should | ||
93 | be regarded as binary by general-purpose text detection schemes, because | ||
94 | general-purpose text processing algorithms might not be applicable. | ||
95 | Under this premise, it is safe to say that our detection method provides | ||
96 | a near-100% recall. | ||
97 | |||
98 | Experiments have been run on many files coming from various platforms | ||
99 | and applications. We tried plain text files, system logs, source code, | ||
100 | formatted office documents, compiled object code, etc. The results | ||
101 | confirm the optimistic assumptions about the capabilities of this | ||
102 | algorithm. | ||
103 | |||
104 | |||
105 | -- | ||
106 | Cosmin Truta | ||
107 | Last updated: 2006-May-28 | ||
@@ -1,12 +1,12 @@ | |||
1 | /* example.c -- usage example of the zlib compression library | 1 | /* example.c -- usage example of the zlib compression library |
2 | * Copyright (C) 1995-2004 Jean-loup Gailly. | 2 | * Copyright (C) 1995-2006 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
6 | /* @(#) $Id$ */ | 6 | /* @(#) $Id$ */ |
7 | 7 | ||
8 | #include <stdio.h> | ||
9 | #include "zlib.h" | 8 | #include "zlib.h" |
9 | #include <stdio.h> | ||
10 | 10 | ||
11 | #ifdef STDC | 11 | #ifdef STDC |
12 | # include <string.h> | 12 | # include <string.h> |
diff --git a/examples/gzlog.c b/examples/gzlog.c index f71f817..b6acdef 100644 --- a/examples/gzlog.c +++ b/examples/gzlog.c | |||
@@ -241,7 +241,7 @@ int gzlog_write(void *obj, char *data, size_t len) | |||
241 | some = len; | 241 | some = len; |
242 | if (write(log->fd, data, some) != some) | 242 | if (write(log->fd, data, some) != some) |
243 | return 1; | 243 | return 1; |
244 | log->crc = crc32(log->crc, data, some); | 244 | log->crc = crc32(log->crc, (unsigned char *)data, some); |
245 | log->len += some; | 245 | log->len += some; |
246 | len -= some; | 246 | len -= some; |
247 | data += some; | 247 | data += some; |
diff --git a/examples/zlib_how.html b/examples/zlib_how.html index 40998db..444ff1c 100644 --- a/examples/zlib_how.html +++ b/examples/zlib_how.html | |||
@@ -4,7 +4,7 @@ | |||
4 | <head> | 4 | <head> |
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
6 | <title>zlib Usage Example</title> | 6 | <title>zlib Usage Example</title> |
7 | <!-- Copyright (c) 2004 Mark Adler. --> | 7 | <!-- Copyright (c) 2004, 2005 Mark Adler. --> |
8 | </head> | 8 | </head> |
9 | <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#00A000"> | 9 | <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#00A000"> |
10 | <h2 align="center"> zlib Usage Example </h2> | 10 | <h2 align="center"> zlib Usage Example </h2> |
@@ -21,13 +21,16 @@ Without further adieu, here is the program <a href="zpipe.c"><tt>zpipe.c</tt></a | |||
21 | <pre><b> | 21 | <pre><b> |
22 | /* zpipe.c: example of proper use of zlib's inflate() and deflate() | 22 | /* zpipe.c: example of proper use of zlib's inflate() and deflate() |
23 | Not copyrighted -- provided to the public domain | 23 | Not copyrighted -- provided to the public domain |
24 | Version 1.2 9 November 2004 Mark Adler */ | 24 | Version 1.4 11 December 2005 Mark Adler */ |
25 | 25 | ||
26 | /* Version history: | 26 | /* Version history: |
27 | 1.0 30 Oct 2004 First version | 27 | 1.0 30 Oct 2004 First version |
28 | 1.1 8 Nov 2004 Add void casting for unused return values | 28 | 1.1 8 Nov 2004 Add void casting for unused return values |
29 | Use switch statement for inflate() return values | 29 | Use switch statement for inflate() return values |
30 | 1.2 9 Nov 2004 Add assertions to document zlib guarantees | 30 | 1.2 9 Nov 2004 Add assertions to document zlib guarantees |
31 | 1.3 6 Apr 2005 Remove incorrect assertion in inf() | ||
32 | 1.4 11 Dec 2005 Add hack to avoid MSDOS end-of-line conversions | ||
33 | Avoid some compiler warnings for input and output buffers | ||
31 | */ | 34 | */ |
32 | </b></pre><!-- --> | 35 | </b></pre><!-- --> |
33 | We now include the header files for the required definitions. From | 36 | We now include the header files for the required definitions. From |
@@ -47,6 +50,21 @@ functions <tt>inflateInit()</tt>, <tt>inflate()</tt>, and | |||
47 | #include <assert.h> | 50 | #include <assert.h> |
48 | #include "zlib.h" | 51 | #include "zlib.h" |
49 | </b></pre><!-- --> | 52 | </b></pre><!-- --> |
53 | This is an ugly hack required to avoid corruption of the input and output data on | ||
54 | Windows/MS-DOS systems. Without this, those systems would assume that the input and output | ||
55 | files are text, and try to convert the end-of-line characters from one standard to | ||
56 | another. That would corrupt binary data, and in particular would render the compressed data unusable. | ||
57 | This sets the input and output to binary which suppresses the end-of-line conversions. | ||
58 | <tt>SET_BINARY_MODE()</tt> will be used later on <tt>stdin</tt> and <tt>stdout</tt>, at the beginning of <tt>main()</tt>. | ||
59 | <pre><b> | ||
60 | #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) | ||
61 | # include <fcntl.h> | ||
62 | # include <io.h> | ||
63 | # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) | ||
64 | #else | ||
65 | # define SET_BINARY_MODE(file) | ||
66 | #endif | ||
67 | </b></pre><!-- --> | ||
50 | <tt>CHUNK</tt> is simply the buffer size for feeding data to and pulling data | 68 | <tt>CHUNK</tt> is simply the buffer size for feeding data to and pulling data |
51 | from the <em>zlib</em> routines. Larger buffer sizes would be more efficient, | 69 | from the <em>zlib</em> routines. Larger buffer sizes would be more efficient, |
52 | especially for <tt>inflate()</tt>. If the memory is available, buffers sizes | 70 | especially for <tt>inflate()</tt>. If the memory is available, buffers sizes |
@@ -80,8 +98,8 @@ is used to pass information to and from the <em>zlib</em> routines, and to maint | |||
80 | int ret, flush; | 98 | int ret, flush; |
81 | unsigned have; | 99 | unsigned have; |
82 | z_stream strm; | 100 | z_stream strm; |
83 | char in[CHUNK]; | 101 | unsigned char in[CHUNK]; |
84 | char out[CHUNK]; | 102 | unsigned char out[CHUNK]; |
85 | </b></pre><!-- --> | 103 | </b></pre><!-- --> |
86 | The first thing we do is to initialize the <em>zlib</em> state for compression using | 104 | The first thing we do is to initialize the <em>zlib</em> state for compression using |
87 | <tt>deflateInit()</tt>. This must be done before the first use of <tt>deflate()</tt>. | 105 | <tt>deflateInit()</tt>. This must be done before the first use of <tt>deflate()</tt>. |
@@ -313,8 +331,8 @@ can tell from the <em>zlib</em> stream itself when the stream is complete. | |||
313 | int ret; | 331 | int ret; |
314 | unsigned have; | 332 | unsigned have; |
315 | z_stream strm; | 333 | z_stream strm; |
316 | char in[CHUNK]; | 334 | unsigned char in[CHUNK]; |
317 | char out[CHUNK]; | 335 | unsigned char out[CHUNK]; |
318 | </b></pre><!-- --> | 336 | </b></pre><!-- --> |
319 | The initialization of the state is the same, except that there is no compression level, | 337 | The initialization of the state is the same, except that there is no compression level, |
320 | of course, and two more elements of the structure are initialized. <tt>avail_in</tt> | 338 | of course, and two more elements of the structure are initialized. <tt>avail_in</tt> |
@@ -494,6 +512,10 @@ int main(int argc, char **argv) | |||
494 | { | 512 | { |
495 | int ret; | 513 | int ret; |
496 | 514 | ||
515 | /* avoid end-of-line conversions */ | ||
516 | SET_BINARY_MODE(stdin); | ||
517 | SET_BINARY_MODE(stdout); | ||
518 | |||
497 | /* do compression if no arguments */ | 519 | /* do compression if no arguments */ |
498 | if (argc == 1) { | 520 | if (argc == 1) { |
499 | ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); | 521 | ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); |
@@ -518,6 +540,6 @@ int main(int argc, char **argv) | |||
518 | } | 540 | } |
519 | </b></pre> | 541 | </b></pre> |
520 | <hr> | 542 | <hr> |
521 | <i>Copyright (c) 2004 by Mark Adler<br>Last modified 13 November 2004</i> | 543 | <i>Copyright (c) 2004, 2005 by Mark Adler<br>Last modified 11 December 2005</i> |
522 | </body> | 544 | </body> |
523 | </html> | 545 | </html> |
diff --git a/examples/zpipe.c b/examples/zpipe.c index 26abb56..83535d1 100644 --- a/examples/zpipe.c +++ b/examples/zpipe.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* zpipe.c: example of proper use of zlib's inflate() and deflate() | 1 | /* zpipe.c: example of proper use of zlib's inflate() and deflate() |
2 | Not copyrighted -- provided to the public domain | 2 | Not copyrighted -- provided to the public domain |
3 | Version 1.2 9 November 2004 Mark Adler */ | 3 | Version 1.4 11 December 2005 Mark Adler */ |
4 | 4 | ||
5 | /* Version history: | 5 | /* Version history: |
6 | 1.0 30 Oct 2004 First version | 6 | 1.0 30 Oct 2004 First version |
@@ -8,6 +8,8 @@ | |||
8 | Use switch statement for inflate() return values | 8 | Use switch statement for inflate() return values |
9 | 1.2 9 Nov 2004 Add assertions to document zlib guarantees | 9 | 1.2 9 Nov 2004 Add assertions to document zlib guarantees |
10 | 1.3 6 Apr 2005 Remove incorrect assertion in inf() | 10 | 1.3 6 Apr 2005 Remove incorrect assertion in inf() |
11 | 1.4 11 Dec 2005 Add hack to avoid MSDOS end-of-line conversions | ||
12 | Avoid some compiler warnings for input and output buffers | ||
11 | */ | 13 | */ |
12 | 14 | ||
13 | #include <stdio.h> | 15 | #include <stdio.h> |
@@ -15,6 +17,14 @@ | |||
15 | #include <assert.h> | 17 | #include <assert.h> |
16 | #include "zlib.h" | 18 | #include "zlib.h" |
17 | 19 | ||
20 | #if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__) | ||
21 | # include <fcntl.h> | ||
22 | # include <io.h> | ||
23 | # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY) | ||
24 | #else | ||
25 | # define SET_BINARY_MODE(file) | ||
26 | #endif | ||
27 | |||
18 | #define CHUNK 16384 | 28 | #define CHUNK 16384 |
19 | 29 | ||
20 | /* Compress from file source to file dest until EOF on source. | 30 | /* Compress from file source to file dest until EOF on source. |
@@ -28,8 +38,8 @@ int def(FILE *source, FILE *dest, int level) | |||
28 | int ret, flush; | 38 | int ret, flush; |
29 | unsigned have; | 39 | unsigned have; |
30 | z_stream strm; | 40 | z_stream strm; |
31 | char in[CHUNK]; | 41 | unsigned char in[CHUNK]; |
32 | char out[CHUNK]; | 42 | unsigned char out[CHUNK]; |
33 | 43 | ||
34 | /* allocate deflate state */ | 44 | /* allocate deflate state */ |
35 | strm.zalloc = Z_NULL; | 45 | strm.zalloc = Z_NULL; |
@@ -84,8 +94,8 @@ int inf(FILE *source, FILE *dest) | |||
84 | int ret; | 94 | int ret; |
85 | unsigned have; | 95 | unsigned have; |
86 | z_stream strm; | 96 | z_stream strm; |
87 | char in[CHUNK]; | 97 | unsigned char in[CHUNK]; |
88 | char out[CHUNK]; | 98 | unsigned char out[CHUNK]; |
89 | 99 | ||
90 | /* allocate inflate state */ | 100 | /* allocate inflate state */ |
91 | strm.zalloc = Z_NULL; | 101 | strm.zalloc = Z_NULL; |
@@ -167,6 +177,10 @@ int main(int argc, char **argv) | |||
167 | { | 177 | { |
168 | int ret; | 178 | int ret; |
169 | 179 | ||
180 | /* avoid end-of-line conversions */ | ||
181 | SET_BINARY_MODE(stdin); | ||
182 | SET_BINARY_MODE(stdout); | ||
183 | |||
170 | /* do compression if no arguments */ | 184 | /* do compression if no arguments */ |
171 | if (argc == 1) { | 185 | if (argc == 1) { |
172 | ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); | 186 | ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION); |
diff --git a/examples/zran.c b/examples/zran.c index 8c7717e..617a130 100644 --- a/examples/zran.c +++ b/examples/zran.c | |||
@@ -351,7 +351,7 @@ int main(int argc, char **argv) | |||
351 | int len; | 351 | int len; |
352 | off_t offset; | 352 | off_t offset; |
353 | FILE *in; | 353 | FILE *in; |
354 | struct access *index; | 354 | struct access *index = NULL; |
355 | unsigned char buf[CHUNK]; | 355 | unsigned char buf[CHUNK]; |
356 | 356 | ||
357 | /* open input file */ | 357 | /* open input file */ |
@@ -1,5 +1,5 @@ | |||
1 | /* gzio.c -- IO on .gz files | 1 | /* gzio.c -- IO on .gz files |
2 | * Copyright (C) 1995-2005 Jean-loup Gailly. | 2 | * Copyright (C) 1995-2006 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | * | 4 | * |
5 | * Compile this file with -DNO_GZCOMPRESS to avoid the compression code. | 5 | * Compile this file with -DNO_GZCOMPRESS to avoid the compression code. |
@@ -7,9 +7,8 @@ | |||
7 | 7 | ||
8 | /* @(#) $Id$ */ | 8 | /* @(#) $Id$ */ |
9 | 9 | ||
10 | #include <stdio.h> | ||
11 | |||
12 | #include "zutil.h" | 10 | #include "zutil.h" |
11 | #include <stdio.h> | ||
13 | 12 | ||
14 | #ifdef NO_DEFLATE /* for compatibility with old definition */ | 13 | #ifdef NO_DEFLATE /* for compatibility with old definition */ |
15 | # define NO_GZCOMPRESS | 14 | # define NO_GZCOMPRESS |
@@ -187,7 +186,10 @@ local gzFile gz_open (path, mode, fd) | |||
187 | /* Write a very simple .gz header: | 186 | /* Write a very simple .gz header: |
188 | */ | 187 | */ |
189 | fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], | 188 | fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1], |
190 | Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE); | 189 | Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, level == 9 ? 2 : |
190 | (strategy >= Z_HUFFMAN_ONLY || | ||
191 | (level != Z_DEFAULT_COMPRESSION && level < 2) ? | ||
192 | 4 : 0) /*xflags*/, OS_CODE); | ||
191 | s->start = 10L; | 193 | s->start = 10L; |
192 | /* We use 10L instead of ftell(s->file) to because ftell causes an | 194 | /* We use 10L instead of ftell(s->file) to because ftell causes an |
193 | * fflush on some systems. This version of the library doesn't use | 195 | * fflush on some systems. This version of the library doesn't use |
@@ -256,7 +258,7 @@ int ZEXPORT gzsetparams (file, level, strategy) | |||
256 | /* =========================================================================== | 258 | /* =========================================================================== |
257 | Read a byte from a gz_stream; update next_in and avail_in. Return EOF | 259 | Read a byte from a gz_stream; update next_in and avail_in. Return EOF |
258 | for end of file. | 260 | for end of file. |
259 | IN assertion: the stream s has been sucessfully opened for reading. | 261 | IN assertion: the stream s has been successfully opened for reading. |
260 | */ | 262 | */ |
261 | local int get_byte(s) | 263 | local int get_byte(s) |
262 | gz_stream *s; | 264 | gz_stream *s; |
@@ -281,7 +283,7 @@ local int get_byte(s) | |||
281 | mode to transparent if the gzip magic header is not present; set s->err | 283 | mode to transparent if the gzip magic header is not present; set s->err |
282 | to Z_DATA_ERROR if the magic header is present but the rest of the header | 284 | to Z_DATA_ERROR if the magic header is present but the rest of the header |
283 | is incorrect. | 285 | is incorrect. |
284 | IN assertion: the stream s has already been created sucessfully; | 286 | IN assertion: the stream s has already been created successfully; |
285 | s->stream.avail_in is zero for the first time, but may be non-zero | 287 | s->stream.avail_in is zero for the first time, but may be non-zero |
286 | for concatenated .gz files. | 288 | for concatenated .gz files. |
287 | */ | 289 | */ |
@@ -301,6 +303,7 @@ local void check_header(s) | |||
301 | if (len) s->inbuf[0] = s->stream.next_in[0]; | 303 | if (len) s->inbuf[0] = s->stream.next_in[0]; |
302 | errno = 0; | 304 | errno = 0; |
303 | len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file); | 305 | len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file); |
306 | if (len == 0) s->z_eof = 1; | ||
304 | if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO; | 307 | if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO; |
305 | s->stream.avail_in += len; | 308 | s->stream.avail_in += len; |
306 | s->stream.next_in = s->inbuf; | 309 | s->stream.next_in = s->inbuf; |
@@ -436,7 +439,7 @@ int ZEXPORT gzread (file, buf, len) | |||
436 | s->stream.avail_out -= n; | 439 | s->stream.avail_out -= n; |
437 | s->stream.avail_in -= n; | 440 | s->stream.avail_in -= n; |
438 | } | 441 | } |
439 | if (s->stream.avail_out > 0) { | 442 | if (s->stream.avail_out > 0 && !feof(s->file)) { |
440 | s->stream.avail_out -= | 443 | s->stream.avail_out -= |
441 | (uInt)fread(next_out, 1, s->stream.avail_out, s->file); | 444 | (uInt)fread(next_out, 1, s->stream.avail_out, s->file); |
442 | } | 445 | } |
@@ -971,7 +974,7 @@ int ZEXPORT gzclose (file) | |||
971 | return destroy((gz_stream*)file); | 974 | return destroy((gz_stream*)file); |
972 | } | 975 | } |
973 | 976 | ||
974 | #ifdef STDC | 977 | #if defined(STDC) && !defined(_WIN32_WCE) |
975 | # define zstrerror(errnum) strerror(errnum) | 978 | # define zstrerror(errnum) strerror(errnum) |
976 | #else | 979 | #else |
977 | # define zstrerror(errnum) "" | 980 | # define zstrerror(errnum) "" |
@@ -1,5 +1,5 @@ | |||
1 | /* inflate.h -- internal inflate state definition | 1 | /* inflate.h -- internal inflate state definition |
2 | * Copyright (C) 1995-2004 Mark Adler | 2 | * Copyright (C) 1995-2006 Mark Adler |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -73,7 +73,7 @@ typedef enum { | |||
73 | CHECK -> LENGTH -> DONE | 73 | CHECK -> LENGTH -> DONE |
74 | */ | 74 | */ |
75 | 75 | ||
76 | /* state maintained between inflate() calls. Approximately 7K bytes. */ | 76 | /* state maintained between inflate() calls. Approximately 10K bytes. */ |
77 | struct inflate_state { | 77 | struct inflate_state { |
78 | inflate_mode mode; /* current inflate mode */ | 78 | inflate_mode mode; /* current inflate mode */ |
79 | int last; /* true if processing last block */ | 79 | int last; /* true if processing last block */ |
@@ -9,7 +9,7 @@ | |||
9 | #define MAXBITS 15 | 9 | #define MAXBITS 15 |
10 | 10 | ||
11 | const char inflate_copyright[] = | 11 | const char inflate_copyright[] = |
12 | " inflate 1.2.3 Copyright 1995-2005 Mark Adler "; | 12 | " inflate 1.2.3.1 Copyright 1995-2005 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 |
@@ -62,7 +62,7 @@ unsigned short FAR *work; | |||
62 | 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; | 62 | 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; |
63 | static const unsigned short lext[31] = { /* Length codes 257..285 extra */ | 63 | static const unsigned short lext[31] = { /* Length codes 257..285 extra */ |
64 | 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, | 64 | 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, |
65 | 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196}; | 65 | 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 74, 196}; |
66 | static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ | 66 | static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ |
67 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, | 67 | 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, |
68 | 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, | 68 | 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, |
diff --git a/make_vms.com b/make_vms.com index c2a1fb5..aa4e461 100644 --- a/make_vms.com +++ b/make_vms.com | |||
@@ -1,6 +1,15 @@ | |||
1 | $! make libz under VMS written by | 1 | $! make libz under VMS written by |
2 | $! Martin P.J. Zinser | 2 | $! Martin P.J. Zinser |
3 | $! <zinser@zinser.no-ip.info or zinser@sysdev.deutsche-boerse.com> | 3 | $! |
4 | $! In case of problems with the install you might contact me at | ||
5 | $! zinser@zinser.no-ip.info(preferred) or | ||
6 | $! zinser@sysdev.deutsche-boerse.com (work) | ||
7 | $! | ||
8 | $! Make procedure history for Zlib | ||
9 | $! | ||
10 | $!------------------------------------------------------------------------------ | ||
11 | $! Version history | ||
12 | $! 0.01 20060120 First version to receive a number | ||
4 | $! | 13 | $! |
5 | $ on error then goto err_exit | 14 | $ on error then goto err_exit |
6 | $! | 15 | $! |
@@ -10,7 +19,10 @@ $! | |||
10 | $ true = 1 | 19 | $ true = 1 |
11 | $ false = 0 | 20 | $ false = 0 |
12 | $ tmpnam = "temp_" + f$getjpi("","pid") | 21 | $ tmpnam = "temp_" + f$getjpi("","pid") |
13 | $ SAY = "WRITE SYS$OUTPUT" | 22 | $ its_decc = false |
23 | $ its_vaxc = false | ||
24 | $ its_gnuc = false | ||
25 | $ s_case = False | ||
14 | $! | 26 | $! |
15 | $! Setup variables holding "config" information | 27 | $! Setup variables holding "config" information |
16 | $! | 28 | $! |
@@ -21,13 +33,11 @@ $ v_string = "ZLIB_VERSION" | |||
21 | $ v_file = "zlib.h" | 33 | $ v_file = "zlib.h" |
22 | $ ccopt = "" | 34 | $ ccopt = "" |
23 | $ lopts = "" | 35 | $ lopts = "" |
36 | $ dnsrl = "" | ||
24 | $ linkonly = false | 37 | $ linkonly = false |
25 | $ optfile = name + ".opt" | 38 | $ optfile = name + ".opt" |
26 | $ its_decc = false | ||
27 | $ its_vaxc = false | ||
28 | $ its_gnuc = false | ||
29 | $ axp = f$getsyi("HW_MODEL").ge.1024 | 39 | $ axp = f$getsyi("HW_MODEL").ge.1024 |
30 | $ s_case = false | 40 | $! |
31 | $! Check for MMK/MMS | 41 | $! Check for MMK/MMS |
32 | $! | 42 | $! |
33 | $ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" | 43 | $ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS" |
@@ -107,7 +117,7 @@ $ call make minigzip.exe - | |||
107 | $ endif | 117 | $ endif |
108 | $ else | 118 | $ else |
109 | $ gosub crea_mms | 119 | $ gosub crea_mms |
110 | $ SAY "Make ''name' ''version' with ''Make' " | 120 | $ write sys$output "Make ''name' ''version' with ''Make' " |
111 | $ 'make' | 121 | $ 'make' |
112 | $ endif | 122 | $ endif |
113 | $! | 123 | $! |
@@ -133,6 +143,7 @@ $ write sys$output "C compiler required to build ''name'" | |||
133 | $ goto err_exit | 143 | $ goto err_exit |
134 | $ERR_EXIT: | 144 | $ERR_EXIT: |
135 | $ set message/facil/ident/sever/text | 145 | $ set message/facil/ident/sever/text |
146 | $ close/nolog optf | ||
136 | $ write sys$output "Exiting..." | 147 | $ write sys$output "Exiting..." |
137 | $ exit 2 | 148 | $ exit 2 |
138 | $! | 149 | $! |
@@ -244,6 +255,9 @@ $!------------------------------------------------------------------------------ | |||
244 | $! | 255 | $! |
245 | $! Look for the compiler used | 256 | $! Look for the compiler used |
246 | $! | 257 | $! |
258 | $! Version history | ||
259 | $! 0.01 20040223 First version to receive a number | ||
260 | $! 0.02 20040229 Save/set value of decc$no_rooted_search_lists | ||
247 | $CHECK_COMPILER: | 261 | $CHECK_COMPILER: |
248 | $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) | 262 | $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) |
249 | $ then | 263 | $ then |
@@ -257,9 +271,20 @@ $! | |||
257 | $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) | 271 | $ if (.not. (its_decc .or. its_vaxc .or. its_gnuc)) |
258 | $ then goto CC_ERR | 272 | $ then goto CC_ERR |
259 | $ else | 273 | $ else |
260 | $ if its_decc then write sys$output "CC compiler check ... Compaq C" | 274 | $ if its_decc |
261 | $ if its_vaxc then write sys$output "CC compiler check ... VAX C" | 275 | $ then |
262 | $ if its_gnuc then write sys$output "CC compiler check ... GNU C" | 276 | $ write sys$output "CC compiler check ... Compaq C" |
277 | $ if f$trnlnm("decc$no_rooted_search_lists") .nes. "" | ||
278 | $ then | ||
279 | $ dnrsl = f$trnlnm("decc$no_rooted_search_lists") | ||
280 | $ endif | ||
281 | $ define decc$no_rooted_search_lists 1 | ||
282 | $ else | ||
283 | $ if its_vaxc then write sys$output "CC compiler check ... VAX C" | ||
284 | $ if its_gnuc then write sys$output "CC compiler check ... GNU C" | ||
285 | $ if f$trnlnm(topt) then write topt "sys$share:vaxcrtl.exe/share" | ||
286 | $ if f$trnlnm(optf) then write optf "sys$share:vaxcrtl.exe/share" | ||
287 | $ endif | ||
263 | $ endif | 288 | $ endif |
264 | $ return | 289 | $ return |
265 | $!------------------------------------------------------------------------------ | 290 | $!------------------------------------------------------------------------------ |
@@ -382,17 +407,23 @@ $ close h_in | |||
382 | $ return | 407 | $ return |
383 | $!------------------------------------------------------------------------------ | 408 | $!------------------------------------------------------------------------------ |
384 | $! | 409 | $! |
385 | $! Analyze Object files for OpenVMS AXP to extract Procedure and Data | 410 | $! Analyze Object files for OpenVMS AXP to extract Procedure and Data |
386 | $! information to build a symbol vector for a shareable image | 411 | $! information to build a symbol vector for a shareable image |
387 | $! All the "brains" of this logic was suggested by Hartmut Becker | 412 | $! All the "brains" of this logic was suggested by Hartmut Becker |
388 | $! (Hartmut.Becker@compaq.com). All the bugs were introduced by me | 413 | $! (Hartmut.Becker@compaq.com). All the bugs were introduced by me |
389 | $! (zinser@decus.de), so if you do have problem reports please do not | 414 | $! (zinser@zinser.no-ip.info), so if you do have problem reports please do not |
390 | $! bother Hartmut/HP, but get in touch with me | 415 | $! bother Hartmut/HP, but get in touch with me |
391 | $! | 416 | $! |
392 | $ ANAL_OBJ_AXP: Subroutine | 417 | $! Version history |
418 | $! 0.01 20040406 Skip over shareable images in option file | ||
419 | $! 0.02 20041109 Fix option file for shareable images with case_sensitive=YES | ||
420 | $! 0.03 20050107 Skip over Identification labels in option file | ||
421 | $! 0.04 20060117 Add uppercase alias to code compiled with /name=as_is | ||
422 | $! | ||
423 | $ ANAL_OBJ_AXP: Subroutine | ||
393 | $ V = 'F$Verify(0) | 424 | $ V = 'F$Verify(0) |
394 | $ SAY := "WRITE_ SYS$OUTPUT" | 425 | $ SAY := "WRITE_ SYS$OUTPUT" |
395 | $ | 426 | $ |
396 | $ IF F$SEARCH("''P1'") .EQS. "" | 427 | $ IF F$SEARCH("''P1'") .EQS. "" |
397 | $ THEN | 428 | $ THEN |
398 | $ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available" | 429 | $ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available" |
@@ -409,6 +440,17 @@ $ create a.tmp | |||
409 | $ open/append atmp a.tmp | 440 | $ open/append atmp a.tmp |
410 | $ loop: | 441 | $ loop: |
411 | $ read/end=end_loop in line | 442 | $ read/end=end_loop in line |
443 | $ if f$locate("/SHARE",f$edit(line,"upcase")) .lt. f$length(line) | ||
444 | $ then | ||
445 | $ write sys$output "ANAL_SKP_SHR-i-skipshare, ''line'" | ||
446 | $ goto loop | ||
447 | $ endif | ||
448 | $ if f$locate("IDENTIFICATION=",f$edit(line,"upcase")) .lt. f$length(line) | ||
449 | $ then | ||
450 | $ write sys$output "ANAL_OBJ_AXP-i-ident: Identification ", - | ||
451 | f$element(1,"=",line) | ||
452 | $ goto loop | ||
453 | $ endif | ||
412 | $ f= f$search(line) | 454 | $ f= f$search(line) |
413 | $ if f .eqs. "" | 455 | $ if f .eqs. "" |
414 | $ then | 456 | $ then |
@@ -450,12 +492,35 @@ $ edito/edt/command=sys$input f.tmp | |||
450 | sub/symbol: "/symbol_vector=(/whole | 492 | sub/symbol: "/symbol_vector=(/whole |
451 | sub/"/=DATA)/whole | 493 | sub/"/=DATA)/whole |
452 | exit | 494 | exit |
453 | $ sort/nodupl d.tmp,f.tmp 'p2' | 495 | $ sort/nodupl d.tmp,f.tmp g.tmp |
454 | $ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;* | 496 | $ open/read raw_vector g.tmp |
497 | $ open/write case_vector 'p2' | ||
498 | $ RAWLOOP: | ||
499 | $ read/end=end_rawloop raw_vector raw_element | ||
500 | $ write case_vector raw_element | ||
501 | $ if f$locate("=PROCEDURE)",raw_element) .lt. f$length(raw_element) | ||
502 | $ then | ||
503 | $ name = f$element(1,"=",raw_element) - "(" | ||
504 | $ if f$edit(name,"UPCASE") .nes. name then - | ||
505 | write case_vector f$fao(" symbol_vector=(!AS/!AS=PROCEDURE)", - | ||
506 | f$edit(name,"UPCASE"), name) | ||
507 | $ endif | ||
508 | $ if f$locate("=DATA)",raw_element) .lt. f$length(raw_element) | ||
509 | $ then | ||
510 | $ name = f$element(1,"=",raw_element) - "(" | ||
511 | $ if f$edit(name,"UPCASE") .nes. name then - | ||
512 | write case_vector f$fao(" symbol_vector=(!AS/!AS=DATA)", - | ||
513 | f$edit(name,"UPCASE"), name) | ||
514 | $ endif | ||
515 | $ goto rawloop | ||
516 | $ END_RAWLOOP: | ||
517 | $ close raw_vector | ||
518 | $ close case_vector | ||
519 | $ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*,g.tmp;* | ||
455 | $ if f$search("x.tmp") .nes. "" - | 520 | $ if f$search("x.tmp") .nes. "" - |
456 | then $ delete x.tmp;* | 521 | then $ delete x.tmp;* |
457 | $! | 522 | $! |
458 | $ EXIT_AA: | 523 | $ EXIT_AA: |
459 | $ if V then set verify | 524 | $ if V then set verify |
460 | $ endsubroutine | 525 | $ endsubroutine |
461 | $!------------------------------------------------------------------------------ | 526 | $!------------------------------------------------------------------------------ |
@@ -1,5 +1,5 @@ | |||
1 | /* minigzip.c -- simulate gzip using the zlib compression library | 1 | /* minigzip.c -- simulate gzip using the zlib compression library |
2 | * Copyright (C) 1995-2005 Jean-loup Gailly. | 2 | * Copyright (C) 1995-2006 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -15,8 +15,8 @@ | |||
15 | 15 | ||
16 | /* @(#) $Id$ */ | 16 | /* @(#) $Id$ */ |
17 | 17 | ||
18 | #include <stdio.h> | ||
19 | #include "zlib.h" | 18 | #include "zlib.h" |
19 | #include <stdio.h> | ||
20 | 20 | ||
21 | #ifdef STDC | 21 | #ifdef STDC |
22 | # include <string.h> | 22 | # include <string.h> |
diff --git a/projects/visualc6/example.dsp b/projects/visualc6/example.dsp index e072a37..f713efd 100644 --- a/projects/visualc6/example.dsp +++ b/projects/visualc6/example.dsp | |||
@@ -17,14 +17,14 @@ CFG=example - Win32 LIB Debug | |||
17 | !MESSAGE | 17 | !MESSAGE |
18 | !MESSAGE Possible choices for configuration are: | 18 | !MESSAGE Possible choices for configuration are: |
19 | !MESSAGE | 19 | !MESSAGE |
20 | !MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application") | ||
21 | !MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application") | ||
22 | !MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") | 20 | !MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") |
23 | !MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") | 21 | !MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") |
24 | !MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application") | 22 | !MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application") |
25 | !MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application") | 23 | !MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application") |
26 | !MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") | 24 | !MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") |
27 | !MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") | 25 | !MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") |
26 | !MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application") | ||
27 | !MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application") | ||
28 | !MESSAGE | 28 | !MESSAGE |
29 | 29 | ||
30 | # Begin Project | 30 | # Begin Project |
@@ -34,22 +34,22 @@ CFG=example - Win32 LIB Debug | |||
34 | CPP=cl.exe | 34 | CPP=cl.exe |
35 | RSC=rc.exe | 35 | RSC=rc.exe |
36 | 36 | ||
37 | !IF "$(CFG)" == "example - Win32 DLL Release" | 37 | !IF "$(CFG)" == "example - Win32 DLL ASM Release" |
38 | 38 | ||
39 | # PROP BASE Use_MFC 0 | 39 | # PROP BASE Use_MFC 0 |
40 | # PROP BASE Use_Debug_Libraries 0 | 40 | # PROP BASE Use_Debug_Libraries 0 |
41 | # PROP BASE Output_Dir "example___Win32_DLL_Release" | 41 | # PROP BASE Output_Dir "example___Win32_DLL_ASM_Release" |
42 | # PROP BASE Intermediate_Dir "example___Win32_DLL_Release" | 42 | # PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release" |
43 | # PROP BASE Target_Dir "" | 43 | # PROP BASE Target_Dir "" |
44 | # PROP Use_MFC 0 | 44 | # PROP Use_MFC 0 |
45 | # PROP Use_Debug_Libraries 0 | 45 | # PROP Use_Debug_Libraries 0 |
46 | # PROP Output_Dir "Win32_DLL_Release" | 46 | # PROP Output_Dir "Win32_DLL_ASM_Release" |
47 | # PROP Intermediate_Dir "Win32_DLL_Release" | 47 | # PROP Intermediate_Dir "Win32_DLL_ASM_Release" |
48 | # PROP Ignore_Export_Lib 0 | 48 | # PROP Ignore_Export_Lib 0 |
49 | # PROP Target_Dir "" | 49 | # PROP Target_Dir "" |
50 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 50 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
51 | # SUBTRACT BASE CPP /YX | 51 | # SUBTRACT BASE CPP /YX |
52 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 52 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
53 | # SUBTRACT CPP /YX | 53 | # SUBTRACT CPP /YX |
54 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 54 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
55 | # ADD RSC /l 0x409 /d "NDEBUG" | 55 | # ADD RSC /l 0x409 /d "NDEBUG" |
@@ -60,22 +60,22 @@ LINK32=link.exe | |||
60 | # 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 | 60 | # 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 |
61 | # ADD LINK32 /nologo /subsystem:console /machine:I386 | 61 | # ADD LINK32 /nologo /subsystem:console /machine:I386 |
62 | 62 | ||
63 | !ELSEIF "$(CFG)" == "example - Win32 DLL Debug" | 63 | !ELSEIF "$(CFG)" == "example - Win32 DLL ASM Debug" |
64 | 64 | ||
65 | # PROP BASE Use_MFC 0 | 65 | # PROP BASE Use_MFC 0 |
66 | # PROP BASE Use_Debug_Libraries 1 | 66 | # PROP BASE Use_Debug_Libraries 1 |
67 | # PROP BASE Output_Dir "example___Win32_DLL_Debug" | 67 | # PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug" |
68 | # PROP BASE Intermediate_Dir "example___Win32_DLL_Debug" | 68 | # PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug" |
69 | # PROP BASE Target_Dir "" | 69 | # PROP BASE Target_Dir "" |
70 | # PROP Use_MFC 0 | 70 | # PROP Use_MFC 0 |
71 | # PROP Use_Debug_Libraries 1 | 71 | # PROP Use_Debug_Libraries 1 |
72 | # PROP Output_Dir "Win32_DLL_Debug" | 72 | # PROP Output_Dir "Win32_DLL_ASM_Debug" |
73 | # PROP Intermediate_Dir "Win32_DLL_Debug" | 73 | # PROP Intermediate_Dir "Win32_DLL_ASM_Debug" |
74 | # PROP Ignore_Export_Lib 0 | 74 | # PROP Ignore_Export_Lib 0 |
75 | # PROP Target_Dir "" | 75 | # PROP Target_Dir "" |
76 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 76 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
77 | # SUBTRACT BASE CPP /YX | 77 | # SUBTRACT BASE CPP /YX |
78 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 78 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
79 | # SUBTRACT CPP /YX | 79 | # SUBTRACT CPP /YX |
80 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 80 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
81 | # ADD RSC /l 0x409 /d "_DEBUG" | 81 | # ADD RSC /l 0x409 /d "_DEBUG" |
@@ -86,22 +86,22 @@ LINK32=link.exe | |||
86 | # 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 | 86 | # 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 |
87 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | 87 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept |
88 | 88 | ||
89 | !ELSEIF "$(CFG)" == "example - Win32 DLL ASM Release" | 89 | !ELSEIF "$(CFG)" == "example - Win32 DLL Release" |
90 | 90 | ||
91 | # PROP BASE Use_MFC 0 | 91 | # PROP BASE Use_MFC 0 |
92 | # PROP BASE Use_Debug_Libraries 0 | 92 | # PROP BASE Use_Debug_Libraries 0 |
93 | # PROP BASE Output_Dir "example___Win32_DLL_ASM_Release" | 93 | # PROP BASE Output_Dir "example___Win32_DLL_Release" |
94 | # PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release" | 94 | # PROP BASE Intermediate_Dir "example___Win32_DLL_Release" |
95 | # PROP BASE Target_Dir "" | 95 | # PROP BASE Target_Dir "" |
96 | # PROP Use_MFC 0 | 96 | # PROP Use_MFC 0 |
97 | # PROP Use_Debug_Libraries 0 | 97 | # PROP Use_Debug_Libraries 0 |
98 | # PROP Output_Dir "Win32_DLL_ASM_Release" | 98 | # PROP Output_Dir "Win32_DLL_Release" |
99 | # PROP Intermediate_Dir "Win32_DLL_ASM_Release" | 99 | # PROP Intermediate_Dir "Win32_DLL_Release" |
100 | # PROP Ignore_Export_Lib 0 | 100 | # PROP Ignore_Export_Lib 0 |
101 | # PROP Target_Dir "" | 101 | # PROP Target_Dir "" |
102 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 102 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
103 | # SUBTRACT BASE CPP /YX | 103 | # SUBTRACT BASE CPP /YX |
104 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 104 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
105 | # SUBTRACT CPP /YX | 105 | # SUBTRACT CPP /YX |
106 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 106 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
107 | # ADD RSC /l 0x409 /d "NDEBUG" | 107 | # ADD RSC /l 0x409 /d "NDEBUG" |
@@ -112,22 +112,22 @@ LINK32=link.exe | |||
112 | # 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 | 112 | # 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 |
113 | # ADD LINK32 /nologo /subsystem:console /machine:I386 | 113 | # ADD LINK32 /nologo /subsystem:console /machine:I386 |
114 | 114 | ||
115 | !ELSEIF "$(CFG)" == "example - Win32 DLL ASM Debug" | 115 | !ELSEIF "$(CFG)" == "example - Win32 DLL Debug" |
116 | 116 | ||
117 | # PROP BASE Use_MFC 0 | 117 | # PROP BASE Use_MFC 0 |
118 | # PROP BASE Use_Debug_Libraries 1 | 118 | # PROP BASE Use_Debug_Libraries 1 |
119 | # PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug" | 119 | # PROP BASE Output_Dir "example___Win32_DLL_Debug" |
120 | # PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug" | 120 | # PROP BASE Intermediate_Dir "example___Win32_DLL_Debug" |
121 | # PROP BASE Target_Dir "" | 121 | # PROP BASE Target_Dir "" |
122 | # PROP Use_MFC 0 | 122 | # PROP Use_MFC 0 |
123 | # PROP Use_Debug_Libraries 1 | 123 | # PROP Use_Debug_Libraries 1 |
124 | # PROP Output_Dir "Win32_DLL_ASM_Debug" | 124 | # PROP Output_Dir "Win32_DLL_Debug" |
125 | # PROP Intermediate_Dir "Win32_DLL_ASM_Debug" | 125 | # PROP Intermediate_Dir "Win32_DLL_Debug" |
126 | # PROP Ignore_Export_Lib 0 | 126 | # PROP Ignore_Export_Lib 0 |
127 | # PROP Target_Dir "" | 127 | # PROP Target_Dir "" |
128 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 128 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
129 | # SUBTRACT BASE CPP /YX | 129 | # SUBTRACT BASE CPP /YX |
130 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 130 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
131 | # SUBTRACT CPP /YX | 131 | # SUBTRACT CPP /YX |
132 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 132 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
133 | # ADD RSC /l 0x409 /d "_DEBUG" | 133 | # ADD RSC /l 0x409 /d "_DEBUG" |
@@ -138,22 +138,22 @@ LINK32=link.exe | |||
138 | # 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 | 138 | # 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 |
139 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | 139 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept |
140 | 140 | ||
141 | !ELSEIF "$(CFG)" == "example - Win32 LIB Release" | 141 | !ELSEIF "$(CFG)" == "example - Win32 LIB ASM Release" |
142 | 142 | ||
143 | # PROP BASE Use_MFC 0 | 143 | # PROP BASE Use_MFC 0 |
144 | # PROP BASE Use_Debug_Libraries 0 | 144 | # PROP BASE Use_Debug_Libraries 0 |
145 | # PROP BASE Output_Dir "example___Win32_LIB_Release" | 145 | # PROP BASE Output_Dir "example___Win32_LIB_ASM_Release" |
146 | # PROP BASE Intermediate_Dir "example___Win32_LIB_Release" | 146 | # PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release" |
147 | # PROP BASE Target_Dir "" | 147 | # PROP BASE Target_Dir "" |
148 | # PROP Use_MFC 0 | 148 | # PROP Use_MFC 0 |
149 | # PROP Use_Debug_Libraries 0 | 149 | # PROP Use_Debug_Libraries 0 |
150 | # PROP Output_Dir "Win32_LIB_Release" | 150 | # PROP Output_Dir "Win32_LIB_ASM_Release" |
151 | # PROP Intermediate_Dir "Win32_LIB_Release" | 151 | # PROP Intermediate_Dir "Win32_LIB_ASM_Release" |
152 | # PROP Ignore_Export_Lib 0 | 152 | # PROP Ignore_Export_Lib 0 |
153 | # PROP Target_Dir "" | 153 | # PROP Target_Dir "" |
154 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 154 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
155 | # SUBTRACT BASE CPP /YX | 155 | # SUBTRACT BASE CPP /YX |
156 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 156 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
157 | # SUBTRACT CPP /YX | 157 | # SUBTRACT CPP /YX |
158 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 158 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
159 | # ADD RSC /l 0x409 /d "NDEBUG" | 159 | # ADD RSC /l 0x409 /d "NDEBUG" |
@@ -164,22 +164,22 @@ LINK32=link.exe | |||
164 | # 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 | 164 | # 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 |
165 | # ADD LINK32 /nologo /subsystem:console /machine:I386 | 165 | # ADD LINK32 /nologo /subsystem:console /machine:I386 |
166 | 166 | ||
167 | !ELSEIF "$(CFG)" == "example - Win32 LIB Debug" | 167 | !ELSEIF "$(CFG)" == "example - Win32 LIB ASM Debug" |
168 | 168 | ||
169 | # PROP BASE Use_MFC 0 | 169 | # PROP BASE Use_MFC 0 |
170 | # PROP BASE Use_Debug_Libraries 1 | 170 | # PROP BASE Use_Debug_Libraries 1 |
171 | # PROP BASE Output_Dir "example___Win32_LIB_Debug" | 171 | # PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug" |
172 | # PROP BASE Intermediate_Dir "example___Win32_LIB_Debug" | 172 | # PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug" |
173 | # PROP BASE Target_Dir "" | 173 | # PROP BASE Target_Dir "" |
174 | # PROP Use_MFC 0 | 174 | # PROP Use_MFC 0 |
175 | # PROP Use_Debug_Libraries 1 | 175 | # PROP Use_Debug_Libraries 1 |
176 | # PROP Output_Dir "Win32_LIB_Debug" | 176 | # PROP Output_Dir "Win32_LIB_ASM_Debug" |
177 | # PROP Intermediate_Dir "Win32_LIB_Debug" | 177 | # PROP Intermediate_Dir "Win32_LIB_ASM_Debug" |
178 | # PROP Ignore_Export_Lib 0 | 178 | # PROP Ignore_Export_Lib 0 |
179 | # PROP Target_Dir "" | 179 | # PROP Target_Dir "" |
180 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 180 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
181 | # SUBTRACT BASE CPP /YX | 181 | # SUBTRACT BASE CPP /YX |
182 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 182 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
183 | # SUBTRACT CPP /YX | 183 | # SUBTRACT CPP /YX |
184 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 184 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
185 | # ADD RSC /l 0x409 /d "_DEBUG" | 185 | # ADD RSC /l 0x409 /d "_DEBUG" |
@@ -190,22 +190,22 @@ LINK32=link.exe | |||
190 | # 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 | 190 | # 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 |
191 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | 191 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept |
192 | 192 | ||
193 | !ELSEIF "$(CFG)" == "example - Win32 LIB ASM Release" | 193 | !ELSEIF "$(CFG)" == "example - Win32 LIB Release" |
194 | 194 | ||
195 | # PROP BASE Use_MFC 0 | 195 | # PROP BASE Use_MFC 0 |
196 | # PROP BASE Use_Debug_Libraries 0 | 196 | # PROP BASE Use_Debug_Libraries 0 |
197 | # PROP BASE Output_Dir "example___Win32_LIB_ASM_Release" | 197 | # PROP BASE Output_Dir "example___Win32_LIB_Release" |
198 | # PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release" | 198 | # PROP BASE Intermediate_Dir "example___Win32_LIB_Release" |
199 | # PROP BASE Target_Dir "" | 199 | # PROP BASE Target_Dir "" |
200 | # PROP Use_MFC 0 | 200 | # PROP Use_MFC 0 |
201 | # PROP Use_Debug_Libraries 0 | 201 | # PROP Use_Debug_Libraries 0 |
202 | # PROP Output_Dir "Win32_LIB_ASM_Release" | 202 | # PROP Output_Dir "Win32_LIB_Release" |
203 | # PROP Intermediate_Dir "Win32_LIB_ASM_Release" | 203 | # PROP Intermediate_Dir "Win32_LIB_Release" |
204 | # PROP Ignore_Export_Lib 0 | 204 | # PROP Ignore_Export_Lib 0 |
205 | # PROP Target_Dir "" | 205 | # PROP Target_Dir "" |
206 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 206 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
207 | # SUBTRACT BASE CPP /YX | 207 | # SUBTRACT BASE CPP /YX |
208 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 208 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
209 | # SUBTRACT CPP /YX | 209 | # SUBTRACT CPP /YX |
210 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 210 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
211 | # ADD RSC /l 0x409 /d "NDEBUG" | 211 | # ADD RSC /l 0x409 /d "NDEBUG" |
@@ -216,22 +216,22 @@ LINK32=link.exe | |||
216 | # 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 | 216 | # 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 |
217 | # ADD LINK32 /nologo /subsystem:console /machine:I386 | 217 | # ADD LINK32 /nologo /subsystem:console /machine:I386 |
218 | 218 | ||
219 | !ELSEIF "$(CFG)" == "example - Win32 LIB ASM Debug" | 219 | !ELSEIF "$(CFG)" == "example - Win32 LIB Debug" |
220 | 220 | ||
221 | # PROP BASE Use_MFC 0 | 221 | # PROP BASE Use_MFC 0 |
222 | # PROP BASE Use_Debug_Libraries 1 | 222 | # PROP BASE Use_Debug_Libraries 1 |
223 | # PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug" | 223 | # PROP BASE Output_Dir "example___Win32_LIB_Debug" |
224 | # PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug" | 224 | # PROP BASE Intermediate_Dir "example___Win32_LIB_Debug" |
225 | # PROP BASE Target_Dir "" | 225 | # PROP BASE Target_Dir "" |
226 | # PROP Use_MFC 0 | 226 | # PROP Use_MFC 0 |
227 | # PROP Use_Debug_Libraries 1 | 227 | # PROP Use_Debug_Libraries 1 |
228 | # PROP Output_Dir "Win32_LIB_ASM_Debug" | 228 | # PROP Output_Dir "Win32_LIB_Debug" |
229 | # PROP Intermediate_Dir "Win32_LIB_ASM_Debug" | 229 | # PROP Intermediate_Dir "Win32_LIB_Debug" |
230 | # PROP Ignore_Export_Lib 0 | 230 | # PROP Ignore_Export_Lib 0 |
231 | # PROP Target_Dir "" | 231 | # PROP Target_Dir "" |
232 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 232 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
233 | # SUBTRACT BASE CPP /YX | 233 | # SUBTRACT BASE CPP /YX |
234 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 234 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
235 | # SUBTRACT CPP /YX | 235 | # SUBTRACT CPP /YX |
236 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 236 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
237 | # ADD RSC /l 0x409 /d "_DEBUG" | 237 | # ADD RSC /l 0x409 /d "_DEBUG" |
@@ -246,14 +246,14 @@ LINK32=link.exe | |||
246 | 246 | ||
247 | # Begin Target | 247 | # Begin Target |
248 | 248 | ||
249 | # Name "example - Win32 DLL Release" | ||
250 | # Name "example - Win32 DLL Debug" | ||
251 | # Name "example - Win32 DLL ASM Release" | 249 | # Name "example - Win32 DLL ASM Release" |
252 | # Name "example - Win32 DLL ASM Debug" | 250 | # Name "example - Win32 DLL ASM Debug" |
253 | # Name "example - Win32 LIB Release" | 251 | # Name "example - Win32 DLL Release" |
254 | # Name "example - Win32 LIB Debug" | 252 | # Name "example - Win32 DLL Debug" |
255 | # Name "example - Win32 LIB ASM Release" | 253 | # Name "example - Win32 LIB ASM Release" |
256 | # Name "example - Win32 LIB ASM Debug" | 254 | # Name "example - Win32 LIB ASM Debug" |
255 | # Name "example - Win32 LIB Release" | ||
256 | # Name "example - Win32 LIB Debug" | ||
257 | # Begin Group "Source Files" | 257 | # Begin Group "Source Files" |
258 | 258 | ||
259 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | 259 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" |
diff --git a/projects/visualc6/minigzip.dsp b/projects/visualc6/minigzip.dsp index f32024e..c50b488 100644 --- a/projects/visualc6/minigzip.dsp +++ b/projects/visualc6/minigzip.dsp | |||
@@ -17,14 +17,14 @@ CFG=minigzip - Win32 LIB Debug | |||
17 | !MESSAGE | 17 | !MESSAGE |
18 | !MESSAGE Possible choices for configuration are: | 18 | !MESSAGE Possible choices for configuration are: |
19 | !MESSAGE | 19 | !MESSAGE |
20 | !MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application") | ||
21 | !MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application") | ||
22 | !MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") | 20 | !MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application") |
23 | !MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") | 21 | !MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application") |
24 | !MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application") | 22 | !MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application") |
25 | !MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application") | 23 | !MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application") |
26 | !MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") | 24 | !MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application") |
27 | !MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") | 25 | !MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application") |
26 | !MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application") | ||
27 | !MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application") | ||
28 | !MESSAGE | 28 | !MESSAGE |
29 | 29 | ||
30 | # Begin Project | 30 | # Begin Project |
@@ -34,22 +34,22 @@ CFG=minigzip - Win32 LIB Debug | |||
34 | CPP=cl.exe | 34 | CPP=cl.exe |
35 | RSC=rc.exe | 35 | RSC=rc.exe |
36 | 36 | ||
37 | !IF "$(CFG)" == "minigzip - Win32 DLL Release" | 37 | !IF "$(CFG)" == "minigzip - Win32 DLL ASM Release" |
38 | 38 | ||
39 | # PROP BASE Use_MFC 0 | 39 | # PROP BASE Use_MFC 0 |
40 | # PROP BASE Use_Debug_Libraries 0 | 40 | # PROP BASE Use_Debug_Libraries 0 |
41 | # PROP BASE Output_Dir "minigzip___Win32_DLL_Release" | 41 | # PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release" |
42 | # PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release" | 42 | # PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release" |
43 | # PROP BASE Target_Dir "" | 43 | # PROP BASE Target_Dir "" |
44 | # PROP Use_MFC 0 | 44 | # PROP Use_MFC 0 |
45 | # PROP Use_Debug_Libraries 0 | 45 | # PROP Use_Debug_Libraries 0 |
46 | # PROP Output_Dir "Win32_DLL_Release" | 46 | # PROP Output_Dir "Win32_DLL_ASM_Release" |
47 | # PROP Intermediate_Dir "Win32_DLL_Release" | 47 | # PROP Intermediate_Dir "Win32_DLL_ASM_Release" |
48 | # PROP Ignore_Export_Lib 0 | 48 | # PROP Ignore_Export_Lib 0 |
49 | # PROP Target_Dir "" | 49 | # PROP Target_Dir "" |
50 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 50 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
51 | # SUBTRACT BASE CPP /YX | 51 | # SUBTRACT BASE CPP /YX |
52 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 52 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
53 | # SUBTRACT CPP /YX | 53 | # SUBTRACT CPP /YX |
54 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 54 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
55 | # ADD RSC /l 0x409 /d "NDEBUG" | 55 | # ADD RSC /l 0x409 /d "NDEBUG" |
@@ -60,22 +60,22 @@ LINK32=link.exe | |||
60 | # 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 | 60 | # 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 |
61 | # ADD LINK32 /nologo /subsystem:console /machine:I386 | 61 | # ADD LINK32 /nologo /subsystem:console /machine:I386 |
62 | 62 | ||
63 | !ELSEIF "$(CFG)" == "minigzip - Win32 DLL Debug" | 63 | !ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Debug" |
64 | 64 | ||
65 | # PROP BASE Use_MFC 0 | 65 | # PROP BASE Use_MFC 0 |
66 | # PROP BASE Use_Debug_Libraries 1 | 66 | # PROP BASE Use_Debug_Libraries 1 |
67 | # PROP BASE Output_Dir "minigzip___Win32_DLL_Debug" | 67 | # PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug" |
68 | # PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug" | 68 | # PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug" |
69 | # PROP BASE Target_Dir "" | 69 | # PROP BASE Target_Dir "" |
70 | # PROP Use_MFC 0 | 70 | # PROP Use_MFC 0 |
71 | # PROP Use_Debug_Libraries 1 | 71 | # PROP Use_Debug_Libraries 1 |
72 | # PROP Output_Dir "Win32_DLL_Debug" | 72 | # PROP Output_Dir "Win32_DLL_ASM_Debug" |
73 | # PROP Intermediate_Dir "Win32_DLL_Debug" | 73 | # PROP Intermediate_Dir "Win32_DLL_ASM_Debug" |
74 | # PROP Ignore_Export_Lib 0 | 74 | # PROP Ignore_Export_Lib 0 |
75 | # PROP Target_Dir "" | 75 | # PROP Target_Dir "" |
76 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 76 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
77 | # SUBTRACT BASE CPP /YX | 77 | # SUBTRACT BASE CPP /YX |
78 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 78 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
79 | # SUBTRACT CPP /YX | 79 | # SUBTRACT CPP /YX |
80 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 80 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
81 | # ADD RSC /l 0x409 /d "_DEBUG" | 81 | # ADD RSC /l 0x409 /d "_DEBUG" |
@@ -86,22 +86,22 @@ LINK32=link.exe | |||
86 | # 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 | 86 | # 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 |
87 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | 87 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept |
88 | 88 | ||
89 | !ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Release" | 89 | !ELSEIF "$(CFG)" == "minigzip - Win32 DLL Release" |
90 | 90 | ||
91 | # PROP BASE Use_MFC 0 | 91 | # PROP BASE Use_MFC 0 |
92 | # PROP BASE Use_Debug_Libraries 0 | 92 | # PROP BASE Use_Debug_Libraries 0 |
93 | # PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release" | 93 | # PROP BASE Output_Dir "minigzip___Win32_DLL_Release" |
94 | # PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release" | 94 | # PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release" |
95 | # PROP BASE Target_Dir "" | 95 | # PROP BASE Target_Dir "" |
96 | # PROP Use_MFC 0 | 96 | # PROP Use_MFC 0 |
97 | # PROP Use_Debug_Libraries 0 | 97 | # PROP Use_Debug_Libraries 0 |
98 | # PROP Output_Dir "Win32_DLL_ASM_Release" | 98 | # PROP Output_Dir "Win32_DLL_Release" |
99 | # PROP Intermediate_Dir "Win32_DLL_ASM_Release" | 99 | # PROP Intermediate_Dir "Win32_DLL_Release" |
100 | # PROP Ignore_Export_Lib 0 | 100 | # PROP Ignore_Export_Lib 0 |
101 | # PROP Target_Dir "" | 101 | # PROP Target_Dir "" |
102 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 102 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
103 | # SUBTRACT BASE CPP /YX | 103 | # SUBTRACT BASE CPP /YX |
104 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 104 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
105 | # SUBTRACT CPP /YX | 105 | # SUBTRACT CPP /YX |
106 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 106 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
107 | # ADD RSC /l 0x409 /d "NDEBUG" | 107 | # ADD RSC /l 0x409 /d "NDEBUG" |
@@ -112,22 +112,22 @@ LINK32=link.exe | |||
112 | # 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 | 112 | # 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 |
113 | # ADD LINK32 /nologo /subsystem:console /machine:I386 | 113 | # ADD LINK32 /nologo /subsystem:console /machine:I386 |
114 | 114 | ||
115 | !ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Debug" | 115 | !ELSEIF "$(CFG)" == "minigzip - Win32 DLL Debug" |
116 | 116 | ||
117 | # PROP BASE Use_MFC 0 | 117 | # PROP BASE Use_MFC 0 |
118 | # PROP BASE Use_Debug_Libraries 1 | 118 | # PROP BASE Use_Debug_Libraries 1 |
119 | # PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug" | 119 | # PROP BASE Output_Dir "minigzip___Win32_DLL_Debug" |
120 | # PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug" | 120 | # PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug" |
121 | # PROP BASE Target_Dir "" | 121 | # PROP BASE Target_Dir "" |
122 | # PROP Use_MFC 0 | 122 | # PROP Use_MFC 0 |
123 | # PROP Use_Debug_Libraries 1 | 123 | # PROP Use_Debug_Libraries 1 |
124 | # PROP Output_Dir "Win32_DLL_ASM_Debug" | 124 | # PROP Output_Dir "Win32_DLL_Debug" |
125 | # PROP Intermediate_Dir "Win32_DLL_ASM_Debug" | 125 | # PROP Intermediate_Dir "Win32_DLL_Debug" |
126 | # PROP Ignore_Export_Lib 0 | 126 | # PROP Ignore_Export_Lib 0 |
127 | # PROP Target_Dir "" | 127 | # PROP Target_Dir "" |
128 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 128 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
129 | # SUBTRACT BASE CPP /YX | 129 | # SUBTRACT BASE CPP /YX |
130 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 130 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
131 | # SUBTRACT CPP /YX | 131 | # SUBTRACT CPP /YX |
132 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 132 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
133 | # ADD RSC /l 0x409 /d "_DEBUG" | 133 | # ADD RSC /l 0x409 /d "_DEBUG" |
@@ -138,22 +138,22 @@ LINK32=link.exe | |||
138 | # 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 | 138 | # 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 |
139 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | 139 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept |
140 | 140 | ||
141 | !ELSEIF "$(CFG)" == "minigzip - Win32 LIB Release" | 141 | !ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Release" |
142 | 142 | ||
143 | # PROP BASE Use_MFC 0 | 143 | # PROP BASE Use_MFC 0 |
144 | # PROP BASE Use_Debug_Libraries 0 | 144 | # PROP BASE Use_Debug_Libraries 0 |
145 | # PROP BASE Output_Dir "minigzip___Win32_LIB_Release" | 145 | # PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release" |
146 | # PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release" | 146 | # PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release" |
147 | # PROP BASE Target_Dir "" | 147 | # PROP BASE Target_Dir "" |
148 | # PROP Use_MFC 0 | 148 | # PROP Use_MFC 0 |
149 | # PROP Use_Debug_Libraries 0 | 149 | # PROP Use_Debug_Libraries 0 |
150 | # PROP Output_Dir "Win32_LIB_Release" | 150 | # PROP Output_Dir "Win32_LIB_ASM_Release" |
151 | # PROP Intermediate_Dir "Win32_LIB_Release" | 151 | # PROP Intermediate_Dir "Win32_LIB_ASM_Release" |
152 | # PROP Ignore_Export_Lib 0 | 152 | # PROP Ignore_Export_Lib 0 |
153 | # PROP Target_Dir "" | 153 | # PROP Target_Dir "" |
154 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 154 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
155 | # SUBTRACT BASE CPP /YX | 155 | # SUBTRACT BASE CPP /YX |
156 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 156 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
157 | # SUBTRACT CPP /YX | 157 | # SUBTRACT CPP /YX |
158 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 158 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
159 | # ADD RSC /l 0x409 /d "NDEBUG" | 159 | # ADD RSC /l 0x409 /d "NDEBUG" |
@@ -164,22 +164,22 @@ LINK32=link.exe | |||
164 | # 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 | 164 | # 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 |
165 | # ADD LINK32 /nologo /subsystem:console /machine:I386 | 165 | # ADD LINK32 /nologo /subsystem:console /machine:I386 |
166 | 166 | ||
167 | !ELSEIF "$(CFG)" == "minigzip - Win32 LIB Debug" | 167 | !ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Debug" |
168 | 168 | ||
169 | # PROP BASE Use_MFC 0 | 169 | # PROP BASE Use_MFC 0 |
170 | # PROP BASE Use_Debug_Libraries 1 | 170 | # PROP BASE Use_Debug_Libraries 1 |
171 | # PROP BASE Output_Dir "minigzip___Win32_LIB_Debug" | 171 | # PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug" |
172 | # PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug" | 172 | # PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug" |
173 | # PROP BASE Target_Dir "" | 173 | # PROP BASE Target_Dir "" |
174 | # PROP Use_MFC 0 | 174 | # PROP Use_MFC 0 |
175 | # PROP Use_Debug_Libraries 1 | 175 | # PROP Use_Debug_Libraries 1 |
176 | # PROP Output_Dir "Win32_LIB_Debug" | 176 | # PROP Output_Dir "Win32_LIB_ASM_Debug" |
177 | # PROP Intermediate_Dir "Win32_LIB_Debug" | 177 | # PROP Intermediate_Dir "Win32_LIB_ASM_Debug" |
178 | # PROP Ignore_Export_Lib 0 | 178 | # PROP Ignore_Export_Lib 0 |
179 | # PROP Target_Dir "" | 179 | # PROP Target_Dir "" |
180 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 180 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
181 | # SUBTRACT BASE CPP /YX | 181 | # SUBTRACT BASE CPP /YX |
182 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 182 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
183 | # SUBTRACT CPP /YX | 183 | # SUBTRACT CPP /YX |
184 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 184 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
185 | # ADD RSC /l 0x409 /d "_DEBUG" | 185 | # ADD RSC /l 0x409 /d "_DEBUG" |
@@ -190,22 +190,22 @@ LINK32=link.exe | |||
190 | # 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 | 190 | # 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 |
191 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept | 191 | # ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept |
192 | 192 | ||
193 | !ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Release" | 193 | !ELSEIF "$(CFG)" == "minigzip - Win32 LIB Release" |
194 | 194 | ||
195 | # PROP BASE Use_MFC 0 | 195 | # PROP BASE Use_MFC 0 |
196 | # PROP BASE Use_Debug_Libraries 0 | 196 | # PROP BASE Use_Debug_Libraries 0 |
197 | # PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release" | 197 | # PROP BASE Output_Dir "minigzip___Win32_LIB_Release" |
198 | # PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release" | 198 | # PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release" |
199 | # PROP BASE Target_Dir "" | 199 | # PROP BASE Target_Dir "" |
200 | # PROP Use_MFC 0 | 200 | # PROP Use_MFC 0 |
201 | # PROP Use_Debug_Libraries 0 | 201 | # PROP Use_Debug_Libraries 0 |
202 | # PROP Output_Dir "Win32_LIB_ASM_Release" | 202 | # PROP Output_Dir "Win32_LIB_Release" |
203 | # PROP Intermediate_Dir "Win32_LIB_ASM_Release" | 203 | # PROP Intermediate_Dir "Win32_LIB_Release" |
204 | # PROP Ignore_Export_Lib 0 | 204 | # PROP Ignore_Export_Lib 0 |
205 | # PROP Target_Dir "" | 205 | # PROP Target_Dir "" |
206 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 206 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
207 | # SUBTRACT BASE CPP /YX | 207 | # SUBTRACT BASE CPP /YX |
208 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 208 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
209 | # SUBTRACT CPP /YX | 209 | # SUBTRACT CPP /YX |
210 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 210 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
211 | # ADD RSC /l 0x409 /d "NDEBUG" | 211 | # ADD RSC /l 0x409 /d "NDEBUG" |
@@ -216,22 +216,22 @@ LINK32=link.exe | |||
216 | # 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 | 216 | # 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 |
217 | # ADD LINK32 /nologo /subsystem:console /machine:I386 | 217 | # ADD LINK32 /nologo /subsystem:console /machine:I386 |
218 | 218 | ||
219 | !ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Debug" | 219 | !ELSEIF "$(CFG)" == "minigzip - Win32 LIB Debug" |
220 | 220 | ||
221 | # PROP BASE Use_MFC 0 | 221 | # PROP BASE Use_MFC 0 |
222 | # PROP BASE Use_Debug_Libraries 1 | 222 | # PROP BASE Use_Debug_Libraries 1 |
223 | # PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug" | 223 | # PROP BASE Output_Dir "minigzip___Win32_LIB_Debug" |
224 | # PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug" | 224 | # PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug" |
225 | # PROP BASE Target_Dir "" | 225 | # PROP BASE Target_Dir "" |
226 | # PROP Use_MFC 0 | 226 | # PROP Use_MFC 0 |
227 | # PROP Use_Debug_Libraries 1 | 227 | # PROP Use_Debug_Libraries 1 |
228 | # PROP Output_Dir "Win32_LIB_ASM_Debug" | 228 | # PROP Output_Dir "Win32_LIB_Debug" |
229 | # PROP Intermediate_Dir "Win32_LIB_ASM_Debug" | 229 | # PROP Intermediate_Dir "Win32_LIB_Debug" |
230 | # PROP Ignore_Export_Lib 0 | 230 | # PROP Ignore_Export_Lib 0 |
231 | # PROP Target_Dir "" | 231 | # PROP Target_Dir "" |
232 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 232 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
233 | # SUBTRACT BASE CPP /YX | 233 | # SUBTRACT BASE CPP /YX |
234 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 234 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
235 | # SUBTRACT CPP /YX | 235 | # SUBTRACT CPP /YX |
236 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 236 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
237 | # ADD RSC /l 0x409 /d "_DEBUG" | 237 | # ADD RSC /l 0x409 /d "_DEBUG" |
@@ -246,14 +246,14 @@ LINK32=link.exe | |||
246 | 246 | ||
247 | # Begin Target | 247 | # Begin Target |
248 | 248 | ||
249 | # Name "minigzip - Win32 DLL Release" | ||
250 | # Name "minigzip - Win32 DLL Debug" | ||
251 | # Name "minigzip - Win32 DLL ASM Release" | 249 | # Name "minigzip - Win32 DLL ASM Release" |
252 | # Name "minigzip - Win32 DLL ASM Debug" | 250 | # Name "minigzip - Win32 DLL ASM Debug" |
253 | # Name "minigzip - Win32 LIB Release" | 251 | # Name "minigzip - Win32 DLL Release" |
254 | # Name "minigzip - Win32 LIB Debug" | 252 | # Name "minigzip - Win32 DLL Debug" |
255 | # Name "minigzip - Win32 LIB ASM Release" | 253 | # Name "minigzip - Win32 LIB ASM Release" |
256 | # Name "minigzip - Win32 LIB ASM Debug" | 254 | # Name "minigzip - Win32 LIB ASM Debug" |
255 | # Name "minigzip - Win32 LIB Release" | ||
256 | # Name "minigzip - Win32 LIB Debug" | ||
257 | # Begin Group "Source Files" | 257 | # Begin Group "Source Files" |
258 | 258 | ||
259 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | 259 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" |
diff --git a/projects/visualc6/zlib.dsp b/projects/visualc6/zlib.dsp index 0fe0604..1e5c499 100644 --- a/projects/visualc6/zlib.dsp +++ b/projects/visualc6/zlib.dsp | |||
@@ -18,14 +18,14 @@ CFG=zlib - Win32 LIB Debug | |||
18 | !MESSAGE | 18 | !MESSAGE |
19 | !MESSAGE Possible choices for configuration are: | 19 | !MESSAGE Possible choices for configuration are: |
20 | !MESSAGE | 20 | !MESSAGE |
21 | !MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") | ||
22 | !MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") | ||
23 | !MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library") | 21 | !MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library") |
24 | !MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library") | 22 | !MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library") |
25 | !MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library") | 23 | !MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library") |
26 | !MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library") | 24 | !MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library") |
27 | !MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library") | 25 | !MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library") |
28 | !MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library") | 26 | !MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library") |
27 | !MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library") | ||
28 | !MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library") | ||
29 | !MESSAGE | 29 | !MESSAGE |
30 | 30 | ||
31 | # Begin Project | 31 | # Begin Project |
@@ -33,23 +33,23 @@ CFG=zlib - Win32 LIB Debug | |||
33 | # PROP Scc_ProjName "" | 33 | # PROP Scc_ProjName "" |
34 | # PROP Scc_LocalPath "" | 34 | # PROP Scc_LocalPath "" |
35 | 35 | ||
36 | !IF "$(CFG)" == "zlib - Win32 DLL Release" | 36 | !IF "$(CFG)" == "zlib - Win32 DLL ASM Release" |
37 | 37 | ||
38 | # PROP BASE Use_MFC 0 | 38 | # PROP BASE Use_MFC 0 |
39 | # PROP BASE Use_Debug_Libraries 0 | 39 | # PROP BASE Use_Debug_Libraries 0 |
40 | # PROP BASE Output_Dir "zlib___Win32_DLL_Release" | 40 | # PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release" |
41 | # PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release" | 41 | # PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release" |
42 | # PROP BASE Target_Dir "" | 42 | # PROP BASE Target_Dir "" |
43 | # PROP Use_MFC 0 | 43 | # PROP Use_MFC 0 |
44 | # PROP Use_Debug_Libraries 0 | 44 | # PROP Use_Debug_Libraries 0 |
45 | # PROP Output_Dir "Win32_DLL_Release" | 45 | # PROP Output_Dir "Win32_DLL_ASM_Release" |
46 | # PROP Intermediate_Dir "Win32_DLL_Release" | 46 | # PROP Intermediate_Dir "Win32_DLL_ASM_Release" |
47 | # PROP Ignore_Export_Lib 0 | 47 | # PROP Ignore_Export_Lib 0 |
48 | # PROP Target_Dir "" | 48 | # PROP Target_Dir "" |
49 | CPP=cl.exe | 49 | CPP=cl.exe |
50 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 50 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
51 | # SUBTRACT BASE CPP /YX /Yc /Yu | 51 | # SUBTRACT BASE CPP /YX /Yc /Yu |
52 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 52 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c |
53 | # SUBTRACT CPP /YX /Yc /Yu | 53 | # SUBTRACT CPP /YX /Yc /Yu |
54 | MTL=midl.exe | 54 | MTL=midl.exe |
55 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 | 55 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 |
@@ -62,25 +62,25 @@ BSC32=bscmake.exe | |||
62 | # ADD BSC32 /nologo | 62 | # ADD BSC32 /nologo |
63 | LINK32=link.exe | 63 | LINK32=link.exe |
64 | # 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 | 64 | # 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 |
65 | # ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll" | 65 | # ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll" |
66 | 66 | ||
67 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" | 67 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" |
68 | 68 | ||
69 | # PROP BASE Use_MFC 0 | 69 | # PROP BASE Use_MFC 0 |
70 | # PROP BASE Use_Debug_Libraries 1 | 70 | # PROP BASE Use_Debug_Libraries 1 |
71 | # PROP BASE Output_Dir "zlib___Win32_DLL_Debug" | 71 | # PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug" |
72 | # PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug" | 72 | # PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug" |
73 | # PROP BASE Target_Dir "" | 73 | # PROP BASE Target_Dir "" |
74 | # PROP Use_MFC 0 | 74 | # PROP Use_MFC 0 |
75 | # PROP Use_Debug_Libraries 1 | 75 | # PROP Use_Debug_Libraries 1 |
76 | # PROP Output_Dir "Win32_DLL_Debug" | 76 | # PROP Output_Dir "Win32_DLL_ASM_Debug" |
77 | # PROP Intermediate_Dir "Win32_DLL_Debug" | 77 | # PROP Intermediate_Dir "Win32_DLL_ASM_Debug" |
78 | # PROP Ignore_Export_Lib 0 | 78 | # PROP Ignore_Export_Lib 0 |
79 | # PROP Target_Dir "" | 79 | # PROP Target_Dir "" |
80 | CPP=cl.exe | 80 | CPP=cl.exe |
81 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 81 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
82 | # SUBTRACT BASE CPP /YX /Yc /Yu | 82 | # SUBTRACT BASE CPP /YX /Yc /Yu |
83 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 83 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FR /FD /GZ /c |
84 | # SUBTRACT CPP /YX /Yc /Yu | 84 | # SUBTRACT CPP /YX /Yc /Yu |
85 | MTL=midl.exe | 85 | MTL=midl.exe |
86 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 | 86 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 |
@@ -93,25 +93,25 @@ BSC32=bscmake.exe | |||
93 | # ADD BSC32 /nologo | 93 | # ADD BSC32 /nologo |
94 | LINK32=link.exe | 94 | LINK32=link.exe |
95 | # 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 | 95 | # 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 |
96 | # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept | 96 | # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept |
97 | 97 | ||
98 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" | 98 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" |
99 | 99 | ||
100 | # PROP BASE Use_MFC 0 | 100 | # PROP BASE Use_MFC 0 |
101 | # PROP BASE Use_Debug_Libraries 0 | 101 | # PROP BASE Use_Debug_Libraries 0 |
102 | # PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release" | 102 | # PROP BASE Output_Dir "zlib___Win32_DLL_Release" |
103 | # PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release" | 103 | # PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release" |
104 | # PROP BASE Target_Dir "" | 104 | # PROP BASE Target_Dir "" |
105 | # PROP Use_MFC 0 | 105 | # PROP Use_MFC 0 |
106 | # PROP Use_Debug_Libraries 0 | 106 | # PROP Use_Debug_Libraries 0 |
107 | # PROP Output_Dir "Win32_DLL_ASM_Release" | 107 | # PROP Output_Dir "Win32_DLL_Release" |
108 | # PROP Intermediate_Dir "Win32_DLL_ASM_Release" | 108 | # PROP Intermediate_Dir "Win32_DLL_Release" |
109 | # PROP Ignore_Export_Lib 0 | 109 | # PROP Ignore_Export_Lib 0 |
110 | # PROP Target_Dir "" | 110 | # PROP Target_Dir "" |
111 | CPP=cl.exe | 111 | CPP=cl.exe |
112 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 112 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
113 | # SUBTRACT BASE CPP /YX /Yc /Yu | 113 | # SUBTRACT BASE CPP /YX /Yc /Yu |
114 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c | 114 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
115 | # SUBTRACT CPP /YX /Yc /Yu | 115 | # SUBTRACT CPP /YX /Yc /Yu |
116 | MTL=midl.exe | 116 | MTL=midl.exe |
117 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 | 117 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 |
@@ -124,25 +124,25 @@ BSC32=bscmake.exe | |||
124 | # ADD BSC32 /nologo | 124 | # ADD BSC32 /nologo |
125 | LINK32=link.exe | 125 | LINK32=link.exe |
126 | # 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 | 126 | # 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 |
127 | # ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll" | 127 | # ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll" |
128 | 128 | ||
129 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" | 129 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" |
130 | 130 | ||
131 | # PROP BASE Use_MFC 0 | 131 | # PROP BASE Use_MFC 0 |
132 | # PROP BASE Use_Debug_Libraries 1 | 132 | # PROP BASE Use_Debug_Libraries 1 |
133 | # PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug" | 133 | # PROP BASE Output_Dir "zlib___Win32_DLL_Debug" |
134 | # PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug" | 134 | # PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug" |
135 | # PROP BASE Target_Dir "" | 135 | # PROP BASE Target_Dir "" |
136 | # PROP Use_MFC 0 | 136 | # PROP Use_MFC 0 |
137 | # PROP Use_Debug_Libraries 1 | 137 | # PROP Use_Debug_Libraries 1 |
138 | # PROP Output_Dir "Win32_DLL_ASM_Debug" | 138 | # PROP Output_Dir "Win32_DLL_Debug" |
139 | # PROP Intermediate_Dir "Win32_DLL_ASM_Debug" | 139 | # PROP Intermediate_Dir "Win32_DLL_Debug" |
140 | # PROP Ignore_Export_Lib 0 | 140 | # PROP Ignore_Export_Lib 0 |
141 | # PROP Target_Dir "" | 141 | # PROP Target_Dir "" |
142 | CPP=cl.exe | 142 | CPP=cl.exe |
143 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 143 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
144 | # SUBTRACT BASE CPP /YX /Yc /Yu | 144 | # SUBTRACT BASE CPP /YX /Yc /Yu |
145 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c | 145 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
146 | # SUBTRACT CPP /YX /Yc /Yu | 146 | # SUBTRACT CPP /YX /Yc /Yu |
147 | MTL=midl.exe | 147 | MTL=midl.exe |
148 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 | 148 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 |
@@ -155,24 +155,24 @@ BSC32=bscmake.exe | |||
155 | # ADD BSC32 /nologo | 155 | # ADD BSC32 /nologo |
156 | LINK32=link.exe | 156 | LINK32=link.exe |
157 | # 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 | 157 | # 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 |
158 | # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept | 158 | # ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept |
159 | 159 | ||
160 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" | 160 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" |
161 | 161 | ||
162 | # PROP BASE Use_MFC 0 | 162 | # PROP BASE Use_MFC 0 |
163 | # PROP BASE Use_Debug_Libraries 0 | 163 | # PROP BASE Use_Debug_Libraries 0 |
164 | # PROP BASE Output_Dir "zlib___Win32_LIB_Release" | 164 | # PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release" |
165 | # PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release" | 165 | # PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release" |
166 | # PROP BASE Target_Dir "" | 166 | # PROP BASE Target_Dir "" |
167 | # PROP Use_MFC 0 | 167 | # PROP Use_MFC 0 |
168 | # PROP Use_Debug_Libraries 0 | 168 | # PROP Use_Debug_Libraries 0 |
169 | # PROP Output_Dir "Win32_LIB_Release" | 169 | # PROP Output_Dir "Win32_LIB_ASM_Release" |
170 | # PROP Intermediate_Dir "Win32_LIB_Release" | 170 | # PROP Intermediate_Dir "Win32_LIB_ASM_Release" |
171 | # PROP Target_Dir "" | 171 | # PROP Target_Dir "" |
172 | CPP=cl.exe | 172 | CPP=cl.exe |
173 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 173 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
174 | # SUBTRACT BASE CPP /YX /Yc /Yu | 174 | # SUBTRACT BASE CPP /YX /Yc /Yu |
175 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 175 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c |
176 | # SUBTRACT CPP /YX /Yc /Yu | 176 | # SUBTRACT CPP /YX /Yc /Yu |
177 | RSC=rc.exe | 177 | RSC=rc.exe |
178 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 178 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
@@ -184,22 +184,22 @@ LIB32=link.exe -lib | |||
184 | # ADD BASE LIB32 /nologo | 184 | # ADD BASE LIB32 /nologo |
185 | # ADD LIB32 /nologo | 185 | # ADD LIB32 /nologo |
186 | 186 | ||
187 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" | 187 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" |
188 | 188 | ||
189 | # PROP BASE Use_MFC 0 | 189 | # PROP BASE Use_MFC 0 |
190 | # PROP BASE Use_Debug_Libraries 1 | 190 | # PROP BASE Use_Debug_Libraries 1 |
191 | # PROP BASE Output_Dir "zlib___Win32_LIB_Debug" | 191 | # PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug" |
192 | # PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug" | 192 | # PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug" |
193 | # PROP BASE Target_Dir "" | 193 | # PROP BASE Target_Dir "" |
194 | # PROP Use_MFC 0 | 194 | # PROP Use_MFC 0 |
195 | # PROP Use_Debug_Libraries 1 | 195 | # PROP Use_Debug_Libraries 1 |
196 | # PROP Output_Dir "Win32_LIB_Debug" | 196 | # PROP Output_Dir "Win32_LIB_ASM_Debug" |
197 | # PROP Intermediate_Dir "Win32_LIB_Debug" | 197 | # PROP Intermediate_Dir "Win32_LIB_ASM_Debug" |
198 | # PROP Target_Dir "" | 198 | # PROP Target_Dir "" |
199 | CPP=cl.exe | 199 | CPP=cl.exe |
200 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 200 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
201 | # SUBTRACT BASE CPP /YX /Yc /Yu | 201 | # SUBTRACT BASE CPP /YX /Yc /Yu |
202 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 202 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FR /FD /GZ /c |
203 | # SUBTRACT CPP /YX /Yc /Yu | 203 | # SUBTRACT CPP /YX /Yc /Yu |
204 | RSC=rc.exe | 204 | RSC=rc.exe |
205 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 205 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
@@ -209,24 +209,24 @@ BSC32=bscmake.exe | |||
209 | # ADD BSC32 /nologo | 209 | # ADD BSC32 /nologo |
210 | LIB32=link.exe -lib | 210 | LIB32=link.exe -lib |
211 | # ADD BASE LIB32 /nologo | 211 | # ADD BASE LIB32 /nologo |
212 | # ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib" | 212 | # ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib" |
213 | 213 | ||
214 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" | 214 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" |
215 | 215 | ||
216 | # PROP BASE Use_MFC 0 | 216 | # PROP BASE Use_MFC 0 |
217 | # PROP BASE Use_Debug_Libraries 0 | 217 | # PROP BASE Use_Debug_Libraries 0 |
218 | # PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release" | 218 | # PROP BASE Output_Dir "zlib___Win32_LIB_Release" |
219 | # PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release" | 219 | # PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release" |
220 | # PROP BASE Target_Dir "" | 220 | # PROP BASE Target_Dir "" |
221 | # PROP Use_MFC 0 | 221 | # PROP Use_MFC 0 |
222 | # PROP Use_Debug_Libraries 0 | 222 | # PROP Use_Debug_Libraries 0 |
223 | # PROP Output_Dir "Win32_LIB_ASM_Release" | 223 | # PROP Output_Dir "Win32_LIB_Release" |
224 | # PROP Intermediate_Dir "Win32_LIB_ASM_Release" | 224 | # PROP Intermediate_Dir "Win32_LIB_Release" |
225 | # PROP Target_Dir "" | 225 | # PROP Target_Dir "" |
226 | CPP=cl.exe | 226 | CPP=cl.exe |
227 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c | 227 | # ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c |
228 | # SUBTRACT BASE CPP /YX /Yc /Yu | 228 | # SUBTRACT BASE CPP /YX /Yc /Yu |
229 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c | 229 | # ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "NDEBUG" /FD /c |
230 | # SUBTRACT CPP /YX /Yc /Yu | 230 | # SUBTRACT CPP /YX /Yc /Yu |
231 | RSC=rc.exe | 231 | RSC=rc.exe |
232 | # ADD BASE RSC /l 0x409 /d "NDEBUG" | 232 | # ADD BASE RSC /l 0x409 /d "NDEBUG" |
@@ -238,22 +238,22 @@ LIB32=link.exe -lib | |||
238 | # ADD BASE LIB32 /nologo | 238 | # ADD BASE LIB32 /nologo |
239 | # ADD LIB32 /nologo | 239 | # ADD LIB32 /nologo |
240 | 240 | ||
241 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" | 241 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" |
242 | 242 | ||
243 | # PROP BASE Use_MFC 0 | 243 | # PROP BASE Use_MFC 0 |
244 | # PROP BASE Use_Debug_Libraries 1 | 244 | # PROP BASE Use_Debug_Libraries 1 |
245 | # PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug" | 245 | # PROP BASE Output_Dir "zlib___Win32_LIB_Debug" |
246 | # PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug" | 246 | # PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug" |
247 | # PROP BASE Target_Dir "" | 247 | # PROP BASE Target_Dir "" |
248 | # PROP Use_MFC 0 | 248 | # PROP Use_MFC 0 |
249 | # PROP Use_Debug_Libraries 1 | 249 | # PROP Use_Debug_Libraries 1 |
250 | # PROP Output_Dir "Win32_LIB_ASM_Debug" | 250 | # PROP Output_Dir "Win32_LIB_Debug" |
251 | # PROP Intermediate_Dir "Win32_LIB_ASM_Debug" | 251 | # PROP Intermediate_Dir "Win32_LIB_Debug" |
252 | # PROP Target_Dir "" | 252 | # PROP Target_Dir "" |
253 | CPP=cl.exe | 253 | CPP=cl.exe |
254 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c | 254 | # ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c |
255 | # SUBTRACT BASE CPP /YX /Yc /Yu | 255 | # SUBTRACT BASE CPP /YX /Yc /Yu |
256 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c | 256 | # ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_DEBUG" /FR /FD /GZ /c |
257 | # SUBTRACT CPP /YX /Yc /Yu | 257 | # SUBTRACT CPP /YX /Yc /Yu |
258 | RSC=rc.exe | 258 | RSC=rc.exe |
259 | # ADD BASE RSC /l 0x409 /d "_DEBUG" | 259 | # ADD BASE RSC /l 0x409 /d "_DEBUG" |
@@ -263,20 +263,20 @@ BSC32=bscmake.exe | |||
263 | # ADD BSC32 /nologo | 263 | # ADD BSC32 /nologo |
264 | LIB32=link.exe -lib | 264 | LIB32=link.exe -lib |
265 | # ADD BASE LIB32 /nologo | 265 | # ADD BASE LIB32 /nologo |
266 | # ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib" | 266 | # ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib" |
267 | 267 | ||
268 | !ENDIF | 268 | !ENDIF |
269 | 269 | ||
270 | # Begin Target | 270 | # Begin Target |
271 | 271 | ||
272 | # Name "zlib - Win32 DLL Release" | ||
273 | # Name "zlib - Win32 DLL Debug" | ||
274 | # Name "zlib - Win32 DLL ASM Release" | 272 | # Name "zlib - Win32 DLL ASM Release" |
275 | # Name "zlib - Win32 DLL ASM Debug" | 273 | # Name "zlib - Win32 DLL ASM Debug" |
276 | # Name "zlib - Win32 LIB Release" | 274 | # Name "zlib - Win32 DLL Release" |
277 | # Name "zlib - Win32 LIB Debug" | 275 | # Name "zlib - Win32 DLL Debug" |
278 | # Name "zlib - Win32 LIB ASM Release" | 276 | # Name "zlib - Win32 LIB ASM Release" |
279 | # Name "zlib - Win32 LIB ASM Debug" | 277 | # Name "zlib - Win32 LIB ASM Debug" |
278 | # Name "zlib - Win32 LIB Release" | ||
279 | # Name "zlib - Win32 LIB Debug" | ||
280 | # Begin Group "Source Files" | 280 | # Begin Group "Source Files" |
281 | 281 | ||
282 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" | 282 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" |
@@ -328,27 +328,27 @@ SOURCE=..\..\uncompr.c | |||
328 | 328 | ||
329 | SOURCE=..\..\win32\zlib.def | 329 | SOURCE=..\..\win32\zlib.def |
330 | 330 | ||
331 | !IF "$(CFG)" == "zlib - Win32 DLL Release" | 331 | !IF "$(CFG)" == "zlib - Win32 DLL ASM Release" |
332 | 332 | ||
333 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" | 333 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" |
334 | 334 | ||
335 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" | 335 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" |
336 | 336 | ||
337 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" | 337 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" |
338 | 338 | ||
339 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" | 339 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" |
340 | 340 | ||
341 | # PROP Exclude_From_Build 1 | 341 | # PROP Exclude_From_Build 1 |
342 | 342 | ||
343 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" | 343 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" |
344 | 344 | ||
345 | # PROP Exclude_From_Build 1 | 345 | # PROP Exclude_From_Build 1 |
346 | 346 | ||
347 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" | 347 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" |
348 | 348 | ||
349 | # PROP Exclude_From_Build 1 | 349 | # PROP Exclude_From_Build 1 |
350 | 350 | ||
351 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" | 351 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" |
352 | 352 | ||
353 | # PROP Exclude_From_Build 1 | 353 | # PROP Exclude_From_Build 1 |
354 | 354 | ||
@@ -419,15 +419,7 @@ SOURCE=..\..\win32\zlib1.rc | |||
419 | 419 | ||
420 | SOURCE=..\..\contrib\masmx86\gvmat32.asm | 420 | SOURCE=..\..\contrib\masmx86\gvmat32.asm |
421 | 421 | ||
422 | !IF "$(CFG)" == "zlib - Win32 DLL Release" | 422 | !IF "$(CFG)" == "zlib - Win32 DLL ASM Release" |
423 | |||
424 | # PROP Exclude_From_Build 1 | ||
425 | |||
426 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" | ||
427 | |||
428 | # PROP Exclude_From_Build 1 | ||
429 | |||
430 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" | ||
431 | 423 | ||
432 | # Begin Custom Build - Assembling... | 424 | # Begin Custom Build - Assembling... |
433 | IntDir=.\Win32_DLL_ASM_Release | 425 | IntDir=.\Win32_DLL_ASM_Release |
@@ -451,11 +443,11 @@ InputName=gvmat32 | |||
451 | 443 | ||
452 | # End Custom Build | 444 | # End Custom Build |
453 | 445 | ||
454 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" | 446 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" |
455 | 447 | ||
456 | # PROP Exclude_From_Build 1 | 448 | # PROP Exclude_From_Build 1 |
457 | 449 | ||
458 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" | 450 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" |
459 | 451 | ||
460 | # PROP Exclude_From_Build 1 | 452 | # PROP Exclude_From_Build 1 |
461 | 453 | ||
@@ -483,6 +475,14 @@ InputName=gvmat32 | |||
483 | 475 | ||
484 | # End Custom Build | 476 | # End Custom Build |
485 | 477 | ||
478 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" | ||
479 | |||
480 | # PROP Exclude_From_Build 1 | ||
481 | |||
482 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" | ||
483 | |||
484 | # PROP Exclude_From_Build 1 | ||
485 | |||
486 | !ENDIF | 486 | !ENDIF |
487 | 487 | ||
488 | # End Source File | 488 | # End Source File |
@@ -490,7 +490,15 @@ InputName=gvmat32 | |||
490 | 490 | ||
491 | SOURCE=..\..\contrib\masmx86\gvmat32c.c | 491 | SOURCE=..\..\contrib\masmx86\gvmat32c.c |
492 | 492 | ||
493 | !IF "$(CFG)" == "zlib - Win32 DLL Release" | 493 | !IF "$(CFG)" == "zlib - Win32 DLL ASM Release" |
494 | |||
495 | # ADD CPP /I "..\.." | ||
496 | |||
497 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" | ||
498 | |||
499 | # ADD CPP /I "..\.." | ||
500 | |||
501 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" | ||
494 | 502 | ||
495 | # PROP Exclude_From_Build 1 | 503 | # PROP Exclude_From_Build 1 |
496 | # ADD CPP /I "..\.." | 504 | # ADD CPP /I "..\.." |
@@ -500,11 +508,11 @@ SOURCE=..\..\contrib\masmx86\gvmat32c.c | |||
500 | # PROP Exclude_From_Build 1 | 508 | # PROP Exclude_From_Build 1 |
501 | # ADD CPP /I "..\.." | 509 | # ADD CPP /I "..\.." |
502 | 510 | ||
503 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" | 511 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" |
504 | 512 | ||
505 | # ADD CPP /I "..\.." | 513 | # ADD CPP /I "..\.." |
506 | 514 | ||
507 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug" | 515 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" |
508 | 516 | ||
509 | # ADD CPP /I "..\.." | 517 | # ADD CPP /I "..\.." |
510 | 518 | ||
@@ -518,14 +526,6 @@ SOURCE=..\..\contrib\masmx86\gvmat32c.c | |||
518 | # PROP Exclude_From_Build 1 | 526 | # PROP Exclude_From_Build 1 |
519 | # ADD CPP /I "..\.." | 527 | # ADD CPP /I "..\.." |
520 | 528 | ||
521 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release" | ||
522 | |||
523 | # ADD CPP /I "..\.." | ||
524 | |||
525 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug" | ||
526 | |||
527 | # ADD CPP /I "..\.." | ||
528 | |||
529 | !ENDIF | 529 | !ENDIF |
530 | 530 | ||
531 | # End Source File | 531 | # End Source File |
@@ -533,15 +533,7 @@ SOURCE=..\..\contrib\masmx86\gvmat32c.c | |||
533 | 533 | ||
534 | SOURCE=..\..\contrib\masmx86\inffas32.asm | 534 | SOURCE=..\..\contrib\masmx86\inffas32.asm |
535 | 535 | ||
536 | !IF "$(CFG)" == "zlib - Win32 DLL Release" | 536 | !IF "$(CFG)" == "zlib - Win32 DLL ASM Release" |
537 | |||
538 | # PROP Exclude_From_Build 1 | ||
539 | |||
540 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" | ||
541 | |||
542 | # PROP Exclude_From_Build 1 | ||
543 | |||
544 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release" | ||
545 | 537 | ||
546 | # Begin Custom Build - Assembling... | 538 | # Begin Custom Build - Assembling... |
547 | IntDir=.\Win32_DLL_ASM_Release | 539 | IntDir=.\Win32_DLL_ASM_Release |
@@ -565,11 +557,11 @@ InputName=inffas32 | |||
565 | 557 | ||
566 | # End Custom Build | 558 | # End Custom Build |
567 | 559 | ||
568 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" | 560 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Release" |
569 | 561 | ||
570 | # PROP Exclude_From_Build 1 | 562 | # PROP Exclude_From_Build 1 |
571 | 563 | ||
572 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" | 564 | !ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug" |
573 | 565 | ||
574 | # PROP Exclude_From_Build 1 | 566 | # PROP Exclude_From_Build 1 |
575 | 567 | ||
@@ -597,6 +589,14 @@ InputName=inffas32 | |||
597 | 589 | ||
598 | # End Custom Build | 590 | # End Custom Build |
599 | 591 | ||
592 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Release" | ||
593 | |||
594 | # PROP Exclude_From_Build 1 | ||
595 | |||
596 | !ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug" | ||
597 | |||
598 | # PROP Exclude_From_Build 1 | ||
599 | |||
600 | !ENDIF | 600 | !ENDIF |
601 | 601 | ||
602 | # End Source File | 602 | # End Source File |
diff --git a/qnx/package.qpg b/qnx/package.qpg index 8a4a47c..bd93d05 100644 --- a/qnx/package.qpg +++ b/qnx/package.qpg | |||
@@ -25,10 +25,10 @@ | |||
25 | <QPG:Files> | 25 | <QPG:Files> |
26 | <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/> | 26 | <QPG:Add file="../zconf.h" install="/opt/include/" user="root:sys" permission="644"/> |
27 | <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/> | 27 | <QPG:Add file="../zlib.h" install="/opt/include/" user="root:sys" permission="644"/> |
28 | <QPG:Add file="../libz.so.1.2.3" install="/opt/lib/" user="root:bin" permission="644"/> | 28 | <QPG:Add file="../libz.so.1.2.3.1" install="/opt/lib/" user="root:bin" permission="644"/> |
29 | <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.3"/> | 29 | <QPG:Add file="libz.so" install="/opt/lib/" component="dev" filetype="symlink" linkto="libz.so.1.2.3.1"/> |
30 | <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.3"/> | 30 | <QPG:Add file="libz.so.1" install="/opt/lib/" filetype="symlink" linkto="libz.so.1.2.3.1"/> |
31 | <QPG:Add file="../libz.so.1.2.3" install="/opt/lib/" component="slib"/> | 31 | <QPG:Add file="../libz.so.1.2.3.1" install="/opt/lib/" component="slib"/> |
32 | </QPG:Files> | 32 | </QPG:Files> |
33 | 33 | ||
34 | <QPG:PackageFilter> | 34 | <QPG:PackageFilter> |
@@ -63,7 +63,7 @@ | |||
63 | </QPM:ProductDescription> | 63 | </QPM:ProductDescription> |
64 | 64 | ||
65 | <QPM:ReleaseDescription> | 65 | <QPM:ReleaseDescription> |
66 | <QPM:ReleaseVersion>1.2.3</QPM:ReleaseVersion> | 66 | <QPM:ReleaseVersion>1.2.3.1</QPM:ReleaseVersion> |
67 | <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency> | 67 | <QPM:ReleaseUrgency>Medium</QPM:ReleaseUrgency> |
68 | <QPM:ReleaseStability>Stable</QPM:ReleaseStability> | 68 | <QPM:ReleaseStability>Stable</QPM:ReleaseStability> |
69 | <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor> | 69 | <QPM:ReleaseNoteMinor></QPM:ReleaseNoteMinor> |
diff --git a/todo/Makefile-new b/todo/Makefile-new new file mode 100644 index 0000000..8a09ebb --- /dev/null +++ b/todo/Makefile-new | |||
@@ -0,0 +1,201 @@ | |||
1 | # Makefile for zlib | ||
2 | # Copyright (C) 1995-2006 Jean-loup Gailly. | ||
3 | # For conditions of distribution and use, see copyright notice in zlib.h | ||
4 | |||
5 | # To compile and test, type: | ||
6 | # ./configure; make test | ||
7 | # The call of configure is optional if you don't have special requirements | ||
8 | # If you wish to build zlib as a shared library, use: ./configure -s | ||
9 | |||
10 | # To use the asm code, type: | ||
11 | # cp contrib/asm?86/match.S ./match.S | ||
12 | # make LOC=-DASMV OBJA=match.o | ||
13 | |||
14 | # To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: | ||
15 | # make install | ||
16 | # To install in $HOME instead of /usr/local, use: | ||
17 | # make install prefix=$HOME | ||
18 | |||
19 | CC=cc | ||
20 | |||
21 | CFLAGS=-O | ||
22 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | ||
23 | #CFLAGS=-g -DDEBUG | ||
24 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | ||
25 | # -Wstrict-prototypes -Wmissing-prototypes | ||
26 | |||
27 | SFLAGS=$(CFLAGS) | ||
28 | #SFLAGS=$(CFLAGS) -fPIC | ||
29 | |||
30 | LD=$(CC) | ||
31 | LDFLAGS=libz.a | ||
32 | LDSHARED=$(CC) | ||
33 | CPP=$(CC) -E | ||
34 | |||
35 | STATICLIB=libz.a | ||
36 | SHAREDLIB=libz.so | ||
37 | SHAREDLIBV=libz.so.1.2.3 | ||
38 | SHAREDLIBM=libz.so.1 | ||
39 | EXE= | ||
40 | |||
41 | LIBS=$(STATICLIB) $(SHAREDLIBV) | ||
42 | |||
43 | AR=ar rc | ||
44 | RANLIB=ranlib | ||
45 | TAR=tar | ||
46 | SHELL=/bin/sh | ||
47 | |||
48 | prefix=/usr/local | ||
49 | exec_prefix=${prefix} | ||
50 | libdir=${exec_prefix}/lib | ||
51 | includedir=${prefix}/include | ||
52 | mandir=${prefix}/share/man | ||
53 | man3dir=${mandir}/man3 | ||
54 | pkgconfigdir = ${libdir}/pkgconfig | ||
55 | |||
56 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
57 | zutil.o inflate.o infback.o inftrees.o inffast.o | ||
58 | |||
59 | OBJA = | ||
60 | #OBJA = match.o | ||
61 | # to use the asm code: make OBJA=match.o | ||
62 | |||
63 | TEST_OBJS = example.o minigzip.o | ||
64 | |||
65 | OBJS_PIC = $(OBJS:.o=.pic.o) | ||
66 | OBJA_PIC = $(OBJA:.o=.pic.o) | ||
67 | |||
68 | .SUFFIXES: .c .o .pic.o | ||
69 | |||
70 | .c.o: | ||
71 | $(CC) -c $(CFLAGS) -o $@ $*.c | ||
72 | |||
73 | .c.pic.o: | ||
74 | $(CC) -c $(SFLAGS) -o $@ $*.c | ||
75 | |||
76 | all: $(STATICLIB) example$(EXE) minigzip$(EXE) | ||
77 | #all: $(STATICLIB) $(SHAREDLIBV) example$(EXE) minigzip$(EXE) | ||
78 | |||
79 | check: test | ||
80 | test: all | ||
81 | @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ | ||
82 | echo hello world | ./minigzip | ./minigzip -d || \ | ||
83 | echo ' *** minigzip test FAILED ***' ; \ | ||
84 | if ./example; then \ | ||
85 | echo ' *** zlib test OK ***'; \ | ||
86 | else \ | ||
87 | echo ' *** zlib test FAILED ***'; \ | ||
88 | fi | ||
89 | |||
90 | match.o: match.S | ||
91 | $(CPP) match.S > _match.s | ||
92 | $(CC) -c _match.s | ||
93 | mv _match.o match.o | ||
94 | rm -f _match.s | ||
95 | |||
96 | match.pic.o: match.S | ||
97 | $(CPP) match.S > _match.s | ||
98 | $(CC) -c -fPIC _match.s | ||
99 | mv _match.o match.pic.o | ||
100 | rm -f _match.s | ||
101 | |||
102 | $(STATICLIB): $(OBJS) $(OBJA) | ||
103 | $(AR) $@ $(OBJS) $(OBJA) | ||
104 | -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 | ||
105 | |||
106 | $(SHAREDLIBV): $(OBJS_PIC) $(OBJA_PIC) | ||
107 | $(LDSHARED) -o $@ $(OBJS_PIC) $(OBJA_PIC) | ||
108 | rm -f $(SHAREDLIB) $(SHAREDLIBM) | ||
109 | ln -s $@ $(SHAREDLIB) | ||
110 | ln -s $@ $(SHAREDLIBM) | ||
111 | |||
112 | example$(EXE): example.o $(STATICLIB) | ||
113 | $(LD) -o $@ example.o $(LDFLAGS) | ||
114 | |||
115 | minigzip$(EXE): minigzip.o $(STATICLIB) | ||
116 | $(LD) -o $@ minigzip.o $(LDFLAGS) | ||
117 | |||
118 | install: $(LIBS) | ||
119 | mkdir -p $(DESTDIR)$(exec_prefix) | ||
120 | mkdir -p $(DESTDIR)$(includedir) | ||
121 | mkdir -p $(DESTDIR)$(libdir) | ||
122 | mkdir -p $(DESTDIR)$(man3dir) | ||
123 | mkdir -p $(DESTDIR)$(pkgconfigdir) | ||
124 | cp zlib.h zconf.h $(DESTDIR)$(includedir) | ||
125 | chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h | ||
126 | cp $(LIBS) $(DESTDIR)$(libdir) | ||
127 | cd $(DESTDIR)$(libdir); chmod 755 $(LIBS) | ||
128 | -@(cd $(DESTDIR)$(libdir); $(RANLIB) $(STATICLIB) || true) >/dev/null 2>&1 | ||
129 | cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \ | ||
130 | rm -f $(SHAREDLIB) $(SHAREDLIBM); \ | ||
131 | ln -s $(SHAREDLIBV) $(SHAREDLIB); \ | ||
132 | ln -s $(SHAREDLIBV) $(SHAREDLIBM); \ | ||
133 | (ldconfig || true) >/dev/null 2>&1; \ | ||
134 | fi | ||
135 | cp zlib.3 $(DESTDIR)$(man3dir) | ||
136 | chmod 644 $(DESTDIR)$(man3dir)/zlib.3 | ||
137 | cp zlib.pc $(DESTDIR)$(pkgconfigdir) | ||
138 | chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc | ||
139 | # The ranlib in install is needed on NeXTSTEP which checks file times | ||
140 | # ldconfig is for Linux | ||
141 | |||
142 | uninstall: | ||
143 | cd $(DESTDIR)$(includedir); rm -f zlib.h zconf.h | ||
144 | cd $(DESTDIR)$(libdir); rm -f $(STATICLIB); \ | ||
145 | if test -f $(SHAREDLIBV); then \ | ||
146 | rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ | ||
147 | fi | ||
148 | cd $(DESTDIR)$(man3dir); rm -f zlib.3 | ||
149 | cd $(DESTDIR)$(pkgconfigdir); rm -f zlib.pc | ||
150 | |||
151 | mostlyclean: clean | ||
152 | clean: | ||
153 | rm -f *.o *~ example$(EXE) minigzip$(EXE) \ | ||
154 | libz.* foo.gz so_locations \ | ||
155 | _match.s maketree contrib/infback9/*.o | ||
156 | |||
157 | maintainer-clean: distclean | ||
158 | distclean: clean | ||
159 | cp -p Makefile.in Makefile | ||
160 | cp -p zconf.in.h zconf.h | ||
161 | rm -f zlib.pc .DS_Store | ||
162 | |||
163 | tags: | ||
164 | etags *.[ch] | ||
165 | |||
166 | depend: | ||
167 | makedepend -- $(CFLAGS) -- *.[ch] | ||
168 | |||
169 | # "fake" targets: not real filenames and no deps (else "touch clean" defeats) | ||
170 | .PHONY: install uninstall clean tags depend | ||
171 | |||
172 | # DO NOT DELETE THIS LINE -- "make depend" depends on it. | ||
173 | |||
174 | adler32.o: zlib.h zconf.h | ||
175 | adler32.pic.o: zlib.h zconf.h | ||
176 | compress.o: zlib.h zconf.h | ||
177 | compress.pic.o: zlib.h zconf.h | ||
178 | crc32.o: crc32.h zlib.h zconf.h | ||
179 | crc32.pic.o: crc32.h zlib.h zconf.h | ||
180 | deflate.o: deflate.h zutil.h zlib.h zconf.h | ||
181 | deflate.pic.o: deflate.h zutil.h zlib.h zconf.h | ||
182 | example.o: zlib.h zconf.h | ||
183 | example.pic.o: zlib.h zconf.h | ||
184 | gzio.o: zutil.h zlib.h zconf.h | ||
185 | gzio.pic.o: zutil.h zlib.h zconf.h | ||
186 | inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h | ||
187 | inffast.pic.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h | ||
188 | inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h | ||
189 | inflate.pic.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h | ||
190 | infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h | ||
191 | infback.pic.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h | ||
192 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | ||
193 | inftrees.pic.o: zutil.h zlib.h zconf.h inftrees.h | ||
194 | minigzip.o: zlib.h zconf.h | ||
195 | minigzip.pic.o: zlib.h zconf.h | ||
196 | trees.o: deflate.h zutil.h zlib.h zconf.h trees.h | ||
197 | trees.pic.o: deflate.h zutil.h zlib.h zconf.h trees.h | ||
198 | uncompr.o: zlib.h zconf.h | ||
199 | uncompr.pic.o: zlib.h zconf.h | ||
200 | zutil.o: zutil.h zlib.h zconf.h | ||
201 | zutil.pic.o: zutil.h zlib.h zconf.h | ||
diff --git a/todo/README b/todo/README new file mode 100644 index 0000000..f87a7df --- /dev/null +++ b/todo/README | |||
@@ -0,0 +1 @@ | |||
This "todo" directory contains works in progress. Nothing in here works, so don't try to use it! | |||
@@ -1,5 +1,6 @@ | |||
1 | /* trees.c -- output deflated data using Huffman coding | 1 | /* trees.c -- output deflated data using Huffman coding |
2 | * Copyright (C) 1995-2005 Jean-loup Gailly | 2 | * Copyright (C) 1995-2006 Jean-loup Gailly |
3 | * detect_data_type() function provided freely by Cosmin Truta, 2006 | ||
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 4 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 5 | */ |
5 | 6 | ||
@@ -152,7 +153,7 @@ local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes, | |||
152 | int blcodes)); | 153 | int blcodes)); |
153 | local void compress_block OF((deflate_state *s, ct_data *ltree, | 154 | local void compress_block OF((deflate_state *s, ct_data *ltree, |
154 | ct_data *dtree)); | 155 | ct_data *dtree)); |
155 | local void set_data_type OF((deflate_state *s)); | 156 | local int detect_data_type OF((deflate_state *s)); |
156 | local unsigned bi_reverse OF((unsigned value, int length)); | 157 | local unsigned bi_reverse OF((unsigned value, int length)); |
157 | local void bi_windup OF((deflate_state *s)); | 158 | local void bi_windup OF((deflate_state *s)); |
158 | local void bi_flush OF((deflate_state *s)); | 159 | local void bi_flush OF((deflate_state *s)); |
@@ -250,11 +251,13 @@ local void tr_static_init() | |||
250 | if (static_init_done) return; | 251 | if (static_init_done) return; |
251 | 252 | ||
252 | /* For some embedded targets, global variables are not initialized: */ | 253 | /* For some embedded targets, global variables are not initialized: */ |
254 | #ifdef NO_INIT_GLOBAL_POINTERS | ||
253 | static_l_desc.static_tree = static_ltree; | 255 | static_l_desc.static_tree = static_ltree; |
254 | static_l_desc.extra_bits = extra_lbits; | 256 | static_l_desc.extra_bits = extra_lbits; |
255 | static_d_desc.static_tree = static_dtree; | 257 | static_d_desc.static_tree = static_dtree; |
256 | static_d_desc.extra_bits = extra_dbits; | 258 | static_d_desc.extra_bits = extra_dbits; |
257 | static_bl_desc.extra_bits = extra_blbits; | 259 | static_bl_desc.extra_bits = extra_blbits; |
260 | #endif | ||
258 | 261 | ||
259 | /* Initialize the mapping length (0..255) -> length code (0..28) */ | 262 | /* Initialize the mapping length (0..255) -> length code (0..28) */ |
260 | length = 0; | 263 | length = 0; |
@@ -931,8 +934,8 @@ void _tr_flush_block(s, buf, stored_len, eof) | |||
931 | if (s->level > 0) { | 934 | if (s->level > 0) { |
932 | 935 | ||
933 | /* Check if the file is binary or text */ | 936 | /* Check if the file is binary or text */ |
934 | if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN) | 937 | if (s->strm->data_type == Z_UNKNOWN) |
935 | set_data_type(s); | 938 | s->strm->data_type = detect_data_type(s); |
936 | 939 | ||
937 | /* Construct the literal and distance trees */ | 940 | /* Construct the literal and distance trees */ |
938 | build_tree(s, (tree_desc *)(&(s->l_desc))); | 941 | build_tree(s, (tree_desc *)(&(s->l_desc))); |
@@ -1118,24 +1121,45 @@ local void compress_block(s, ltree, dtree) | |||
1118 | } | 1121 | } |
1119 | 1122 | ||
1120 | /* =========================================================================== | 1123 | /* =========================================================================== |
1121 | * Set the data type to BINARY or TEXT, using a crude approximation: | 1124 | * Check if the data type is TEXT or BINARY, using the following algorithm: |
1122 | * set it to Z_TEXT if all symbols are either printable characters (33 to 255) | 1125 | * - TEXT if the two conditions below are satisfied: |
1123 | * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise. | 1126 | * a) There are no non-portable control characters belonging to the |
1127 | * "black list" (0..6, 14..25, 28..31). | ||
1128 | * b) There is at least one printable character belonging to the | ||
1129 | * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). | ||
1130 | * - BINARY otherwise. | ||
1131 | * - The following partially-portable control characters form a | ||
1132 | * "gray list" that is ignored in this detection algorithm: | ||
1133 | * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). | ||
1124 | * IN assertion: the fields Freq of dyn_ltree are set. | 1134 | * IN assertion: the fields Freq of dyn_ltree are set. |
1125 | */ | 1135 | */ |
1126 | local void set_data_type(s) | 1136 | local int detect_data_type(s) |
1127 | deflate_state *s; | 1137 | deflate_state *s; |
1128 | { | 1138 | { |
1139 | /* black_mask is the bit mask of black-listed bytes | ||
1140 | * set bits 0..6, 14..25, and 28..31 | ||
1141 | * 0xf3ffc07f = binary 11110011111111111100000001111111 | ||
1142 | */ | ||
1143 | unsigned long black_mask = 0xf3ffc07fUL; | ||
1129 | int n; | 1144 | int n; |
1130 | 1145 | ||
1131 | for (n = 0; n < 9; n++) | 1146 | /* Check for non-textual ("black-listed") bytes. */ |
1147 | for (n = 0; n <= 31; n++, black_mask >>= 1) | ||
1148 | if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0)) | ||
1149 | return Z_BINARY; | ||
1150 | |||
1151 | /* Check for textual ("white-listed") bytes. */ | ||
1152 | if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 | ||
1153 | || s->dyn_ltree[13].Freq != 0) | ||
1154 | return Z_TEXT; | ||
1155 | for (n = 32; n < LITERALS; n++) | ||
1132 | if (s->dyn_ltree[n].Freq != 0) | 1156 | if (s->dyn_ltree[n].Freq != 0) |
1133 | break; | 1157 | return Z_TEXT; |
1134 | if (n == 9) | 1158 | |
1135 | for (n = 14; n < 32; n++) | 1159 | /* There are no "black-listed" or "white-listed" bytes: |
1136 | if (s->dyn_ltree[n].Freq != 0) | 1160 | * this stream either is empty or has tolerated ("gray-listed") bytes only. |
1137 | break; | 1161 | */ |
1138 | s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY; | 1162 | return Z_BINARY; |
1139 | } | 1163 | } |
1140 | 1164 | ||
1141 | /* =========================================================================== | 1165 | /* =========================================================================== |
diff --git a/watcom/watcom_f.mak b/watcom/watcom_f.mak new file mode 100644 index 0000000..a52229a --- /dev/null +++ b/watcom/watcom_f.mak | |||
@@ -0,0 +1,40 @@ | |||
1 | # Makefile for zlib | ||
2 | # OpenWatcom flat model | ||
3 | # Last updated: 28-Dec-2005 | ||
4 | |||
5 | # To use, do "wmake -f watcom_f.mak" | ||
6 | |||
7 | C_SOURCE = adler32.c compress.c crc32.c deflate.c & | ||
8 | gzio.c infback.c inffast.c inflate.c & | ||
9 | inftrees.c trees.c uncompr.c zutil.c | ||
10 | |||
11 | OBJS = adler32.obj compress.obj crc32.obj deflate.obj & | ||
12 | gzio.obj infback.obj inffast.obj inflate.obj & | ||
13 | inftrees.obj trees.obj uncompr.obj zutil.obj | ||
14 | |||
15 | CC = wcc386 | ||
16 | LINKER = wcl386 | ||
17 | CFLAGS = -zq -mf -3r -fp3 -s -bt=dos -oilrtfm -fr=nul -wx | ||
18 | ZLIB_LIB = zlib_f.lib | ||
19 | |||
20 | .C.OBJ: | ||
21 | $(CC) $(CFLAGS) $[@ | ||
22 | |||
23 | all: $(ZLIB_LIB) example.exe minigzip.exe | ||
24 | |||
25 | $(ZLIB_LIB): $(OBJS) | ||
26 | wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj | ||
27 | wlib -b -c $(ZLIB_LIB) -+deflate.obj -+gzio.obj -+infback.obj | ||
28 | wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj | ||
29 | wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj | ||
30 | |||
31 | example.exe: $(ZLIB_LIB) example.obj | ||
32 | $(LINKER) -ldos32a -fe=example.exe example.obj $(ZLIB_LIB) | ||
33 | |||
34 | minigzip.exe: $(ZLIB_LIB) minigzip.obj | ||
35 | $(LINKER) -ldos32a -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) | ||
36 | |||
37 | clean: .SYMBOLIC | ||
38 | del *.obj | ||
39 | del $(ZLIB_LIB) | ||
40 | @echo Cleaning done | ||
diff --git a/watcom/watcom_l.mak b/watcom/watcom_l.mak new file mode 100644 index 0000000..bf03edd --- /dev/null +++ b/watcom/watcom_l.mak | |||
@@ -0,0 +1,40 @@ | |||
1 | # Makefile for zlib | ||
2 | # OpenWatcom large model | ||
3 | # Last updated: 28-Dec-2005 | ||
4 | |||
5 | # To use, do "wmake -f watcom_l.mak" | ||
6 | |||
7 | C_SOURCE = adler32.c compress.c crc32.c deflate.c & | ||
8 | gzio.c infback.c inffast.c inflate.c & | ||
9 | inftrees.c trees.c uncompr.c zutil.c | ||
10 | |||
11 | OBJS = adler32.obj compress.obj crc32.obj deflate.obj & | ||
12 | gzio.obj infback.obj inffast.obj inflate.obj & | ||
13 | inftrees.obj trees.obj uncompr.obj zutil.obj | ||
14 | |||
15 | CC = wcc | ||
16 | LINKER = wcl | ||
17 | CFLAGS = -zq -ml -s -bt=dos -oilrtfm -fr=nul -wx | ||
18 | ZLIB_LIB = zlib_l.lib | ||
19 | |||
20 | .C.OBJ: | ||
21 | $(CC) $(CFLAGS) $[@ | ||
22 | |||
23 | all: $(ZLIB_LIB) example.exe minigzip.exe | ||
24 | |||
25 | $(ZLIB_LIB): $(OBJS) | ||
26 | wlib -b -c $(ZLIB_LIB) -+adler32.obj -+compress.obj -+crc32.obj | ||
27 | wlib -b -c $(ZLIB_LIB) -+deflate.obj -+gzio.obj -+infback.obj | ||
28 | wlib -b -c $(ZLIB_LIB) -+inffast.obj -+inflate.obj -+inftrees.obj | ||
29 | wlib -b -c $(ZLIB_LIB) -+trees.obj -+uncompr.obj -+zutil.obj | ||
30 | |||
31 | example.exe: $(ZLIB_LIB) example.obj | ||
32 | $(LINKER) -fe=example.exe example.obj $(ZLIB_LIB) | ||
33 | |||
34 | minigzip.exe: $(ZLIB_LIB) minigzip.obj | ||
35 | $(LINKER) -fe=minigzip.exe minigzip.obj $(ZLIB_LIB) | ||
36 | |||
37 | clean: .SYMBOLIC | ||
38 | del *.obj | ||
39 | del $(ZLIB_LIB) | ||
40 | @echo Cleaning done | ||
diff --git a/win32/DLL_FAQ.txt b/win32/DLL_FAQ.txt index fb18e07..12c0090 100644 --- a/win32/DLL_FAQ.txt +++ b/win32/DLL_FAQ.txt | |||
@@ -16,7 +16,7 @@ in the zlib distribution, or at the following location: | |||
16 | 16 | ||
17 | Pointers to a precompiled ZLIB1.DLL can be found in the zlib | 17 | Pointers to a precompiled ZLIB1.DLL can be found in the zlib |
18 | web site at: | 18 | web site at: |
19 | http://www.zlib.org/ | 19 | http://www.zlib.net/ |
20 | 20 | ||
21 | Applications that link to ZLIB1.DLL can rely on the following | 21 | Applications that link to ZLIB1.DLL can rely on the following |
22 | specification: | 22 | specification: |
@@ -350,9 +350,9 @@ in the zlib distribution, or at the following location: | |||
350 | your build is unofficial. You should give it a different file | 350 | your build is unofficial. You should give it a different file |
351 | name, and/or install it in a private directory that can be | 351 | name, and/or install it in a private directory that can be |
352 | accessed by your application only, and is not visible to the | 352 | accessed by your application only, and is not visible to the |
353 | others (e.g. it's not in the SYSTEM or the SYSTEM32 directory, | 353 | others (i.e. it's neither in the PATH, nor in the SYSTEM or |
354 | and it's not in the PATH). Otherwise, your build may clash | 354 | SYSTEM32 directories). Otherwise, your build may clash with |
355 | with applications that link to the official build. | 355 | applications that link to the official build. |
356 | 356 | ||
357 | For example, in Cygwin, zlib is linked to the Cygwin runtime | 357 | For example, in Cygwin, zlib is linked to the Cygwin runtime |
358 | CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL. | 358 | CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL. |
diff --git a/win32/Makefile.bor b/win32/Makefile.bor index b802519..67dafaa 100644 --- a/win32/Makefile.bor +++ b/win32/Makefile.bor | |||
@@ -1,9 +1,6 @@ | |||
1 | # Makefile for zlib | 1 | # Makefile for zlib |
2 | # Borland C++ for Win32 | 2 | # Borland C++ for Win32 |
3 | # | 3 | # |
4 | # Updated for zlib 1.2.x by Cosmin Truta, 11-Mar-2003 | ||
5 | # Last updated: 28-Aug-2003 | ||
6 | # | ||
7 | # Usage: | 4 | # Usage: |
8 | # make -f win32/Makefile.bor | 5 | # make -f win32/Makefile.bor |
9 | # make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj | 6 | # make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj |
@@ -99,8 +96,8 @@ minigzip.exe: minigzip.obj $(ZLIB_LIB) | |||
99 | 96 | ||
100 | # cleanup | 97 | # cleanup |
101 | clean: | 98 | clean: |
99 | -del $(ZLIB_LIB) | ||
102 | -del *.obj | 100 | -del *.obj |
103 | -del *.lib | ||
104 | -del *.exe | 101 | -del *.exe |
105 | -del *.tds | 102 | -del *.tds |
106 | -del zlib.bak | 103 | -del zlib.bak |
diff --git a/win32/Makefile.msc b/win32/Makefile.msc index 528ecaa..5900d66 100644 --- a/win32/Makefile.msc +++ b/win32/Makefile.msc | |||
@@ -1,11 +1,5 @@ | |||
1 | # Makefile for zlib -- Microsoft (Visual) C | 1 | # Makefile for zlib using Microsoft (Visual) C |
2 | # | 2 | # zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler |
3 | # Authors: | ||
4 | # Cosmin Truta, 11-Mar-2003 | ||
5 | # Christian Spieler, 19-Mar-2003 | ||
6 | # | ||
7 | # Last updated: | ||
8 | # Cosmin Truta, 27-Aug-2003 | ||
9 | # | 3 | # |
10 | # Usage: | 4 | # Usage: |
11 | # nmake -f win32/Makefile.msc (standard build) | 5 | # nmake -f win32/Makefile.msc (standard build) |
@@ -27,9 +21,10 @@ AS = ml | |||
27 | LD = link | 21 | LD = link |
28 | AR = lib | 22 | AR = lib |
29 | RC = rc | 23 | RC = rc |
30 | CFLAGS = -nologo -MD -O2 $(LOC) | 24 | CFLAGS = -nologo -MD -O2 -Oy- $(LOC) |
25 | WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE | ||
31 | ASFLAGS = -coff | 26 | ASFLAGS = -coff |
32 | LDFLAGS = -nologo -release | 27 | LDFLAGS = -nologo -debug -release |
33 | ARFLAGS = -nologo | 28 | ARFLAGS = -nologo |
34 | RCFLAGS = /dWIN32 /r | 29 | RCFLAGS = /dWIN32 /r |
35 | 30 | ||
@@ -50,21 +45,31 @@ $(IMPLIB): $(SHAREDLIB) | |||
50 | $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res | 45 | $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res |
51 | $(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \ | 46 | $(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \ |
52 | -out:$@ $(OBJS) $(OBJA) zlib1.res | 47 | -out:$@ $(OBJS) $(OBJA) zlib1.res |
48 | if exist $@.manifest \ | ||
49 | mt -nologo -manifest $@.manifest -outputresource:$@;2 | ||
53 | 50 | ||
54 | example.exe: example.obj $(STATICLIB) | 51 | example.exe: example.obj $(STATICLIB) |
55 | $(LD) $(LDFLAGS) example.obj $(STATICLIB) | 52 | $(LD) $(LDFLAGS) example.obj $(STATICLIB) |
53 | if exist $@.manifest \ | ||
54 | mt -nologo -manifest $@.manifest -outputresource:$@;1 | ||
56 | 55 | ||
57 | minigzip.exe: minigzip.obj $(STATICLIB) | 56 | minigzip.exe: minigzip.obj $(STATICLIB) |
58 | $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB) | 57 | $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB) |
58 | if exist $@.manifest \ | ||
59 | mt -nologo -manifest $@.manifest -outputresource:$@;1 | ||
59 | 60 | ||
60 | example_d.exe: example.obj $(IMPLIB) | 61 | example_d.exe: example.obj $(IMPLIB) |
61 | $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB) | 62 | $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB) |
63 | if exist $@.manifest \ | ||
64 | mt -nologo -manifest $@.manifest -outputresource:$@;1 | ||
62 | 65 | ||
63 | minigzip_d.exe: minigzip.obj $(IMPLIB) | 66 | minigzip_d.exe: minigzip.obj $(IMPLIB) |
64 | $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB) | 67 | $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB) |
68 | if exist $@.manifest \ | ||
69 | mt -nologo -manifest $@.manifest -outputresource:$@;1 | ||
65 | 70 | ||
66 | .c.obj: | 71 | .c.obj: |
67 | $(CC) -c $(CFLAGS) $< | 72 | $(CC) -c $(WFLAGS) $(CFLAGS) $< |
68 | 73 | ||
69 | .asm.obj: | 74 | .asm.obj: |
70 | $(AS) -c $(ASFLAGS) $< | 75 | $(AS) -c $(ASFLAGS) $< |
@@ -123,4 +128,6 @@ clean: | |||
123 | -del *.res | 128 | -del *.res |
124 | -del *.exp | 129 | -del *.exp |
125 | -del *.exe | 130 | -del *.exe |
131 | -del *.pdb | ||
132 | -del *.manifest | ||
126 | -del foo.gz | 133 | -del foo.gz |
diff --git a/win32/zlib.def b/win32/zlib.def index a47cbc1..dbea9c5 100644 --- a/win32/zlib.def +++ b/win32/zlib.def | |||
@@ -43,12 +43,15 @@ EXPORTS | |||
43 | gzrewind | 43 | gzrewind |
44 | gztell | 44 | gztell |
45 | gzeof | 45 | gzeof |
46 | gzdirect | ||
46 | gzclose | 47 | gzclose |
47 | gzerror | 48 | gzerror |
48 | gzclearerr | 49 | gzclearerr |
49 | ; checksum functions | 50 | ; checksum functions |
50 | adler32 | 51 | adler32 |
52 | adler32_combine | ||
51 | crc32 | 53 | crc32 |
54 | crc32_combine | ||
52 | ; various hacks, don't look :) | 55 | ; various hacks, don't look :) |
53 | deflateInit_ | 56 | deflateInit_ |
54 | deflateInit2_ | 57 | deflateInit2_ |
diff --git a/win32/zlib1.rc b/win32/zlib1.rc index 99025c9..0d1d7ff 100644 --- a/win32/zlib1.rc +++ b/win32/zlib1.rc | |||
@@ -1,19 +1,20 @@ | |||
1 | #include <windows.h> | 1 | #include <winver.h> |
2 | #include "../zlib.h" | ||
2 | 3 | ||
3 | #ifdef GCC_WINDRES | 4 | #ifdef GCC_WINDRES |
4 | VS_VERSION_INFO VERSIONINFO | 5 | VS_VERSION_INFO VERSIONINFO |
5 | #else | 6 | #else |
6 | VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE | 7 | VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE |
7 | #endif | 8 | #endif |
8 | FILEVERSION 1,2,2,0 | 9 | FILEVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 |
9 | PRODUCTVERSION 1,2,2,0 | 10 | PRODUCTVERSION ZLIB_VER_MAJOR,ZLIB_VER_MINOR,ZLIB_VER_REVISION,0 |
10 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK | 11 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK |
11 | #ifdef _DEBUG | 12 | #ifdef _DEBUG |
12 | FILEFLAGS 1 | 13 | FILEFLAGS 1 |
13 | #else | 14 | #else |
14 | FILEFLAGS 0 | 15 | FILEFLAGS 0 |
15 | #endif | 16 | #endif |
16 | FILEOS VOS_DOS_WINDOWS32 | 17 | FILEOS VOS__WINDOWS32 |
17 | FILETYPE VFT_DLL | 18 | FILETYPE VFT_DLL |
18 | FILESUBTYPE 0 // not used | 19 | FILESUBTYPE 0 // not used |
19 | BEGIN | 20 | BEGIN |
@@ -23,13 +24,13 @@ BEGIN | |||
23 | //language ID = U.S. English, char set = Windows, Multilingual | 24 | //language ID = U.S. English, char set = Windows, Multilingual |
24 | BEGIN | 25 | BEGIN |
25 | VALUE "FileDescription", "zlib data compression library\0" | 26 | VALUE "FileDescription", "zlib data compression library\0" |
26 | VALUE "FileVersion", "1.2.3\0" | 27 | VALUE "FileVersion", ZLIB_VERSION "\0" |
27 | VALUE "InternalName", "zlib1.dll\0" | 28 | VALUE "InternalName", "zlib1.dll\0" |
28 | VALUE "LegalCopyright", "(C) 1995-2004 Jean-loup Gailly & Mark Adler\0" | 29 | VALUE "LegalCopyright", "(C) 1995-2006 Jean-loup Gailly & Mark Adler\0" |
29 | VALUE "OriginalFilename", "zlib1.dll\0" | 30 | VALUE "OriginalFilename", "zlib1.dll\0" |
30 | VALUE "ProductName", "zlib\0" | 31 | VALUE "ProductName", "zlib\0" |
31 | VALUE "ProductVersion", "1.2.3\0" | 32 | VALUE "ProductVersion", ZLIB_VERSION "\0" |
32 | VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0" | 33 | VALUE "Comments", "For more information visit http://www.zlib.net/\0" |
33 | END | 34 | END |
34 | END | 35 | END |
35 | BLOCK "VarFileInfo" | 36 | BLOCK "VarFileInfo" |
@@ -1,5 +1,5 @@ | |||
1 | /* zconf.h -- configuration of the zlib compression library | 1 | /* zconf.h -- configuration of the zlib compression library |
2 | * Copyright (C) 1995-2005 Jean-loup Gailly. | 2 | * Copyright (C) 1995-2006 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -11,52 +11,115 @@ | |||
11 | /* | 11 | /* |
12 | * If you *really* need a unique prefix for all types and library functions, | 12 | * If you *really* need a unique prefix for all types and library functions, |
13 | * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. | 13 | * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. |
14 | * Even better than compiling with -DZ_PREFIX would be to use configure to set | ||
15 | * this permanently in zconf.h using "./configure --zprefix". | ||
14 | */ | 16 | */ |
15 | #ifdef Z_PREFIX | 17 | #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ |
16 | # define deflateInit_ z_deflateInit_ | 18 | |
19 | /* all linked symbols */ | ||
20 | # define _dist_code z__dist_code | ||
21 | # define _length_code z__length_code | ||
22 | # define _tr_align z__tr_align | ||
23 | # define _tr_flush_block z__tr_flush_block | ||
24 | # define _tr_init z__tr_init | ||
25 | # define _tr_stored_block z__tr_stored_block | ||
26 | # define _tr_tally z__tr_tally | ||
27 | # define adler32 z_adler32 | ||
28 | # define adler32_combine z_adler32_combine | ||
29 | # define compress z_compress | ||
30 | # define compress2 z_compress2 | ||
31 | # define compressBound z_compressBound | ||
32 | # define crc32 z_crc32 | ||
33 | # define crc32_combine z_crc32_combine | ||
17 | # define deflate z_deflate | 34 | # define deflate z_deflate |
35 | # define deflateBound z_deflateBound | ||
36 | # define deflateCopy z_deflateCopy | ||
18 | # define deflateEnd z_deflateEnd | 37 | # define deflateEnd z_deflateEnd |
19 | # define inflateInit_ z_inflateInit_ | ||
20 | # define inflate z_inflate | ||
21 | # define inflateEnd z_inflateEnd | ||
22 | # define deflateInit2_ z_deflateInit2_ | 38 | # define deflateInit2_ z_deflateInit2_ |
23 | # define deflateSetDictionary z_deflateSetDictionary | 39 | # define deflateInit_ z_deflateInit_ |
24 | # define deflateCopy z_deflateCopy | ||
25 | # define deflateReset z_deflateReset | ||
26 | # define deflateParams z_deflateParams | 40 | # define deflateParams z_deflateParams |
27 | # define deflateBound z_deflateBound | ||
28 | # define deflatePrime z_deflatePrime | 41 | # define deflatePrime z_deflatePrime |
42 | # define deflateReset z_deflateReset | ||
43 | # define deflateSetDictionary z_deflateSetDictionary | ||
44 | # define deflateSetHeader z_deflateSetHeader | ||
45 | # define deflateTune z_deflateTune | ||
46 | # define deflate_copyright z_deflate_copyright | ||
47 | # define get_crc_table z_get_crc_table | ||
48 | # define gzclearerr z_gzclearerr | ||
49 | # define gzclose z_gzclose | ||
50 | # define gzdirect z_gzdirect | ||
51 | # define gzdopen z_gzdopen | ||
52 | # define gzeof z_gzeof | ||
53 | # define gzerror z_gzerror | ||
54 | # define gzflush z_gzflush | ||
55 | # define gzgetc z_gzgetc | ||
56 | # define gzgets z_gzgets | ||
57 | # define gzopen z_gzopen | ||
58 | # define gzprintf z_gzprintf | ||
59 | # define gzputc z_gzputc | ||
60 | # define gzputs z_gzputs | ||
61 | # define gzread z_gzread | ||
62 | # define gzrewind z_gzrewind | ||
63 | # define gzseek z_gzseek | ||
64 | # define gzsetparams z_gzsetparams | ||
65 | # define gztell z_gztell | ||
66 | # define gzungetc z_gzungetc | ||
67 | # define gzwrite z_gzwrite | ||
68 | # define inflate z_inflate | ||
69 | # define inflateBack z_inflateBack | ||
70 | # define inflateBackEnd z_inflateBackEnd | ||
71 | # define inflateBackInit_ z_inflateBackInit_ | ||
72 | # define inflateCopy z_inflateCopy | ||
73 | # define inflateEnd z_inflateEnd | ||
74 | # define inflateGetHeader z_inflateGetHeader | ||
29 | # define inflateInit2_ z_inflateInit2_ | 75 | # define inflateInit2_ z_inflateInit2_ |
76 | # define inflateInit_ z_inflateInit_ | ||
77 | # define inflatePrime z_inflatePrime | ||
78 | # define inflateReset z_inflateReset | ||
30 | # define inflateSetDictionary z_inflateSetDictionary | 79 | # define inflateSetDictionary z_inflateSetDictionary |
31 | # define inflateSync z_inflateSync | 80 | # define inflateSync z_inflateSync |
32 | # define inflateSyncPoint z_inflateSyncPoint | 81 | # define inflateSyncPoint z_inflateSyncPoint |
33 | # define inflateCopy z_inflateCopy | 82 | # define inflate_copyright z_inflate_copyright |
34 | # define inflateReset z_inflateReset | 83 | # define inflate_fast z_inflate_fast |
35 | # define inflateBack z_inflateBack | 84 | # define inflate_table z_inflate_table |
36 | # define inflateBackEnd z_inflateBackEnd | ||
37 | # define compress z_compress | ||
38 | # define compress2 z_compress2 | ||
39 | # define compressBound z_compressBound | ||
40 | # define uncompress z_uncompress | 85 | # define uncompress z_uncompress |
41 | # define adler32 z_adler32 | ||
42 | # define crc32 z_crc32 | ||
43 | # define get_crc_table z_get_crc_table | ||
44 | # define zError z_zError | 86 | # define zError z_zError |
87 | # define z_errmsg z_z_errmsg | ||
88 | # define zcalloc z_zcalloc | ||
89 | # define zcfree z_zcfree | ||
90 | # define zlibCompileFlags z_zlibCompileFlags | ||
91 | # define zlibVersion z_zlibVersion | ||
45 | 92 | ||
93 | /* all zlib typedefs in zlib.h and zconf.h */ | ||
94 | # define Byte z_Byte | ||
95 | # define Bytef z_Bytef | ||
46 | # define alloc_func z_alloc_func | 96 | # define alloc_func z_alloc_func |
97 | # define charf z_charf | ||
47 | # define free_func z_free_func | 98 | # define free_func z_free_func |
99 | # define gzFile z_gzFile | ||
100 | # define gz_header z_gz_header | ||
101 | # define gz_headerp z_gz_headerp | ||
48 | # define in_func z_in_func | 102 | # define in_func z_in_func |
103 | # define intf z_intf | ||
49 | # define out_func z_out_func | 104 | # define out_func z_out_func |
50 | # define Byte z_Byte | ||
51 | # define uInt z_uInt | 105 | # define uInt z_uInt |
52 | # define uLong z_uLong | ||
53 | # define Bytef z_Bytef | ||
54 | # define charf z_charf | ||
55 | # define intf z_intf | ||
56 | # define uIntf z_uIntf | 106 | # define uIntf z_uIntf |
107 | # define uLong z_uLong | ||
57 | # define uLongf z_uLongf | 108 | # define uLongf z_uLongf |
58 | # define voidpf z_voidpf | ||
59 | # define voidp z_voidp | 109 | # define voidp z_voidp |
110 | # define voidp z_voidp | ||
111 | # define voidpc z_voidpc | ||
112 | # define voidpc z_voidpc | ||
113 | # define voidpf z_voidpf | ||
114 | # define voidpf z_voidpf | ||
115 | # define z_stream z_z_stream | ||
116 | # define z_streamp z_z_streamp | ||
117 | |||
118 | /* all zlib structs in zlib.h and zconf.h */ | ||
119 | # define gz_header_s z_gz_header_s | ||
120 | # define internal_state z_internal_state | ||
121 | # define z_stream_s z_z_stream_s | ||
122 | |||
60 | #endif | 123 | #endif |
61 | 124 | ||
62 | #if defined(__MSDOS__) && !defined(MSDOS) | 125 | #if defined(__MSDOS__) && !defined(MSDOS) |
@@ -243,6 +306,10 @@ | |||
243 | # endif | 306 | # endif |
244 | #endif | 307 | #endif |
245 | 308 | ||
309 | #ifdef HAVE_VISIBILITY_PRAGMA | ||
310 | # define ZEXTERN __attribute__((visibility ("default"))) extern | ||
311 | #endif | ||
312 | |||
246 | #ifndef ZEXTERN | 313 | #ifndef ZEXTERN |
247 | # define ZEXTERN extern | 314 | # define ZEXTERN extern |
248 | #endif | 315 | #endif |
@@ -307,9 +374,6 @@ typedef uLong FAR uLongf; | |||
307 | 374 | ||
308 | #if defined(__MVS__) | 375 | #if defined(__MVS__) |
309 | # define NO_vsnprintf | 376 | # define NO_vsnprintf |
310 | # ifdef FAR | ||
311 | # undef FAR | ||
312 | # endif | ||
313 | #endif | 377 | #endif |
314 | 378 | ||
315 | /* MVS linker does not support external names larger than 8 bytes */ | 379 | /* MVS linker does not support external names larger than 8 bytes */ |
@@ -1,5 +1,5 @@ | |||
1 | /* zconf.h -- configuration of the zlib compression library | 1 | /* zconf.h -- configuration of the zlib compression library |
2 | * Copyright (C) 1995-2005 Jean-loup Gailly. | 2 | * Copyright (C) 1995-2006 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -11,52 +11,115 @@ | |||
11 | /* | 11 | /* |
12 | * If you *really* need a unique prefix for all types and library functions, | 12 | * If you *really* need a unique prefix for all types and library functions, |
13 | * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. | 13 | * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. |
14 | * Even better than compiling with -DZ_PREFIX would be to use configure to set | ||
15 | * this permanently in zconf.h using "./configure --zprefix". | ||
14 | */ | 16 | */ |
15 | #ifdef Z_PREFIX | 17 | #ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ |
16 | # define deflateInit_ z_deflateInit_ | 18 | |
19 | /* all linked symbols */ | ||
20 | # define _dist_code z__dist_code | ||
21 | # define _length_code z__length_code | ||
22 | # define _tr_align z__tr_align | ||
23 | # define _tr_flush_block z__tr_flush_block | ||
24 | # define _tr_init z__tr_init | ||
25 | # define _tr_stored_block z__tr_stored_block | ||
26 | # define _tr_tally z__tr_tally | ||
27 | # define adler32 z_adler32 | ||
28 | # define adler32_combine z_adler32_combine | ||
29 | # define compress z_compress | ||
30 | # define compress2 z_compress2 | ||
31 | # define compressBound z_compressBound | ||
32 | # define crc32 z_crc32 | ||
33 | # define crc32_combine z_crc32_combine | ||
17 | # define deflate z_deflate | 34 | # define deflate z_deflate |
35 | # define deflateBound z_deflateBound | ||
36 | # define deflateCopy z_deflateCopy | ||
18 | # define deflateEnd z_deflateEnd | 37 | # define deflateEnd z_deflateEnd |
19 | # define inflateInit_ z_inflateInit_ | ||
20 | # define inflate z_inflate | ||
21 | # define inflateEnd z_inflateEnd | ||
22 | # define deflateInit2_ z_deflateInit2_ | 38 | # define deflateInit2_ z_deflateInit2_ |
23 | # define deflateSetDictionary z_deflateSetDictionary | 39 | # define deflateInit_ z_deflateInit_ |
24 | # define deflateCopy z_deflateCopy | ||
25 | # define deflateReset z_deflateReset | ||
26 | # define deflateParams z_deflateParams | 40 | # define deflateParams z_deflateParams |
27 | # define deflateBound z_deflateBound | ||
28 | # define deflatePrime z_deflatePrime | 41 | # define deflatePrime z_deflatePrime |
42 | # define deflateReset z_deflateReset | ||
43 | # define deflateSetDictionary z_deflateSetDictionary | ||
44 | # define deflateSetHeader z_deflateSetHeader | ||
45 | # define deflateTune z_deflateTune | ||
46 | # define deflate_copyright z_deflate_copyright | ||
47 | # define get_crc_table z_get_crc_table | ||
48 | # define gzclearerr z_gzclearerr | ||
49 | # define gzclose z_gzclose | ||
50 | # define gzdirect z_gzdirect | ||
51 | # define gzdopen z_gzdopen | ||
52 | # define gzeof z_gzeof | ||
53 | # define gzerror z_gzerror | ||
54 | # define gzflush z_gzflush | ||
55 | # define gzgetc z_gzgetc | ||
56 | # define gzgets z_gzgets | ||
57 | # define gzopen z_gzopen | ||
58 | # define gzprintf z_gzprintf | ||
59 | # define gzputc z_gzputc | ||
60 | # define gzputs z_gzputs | ||
61 | # define gzread z_gzread | ||
62 | # define gzrewind z_gzrewind | ||
63 | # define gzseek z_gzseek | ||
64 | # define gzsetparams z_gzsetparams | ||
65 | # define gztell z_gztell | ||
66 | # define gzungetc z_gzungetc | ||
67 | # define gzwrite z_gzwrite | ||
68 | # define inflate z_inflate | ||
69 | # define inflateBack z_inflateBack | ||
70 | # define inflateBackEnd z_inflateBackEnd | ||
71 | # define inflateBackInit_ z_inflateBackInit_ | ||
72 | # define inflateCopy z_inflateCopy | ||
73 | # define inflateEnd z_inflateEnd | ||
74 | # define inflateGetHeader z_inflateGetHeader | ||
29 | # define inflateInit2_ z_inflateInit2_ | 75 | # define inflateInit2_ z_inflateInit2_ |
76 | # define inflateInit_ z_inflateInit_ | ||
77 | # define inflatePrime z_inflatePrime | ||
78 | # define inflateReset z_inflateReset | ||
30 | # define inflateSetDictionary z_inflateSetDictionary | 79 | # define inflateSetDictionary z_inflateSetDictionary |
31 | # define inflateSync z_inflateSync | 80 | # define inflateSync z_inflateSync |
32 | # define inflateSyncPoint z_inflateSyncPoint | 81 | # define inflateSyncPoint z_inflateSyncPoint |
33 | # define inflateCopy z_inflateCopy | 82 | # define inflate_copyright z_inflate_copyright |
34 | # define inflateReset z_inflateReset | 83 | # define inflate_fast z_inflate_fast |
35 | # define inflateBack z_inflateBack | 84 | # define inflate_table z_inflate_table |
36 | # define inflateBackEnd z_inflateBackEnd | ||
37 | # define compress z_compress | ||
38 | # define compress2 z_compress2 | ||
39 | # define compressBound z_compressBound | ||
40 | # define uncompress z_uncompress | 85 | # define uncompress z_uncompress |
41 | # define adler32 z_adler32 | ||
42 | # define crc32 z_crc32 | ||
43 | # define get_crc_table z_get_crc_table | ||
44 | # define zError z_zError | 86 | # define zError z_zError |
87 | # define z_errmsg z_z_errmsg | ||
88 | # define zcalloc z_zcalloc | ||
89 | # define zcfree z_zcfree | ||
90 | # define zlibCompileFlags z_zlibCompileFlags | ||
91 | # define zlibVersion z_zlibVersion | ||
45 | 92 | ||
93 | /* all zlib typedefs in zlib.h and zconf.h */ | ||
94 | # define Byte z_Byte | ||
95 | # define Bytef z_Bytef | ||
46 | # define alloc_func z_alloc_func | 96 | # define alloc_func z_alloc_func |
97 | # define charf z_charf | ||
47 | # define free_func z_free_func | 98 | # define free_func z_free_func |
99 | # define gzFile z_gzFile | ||
100 | # define gz_header z_gz_header | ||
101 | # define gz_headerp z_gz_headerp | ||
48 | # define in_func z_in_func | 102 | # define in_func z_in_func |
103 | # define intf z_intf | ||
49 | # define out_func z_out_func | 104 | # define out_func z_out_func |
50 | # define Byte z_Byte | ||
51 | # define uInt z_uInt | 105 | # define uInt z_uInt |
52 | # define uLong z_uLong | ||
53 | # define Bytef z_Bytef | ||
54 | # define charf z_charf | ||
55 | # define intf z_intf | ||
56 | # define uIntf z_uIntf | 106 | # define uIntf z_uIntf |
107 | # define uLong z_uLong | ||
57 | # define uLongf z_uLongf | 108 | # define uLongf z_uLongf |
58 | # define voidpf z_voidpf | ||
59 | # define voidp z_voidp | 109 | # define voidp z_voidp |
110 | # define voidp z_voidp | ||
111 | # define voidpc z_voidpc | ||
112 | # define voidpc z_voidpc | ||
113 | # define voidpf z_voidpf | ||
114 | # define voidpf z_voidpf | ||
115 | # define z_stream z_z_stream | ||
116 | # define z_streamp z_z_streamp | ||
117 | |||
118 | /* all zlib structs in zlib.h and zconf.h */ | ||
119 | # define gz_header_s z_gz_header_s | ||
120 | # define internal_state z_internal_state | ||
121 | # define z_stream_s z_z_stream_s | ||
122 | |||
60 | #endif | 123 | #endif |
61 | 124 | ||
62 | #if defined(__MSDOS__) && !defined(MSDOS) | 125 | #if defined(__MSDOS__) && !defined(MSDOS) |
@@ -243,6 +306,10 @@ | |||
243 | # endif | 306 | # endif |
244 | #endif | 307 | #endif |
245 | 308 | ||
309 | #ifdef HAVE_VISIBILITY_PRAGMA | ||
310 | # define ZEXTERN __attribute__((visibility ("default"))) extern | ||
311 | #endif | ||
312 | |||
246 | #ifndef ZEXTERN | 313 | #ifndef ZEXTERN |
247 | # define ZEXTERN extern | 314 | # define ZEXTERN extern |
248 | #endif | 315 | #endif |
@@ -307,9 +374,6 @@ typedef uLong FAR uLongf; | |||
307 | 374 | ||
308 | #if defined(__MVS__) | 375 | #if defined(__MVS__) |
309 | # define NO_vsnprintf | 376 | # define NO_vsnprintf |
310 | # ifdef FAR | ||
311 | # undef FAR | ||
312 | # endif | ||
313 | #endif | 377 | #endif |
314 | 378 | ||
315 | /* MVS linker does not support external names larger than 8 bytes */ | 379 | /* MVS linker does not support external names larger than 8 bytes */ |
@@ -1,4 +1,4 @@ | |||
1 | .TH ZLIB 3 "18 July 2005" | 1 | .TH ZLIB 3 "16 August 2006" |
2 | .SH NAME | 2 | .SH NAME |
3 | zlib \- compression/decompression library | 3 | zlib \- compression/decompression library |
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
@@ -133,7 +133,7 @@ before asking for help. | |||
133 | Send questions and/or comments to zlib@gzip.org, | 133 | Send questions and/or comments to zlib@gzip.org, |
134 | or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). | 134 | or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). |
135 | .SH AUTHORS | 135 | .SH AUTHORS |
136 | Version 1.2.3 | 136 | Version 1.2.3.1 |
137 | Copyright (C) 1995-2005 Jean-loup Gailly (jloup@gzip.org) | 137 | Copyright (C) 1995-2005 Jean-loup Gailly (jloup@gzip.org) |
138 | and Mark Adler (madler@alumni.caltech.edu). | 138 | and Mark Adler (madler@alumni.caltech.edu). |
139 | .LP | 139 | .LP |
@@ -1,7 +1,7 @@ | |||
1 | /* zlib.h -- interface of the 'zlib' general purpose compression library | 1 | /* zlib.h -- interface of the 'zlib' general purpose compression library |
2 | version 1.2.3, July 18th, 2005 | 2 | version 1.2.3.1, August 16th, 2006 |
3 | 3 | ||
4 | Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler | 4 | Copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler |
5 | 5 | ||
6 | This software is provided 'as-is', without any express or implied | 6 | This software is provided 'as-is', without any express or implied |
7 | warranty. In no event will the authors be held liable for any damages | 7 | warranty. In no event will the authors be held liable for any damages |
@@ -37,8 +37,11 @@ | |||
37 | extern "C" { | 37 | extern "C" { |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #define ZLIB_VERSION "1.2.3" | 40 | #define ZLIB_VERSION "1.2.3.1" |
41 | #define ZLIB_VERNUM 0x1230 | 41 | #define ZLIB_VERNUM 0x1231 |
42 | #define ZLIB_VER_MAJOR 1 | ||
43 | #define ZLIB_VER_MINOR 2 | ||
44 | #define ZLIB_VER_REVISION 3 | ||
42 | 45 | ||
43 | /* | 46 | /* |
44 | The 'zlib' compression library provides in-memory compression and | 47 | The 'zlib' compression library provides in-memory compression and |
@@ -353,10 +356,14 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); | |||
353 | 356 | ||
354 | inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough | 357 | inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough |
355 | memory, Z_VERSION_ERROR if the zlib library version is incompatible with the | 358 | memory, Z_VERSION_ERROR if the zlib library version is incompatible with the |
356 | version assumed by the caller. msg is set to null if there is no error | 359 | version assumed by the caller, or Z_STREAM_ERROR if the parameters are |
357 | message. inflateInit does not perform any decompression apart from reading | 360 | invalid, such as a null pointer to the structure. msg is set to null if |
358 | the zlib header if present: this will be done by inflate(). (So next_in and | 361 | there is no error message. inflateInit does not perform any decompression |
359 | avail_in may be modified, but next_out and avail_out are unchanged.) | 362 | apart from possibly reading the zlib header if present: actual decompression |
363 | will be done by inflate(). (So next_in and avail_in may be modified, but | ||
364 | next_out and avail_out are unused and unchanged.) The current | ||
365 | implementation of inflateInit() does not process any header information -- | ||
366 | that is deferred until inflate() is called. | ||
360 | */ | 367 | */ |
361 | 368 | ||
362 | 369 | ||
@@ -645,9 +652,10 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, | |||
645 | uLong sourceLen)); | 652 | uLong sourceLen)); |
646 | /* | 653 | /* |
647 | deflateBound() returns an upper bound on the compressed size after | 654 | deflateBound() returns an upper bound on the compressed size after |
648 | deflation of sourceLen bytes. It must be called after deflateInit() | 655 | deflation of sourceLen bytes. It must be called after deflateInit() or |
649 | or deflateInit2(). This would be used to allocate an output buffer | 656 | deflateInit2(), and after deflateSetHeader(), if used. This would be used |
650 | for deflation in a single pass, and so would be called before deflate(). | 657 | to allocate an output buffer for deflation in a single pass, and so would be |
658 | called before deflate(). | ||
651 | */ | 659 | */ |
652 | 660 | ||
653 | ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, | 661 | ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, |
@@ -726,11 +734,15 @@ ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, | |||
726 | a crc32 instead of an adler32. | 734 | a crc32 instead of an adler32. |
727 | 735 | ||
728 | inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough | 736 | inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough |
729 | memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg | 737 | memory, Z_VERSION_ERROR if the zlib library version is incompatible with the |
730 | is set to null if there is no error message. inflateInit2 does not perform | 738 | version assumed by the caller, or Z_STREAM_ERROR if the parameters are |
731 | any decompression apart from reading the zlib header if present: this will | 739 | invalid, such as a null pointer to the structure. msg is set to null if |
732 | be done by inflate(). (So next_in and avail_in may be modified, but next_out | 740 | there is no error message. inflateInit2 does not perform any decompression |
733 | and avail_out are unchanged.) | 741 | apart from possibly reading the zlib header if present: actual decompression |
742 | will be done by inflate(). (So next_in and avail_in may be modified, but | ||
743 | next_out and avail_out are unused and unchanged.) The current | ||
744 | implementation of inflateInit2() does not process any header information -- | ||
745 | that is deferred until inflate() is called. | ||
734 | */ | 746 | */ |
735 | 747 | ||
736 | ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, | 748 | ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, |
@@ -1230,7 +1242,8 @@ ZEXTERN int ZEXPORT gzclose OF((gzFile file)); | |||
1230 | /* | 1242 | /* |
1231 | Flushes all pending output if necessary, closes the compressed file | 1243 | Flushes all pending output if necessary, closes the compressed file |
1232 | and deallocates all the (de)compression state. The return value is the zlib | 1244 | and deallocates all the (de)compression state. The return value is the zlib |
1233 | error number (see function gzerror below). | 1245 | error number. Note that once file is close, you cannot call gzerror with |
1246 | file, since its structures have been deallocated. | ||
1234 | */ | 1247 | */ |
1235 | 1248 | ||
1236 | ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); | 1249 | ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); |
@@ -1240,6 +1253,9 @@ ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); | |||
1240 | error occurred in the file system and not in the compression library, | 1253 | error occurred in the file system and not in the compression library, |
1241 | errnum is set to Z_ERRNO and the application may consult errno | 1254 | errnum is set to Z_ERRNO and the application may consult errno |
1242 | to get the exact error code. | 1255 | to get the exact error code. |
1256 | |||
1257 | The application must not modify the returned string and future calls to | ||
1258 | this function may invalidate the returned string. | ||
1243 | */ | 1259 | */ |
1244 | 1260 | ||
1245 | ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); | 1261 | ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); |
@@ -1339,8 +1355,7 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, | |||
1339 | inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) | 1355 | inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) |
1340 | #define inflateBackInit(strm, windowBits, window) \ | 1356 | #define inflateBackInit(strm, windowBits, window) \ |
1341 | inflateBackInit_((strm), (windowBits), (window), \ | 1357 | inflateBackInit_((strm), (windowBits), (window), \ |
1342 | ZLIB_VERSION, sizeof(z_stream)) | 1358 | ZLIB_VERSION, sizeof(z_stream)) |
1343 | |||
1344 | 1359 | ||
1345 | #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) | 1360 | #if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) |
1346 | struct internal_state {int dummy;}; /* hack for buggy compilers */ | 1361 | struct internal_state {int dummy;}; /* hack for buggy compilers */ |
diff --git a/zlib.map b/zlib.map new file mode 100644 index 0000000..da683a8 --- /dev/null +++ b/zlib.map | |||
@@ -0,0 +1,44 @@ | |||
1 | ZLIB_1.2.0 { | ||
2 | global: | ||
3 | compressBound; | ||
4 | deflateBound; | ||
5 | inflateBack; | ||
6 | inflateBackEnd; | ||
7 | inflateBackInit_; | ||
8 | inflateCopy; | ||
9 | local: | ||
10 | deflate_copyright; | ||
11 | inflate_copyright; | ||
12 | inflate_fast; | ||
13 | inflate_table; | ||
14 | zcalloc; | ||
15 | zcfree; | ||
16 | z_errmsg; | ||
17 | _*; | ||
18 | }; | ||
19 | |||
20 | ZLIB_1.2.0.2 { | ||
21 | gzclearerr; | ||
22 | gzungetc; | ||
23 | zlibCompileFlags; | ||
24 | } ZLIB_1.2.0; | ||
25 | |||
26 | ZLIB_1.2.0.8 { | ||
27 | deflatePrime; | ||
28 | } ZLIB_1.2.0.2; | ||
29 | |||
30 | ZLIB_1.2.2 { | ||
31 | adler32_combine; | ||
32 | crc32_combine; | ||
33 | deflateSetHeader; | ||
34 | inflateGetHeader; | ||
35 | } ZLIB_1.2.0.8; | ||
36 | |||
37 | ZLIB_1.2.2.3 { | ||
38 | deflateTune; | ||
39 | gzdirect; | ||
40 | } ZLIB_1.2.2; | ||
41 | |||
42 | ZLIB_1.2.2.4 { | ||
43 | inflatePrime; | ||
44 | } ZLIB_1.2.2.3; | ||
diff --git a/zlib.pc.in b/zlib.pc.in new file mode 100644 index 0000000..3e355aa --- /dev/null +++ b/zlib.pc.in | |||
@@ -0,0 +1,12 @@ | |||
1 | prefix=@prefix@ | ||
2 | exec_prefix=@exec_prefix@ | ||
3 | libdir=@libdir@ | ||
4 | includedir=@includedir@ | ||
5 | |||
6 | Name: zlib | ||
7 | Description: zlib compression library | ||
8 | Version: @VERSION@ | ||
9 | |||
10 | Requires: | ||
11 | Libs: -L${libdir} -lz | ||
12 | Cflags: -I${includedir} | ||
@@ -1,5 +1,5 @@ | |||
1 | /* zutil.h -- internal interface and configuration of the compression library | 1 | /* zutil.h -- internal interface and configuration of the compression library |
2 | * Copyright (C) 1995-2005 Jean-loup Gailly. | 2 | * Copyright (C) 1995-2006 Jean-loup Gailly. |
3 | * For conditions of distribution and use, see copyright notice in zlib.h | 3 | * For conditions of distribution and use, see copyright notice in zlib.h |
4 | */ | 4 | */ |
5 | 5 | ||
@@ -23,7 +23,7 @@ | |||
23 | # include <string.h> | 23 | # include <string.h> |
24 | # include <stdlib.h> | 24 | # include <stdlib.h> |
25 | #endif | 25 | #endif |
26 | #ifdef NO_ERRNO_H | 26 | #if defined(NO_ERRNO_H) || defined(_WIN32_WCE) |
27 | # ifdef _WIN32_WCE | 27 | # ifdef _WIN32_WCE |
28 | /* The Microsoft C Run-Time Library for Windows CE doesn't have | 28 | /* The Microsoft C Run-Time Library for Windows CE doesn't have |
29 | * errno. We define it as a global variable to simplify porting. | 29 | * errno. We define it as a global variable to simplify porting. |
@@ -34,9 +34,7 @@ | |||
34 | # endif | 34 | # endif |
35 | extern int errno; | 35 | extern int errno; |
36 | #else | 36 | #else |
37 | # ifndef _WIN32_WCE | 37 | # include <errno.h> |
38 | # include <errno.h> | ||
39 | # endif | ||
40 | #endif | 38 | #endif |
41 | 39 | ||
42 | #ifndef local | 40 | #ifndef local |
@@ -151,7 +149,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
151 | # define fdopen(fd,mode) NULL /* No fdopen() */ | 149 | # define fdopen(fd,mode) NULL /* No fdopen() */ |
152 | #endif | 150 | #endif |
153 | 151 | ||
154 | #if (defined(_MSC_VER) && (_MSC_VER > 600)) | 152 | #if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX |
155 | # if defined(_WIN32_WCE) | 153 | # if defined(_WIN32_WCE) |
156 | # define fdopen(fd,mode) NULL /* No fdopen() */ | 154 | # define fdopen(fd,mode) NULL /* No fdopen() */ |
157 | # ifndef _PTRDIFF_T_DEFINED | 155 | # ifndef _PTRDIFF_T_DEFINED |