(list_archive): Always decode the header. This
is necessary so the extended header is processed and the correct
filename is printed no matter what the state of verbose_option.
(start_header): Store long file names
in "path" keyword of an extended header if in POSIX
mode.
(finish_header): print header before calling write_extended().
(decode_header): Added initial support for POSIX extended
and STAR headers.
(skip_member): Check oldgnu_header only if current_format is set
to OLDGNU_FORMAT.
(decode_header): Added initial support for POSIX extended
and STAR headers.
(skip_member): Check oldgnu_header only if current_format is set
to OLDGNU_FORMAT
New option --check-links.
Changed semantics of -o to comply to UNIX98 when extracting and
to its previous semantics otherwise.
(main): Call check_links if --check-links. was given.
Paul Eggert [Sat, 5 Jul 2003 08:24:55 +0000 (08:24 +0000)]
Convert to UTF-8.
Don't include <print-copyr.h>.
(DEFAULT_PATTERN): Renamed from DEFAULT.
(ZEROS_PATTERN): Renamed from ZEROS.
(main): Use gettext to translate (C), not print_copyright.
Paul Eggert [Sat, 5 Jul 2003 08:18:46 +0000 (08:18 +0000)]
Do not include <print-copyr.h>.
Include <getdate.h>.
(get_date): Remove decl.
(ATIME_PRESERVE_OPTION, CHECKPOINT_OPTION, FORCE_LOCAL_OPTION,
IGNORE_FAILED_READ_OPTION, INDEX_FILE_OPTION, NO_OVERWRITE_DIR_OPTION,
NUMERIC_OWNER_OPTION, RECURSIVE_UNLINK_OPTION, REMOVE_FILES_OPTION,
SHOW_OMITTED_DIRS_OPTION, TOTALS_OPTION): New constants.
(long_options, decode_options): Use them.
(OVERWRITE_DIR_OPTION): Remove.
(long_options): New options --index-file, --no-overwrite-dir.
Remove --overwrite-dir option.
(usage): Use PACKAGE_BUGREPORT.
(decode_options): Terminate new argv properly.
Use PACKAGE_NAME, PACKAGE_VERSION.
If verbose, report how we grokked any textual date option.
(main): Add support for index-file.
Paul Eggert [Sat, 5 Jul 2003 07:21:19 +0000 (07:21 +0000)]
Don't include print-copyr.h.
(prepare_input_buffer): Renamed from prepare_record_buffer.
New arg FD. All uses changed.
Do not read more than INT_MAX bytes at once,
since it breaks on some brain damaged Tru64 hosts.
Do not mix int and size_t pointers. Divide size by two
when retrying instead of subtracting 1024; for speed.
(main): Use gettext to translate (C), not print_copyright.
Paul Eggert [Sat, 5 Jul 2003 07:17:20 +0000 (07:17 +0000)]
(namelist_match): Allow partial matches only if recursive.
(hash_string_hasher): Renamed from hash_avoided_name.
(hash_string_compare): Renamed from compare_avoided_anames.
(hash_string_insert, hash_string_lookup): New functions.
(add_avoided_name, is_avoided_name): Use them.
(safer_name_suffix): New function.
(contains_dot_dot): Moved here from misc.c. Now returns bool, not int.
Paul Eggert [Sat, 5 Jul 2003 07:00:54 +0000 (07:00 +0000)]
(read_and): Give full type for procedure arg.
(read_header): Strip trailing slashes, setting current_trailing_slash.
(tartime): Avoid int overflow when printing year (!).
(print_header): New arg specifing block ordinal. All uses changed.
Print link as 'h' type. Give labels for long links and names.
Paul Eggert [Sat, 5 Jul 2003 06:53:31 +0000 (06:53 +0000)]
(we_are_root): Now bool, not int.
(check_time): Warn about implausibly old time stamps.
(set_stat): Use utimbuf, not stat_info.
(preprare_to_extract): New arg DIRECTORY.
(fill_in_sparse_array): Moved here from compare.c.
(extract_sparse_file): Now returns off_t, giving size left.
Truncate file at end.
(extract_archive): Use safer_name_suffix rather than rolling our own.
Use fill_in_sparse_array rather than rolling our own.
Strip trailing slashes more effectively.
Check for unsafe names.
Paul Eggert [Sat, 5 Jul 2003 06:43:30 +0000 (06:43 +0000)]
(relativize): Remove; replaced by safer_name_suffix.
All callers changed.
(start_header): Clear devmajor and devminor fields, too.
(finish_header): New arg block_ordinal.
(init_sparsearray): Now extern. Set sp_array_size to
SPARSES_IN_OLDGNU_HEADER if it is zero.
(dump_file): Keep link table as a hash.
Do not count "file changed as we read it" as a failure.
Paul Eggert [Sat, 5 Jul 2003 06:19:54 +0000 (06:19 +0000)]
(print_total_written): Adjust to new human.h interface.
(child_open_for_compress): Do not increase size to BLOCKSIZE.
(open_archive): Open index file name.
Strip trailng slahes from file names.
(flush_write): Set size to 0 if not saving names.
(flush_write, flush_read): Use safer_name_suffix rather than
inline code.