diff options
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | deflate.c | 6 | ||||
-rw-r--r-- | deflate.h | 4 | ||||
-rw-r--r-- | examples/gzlog.c | 2 | ||||
-rw-r--r-- | msdos/Makefile.dj2 | 2 | ||||
-rw-r--r-- | msdos/Makefile.emx | 2 | ||||
-rw-r--r-- | old/Makefile.emx | 2 | ||||
-rw-r--r-- | old/os2/Makefile.os2 | 2 | ||||
-rw-r--r-- | treebuild.xml | 2 | ||||
-rw-r--r-- | trees.c | 32 | ||||
-rw-r--r-- | win32/Makefile.gcc | 2 | ||||
-rw-r--r-- | zlib.h | 2 | ||||
-rw-r--r-- | zutil.c | 4 | ||||
-rw-r--r-- | zutil.h | 2 |
14 files changed, 33 insertions, 33 deletions
diff --git a/Makefile.in b/Makefile.in index 67592f3..f608c6c 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -20,7 +20,7 @@ CC=cc | |||
20 | 20 | ||
21 | CFLAGS=-O | 21 | CFLAGS=-O |
22 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | 22 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 |
23 | #CFLAGS=-g -DDEBUG | 23 | #CFLAGS=-g -DZLIB_DEBUG |
24 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | 24 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ |
25 | # -Wstrict-prototypes -Wmissing-prototypes | 25 | # -Wstrict-prototypes -Wmissing-prototypes |
26 | 26 | ||
@@ -92,7 +92,7 @@ local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); | |||
92 | local uInt longest_match OF((deflate_state *s, IPos cur_match)); | 92 | local uInt longest_match OF((deflate_state *s, IPos cur_match)); |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | #ifdef DEBUG | 95 | #ifdef ZLIB_DEBUG |
96 | local void check_match OF((deflate_state *s, IPos start, IPos match, | 96 | local void check_match OF((deflate_state *s, IPos start, IPos match, |
97 | int length)); | 97 | int length)); |
98 | #endif | 98 | #endif |
@@ -1349,7 +1349,7 @@ local uInt longest_match(s, cur_match) | |||
1349 | 1349 | ||
1350 | #endif /* FASTEST */ | 1350 | #endif /* FASTEST */ |
1351 | 1351 | ||
1352 | #ifdef DEBUG | 1352 | #ifdef ZLIB_DEBUG |
1353 | /* =========================================================================== | 1353 | /* =========================================================================== |
1354 | * Check that the match at match_start is indeed a match. | 1354 | * Check that the match at match_start is indeed a match. |
1355 | */ | 1355 | */ |
@@ -1375,7 +1375,7 @@ local void check_match(s, start, match, length) | |||
1375 | } | 1375 | } |
1376 | #else | 1376 | #else |
1377 | # define check_match(s, start, match, length) | 1377 | # define check_match(s, start, match, length) |
1378 | #endif /* DEBUG */ | 1378 | #endif /* ZLIB_DEBUG */ |
1379 | 1379 | ||
1380 | /* =========================================================================== | 1380 | /* =========================================================================== |
1381 | * Fill the window when the lookahead becomes insufficient. | 1381 | * Fill the window when the lookahead becomes insufficient. |
@@ -249,7 +249,7 @@ typedef struct internal_state { | |||
249 | uInt matches; /* number of string matches in current block */ | 249 | uInt matches; /* number of string matches in current block */ |
250 | uInt insert; /* bytes at end of window left to insert */ | 250 | uInt insert; /* bytes at end of window left to insert */ |
251 | 251 | ||
252 | #ifdef DEBUG | 252 | #ifdef ZLIB_DEBUG |
253 | ulg compressed_len; /* total bit length of compressed file mod 2^32 */ | 253 | ulg compressed_len; /* total bit length of compressed file mod 2^32 */ |
254 | ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ | 254 | ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ |
255 | #endif | 255 | #endif |
@@ -309,7 +309,7 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, | |||
309 | * used. | 309 | * used. |
310 | */ | 310 | */ |
311 | 311 | ||
312 | #ifndef DEBUG | 312 | #ifndef ZLIB_DEBUG |
313 | /* Inline versions of _tr_tally for speed: */ | 313 | /* Inline versions of _tr_tally for speed: */ |
314 | 314 | ||
315 | #if defined(GEN_TREES_H) || !defined(STDC) | 315 | #if defined(GEN_TREES_H) || !defined(STDC) |
diff --git a/examples/gzlog.c b/examples/gzlog.c index 922f878..f33a862 100644 --- a/examples/gzlog.c +++ b/examples/gzlog.c | |||
@@ -243,7 +243,7 @@ typedef unsigned int uint; | |||
243 | typedef unsigned long ulong; | 243 | typedef unsigned long ulong; |
244 | 244 | ||
245 | /* Macro for debugging to deterministically force recovery operations */ | 245 | /* Macro for debugging to deterministically force recovery operations */ |
246 | #ifdef DEBUG | 246 | #ifdef GZLOG_DEBUG |
247 | #include <setjmp.h> /* longjmp */ | 247 | #include <setjmp.h> /* longjmp */ |
248 | jmp_buf gzlog_jump; /* where to go back to */ | 248 | jmp_buf gzlog_jump; /* where to go back to */ |
249 | int gzlog_bail = 0; /* which point to bail at (1..8) */ | 249 | int gzlog_bail = 0; /* which point to bail at (1..8) */ |
diff --git a/msdos/Makefile.dj2 b/msdos/Makefile.dj2 index 29b0395..59d2037 100644 --- a/msdos/Makefile.dj2 +++ b/msdos/Makefile.dj2 | |||
@@ -29,7 +29,7 @@ CC=gcc | |||
29 | 29 | ||
30 | #CFLAGS=-MMD -O | 30 | #CFLAGS=-MMD -O |
31 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | 31 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 |
32 | #CFLAGS=-MMD -g -DDEBUG | 32 | #CFLAGS=-MMD -g -DZLIB_DEBUG |
33 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | 33 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ |
34 | -Wstrict-prototypes -Wmissing-prototypes | 34 | -Wstrict-prototypes -Wmissing-prototypes |
35 | 35 | ||
diff --git a/msdos/Makefile.emx b/msdos/Makefile.emx index 9c1b57a..e30f67b 100644 --- a/msdos/Makefile.emx +++ b/msdos/Makefile.emx | |||
@@ -11,7 +11,7 @@ CC=gcc | |||
11 | 11 | ||
12 | #CFLAGS=-MMD -O | 12 | #CFLAGS=-MMD -O |
13 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | 13 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 |
14 | #CFLAGS=-MMD -g -DDEBUG | 14 | #CFLAGS=-MMD -g -DZLIB_DEBUG |
15 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | 15 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ |
16 | -Wstrict-prototypes -Wmissing-prototypes | 16 | -Wstrict-prototypes -Wmissing-prototypes |
17 | 17 | ||
diff --git a/old/Makefile.emx b/old/Makefile.emx index 4d6ab0e..612b037 100644 --- a/old/Makefile.emx +++ b/old/Makefile.emx | |||
@@ -11,7 +11,7 @@ CC=gcc -Zwin32 | |||
11 | 11 | ||
12 | #CFLAGS=-MMD -O | 12 | #CFLAGS=-MMD -O |
13 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | 13 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 |
14 | #CFLAGS=-MMD -g -DDEBUG | 14 | #CFLAGS=-MMD -g -DZLIB_DEBUG |
15 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | 15 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ |
16 | -Wstrict-prototypes -Wmissing-prototypes | 16 | -Wstrict-prototypes -Wmissing-prototypes |
17 | 17 | ||
diff --git a/old/os2/Makefile.os2 b/old/os2/Makefile.os2 index a105aaa..bb426c0 100644 --- a/old/os2/Makefile.os2 +++ b/old/os2/Makefile.os2 | |||
@@ -14,7 +14,7 @@ CC=gcc -Zomf -s | |||
14 | 14 | ||
15 | CFLAGS=-O6 -Wall | 15 | CFLAGS=-O6 -Wall |
16 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | 16 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 |
17 | #CFLAGS=-g -DDEBUG | 17 | #CFLAGS=-g -DZLIB_DEBUG |
18 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | 18 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ |
19 | # -Wstrict-prototypes -Wmissing-prototypes | 19 | # -Wstrict-prototypes -Wmissing-prototypes |
20 | 20 | ||
diff --git a/treebuild.xml b/treebuild.xml index 7a8ea27..d3732d8 100644 --- a/treebuild.xml +++ b/treebuild.xml | |||
@@ -101,7 +101,7 @@ | |||
101 | <!-- | 101 | <!-- |
102 | CFLAGS=-O | 102 | CFLAGS=-O |
103 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | 103 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 |
104 | #CFLAGS=-g -DDEBUG | 104 | #CFLAGS=-g -DZLIB_DEBUG |
105 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | 105 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ |
106 | # -Wstrict-prototypes -Wmissing-prototypes | 106 | # -Wstrict-prototypes -Wmissing-prototypes |
107 | 107 | ||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #include "deflate.h" | 37 | #include "deflate.h" |
38 | 38 | ||
39 | #ifdef DEBUG | 39 | #ifdef ZLIB_DEBUG |
40 | # include <ctype.h> | 40 | # include <ctype.h> |
41 | #endif | 41 | #endif |
42 | 42 | ||
@@ -159,11 +159,11 @@ local void copy_block OF((deflate_state *s, charf *buf, unsigned len, | |||
159 | local void gen_trees_header OF((void)); | 159 | local void gen_trees_header OF((void)); |
160 | #endif | 160 | #endif |
161 | 161 | ||
162 | #ifndef DEBUG | 162 | #ifndef ZLIB_DEBUG |
163 | # define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) | 163 | # define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) |
164 | /* Send a code of the given tree. c and tree must not have side effects */ | 164 | /* Send a code of the given tree. c and tree must not have side effects */ |
165 | 165 | ||
166 | #else /* DEBUG */ | 166 | #else /* !ZLIB_DEBUG */ |
167 | # define send_code(s, c, tree) \ | 167 | # define send_code(s, c, tree) \ |
168 | { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ | 168 | { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ |
169 | send_bits(s, tree[c].Code, tree[c].Len); } | 169 | send_bits(s, tree[c].Code, tree[c].Len); } |
@@ -182,7 +182,7 @@ local void gen_trees_header OF((void)); | |||
182 | * Send a value on a given number of bits. | 182 | * Send a value on a given number of bits. |
183 | * IN assertion: length <= 16 and value fits in length bits. | 183 | * IN assertion: length <= 16 and value fits in length bits. |
184 | */ | 184 | */ |
185 | #ifdef DEBUG | 185 | #ifdef ZLIB_DEBUG |
186 | local void send_bits OF((deflate_state *s, int value, int length)); | 186 | local void send_bits OF((deflate_state *s, int value, int length)); |
187 | 187 | ||
188 | local void send_bits(s, value, length) | 188 | local void send_bits(s, value, length) |
@@ -208,7 +208,7 @@ local void send_bits(s, value, length) | |||
208 | s->bi_valid += length; | 208 | s->bi_valid += length; |
209 | } | 209 | } |
210 | } | 210 | } |
211 | #else /* !DEBUG */ | 211 | #else /* !ZLIB_DEBUG */ |
212 | 212 | ||
213 | #define send_bits(s, value, length) \ | 213 | #define send_bits(s, value, length) \ |
214 | { int len = length;\ | 214 | { int len = length;\ |
@@ -223,7 +223,7 @@ local void send_bits(s, value, length) | |||
223 | s->bi_valid += len;\ | 223 | s->bi_valid += len;\ |
224 | }\ | 224 | }\ |
225 | } | 225 | } |
226 | #endif /* DEBUG */ | 226 | #endif /* ZLIB_DEBUG */ |
227 | 227 | ||
228 | 228 | ||
229 | /* the arguments must not have side effects */ | 229 | /* the arguments must not have side effects */ |
@@ -317,7 +317,7 @@ local void tr_static_init() | |||
317 | * Genererate the file trees.h describing the static trees. | 317 | * Genererate the file trees.h describing the static trees. |
318 | */ | 318 | */ |
319 | #ifdef GEN_TREES_H | 319 | #ifdef GEN_TREES_H |
320 | # ifndef DEBUG | 320 | # ifndef ZLIB_DEBUG |
321 | # include <stdio.h> | 321 | # include <stdio.h> |
322 | # endif | 322 | # endif |
323 | 323 | ||
@@ -394,7 +394,7 @@ void ZLIB_INTERNAL _tr_init(s) | |||
394 | 394 | ||
395 | s->bi_buf = 0; | 395 | s->bi_buf = 0; |
396 | s->bi_valid = 0; | 396 | s->bi_valid = 0; |
397 | #ifdef DEBUG | 397 | #ifdef ZLIB_DEBUG |
398 | s->compressed_len = 0L; | 398 | s->compressed_len = 0L; |
399 | s->bits_sent = 0L; | 399 | s->bits_sent = 0L; |
400 | #endif | 400 | #endif |
@@ -869,7 +869,7 @@ void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last) | |||
869 | int last; /* one if this is the last block for a file */ | 869 | int last; /* one if this is the last block for a file */ |
870 | { | 870 | { |
871 | send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ | 871 | send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ |
872 | #ifdef DEBUG | 872 | #ifdef ZLIB_DEBUG |
873 | s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; | 873 | s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; |
874 | s->compressed_len += (stored_len + 4) << 3; | 874 | s->compressed_len += (stored_len + 4) << 3; |
875 | #endif | 875 | #endif |
@@ -894,7 +894,7 @@ void ZLIB_INTERNAL _tr_align(s) | |||
894 | { | 894 | { |
895 | send_bits(s, STATIC_TREES<<1, 3); | 895 | send_bits(s, STATIC_TREES<<1, 3); |
896 | send_code(s, END_BLOCK, static_ltree); | 896 | send_code(s, END_BLOCK, static_ltree); |
897 | #ifdef DEBUG | 897 | #ifdef ZLIB_DEBUG |
898 | s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ | 898 | s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ |
899 | #endif | 899 | #endif |
900 | bi_flush(s); | 900 | bi_flush(s); |
@@ -974,7 +974,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) | |||
974 | send_bits(s, (STATIC_TREES<<1)+last, 3); | 974 | send_bits(s, (STATIC_TREES<<1)+last, 3); |
975 | compress_block(s, (const ct_data *)static_ltree, | 975 | compress_block(s, (const ct_data *)static_ltree, |
976 | (const ct_data *)static_dtree); | 976 | (const ct_data *)static_dtree); |
977 | #ifdef DEBUG | 977 | #ifdef ZLIB_DEBUG |
978 | s->compressed_len += 3 + s->static_len; | 978 | s->compressed_len += 3 + s->static_len; |
979 | #endif | 979 | #endif |
980 | } else { | 980 | } else { |
@@ -983,7 +983,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) | |||
983 | max_blindex+1); | 983 | max_blindex+1); |
984 | compress_block(s, (const ct_data *)s->dyn_ltree, | 984 | compress_block(s, (const ct_data *)s->dyn_ltree, |
985 | (const ct_data *)s->dyn_dtree); | 985 | (const ct_data *)s->dyn_dtree); |
986 | #ifdef DEBUG | 986 | #ifdef ZLIB_DEBUG |
987 | s->compressed_len += 3 + s->opt_len; | 987 | s->compressed_len += 3 + s->opt_len; |
988 | #endif | 988 | #endif |
989 | } | 989 | } |
@@ -995,7 +995,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last) | |||
995 | 995 | ||
996 | if (last) { | 996 | if (last) { |
997 | bi_windup(s); | 997 | bi_windup(s); |
998 | #ifdef DEBUG | 998 | #ifdef ZLIB_DEBUG |
999 | s->compressed_len += 7; /* align on byte boundary */ | 999 | s->compressed_len += 7; /* align on byte boundary */ |
1000 | #endif | 1000 | #endif |
1001 | } | 1001 | } |
@@ -1193,7 +1193,7 @@ local void bi_windup(s) | |||
1193 | } | 1193 | } |
1194 | s->bi_buf = 0; | 1194 | s->bi_buf = 0; |
1195 | s->bi_valid = 0; | 1195 | s->bi_valid = 0; |
1196 | #ifdef DEBUG | 1196 | #ifdef ZLIB_DEBUG |
1197 | s->bits_sent = (s->bits_sent+7) & ~7; | 1197 | s->bits_sent = (s->bits_sent+7) & ~7; |
1198 | #endif | 1198 | #endif |
1199 | } | 1199 | } |
@@ -1213,11 +1213,11 @@ local void copy_block(s, buf, len, header) | |||
1213 | if (header) { | 1213 | if (header) { |
1214 | put_short(s, (ush)len); | 1214 | put_short(s, (ush)len); |
1215 | put_short(s, (ush)~len); | 1215 | put_short(s, (ush)~len); |
1216 | #ifdef DEBUG | 1216 | #ifdef ZLIB_DEBUG |
1217 | s->bits_sent += 2*16; | 1217 | s->bits_sent += 2*16; |
1218 | #endif | 1218 | #endif |
1219 | } | 1219 | } |
1220 | #ifdef DEBUG | 1220 | #ifdef ZLIB_DEBUG |
1221 | s->bits_sent += (ulg)len<<3; | 1221 | s->bits_sent += (ulg)len<<3; |
1222 | #endif | 1222 | #endif |
1223 | while (len--) { | 1223 | while (len--) { |
diff --git a/win32/Makefile.gcc b/win32/Makefile.gcc index 6d1ded6..305be50 100644 --- a/win32/Makefile.gcc +++ b/win32/Makefile.gcc | |||
@@ -39,7 +39,7 @@ IMPLIB = libz.dll.a | |||
39 | SHARED_MODE=0 | 39 | SHARED_MODE=0 |
40 | 40 | ||
41 | #LOC = -DASMV | 41 | #LOC = -DASMV |
42 | #LOC = -DDEBUG -g | 42 | #LOC = -DZLIB_DEBUG -g |
43 | 43 | ||
44 | PREFIX = | 44 | PREFIX = |
45 | CC = $(PREFIX)gcc | 45 | CC = $(PREFIX)gcc |
@@ -1122,7 +1122,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); | |||
1122 | 7.6: size of z_off_t | 1122 | 7.6: size of z_off_t |
1123 | 1123 | ||
1124 | Compiler, assembler, and debug options: | 1124 | Compiler, assembler, and debug options: |
1125 | 8: DEBUG | 1125 | 8: ZLIB_DEBUG |
1126 | 9: ASMV or ASMINF -- use ASM code | 1126 | 9: ASMV or ASMINF -- use ASM code |
1127 | 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention | 1127 | 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention |
1128 | 11: 0 (reserved) | 1128 | 11: 0 (reserved) |
@@ -61,7 +61,7 @@ uLong ZEXPORT zlibCompileFlags() | |||
61 | case 8: flags += 2 << 6; break; | 61 | case 8: flags += 2 << 6; break; |
62 | default: flags += 3 << 6; | 62 | default: flags += 3 << 6; |
63 | } | 63 | } |
64 | #ifdef DEBUG | 64 | #ifdef ZLIB_DEBUG |
65 | flags += 1 << 8; | 65 | flags += 1 << 8; |
66 | #endif | 66 | #endif |
67 | #if defined(ASMV) || defined(ASMINF) | 67 | #if defined(ASMV) || defined(ASMINF) |
@@ -115,7 +115,7 @@ uLong ZEXPORT zlibCompileFlags() | |||
115 | return flags; | 115 | return flags; |
116 | } | 116 | } |
117 | 117 | ||
118 | #ifdef DEBUG | 118 | #ifdef ZLIB_DEBUG |
119 | 119 | ||
120 | # ifndef verbose | 120 | # ifndef verbose |
121 | # define verbose 0 | 121 | # define verbose 0 |
@@ -216,7 +216,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ | |||
216 | #endif | 216 | #endif |
217 | 217 | ||
218 | /* Diagnostic functions */ | 218 | /* Diagnostic functions */ |
219 | #ifdef DEBUG | 219 | #ifdef ZLIB_DEBUG |
220 | # include <stdio.h> | 220 | # include <stdio.h> |
221 | extern int ZLIB_INTERNAL z_verbose; | 221 | extern int ZLIB_INTERNAL z_verbose; |
222 | extern void ZLIB_INTERNAL z_error OF((char *m)); | 222 | extern void ZLIB_INTERNAL z_error OF((char *m)); |