Update the debug programs so that they compile again.

This commit is contained in:
Lasse Collin 2009-11-14 19:45:39 +02:00
parent 418d64a32e
commit 2291346f0c
3 changed files with 14 additions and 7 deletions

View File

@ -11,6 +11,7 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include "sysdefs.h" #include "sysdefs.h"
#include "lzma.h"
#include <stdio.h> #include <stdio.h>

View File

@ -42,8 +42,10 @@ main(void)
{ UINT64_MAX, NULL } { UINT64_MAX, NULL }
}; };
printf("Encoder: %10" PRIu64 " B\n", lzma_memusage_encoder(filters)); printf("Encoder: %10" PRIu64 " B\n",
printf("Decoder: %10" PRIu64 " B\n", lzma_memusage_decoder(filters)); lzma_raw_encoder_memusage(filters));
printf("Decoder: %10" PRIu64 " B\n",
lzma_raw_decoder_memusage(filters));
return 0; return 0;
} }

View File

@ -71,7 +71,6 @@ main(int argc, char **argv)
.lp = LZMA_LP_DEFAULT, .lp = LZMA_LP_DEFAULT,
.pb = LZMA_PB_DEFAULT, .pb = LZMA_PB_DEFAULT,
.preset_dict = NULL, .preset_dict = NULL,
.persistent = true,
.mode = LZMA_MODE_NORMAL, .mode = LZMA_MODE_NORMAL,
.nice_len = 32, .nice_len = 32,
.mf = LZMA_MF_HC3, .mf = LZMA_MF_HC3,
@ -106,20 +105,25 @@ main(int argc, char **argv)
} }
// Encoding // Encoding
encode(0, LZMA_SYNC_FLUSH); encode(0, LZMA_SYNC_FLUSH);
encode(6, LZMA_SYNC_FLUSH); encode(6, LZMA_SYNC_FLUSH);
encode(0, LZMA_SYNC_FLUSH); encode(0, LZMA_SYNC_FLUSH);
encode(7, LZMA_SYNC_FLUSH); encode(7, LZMA_SYNC_FLUSH);
encode(0, LZMA_SYNC_FLUSH); encode(0, LZMA_SYNC_FLUSH);
encode(0, LZMA_FINISH); encode(0, LZMA_FINISH);
/* /*
encode(53, LZMA_SYNC_FLUSH); encode(53, LZMA_SYNC_FLUSH);
// opt_lzma.literal_context_bits = 2; opt_lzma.lc = 2;
// opt_lzma.literal_pos_bits = 1; opt_lzma.lp = 1;
// opt_lzma.pos_bits = 0; opt_lzma.pb = 0;
if (lzma_filters_update(&strm, filters) != LZMA_OK) {
fprintf(stderr, "update failed\n");
exit(1);
}
encode(404, LZMA_FINISH); encode(404, LZMA_FINISH);
*/ */
// Clean up // Clean up
lzma_end(&strm); lzma_end(&strm);