]> Dogcows Code - chaz/tar/commit
Run alternative decompression programs if the principal one is not available.
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 4 Nov 2010 14:09:25 +0000 (16:09 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Fri, 5 Nov 2010 08:09:51 +0000 (10:09 +0200)
commitf1fed3996a6c5b5f39ddb48cb5c88c09afe13fba
tree7dd63f30611d98bb9ed3dcd6cdf7e7babedb1c4d
parentb32edff5aa612fdf819c00dc8aacb46ce4a297c0
Run alternative decompression programs if the principal one is not available.

Some compression programs are able to handle various compression formats
(e.g. `gzip' can decompress files created by `compress', `xz' is able
to handle lzma, etc.)  Tar tries to use such programs for decompression
if the principal decompressor cannot be started.

* src/buffer.c (compress_type): Swap ct_none and ct_tar.
(archive_compression_type): New static variable.
(zip_magic): Remove program and option fields.
(zip_program): New structure and static.
(compress_program): Remove macro.
(find_zip_program): New static function.
(first_decompress_program,next_decompress_program): New functions.
(open_compressed_archive): Set archive_compression_type instead of
use_compress_program_option.
* src/common.h (first_decompress_program)
(next_decompress_program): New functions.
(WARN_DECOMPRESS_PROGRAM): New flag.
(WARN_VERBOSE_WARNINGS): Include WARN_DECOMPRESS_PROGRAM.
* src/warning.c (warning_args): Add "decompress-program".
(warning_types): Add WARN_DECOMPRESS_PROGRAM.
* src/system.c (run_decompress_program): New function.
(sys_child_open_for_uncompress): Use run_decompress_program
instead of calling execlp directly.
doc/tar.texi
src/buffer.c
src/common.h
src/system.c
src/warning.c
This page took 0.027778 seconds and 4 git commands to generate.