moved cmake and debian directories to contrib (#245)
authorYann Collet <cyan@fb.com>
Wed, 2 Nov 2016 00:26:22 +0000 (17:26 -0700)
committerYann Collet <cyan@fb.com>
Wed, 2 Nov 2016 00:29:15 +0000 (17:29 -0700)
15 files changed:
Makefile
NEWS
contrib/cmake_unofficial/.gitignore [new file with mode: 0644]
contrib/cmake_unofficial/CMakeLists.txt [moved from cmake_unofficial/CMakeLists.txt with 97% similarity]
contrib/debian/changelog [new file with mode: 0644]
contrib/debian/compat [moved from debian/compat with 100% similarity]
contrib/debian/control [moved from debian/control with 79% similarity]
contrib/debian/copyright [moved from debian/copyright with 87% similarity]
contrib/debian/dirs [moved from debian/dirs with 100% similarity]
contrib/debian/docs [moved from debian/docs with 100% similarity]
contrib/debian/liblz4-dev.install [moved from debian/liblz4-dev.install with 100% similarity]
contrib/debian/liblz4.install [moved from debian/liblz4.install with 100% similarity]
contrib/debian/rules [moved from debian/rules with 100% similarity]
debian/changelog [deleted file]
programs/lz4io.c

index 930922d..518ffbd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -91,7 +91,7 @@ test:
        $(MAKE) -C $(PRGDIR) test
 
 cmake:
-       @cd cmake_unofficial; cmake CMakeLists.txt; $(MAKE)
+       @cd contrib/cmake_unofficial; cmake CMakeLists.txt; $(MAKE)
 
 gpptest: clean
        $(MAKE) all CC=g++ CFLAGS="-O3 -I../lib -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror"
diff --git a/NEWS b/NEWS
index a1baead..b676d86 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,10 @@
-r132
+v1.7.2
+Changed : moved to versioning; package, cli and library have same version number
 Improved: Small decompression speed boost (+4%)
 Improved: Performance on ARMv6 and ARMv7
 Added : Debianization, by Evgeniy Polyakov
-Makefile: Safely protects lz4 version when selecting custom CFLAGS
-Makefile: Generates intermediate object files (*.o) for faster compilation on low power systems
+Makefile: Generates object files (*.o) for faster (re)compilation on low power systems
+Fix : cli : crash on some invalid inputs
 
 r131
 New    : Dos/DJGPP target, thanks to Louis Santillan (#114)
diff --git a/contrib/cmake_unofficial/.gitignore b/contrib/cmake_unofficial/.gitignore
new file mode 100644 (file)
index 0000000..0f81929
--- /dev/null
@@ -0,0 +1,7 @@
+# cmake artefact
+
+CMakeCache.txt
+CMakeFiles
+*.cmake
+Makefile
+liblz4.pc
similarity index 97%
rename from cmake_unofficial/CMakeLists.txt
rename to contrib/cmake_unofficial/CMakeLists.txt
index c7f1dab..6edec98 100644 (file)
@@ -2,7 +2,7 @@ PROJECT(LZ4 C)
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LZ4 compression library")
 set(CPACK_PACKAGE_VERSION_MAJOR 1)
 set(CPACK_PACKAGE_VERSION_MINOR 7)
-set(CPACK_PACKAGE_VERSION_PATCH r132)
+set(CPACK_PACKAGE_VERSION_PATCH 2)
 set(VERSION_STRING     " \"${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}\" ")
 include(CPack)
 
@@ -24,8 +24,8 @@ IF(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
 ENDIF()
 
 
-set(LZ4_DIR ../lib/)
-set(PRG_DIR ../programs/)
+set(LZ4_DIR ../../lib/)
+set(PRG_DIR ../../programs/)
 set(LZ4_SRCS_LIB ${LZ4_DIR}lz4.c ${LZ4_DIR}lz4hc.c ${LZ4_DIR}lz4.h ${LZ4_DIR}lz4hc.h ${LZ4_DIR}lz4frame.c ${LZ4_DIR}lz4frame.h ${LZ4_DIR}xxhash.c)
 set(LZ4_SRCS ${LZ4_DIR}lz4frame.c ${LZ4_DIR}xxhash.c ${PRG_DIR}bench.c ${PRG_DIR}lz4cli.c ${PRG_DIR}lz4io.c)
 
@@ -108,7 +108,3 @@ if(GNU_COMPATIBLE_COMPILER)
 endif()
 ADD_DEFINITIONS("-DLZ4_VERSION=\"${CPACK_PACKAGE_VERSION_PATCH}\"")
 INCLUDE_DIRECTORIES (${LZ4_DIR})
-
-
-
-
diff --git a/contrib/debian/changelog b/contrib/debian/changelog
new file mode 100644 (file)
index 0000000..87ac016
--- /dev/null
@@ -0,0 +1,10 @@
+liblz4 (1.7.2) unstable; urgency=low
+
+  * Changed : moved to versioning; package, cli and library have same version number
+  * Improved: Small decompression speed boost (+4%)
+  * Improved: Performance on ARMv6 and ARMv7
+  * Added : Debianization, by Evgeniy Polyakov
+  * Makefile: Generates object files (*.o) for faster (re)compilation on low power systems
+  * Fix : cli : crash on some invalid inputs
+
+ -- Yann Collet <Cyan4973@github.com>  Sun, 28 Jun 2015 01:00:00 +0000
similarity index 100%
rename from debian/compat
rename to contrib/debian/compat
similarity index 79%
rename from debian/control
rename to contrib/debian/control
index 1a5a077..ac3b460 100644 (file)
@@ -7,9 +7,9 @@ Build-Depends:
  debhelper (>= 7.0.50~),
  cdbs
 Standards-Version: 3.8.0
-Homepage: https://code.google.com/p/lz4/
-Vcs-Git: git://github.com/Cyan4973/lz4.git
-Vcs-Browser: https://github.com/Cyan4973/lz4
+Homepage: http://www.lz4.org/
+Vcs-Git: git://github.com/lz4/lz4.git
+Vcs-Browser: https://github.com/lz4/lz4
 
 Package: liblz4
 Architecture: any
similarity index 87%
rename from debian/copyright
rename to contrib/debian/copyright
index da22555..18a7f48 100644 (file)
@@ -1,7 +1,7 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: liblz4
 Upstream-Contact: Yann Collet <Cyan4973@github.com>
-Source: https://github.com/Cyan4973/lz4
+Source: https://github.com/lz4/lz4
 
 Files: *
 Copyright: (C) 2011+ Yann Collet
similarity index 100%
rename from debian/dirs
rename to contrib/debian/dirs
similarity index 100%
rename from debian/docs
rename to contrib/debian/docs
similarity index 100%
rename from debian/rules
rename to contrib/debian/rules
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644 (file)
index 7a4bac6..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-liblz4 (0.131) unstable; urgency=low
-
-  * New    : Dos/DJGPP target, thanks to Louis Santillan (#114)
-  * Added  : Example using lz4frame library, by Zbigniew JÄ™drzejewski-Szmek (#118)
-  * Changed: xxhash symbols are modified (namespace emulation) within liblz4
-
- -- Yann Collet <Cyan4973@github.com>  Sun, 28 Jun 2015 01:00:00 +0000
-
index 7293d77..f90cb50 100644 (file)
@@ -697,12 +697,12 @@ static unsigned long long LZ4IO_decodeLegacyStream(FILE* finput, FILE* foutput)
     /* Main Loop */
     while (1) {
         int decodeSize;
-        size_t sizeCheck;
         unsigned int blockSize;
 
         /* Block Size */
-        sizeCheck = fread(in_buff, 1, 4, finput);
-        if (sizeCheck==0) break;                   /* Nothing to read : file read is completed */
+        { size_t const sizeCheck = fread(in_buff, 1, 4, finput);
+          if (sizeCheck == 0) break;                   /* Nothing to read : file read is completed */
+          if (sizeCheck != 4) EXM_THROW(52, "Read error : cannot access block size "); }
         blockSize = LZ4IO_readLE32(in_buff);       /* Convert to Little Endian */
         if (blockSize > LZ4_COMPRESSBOUND(LEGACY_BLOCKSIZE)) {
             /* Cannot read next block : maybe new stream ? */
@@ -711,8 +711,8 @@ static unsigned long long LZ4IO_decodeLegacyStream(FILE* finput, FILE* foutput)
         }
 
         /* Read Block */
-        sizeCheck = fread(in_buff, 1, blockSize, finput);
-        if (sizeCheck!=blockSize) EXM_THROW(52, "Read error : cannot access compressed block !");
+        { size_t const sizeCheck = fread(in_buff, 1, blockSize, finput);
+          if (sizeCheck!=blockSize) EXM_THROW(52, "Read error : cannot access compressed block !"); }
 
         /* Decode Block */
         decodeSize = LZ4_decompress_safe(in_buff, out_buff, blockSize, LEGACY_BLOCKSIZE);