zlib patch for DEBUG pre-processor

Patch as described on zlib:
https://github.com/madler/zlib/pull/80
This commit is contained in:
Daniel Rosser
2014-10-06 14:37:39 +11:00
parent fb2eba8eac
commit 7d413184e6
11 changed files with 41 additions and 41 deletions

View File

@@ -93,7 +93,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 ZLIB_DEBUG
local void check_match OF((deflate_state *s, IPos start, IPos match,
int length));
#endif
@@ -1225,7 +1225,7 @@ local uInt longest_match_fast(s, cur_match)
return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
}
#ifdef DEBUG
#ifdef ZLIB_DEBUG
/* ===========================================================================
* Check that the match at match_start is indeed a match.
*/

View File

@@ -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 ZLIB_DEBUG
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
@@ -294,7 +294,7 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
* used.
*/
#ifndef DEBUG
#ifndef ZLIB_DEBUG
/* Inline versions of _tr_tally for speed: */
#if defined(GEN_TREES_H) || !defined(STDC)

View File

@@ -238,7 +238,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif
/* Diagnostic functions */
#ifdef DEBUG
#ifdef ZLIB_DEBUG
# include <stdio.h>
extern int z_verbose;
extern void z_error OF((char *m));