summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-07-06 14:16:15 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-07-06 14:16:15 -0700
commit62926623081dd71e8cb4803375b70191df5592fe (patch)
tree46086ae36f74a7d3bdbd49e8541bd65b92966ad0
parent553ce5ef0813222dba2afd220114d00ff5a20d47 (diff)
downloadsyslinux-62926623081dd71e8cb4803375b70191df5592fe.tar.gz
zlib: rename DEBUG to DEBUG_ZLIB again
We don't want to use the global DEBUG for zlib... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--com32/lib/zlib/deflate.c6
-rw-r--r--com32/lib/zlib/deflate.h4
-rw-r--r--com32/lib/zlib/trees.c34
-rw-r--r--com32/lib/zlib/zutil.c4
-rw-r--r--com32/lib/zlib/zutil.h4
5 files changed, 26 insertions, 26 deletions
diff --git a/com32/lib/zlib/deflate.c b/com32/lib/zlib/deflate.c
index 5c4022f3..1a375634 100644
--- a/com32/lib/zlib/deflate.c
+++ b/com32/lib/zlib/deflate.c
@@ -92,7 +92,7 @@ local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
local uInt longest_match OF((deflate_state *s, IPos cur_match));
#endif
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
local void check_match OF((deflate_state *s, IPos start, IPos match,
int length));
#endif
@@ -1264,7 +1264,7 @@ local uInt longest_match(s, cur_match)
#endif /* FASTEST */
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
/* ===========================================================================
* Check that the match at match_start is indeed a match.
*/
@@ -1290,7 +1290,7 @@ local void check_match(s, start, match, length)
}
#else
# define check_match(s, start, match, length)
-#endif /* DEBUG */
+#endif /* DEBUG_ZLIB */
/* ===========================================================================
* Fill the window when the lookahead becomes insufficient.
diff --git a/com32/lib/zlib/deflate.h b/com32/lib/zlib/deflate.h
index cbf0d1ea..09cf4c49 100644
--- a/com32/lib/zlib/deflate.h
+++ b/com32/lib/zlib/deflate.h
@@ -246,7 +246,7 @@ typedef struct internal_state {
uInt matches; /* number of string matches in current block */
int last_eob_len; /* bit length of EOB code for last block */
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
ulg compressed_len; /* total bit length of compressed file mod 2^32 */
ulg bits_sent; /* bit length of compressed data sent mod 2^32 */
#endif
@@ -305,7 +305,7 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
* used.
*/
-#ifndef DEBUG
+#ifndef DEBUG_ZLIB
/* Inline versions of _tr_tally for speed: */
#if defined(GEN_TREES_H) || !defined(STDC)
diff --git a/com32/lib/zlib/trees.c b/com32/lib/zlib/trees.c
index 56e9bb1c..d1de3cd0 100644
--- a/com32/lib/zlib/trees.c
+++ b/com32/lib/zlib/trees.c
@@ -36,7 +36,7 @@
#include "deflate.h"
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
# include <ctype.h>
#endif
@@ -164,11 +164,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); }
@@ -187,7 +187,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)
@@ -213,7 +213,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;\
@@ -228,7 +228,7 @@ local void send_bits(s, value, length)
s->bi_valid += len;\
}\
}
-#endif /* DEBUG */
+#endif /* DEBUG_ZLIB */
/* the arguments must not have side effects */
@@ -322,7 +322,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
@@ -400,7 +400,7 @@ void ZLIB_INTERNAL _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
@@ -875,7 +875,7 @@ void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
int last; /* one if this is the last block for a file */
{
send_bits(s, (STORED_BLOCK<<1)+last, 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
@@ -898,7 +898,7 @@ void ZLIB_INTERNAL _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);
@@ -910,7 +910,7 @@ void ZLIB_INTERNAL _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);
@@ -991,7 +991,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
#endif
send_bits(s, (STATIC_TREES<<1)+last, 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 {
@@ -999,7 +999,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
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
}
@@ -1011,7 +1011,7 @@ void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
if (last) {
bi_windup(s);
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
s->compressed_len += 7; /* align on byte boundary */
#endif
}
@@ -1210,7 +1210,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
}
@@ -1231,11 +1231,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--) {
diff --git a/com32/lib/zlib/zutil.c b/com32/lib/zlib/zutil.c
index 898ed345..3ce89769 100644
--- a/com32/lib/zlib/zutil.c
+++ b/com32/lib/zlib/zutil.c
@@ -58,7 +58,7 @@ uLong ZEXPORT zlibCompileFlags()
case 8: flags += 2 << 6; break;
default: flags += 3 << 6;
}
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
flags += 1 << 8;
#endif
#if defined(ASMV) || defined(ASMINF)
@@ -112,7 +112,7 @@ uLong ZEXPORT zlibCompileFlags()
return flags;
}
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
# ifndef verbose
# define verbose 0
diff --git a/com32/lib/zlib/zutil.h b/com32/lib/zlib/zutil.h
index 258fa887..ac2d73e8 100644
--- a/com32/lib/zlib/zutil.h
+++ b/com32/lib/zlib/zutil.h
@@ -242,10 +242,10 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif
/* Diagnostic functions */
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
# include <stdio.h>
extern int ZLIB_INTERNAL z_verbose;
- extern void ZLIB_INTERNAL z_error OF((char *m));
+ extern void ZLIB_INTERNAL z_error OF((const char *m));
# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
# define Trace(x) {if (z_verbose>=0) fprintf x ;}
# define Tracev(x) {if (z_verbose>0) fprintf x ;}