fix #283 : implement LZ4_versionString().
authorYann Collet <yann.collet.73@gmail.com>
Sun, 4 Dec 2016 19:05:36 +0000 (20:05 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Sun, 4 Dec 2016 19:05:36 +0000 (20:05 +0100)
lib/lz4.c
programs/lz4cli.c
tests/fuzzer.c

index fc19493..143c36e 100644 (file)
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -391,6 +391,7 @@ typedef enum { full = 0, partial = 1 } earlyEnd_directive;
 *  Local Utils
 **************************************/
 int LZ4_versionNumber (void) { return LZ4_VERSION_NUMBER; }
+const char* LZ4_versionString(void) { return LZ4_VERSION_STRING; }
 int LZ4_compressBound(int isize)  { return LZ4_COMPRESSBOUND(isize); }
 int LZ4_sizeofState() { return LZ4_STREAMSIZE; }
 
index a452d1c..46c2f1b 100644 (file)
@@ -78,7 +78,7 @@
 ******************************/
 #define COMPRESSOR_NAME "LZ4 command line interface"
 #define AUTHOR "Yann Collet"
-#define WELCOME_MESSAGE "*** %s %i-bits v%s, by %s ***\n", COMPRESSOR_NAME, (int)(sizeof(void*)*8), LZ4_VERSION_STRING, AUTHOR
+#define WELCOME_MESSAGE "*** %s %i-bits v%s, by %s ***\n", COMPRESSOR_NAME, (int)(sizeof(void*)*8), LZ4_versionString(), AUTHOR
 #define LZ4_EXTENSION ".lz4"
 #define LZ4CAT "lz4cat"
 #define UNLZ4 "unlz4"
index 06cfd40..260208a 100644 (file)
@@ -1102,7 +1102,7 @@ int main(int argc, const char** argv)
         }
     }
 
-    printf("Starting LZ4 fuzzer (%i-bits, v%s)\n", (int)(sizeof(size_t)*8), LZ4_VERSION_STRING);
+    printf("Starting LZ4 fuzzer (%i-bits, v%s)\n", (int)(sizeof(size_t)*8), LZ4_versionString());
 
     if (!seedset) {
         time_t const t = time(NULL);