Improve handling of --test-label.
commit28f2669b15f2ddf5a25e4d7a7f36023ae0268c8b
authorSergey Poznyakoff <gray@gnu.org.ua>
Sun, 24 Jan 2010 14:52:24 +0000 (24 16:52 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sun, 24 Jan 2010 14:58:04 +0000 (24 16:58 +0200)
tree320c2cb80c43237d788d01206c1667eafb7169ce
parent166b7c7d028c3dbcfded5c834b9bf752d2fb41f0
Improve handling of --test-label.

* src/list.c (print_volume_label): New function.
(print_header): Call print_volume_label.
(test_archive_label): New function.
* src/buffer.c (VOLUME_LABEL_APPEND): Remove.
(VOLUME_TEXT, VOLUME_TEXT_LEN): New macros
(drop_volume_label_suffix): New function.
(check_label_pattern): Use drop_volume_label_suffix.
* src/common.h (subcommand): New constant TEST_LABEL_SUBCOMMAND.
(test_label_option): Remove.
(drop_volume_label_suffix): New proto.
(test_archive_label): New proto.
* src/names.c (all_names_found): Remove test for test_label_option.
* src/tar.c (subcommand_string): Handle TEST_LABEL_SUBCOMMAND.
(set_subcommand_option): Improve diagnostics.
(parse_opt): Set subcommand if --test-label is given.
(main): Handle TEST_LABEL_SUBCOMMAND.
src/buffer.c
src/common.h
src/list.c
src/names.c
src/tar.c