diff -pru tar-1.13-bz2/src/tar.c tar-1.13-lzma/src/tar.c --- tar-1.13-bz2/src/tar.c 2008-09-30 19:35:45.000000000 +0200 +++ tar-1.13-lzma/src/tar.c 2008-09-30 19:47:17.000000000 +0200 @@ -18,6 +18,8 @@ /* Patched to integrate bzip2 as compression filter (options -j, --bzip2 and --bunzip2) */ +/* Patched to integrate lzma as compression filter (option --lzma) */ + #include "system.h" #include @@ -145,7 +147,10 @@ enum OBSOLETE_BLOCK_NUMBER, OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH, - OBSOLETE_VERSION_CONTROL + OBSOLETE_VERSION_CONTROL, + + /* New options can go here. */ + NEW_LZMA_COMPRESS }; /* If nonzero, display usage information and exit. */ @@ -201,6 +206,7 @@ struct option long_options[] = {"label", required_argument, NULL, 'V'}, {"list", no_argument, NULL, 't'}, {"listed-incremental", required_argument, NULL, 'g'}, + {"lzma", no_argument, NULL, NEW_LZMA_COMPRESS}, {"mode", required_argument, NULL, MODE_OPTION}, {"modification-time", no_argument, NULL, OBSOLETE_TOUCH}, {"multi-volume", no_argument, NULL, 'M'}, @@ -346,6 +352,7 @@ Archive format selection:\n\ PATTERN at list/extract time, a globbing PATTERN\n\ -o, --old-archive, --portability write a V7 format archive\n\ --posix write a POSIX conformant archive\n\ + --lzma filter the archive through lzma\n\ -j, --bzip2, --bunzip2 filter the archive through bzip2\n\ -z, --gzip, --ungzip filter the archive through gzip\n\ -Z, --compress, --uncompress filter the archive through compress\n\ @@ -852,6 +859,10 @@ decode_options (int argc, char *const *a no_recurse_option = 1; break; + case NEW_LZMA_COMPRESS: + set_use_compress_program_option ("lzma"); + break; + case NULL_OPTION: filename_terminator = '\0'; break;