summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2016-12-04 19:05:36 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2016-12-04 19:05:36 (GMT)
commit5eb547a6080b8e63b5e522b448e31052fbc6b927 (patch)
tree6c8ecde04424aa9220ca7c8e2aa1218a8239bafc
parent9a6f7dfc5b1e9ce882944c45de895cf9c21d1b7c (diff)
downloadlz4-5eb547a6080b8e63b5e522b448e31052fbc6b927.zip
lz4-5eb547a6080b8e63b5e522b448e31052fbc6b927.tar.gz
lz4-5eb547a6080b8e63b5e522b448e31052fbc6b927.tar.bz2
fix #283 : implement LZ4_versionString().
-rw-r--r--lib/lz4.c1
-rw-r--r--programs/lz4cli.c2
-rw-r--r--tests/fuzzer.c2
3 files changed, 3 insertions, 2 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index fc19493..143c36e 100644
--- 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; }
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index a452d1c..46c2f1b 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -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"
diff --git a/tests/fuzzer.c b/tests/fuzzer.c
index 06cfd40..260208a 100644
--- a/tests/fuzzer.c
+++ b/tests/fuzzer.c
@@ -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);