#include <string.h>
#include <stdlib.h>
#include <inttypes.h>
+#include <stdint.h>
#define TESTFILE "foo.gz"
CHECK_ERR(err, "inflateEnd");
if (d_stream.total_out != 2*uncomprLen + diff) {
- fprintf(stderr, "bad large inflate: %zu\n", d_stream.total_out);
+ fprintf(stderr, "bad large inflate: %" PRIu64 "\n", (uint64_t)d_stream.total_out);
exit(1);
} else {
printf("large_inflate(): OK\n");
CHECK_ERR(err, "inflateEnd");
if (d_stream.total_out != 2 * uncomprLen + diff) {
- fprintf(stderr, "bad large inflate: %zu\n", d_stream.total_out);
+ fprintf(stderr, "bad large inflate: %" PRIu64 "\n", (uint64_t)d_stream.total_out);
exit(1);
}
}
#include <string.h>
#undef NDEBUG
#include <assert.h>
+#include <inttypes.h>
+#include <stdint.h>
/* get definition of internal structure so we can mess with it (see pull()),
and so we can call inflate_trees() (see cover5()) */
static void mem_used(PREFIX3(stream) *strm, char *prefix) {
struct mem_zone *zone = strm->opaque;
- fprintf(stderr, "%s: %zu allocated\n", prefix, zone->total);
+ fprintf(stderr, "%s: %" PRIu64 " allocated\n", prefix, (uint64_t)zone->total);
}
/* show the high water allocation in bytes */
static void mem_high(PREFIX3(stream) *strm, char *prefix) {
struct mem_zone *zone = strm->opaque;
- fprintf(stderr, "%s: %zu high water mark\n", prefix, zone->highwater);
+ fprintf(stderr, "%s: %" PRIu64 " high water mark\n", prefix, (uint64_t)zone->highwater);
}
/* release the memory allocation zone -- if there are any surprises, notify */
/* issue alerts about anything unexpected */
if (count || zone->total)
- fprintf(stderr, "** %s: %zu bytes in %d blocks not freed\n",
- prefix, zone->total, count);
+ fprintf(stderr, "** %s: %" PRIu64 " bytes in %d blocks not freed\n",
+ prefix, (uint64_t)zone->total, count);
if (zone->notlifo)
fprintf(stderr, "** %s: %d frees not LIFO\n", prefix, zone->notlifo);
if (zone->rogue)
#ifdef ZLIB_DEBUG
# include <ctype.h>
+# include <inttypes.h>
+# include <stdint.h>
#endif
+
/* trees.h */
extern ZLIB_INTERNAL const ct_data static_ltree[L_CODES+2];
extern ZLIB_INTERNAL const ct_data static_dtree[D_CODES];
send_code(s, END_BLOCK, ltree, bi_buf, bi_valid);
s->bi_valid = bi_valid;
s->bi_buf = bi_buf;
- Tracev((stderr, "\n+++ Emit End Block: Last: %u Pending: %u Total Out: %zu\n",
- last, s->pending, s->strm->total_out));
+ Tracev((stderr, "\n+++ Emit End Block: Last: %u Pending: %u Total Out: %" PRIu64 "\n",
+ last, s->pending, (uint64_t)s->strm->total_out));
(void)last;
}