]> granicus.if.org Git - xz/commitdiff
Update the debug programs so that they compile again.
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 14 Nov 2009 17:45:39 +0000 (19:45 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 14 Nov 2009 17:45:39 +0000 (19:45 +0200)
debug/crc32.c
debug/memusage.c
debug/sync_flush.c

index 0fe46511f03db9d3c33b8fd0bb11dc870a28cea1..e545a3cc1ebe12655b7a1dc1a13ff7cd52bfa476 100644 (file)
@@ -11,6 +11,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "sysdefs.h"
+#include "lzma.h"
 #include <stdio.h>
 
 
index 93fe0b2ca7908a0cc7c687c25a208084790cb304..bd72b5a22c6e685989181915483241749ac32fb9 100644 (file)
@@ -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;
 }
index 1dccbdaacbd21d980a9d97d7ee233d7a40f3efe8..4a31efdd88b4b65a795c430d340f7167da6bcb66 100644 (file)
@@ -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);