]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
CLI supports Legacy formats v0.4+
authorYann Collet <cyan@fb.com>
Sun, 28 Aug 2016 19:47:17 +0000 (12:47 -0700)
committerYann Collet <cyan@fb.com>
Sun, 28 Aug 2016 19:47:17 +0000 (12:47 -0700)
programs/Makefile
programs/fileio.c

index dd6e7838a9d126bbdc9a615ba5bdc0cbe41a9e0f..083b0f2f007d6d3ba2f744b31c6288b742150dec 100644 (file)
@@ -86,10 +86,10 @@ all: zstd
 
 
 $(ZSTDDECOMP_O): $(ZSTDDIR)/decompress/zstd_decompress.c
-       $(CC)    $(ALIGN_LOOP) $(FLAGS) $^ -c -o $@
+       $(CC)    $(ALIGN_LOOP) $(FLAGS) -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) $^ -c -o $@
 
 $(ZSTDDECOMP32_O): $(ZSTDDIR)/decompress/zstd_decompress.c
-       $(CC)  -m32 $(ALIGN_LOOP) $(FLAGS) $^ -c -o $@
+       $(CC)  -m32 $(ALIGN_LOOP) $(FLAGS) -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT) $^ -c -o $@
 
 zstd  : $(ZSTDDECOMP_O) $(ZSTD_FILES) $(ZSTDLEGACY_FILES) $(ZDICT_FILES) \
         zstdcli.c fileio.c bench.c datagen.c dibio.c
index 00cb31baa02ccb390f06ff89f18cb8da4dcd593d..55ba1425d2ca26de6d8ec282e851d30588aa3819 100644 (file)
@@ -610,7 +610,7 @@ static void FIO_fwriteSparseEnd(FILE* file, unsigned storedSkips)
 unsigned long long FIO_decompressFrame(dRess_t ress,
                                        FILE* foutput, FILE* finput, size_t alreadyLoaded)
 {
-    U64    frameSize = 0;
+    U64 frameSize = 0;
     size_t readSize;
     U32 storedSkips = 0;
 
@@ -721,7 +721,7 @@ static int FIO_decompressSrcFile(dRess_t ress, const char* srcFileName)
 
     /* Final Status */
     DISPLAYLEVEL(2, "\r%79s\r", "");
-    DISPLAYLEVEL(2, "%-20.20s: %llu bytes \n", srcFileName, filesize);
+    DISPLAYLEVEL(2, "%-20s: %llu bytes \n", srcFileName, filesize);
 
     /* Close */
     if (fclose(srcFile)) EXM_THROW(33, "zstd: %s close error", srcFileName);  /* error should never happen */