summaryrefslogtreecommitdiffstats
path: root/programs
diff options
context:
space:
mode:
Diffstat (limited to 'programs')
-rw-r--r--programs/Makefile2
-rw-r--r--programs/lz4cli.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/programs/Makefile b/programs/Makefile
index 868c5fb..54a19cf 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -86,11 +86,13 @@ ifneq (,$(filter $(shell uname),Linux Darwin))
install: lz4 lz4c
@install -d -m 755 $(DESTDIR)$(BINDIR)/ $(DESTDIR)$(MANDIR)/
@install -m 755 lz4 $(DESTDIR)$(BINDIR)/lz4
+ @ln -s $(DESTDIR)$(BINDIR)/lz4 $(DESTDIR)$(BINDIR)/lz4cat
@install -m 755 lz4c $(DESTDIR)$(BINDIR)/lz4c
@install -m 644 lz4.1 $(DESTDIR)$(MANDIR)/lz4.1
@echo lz4 installation completed
uninstall:
+ rm -f $(DESTDIR)$(BINDIR)/lz4cat
[ -x $(DESTDIR)$(BINDIR)/lz4 ] && rm -f $(DESTDIR)$(BINDIR)/lz4
[ -x $(DESTDIR)$(BINDIR)/lz4c ] && rm -f $(DESTDIR)$(BINDIR)/lz4c
[ -f $(DESTDIR)$(MANDIR)/lz4.1 ] && rm -f $(DESTDIR)$(MANDIR)/lz4.1
diff --git a/programs/lz4cli.c b/programs/lz4cli.c
index 26e0111..fc5bd81 100644
--- a/programs/lz4cli.c
+++ b/programs/lz4cli.c
@@ -109,11 +109,12 @@
//****************************
#define COMPRESSOR_NAME "LZ4 Compression CLI"
#ifndef LZ4_VERSION
-# define LZ4_VERSION "v1.1.3"
+# define LZ4_VERSION "v1.1.5"
#endif
#define AUTHOR "Yann Collet"
#define WELCOME_MESSAGE "*** %s %i-bits %s, by %s (%s) ***\n", COMPRESSOR_NAME, (int)(sizeof(void*)*8), LZ4_VERSION, AUTHOR, __DATE__
#define LZ4_EXTENSION ".lz4"
+#define LZ4_CAT "lz4cat"
#define KB *(1U<<10)
#define MB *(1U<<20)
@@ -310,6 +311,10 @@ int main(int argc, char** argv)
LZ4IO_setOverwrite(0);
blockSize = LZ4IO_setBlockSizeID(LZ4_BLOCKSIZEID_DEFAULT);
+ // lz4cat behavior
+ if (!strcmp(programName, LZ4_CAT)) { decode=1; forceStdout=1; output_filename=stdoutmark; displayLevel=1; }
+
+ // command switches
for(i=1; i<argc; i++)
{
char* argument = argv[i];
@@ -335,7 +340,7 @@ int main(int argc, char** argv)
if ((argument[0]=='c') && (argument[1]=='0')) { cLevel=0; argument++; continue; } // -c0 (fast compression)
if ((argument[0]=='c') && (argument[1]=='1')) { cLevel=9; argument++; continue; } // -c1 (high compression)
if ((argument[0]=='h') && (argument[1]=='c')) { cLevel=9; argument++; continue; } // -hc (high compression)
- if (*argument=='y') { LZ4IO_setOverwrite(1); continue; } // -y (answer 'yes' to overwrite permission)
+ if (*argument=='y') { LZ4IO_setOverwrite(1); continue; } // -y (answer 'yes' to overwrite permission)
if (*argument=='s') { displayLevel=1; continue; } // -s (silent mode)
#endif // DISABLE_LZ4C_LEGACY_OPTIONS