[syslinux:master] zlib: change DEBUG to DEBUG_ZLIB

syslinux-bot for H. Peter Anvin hpa at linux.intel.com
Thu Jul 1 18:06:18 PDT 2010


Commit-ID:  d6799b6b04f50c6b67358f7afbcd46912fdca83a
Gitweb:     http://syslinux.zytor.com/commit/d6799b6b04f50c6b67358f7afbcd46912fdca83a
Author:     H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Thu, 1 Jul 2010 18:03:01 -0700
Committer:  H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Thu, 1 Jul 2010 18:03:01 -0700

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 at linux.intel.com>


---
 com32/lib/zlib/deflate.c |    6 +++---
 com32/lib/zlib/deflate.h |    4 ++--
 com32/lib/zlib/trees.c   |   34 +++++++++++++++++-----------------
 com32/lib/zlib/zutil.c   |    4 ++--
 com32/lib/zlib/zutil.h   |    2 +-
 5 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/com32/lib/zlib/deflate.c b/com32/lib/zlib/deflate.c
index feb1d16..b66cb98 100644
--- a/com32/lib/zlib/deflate.c
+++ b/com32/lib/zlib/deflate.c
@@ -92,7 +92,7 @@ local uInt longest_match  OF((deflate_state *s, IPos cur_match));
 #endif
 local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
 
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
 local  void check_match OF((deflate_state *s, IPos start, IPos match,
                             int length));
 #endif
@@ -1052,7 +1052,7 @@ local uInt longest_match_fast(s, cur_match)
     return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
 }
 
-#ifdef DEBUG
+#ifdef DEBUG_ZLIB
 /* ===========================================================================
  * Check that the match at match_start is indeed a match.
  */
@@ -1078,7 +1078,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 e83ed28..ea8d9ef 100644
--- a/com32/lib/zlib/deflate.h
+++ b/com32/lib/zlib/deflate.h
@@ -240,7 +240,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
@@ -288,7 +288,7 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
  * 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 668ed68..cf8377c 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--) {
diff --git a/com32/lib/zlib/zutil.c b/com32/lib/zlib/zutil.c
index 1965406..d692e05 100644
--- a/com32/lib/zlib/zutil.c
+++ b/com32/lib/zlib/zutil.c
@@ -61,7 +61,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)
@@ -115,7 +115,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 483dc26..b85cec1 100644
--- a/com32/lib/zlib/zutil.h
+++ b/com32/lib/zlib/zutil.h
@@ -226,7 +226,7 @@ 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 z_verbose;
    extern void z_error    OF((char *m));



More information about the Syslinux-commits mailing list