--- tar.c Fri Jun 1 13:56:06 2001 +++ tar-1.13/src/tar.c Thu May 31 19:02:31 2001 @@ -186,6 +186,8 @@ {"group", required_argument, NULL, GROUP_OPTION}, {"gunzip", no_argument, NULL, 'z'}, {"gzip", no_argument, NULL, 'z'}, + {"bunzip2", no_argument, NULL, 'j'}, + {"bzip2", no_argument, NULL, 'j'}, {"help", no_argument, &show_help, 1}, {"ignore-failed-read", no_argument, &ignore_failed_read_option, 1}, {"ignore-zeros", no_argument, NULL, 'i'}, @@ -235,6 +237,7 @@ {"touch", no_argument, NULL, 'm'}, {"uncompress", no_argument, NULL, 'Z'}, {"ungzip", no_argument, NULL, 'z'}, + {"unbzip2", no_argument, NULL, 'j'}, {"unlink-first", no_argument, NULL, 'U'}, {"update", no_argument, NULL, 'u'}, {"use-compress-program", required_argument, NULL, USE_COMPRESS_PROGRAM_OPTION}, @@ -341,6 +344,7 @@ -o, --old-archive, --portability write a V7 format archive\n\ --posix write a POSIX conformant archive\n\ -z, --gzip, --ungzip filter the archive through gzip\n\ + -j, --bzip2, --unbzip2 filter the archive through bzip2\n\ -Z, --compress, --uncompress filter the archive through compress\n\ --use-compress-program=PROG filter through PROG (must accept -d)\n"), stdout); @@ -416,7 +420,7 @@ Y per-block gzip compression */ #define OPTION_STRING \ - "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxz" + "-01234567ABC:F:GK:L:MN:OPRST:UV:WX:Zb:cdf:g:hiklmoprstuvwxzj" static void set_subcommand_option (enum subcommand subcommand) @@ -519,7 +523,7 @@ input_files = 0; while (optchar = getopt_long (argc, argv, OPTION_STRING, long_options, NULL), - optchar != EOF) + optchar != EOF){ switch (optchar) { case '?': @@ -788,6 +792,10 @@ FATAL_ERROR ((0, errno, "%s", optarg)); break; + case 'j': + set_use_compress_program_option ("bzip2"); + break; + case 'z': set_use_compress_program_option ("gzip"); break; @@ -986,6 +994,7 @@ #endif /* not DEVICE_PREFIX */ } + } /* Process trivial options. */