#include "deflate.h"
-#ifdef DEBUG
+#ifdef __WXDEBUG__
# include <ctype.h>
#endif
local void gen_trees_header OF((void));
#endif
-#ifndef DEBUG
+#ifndef __WXDEBUG__
# 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 /* __WXDEBUG__ */
# define send_code(s, c, tree) \
{ if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \
send_bits(s, tree[c].Code, tree[c].Len); }
* Send a value on a given number of bits.
* IN assertion: length <= 16 and value fits in length bits.
*/
-#ifdef DEBUG
+#ifdef __WXDEBUG__
local void send_bits OF((deflate_state *s, int value, int length));
local void send_bits(s, value, length)
s->bi_valid += length;
}
}
-#else /* !DEBUG */
+#else /* !__WXDEBUG__ */
#define send_bits(s, value, length) \
{ int len = length;\
s->bi_valid += len;\
}\
}
-#endif /* DEBUG */
+#endif /* __WXDEBUG__ */
#define MAX(a,b) (a >= b ? a : b)
* Genererate the file trees.h describing the static trees.
*/
#ifdef GEN_TREES_H
-# ifndef DEBUG
+# ifndef __WXDEBUG__
# include <stdio.h>
# endif
s->bi_buf = 0;
s->bi_valid = 0;
s->last_eob_len = 8; /* enough lookahead for inflate */
-#ifdef DEBUG
+#ifdef __WXDEBUG__
s->bits_sent = 0L;
#endif
/* Check that the bit counts in bl_count are consistent. The last code
* must be all ones.
*/
- Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
+ Assert (code + bl_count[MAX_BITS]-1 == (ush)(1<<MAX_BITS)-(ush)1,
"inconsistent bit counts");
Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
} /* literal or match pair ? */
/* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
- Assert(s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow");
+ Assert((unsigned)s->pending < s->lit_bufsize + 2*lx, "pendingBuf overflow");
} while (lx < s->last_lit);
}
s->bi_buf = 0;
s->bi_valid = 0;
-#ifdef DEBUG
+#ifdef __WXDEBUG__
s->bits_sent = (s->bits_sent+7) & ~7;
#endif
}
if (header) {
put_short(s, (ush)len);
put_short(s, (ush)~len);
-#ifdef DEBUG
+#ifdef __WXDEBUG__
s->bits_sent += 2*16;
#endif
}
-#ifdef DEBUG
+#ifdef __WXDEBUG__
s->bits_sent += (ulg)len<<3;
#endif
while (len--) {