summaryrefslogtreecommitdiff
path: root/lzf.c
diff options
context:
space:
mode:
authorroot <root>2006-07-07 15:34:11 +0000
committerroot <root>2006-07-07 15:34:11 +0000
commitc236b409799117eb10770bb7225d10d8409dee35 (patch)
treebf79a84679f4f35aa2f90e96fea6aecef2d79470 /lzf.c
parent62f3e819eab18f9d175408dd7421b137132a728d (diff)
*** empty log message ***rel-1_6
Diffstat (limited to 'lzf.c')
-rw-r--r--lzf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lzf.c b/lzf.c
index a7a6a82..b608cc0 100644
--- a/lzf.c
+++ b/lzf.c
@@ -40,6 +40,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <assert.h>
#include <unistd.h>
@@ -203,6 +204,9 @@ main (int argc, char *argv[])
unsigned int blocksize = 64*1024-1;
enum { m_compress, m_decompress } mode = m_compress;
+ if (!strcmp (argv[0] + strlen (argv[0] - 5), "unlzf"))
+ mode = m_decompress;
+
while ((c = getopt (argc, argv, "cdb:h")) != -1)
switch (c)
{