diff --git a/common/dist/zlib/deflate.c b/common/dist/zlib/deflate.c index 93e973ff5d48..9e292a1b1b0f 100644 --- a/common/dist/zlib/deflate.c +++ b/common/dist/zlib/deflate.c @@ -1,4 +1,4 @@ -/* $NetBSD: deflate.c,v 1.1.1.1 2006/01/14 20:10:26 christos Exp $ */ +/* $NetBSD: deflate.c,v 1.2 2006/01/16 17:02:29 christos Exp $ */ /* deflate.c -- compress data using the deflation algorithm * Copyright (C) 1995-2005 Jean-loup Gailly. @@ -95,7 +95,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 @@ -1227,7 +1227,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. */ @@ -1253,7 +1253,7 @@ local void check_match(s, start, match, length) } #else # define check_match(s, start, match, length) -#endif /* DEBUG */ +#endif /* ZLIB_DEBUG */ /* =========================================================================== * Fill the window when the lookahead becomes insufficient. diff --git a/common/dist/zlib/deflate.h b/common/dist/zlib/deflate.h index 88f88620877a..14c056e21757 100644 --- a/common/dist/zlib/deflate.h +++ b/common/dist/zlib/deflate.h @@ -1,4 +1,4 @@ -/* $NetBSD: deflate.h,v 1.1.1.1 2006/01/14 20:10:28 christos Exp $ */ +/* $NetBSD: deflate.h,v 1.2 2006/01/16 17:02:29 christos Exp $ */ /* deflate.h -- internal compression state * Copyright (C) 1995-2004 Jean-loup Gailly @@ -248,7 +248,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 @@ -296,7 +296,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) diff --git a/common/dist/zlib/trees.c b/common/dist/zlib/trees.c index 8baaec3b61f7..bf5ce043b16c 100644 --- a/common/dist/zlib/trees.c +++ b/common/dist/zlib/trees.c @@ -1,4 +1,4 @@ -/* $NetBSD: trees.c,v 1.1.1.1 2006/01/14 20:10:33 christos Exp $ */ +/* $NetBSD: trees.c,v 1.2 2006/01/16 17:02:29 christos Exp $ */ /* trees.c -- output deflated data using Huffman coding * Copyright (C) 1995-2005 Jean-loup Gailly @@ -37,7 +37,7 @@ #include "deflate.h" -#ifdef DEBUG +#ifdef ZLIB_DEBUG # include #endif @@ -165,11 +165,11 @@ local void copy_block OF((deflate_state *s, charf *buf, unsigned len, local void gen_trees_header OF((void)); #endif -#ifndef DEBUG +#ifndef ZLIB_DEBUG # 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 /* ZLIB_DEBUG */ # define send_code(s, c, tree) \ { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ send_bits(s, tree[c].Code, tree[c].Len); } @@ -188,7 +188,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 ZLIB_DEBUG local void send_bits OF((deflate_state *s, int value, int length)); local void send_bits(s, value, length) @@ -214,7 +214,7 @@ local void send_bits(s, value, length) s->bi_valid += length; } } -#else /* !DEBUG */ +#else /* !ZLIB_DEBUG */ #define send_bits(s, value, length) \ { int len = length;\ @@ -229,7 +229,7 @@ local void send_bits(s, value, length) s->bi_valid += len;\ }\ } -#endif /* DEBUG */ +#endif /* ZLIB_DEBUG */ /* the arguments must not have side effects */ @@ -321,7 +321,7 @@ local void tr_static_init() * Genererate the file trees.h describing the static trees. */ #ifdef GEN_TREES_H -# ifndef DEBUG +# ifndef ZLIB_DEBUG # include # endif @@ -398,7 +398,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 ZLIB_DEBUG s->compressed_len = 0L; s->bits_sent = 0L; #endif @@ -873,7 +873,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 ZLIB_DEBUG s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; s->compressed_len += (stored_len + 4) << 3; #endif @@ -896,7 +896,7 @@ void _tr_align(s) { send_bits(s, STATIC_TREES<<1, 3); send_code(s, END_BLOCK, static_ltree); -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ #endif bi_flush(s); @@ -908,7 +908,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 ZLIB_DEBUG s->compressed_len += 10L; #endif bi_flush(s); @@ -989,7 +989,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 ZLIB_DEBUG s->compressed_len += 3 + s->static_len; #endif } else { @@ -997,7 +997,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 ZLIB_DEBUG s->compressed_len += 3 + s->opt_len; #endif } @@ -1009,7 +1009,7 @@ void _tr_flush_block(s, buf, stored_len, eof) if (eof) { bi_windup(s); -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->compressed_len += 7; /* align on byte boundary */ #endif } @@ -1187,7 +1187,7 @@ local void bi_windup(s) } s->bi_buf = 0; s->bi_valid = 0; -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->bits_sent = (s->bits_sent+7) & ~7; #endif } @@ -1208,11 +1208,11 @@ local void copy_block(s, buf, len, header) if (header) { put_short(s, (ush)len); put_short(s, (ush)~len); -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->bits_sent += 2*16; #endif } -#ifdef DEBUG +#ifdef ZLIB_DEBUG s->bits_sent += (ulg)len<<3; #endif while (len--) { diff --git a/common/dist/zlib/zlib.h b/common/dist/zlib/zlib.h index a922539bfd4f..8f5f47c65bea 100644 --- a/common/dist/zlib/zlib.h +++ b/common/dist/zlib/zlib.h @@ -1,4 +1,4 @@ -/* $NetBSD: zlib.h,v 1.1.1.1 2006/01/14 20:10:42 christos Exp $ */ +/* $NetBSD: zlib.h,v 1.2 2006/01/16 17:02:29 christos Exp $ */ /* zlib.h -- interface of the 'zlib' general purpose compression library version 1.2.3, July 18th, 2005 @@ -966,7 +966,7 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); 7.6: size of z_off_t Compiler, assembler, and debug options: - 8: DEBUG + 8: ZLIB_DEBUG 9: ASMV or ASMINF -- use ASM code 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention 11: 0 (reserved) diff --git a/common/dist/zlib/zutil.c b/common/dist/zlib/zutil.c index 7f6ee362adfd..41507d6b8532 100644 --- a/common/dist/zlib/zutil.c +++ b/common/dist/zlib/zutil.c @@ -1,4 +1,4 @@ -/* $NetBSD: zutil.c,v 1.1.1.1 2006/01/14 20:10:34 christos Exp $ */ +/* $NetBSD: zutil.c,v 1.2 2006/01/16 17:02:29 christos Exp $ */ /* zutil.c -- target dependent utility functions for the compression library * Copyright (C) 1995-2005 Jean-loup Gailly. @@ -60,7 +60,7 @@ uLong ZEXPORT zlibCompileFlags() case 8: flags += 2 << 6; break; default: flags += 3 << 6; } -#ifdef DEBUG +#ifdef ZLIB_DEBUG flags += 1 << 8; #endif #if defined(ASMV) || defined(ASMINF) @@ -114,7 +114,7 @@ uLong ZEXPORT zlibCompileFlags() return flags; } -#ifdef DEBUG +#ifdef ZLIB_DEBUG # ifndef verbose # define verbose 0 diff --git a/common/dist/zlib/zutil.h b/common/dist/zlib/zutil.h index b58659f66681..d468581ecb83 100644 --- a/common/dist/zlib/zutil.h +++ b/common/dist/zlib/zutil.h @@ -1,4 +1,4 @@ -/* $NetBSD: zutil.h,v 1.2 2006/01/14 20:28:58 christos Exp $ */ +/* $NetBSD: zutil.h,v 1.3 2006/01/16 17:02:29 christos Exp $ */ /* zutil.h -- internal interface and configuration of the compression library * Copyright (C) 1995-2005 Jean-loup Gailly. @@ -247,7 +247,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ #endif /* Diagnostic functions */ -#ifdef DEBUG +#if defined(ZLIB_DEBUG) && !(defined(_KERNEL) || defined(_STANDALONE)) # include extern int z_verbose; extern void z_error OF((char *m));