From 2291346f0cccf88e605d84b75c9c5aaaaddb5df8 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 14 Nov 2009 19:45:39 +0200 Subject: Update the debug programs so that they compile again. --- debug/crc32.c | 1 + debug/memusage.c | 6 ++++-- debug/sync_flush.c | 14 +++++++++----- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/debug/crc32.c b/debug/crc32.c index 0fe46511..e545a3cc 100644 --- a/debug/crc32.c +++ b/debug/crc32.c @@ -11,6 +11,7 @@ /////////////////////////////////////////////////////////////////////////////// #include "sysdefs.h" +#include "lzma.h" #include diff --git a/debug/memusage.c b/debug/memusage.c index 93fe0b2c..bd72b5a2 100644 --- a/debug/memusage.c +++ b/debug/memusage.c @@ -42,8 +42,10 @@ main(void) { UINT64_MAX, NULL } }; - printf("Encoder: %10" PRIu64 " B\n", lzma_memusage_encoder(filters)); - printf("Decoder: %10" PRIu64 " B\n", lzma_memusage_decoder(filters)); + printf("Encoder: %10" PRIu64 " B\n", + lzma_raw_encoder_memusage(filters)); + printf("Decoder: %10" PRIu64 " B\n", + lzma_raw_decoder_memusage(filters)); return 0; } diff --git a/debug/sync_flush.c b/debug/sync_flush.c index 1dccbdaa..4a31efdd 100644 --- a/debug/sync_flush.c +++ b/debug/sync_flush.c @@ -71,7 +71,6 @@ main(int argc, char **argv) .lp = LZMA_LP_DEFAULT, .pb = LZMA_PB_DEFAULT, .preset_dict = NULL, - .persistent = true, .mode = LZMA_MODE_NORMAL, .nice_len = 32, .mf = LZMA_MF_HC3, @@ -106,20 +105,25 @@ main(int argc, char **argv) } // Encoding - encode(0, LZMA_SYNC_FLUSH); encode(6, LZMA_SYNC_FLUSH); encode(0, LZMA_SYNC_FLUSH); encode(7, LZMA_SYNC_FLUSH); encode(0, LZMA_SYNC_FLUSH); encode(0, LZMA_FINISH); + /* encode(53, LZMA_SYNC_FLUSH); -// opt_lzma.literal_context_bits = 2; -// opt_lzma.literal_pos_bits = 1; -// opt_lzma.pos_bits = 0; + opt_lzma.lc = 2; + opt_lzma.lp = 1; + opt_lzma.pb = 0; + if (lzma_filters_update(&strm, filters) != LZMA_OK) { + fprintf(stderr, "update failed\n"); + exit(1); + } encode(404, LZMA_FINISH); */ + // Clean up lzma_end(&strm); -- cgit v1.2.3