summaryrefslogtreecommitdiff
path: root/com32/lib/zlib/trees.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-07-01 18:03:01 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-07-01 18:03:01 -0700
commitd6799b6b04f50c6b67358f7afbcd46912fdca83a (patch)
treef6c2b468801f7ae94ff1b9c798c814f969f0c3a3 /com32/lib/zlib/trees.c
parent20ea30320a6195b7cba950b8bdbbb8289560a646 (diff)
downloadsyslinux-d6799b6b04f50c6b67358f7afbcd46912fdca83a.tar.gz
zlib: change DEBUG to DEBUG_ZLIB
zlib uses DEBUG for something slightly different than the Syslinux main code, so change the name of the symbol. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'com32/lib/zlib/trees.c')
-rw-r--r--com32/lib/zlib/trees.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/com32/lib/zlib/trees.c b/com32/lib/zlib/trees.c
index 668ed68a..cf8377c9 100644
--- a/com32/lib/zlib/trees.c
+++ b/com32/lib/zlib/trees.c
@@ -34,7 +34,7 @@
#include "deflate.h"
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
# include <ctype.h>
#endif
@@ -162,11 +162,11 @@ local void copy_block OF((deflate_state *s, charf *buf, unsigned len,
local void gen_trees_header OF((void));
#endif
-#ifndef DEBUG
+#ifndef DEBUG_ZLIB
# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len)
/* Send a code of the given tree. c and tree must not have side effects */
-#else /* DEBUG */
+#else /* DEBUG_ZLIB */
# define send_code(s, c, tree) \
{ if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
send_bits(s, tree[c].Code, tree[c].Len); }
@@ -185,7 +185,7 @@ local void gen_trees_header OF((void));
* Send a value on a given number of bits.
* IN assertion: length <= 16 and value fits in length bits.
*/
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
local void send_bits OF((deflate_state *s, int value, int length));
local void send_bits(s, value, length)
@@ -211,7 +211,7 @@ local void send_bits(s, value, length)
s->bi_valid += length;
}
}
-#else /* !DEBUG */
+#else /* !DEBUG_ZLIB */
#define send_bits(s, value, length) \
{ int len = length;\
@@ -226,7 +226,7 @@ local void send_bits(s, value, length)
s->bi_valid += len;\
}\
}
-#endif /* DEBUG */
+#endif /* DEBUG_ZLIB */
/* the arguments must not have side effects */
@@ -318,7 +318,7 @@ local void tr_static_init()
* Genererate the file trees.h describing the static trees.
*/
#ifdef GEN_TREES_H
-# ifndef DEBUG
+# ifndef DEBUG_ZLIB
# include <stdio.h>
# endif
@@ -395,7 +395,7 @@ void _tr_init(s)
s->bi_buf = 0;
s->bi_valid = 0;
s->last_eob_len = 8; /* enough lookahead for inflate */
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->compressed_len = 0L;
s->bits_sent = 0L;
#endif
@@ -870,7 +870,7 @@ void _tr_stored_block(s, buf, stored_len, eof)
int eof; /* true if this is the last block for a file */
{
send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
s->compressed_len += (stored_len + 4) << 3;
#endif
@@ -893,7 +893,7 @@ void _tr_align(s)
{
send_bits(s, STATIC_TREES<<1, 3);
send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
#endif
bi_flush(s);
@@ -905,7 +905,7 @@ void _tr_align(s)
if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
send_bits(s, STATIC_TREES<<1, 3);
send_code(s, END_BLOCK, static_ltree);
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->compressed_len += 10L;
#endif
bi_flush(s);
@@ -985,7 +985,7 @@ void _tr_flush_block(s, buf, stored_len, eof)
#endif
send_bits(s, (STATIC_TREES<<1)+eof, 3);
compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->compressed_len += 3 + s->static_len;
#endif
} else {
@@ -993,7 +993,7 @@ void _tr_flush_block(s, buf, stored_len, eof)
send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
max_blindex+1);
compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->compressed_len += 3 + s->opt_len;
#endif
}
@@ -1005,7 +1005,7 @@ void _tr_flush_block(s, buf, stored_len, eof)
if (eof) {
bi_windup(s);
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->compressed_len += 7; /* align on byte boundary */
#endif
}
@@ -1180,7 +1180,7 @@ local void bi_windup(s)
}
s->bi_buf = 0;
s->bi_valid = 0;
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->bits_sent = (s->bits_sent+7) & ~7;
#endif
}
@@ -1201,11 +1201,11 @@ local void copy_block(s, buf, len, header)
if (header) {
put_short(s, (ush)len);
put_short(s, (ush)~len);
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->bits_sent += 2*16;
#endif
}
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->bits_sent += (ulg)len<<3;
#endif
while (len--) {