diff options
Diffstat (limited to 'lzf.c')
-rw-r--r-- | lzf.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) { |