Paul Eggert [Fri, 3 Dec 1999 13:04:17 +0000 (13:04 +0000)]
(dump_file): Do not diagnose a file that the parent directory
said should be there, but is absent. It was
probably removed between then and now.
Do not pass meaningless errno to ERROR when reporting that the
file changed as we read it.
Paul Eggert [Mon, 11 Oct 1999 06:56:17 +0000 (06:56 +0000)]
Remove --with-dmalloc.
Add --disable-largefile.
Remove old NeXT dirent problems, or AIX valloc problems.
Remove old union wait advice, and old %lld advice.
Remove advice about FreeBSD 2.1.7, ISC 4.1mu, Ultrix `make'.
Paul Eggert [Fri, 24 Sep 1999 23:44:52 +0000 (23:44 +0000)]
(update_archive): Remove call to name_expand; had no effect.
Use chdir_do to change into directory.
Use deref_stat instead of stat.
Use add_avoided_name to mark names to be avoided; the old method of
setting a bit with the name caused all descendants of that name to
be avoided, in some circumstances.
Paul Eggert [Fri, 24 Sep 1999 23:44:52 +0000 (23:44 +0000)]
(<time.h>): Include.
(time): Declare if not defined.
(confirm): Don't read past EOF.
(long_options, usage): Add --no-same-owner, --no-same-permissions.
(main): Use clock_gettime if available.
Paul Eggert [Thu, 23 Sep 1999 06:22:31 +0000 (06:22 +0000)]
(name_next): Go back to using plain chdir.
(name_gather): Use chdir_arg to keep track of arguments to chdir.
(addname): Likewise.
(name_match): Use chdir_do to act on chdir args.
(merge_sort): Moved here from incremen.c.
(compare_names, add_hierarchy_to_namelist, collect_and_sort_names):
Likewise.
(name_expand): Remove.
(name_from_list): Skip fack names.
Use chdir_do to act on chdir args.
(struct avoided_name): New struct.
(avoided_names): New var.
(add_avoided_name, is_avoided_name): New functions.
Paul Eggert [Wed, 22 Sep 1999 06:14:23 +0000 (06:14 +0000)]
(time): Declare if not defined.
(base_64_digits): Moved here from create.c.
(base64_map): Use UCHAR_MAX for size, not less-clear (unsigned char) -1.
(read_and): Don't get time from header unless we need it now;
as getting time can cause duplicate diagnostics if bogus.
Remove "Hmm, " from diagnostic.
Use "Skipping to next header" uniformly.
(from_header): Renamed from from_chars. All uses changed.
Allow different forms for unportable 2's complement numbers.
Don't check for extended forms when parsing checksums.
Parse base-256 output.
(gid_from_header): Renamed from gid_from_chars. All uses changed.
(major_from_header): Renamed from major_from_chars. All uses changed.
(minor_from_header): Renamed from minor_from_chars. All uses changed.
(mode_from_header): Renamed from mode_from_chars. All uses changed.
(off_from_header): Renamed from off_from_chars. All uses changed.
(size_from_header): Renamed from size_from_chars. All uses changed.
(time_from_header): Renamed from time_from_chars. All uses changed.
Warn about future timestamps.
(uid_from_header): Renamed from uid_from_chars. All uses changed.
(uintmax_from_header): Renamed from uintmax_from_chars. All uses changed.
(tartime): New function, incorporating isotime.
(isotime): Delete.
(print_header): Use tartime.
Paul Eggert [Tue, 21 Sep 1999 15:13:33 +0000 (15:13 +0000)]
(struct link): Remove unused linkcount member.
(base_64_digits): Move to list.c.
(base_8_digits): Remove.
(to_octal): New function, with some of old contents of to_base.
(to_base): Remove.
(to_base256): New function.
(to_chars): Use base 256, not base 64, for huge values.
(mode_to_chars): Don't use two's complement in GNU format or POSIX format.
(dump_file): Interchange last two arguments. If TOP_LEVEL is negative,
it means we have an incremental dump where we don't know whether this
is a top-level call.
Use deref_stat instead of statx / stat / lstat.
Cast result of alloca.
Check for dates if 0 < top_level, not if listed_incremental_option.
Move multiple-link check after directory check.
Do not dump avoided names.
Dump hard links to symbolic names as links, not as separate symbolic links.
start_header cannot return a null pointer, so don't test for it.
Likewise for find_next_block.
Paul Eggert [Tue, 21 Sep 1999 15:13:33 +0000 (15:13 +0000)]
(<time.h>): No need to include.
(time): No need to declare.
(now): Remove variable.
(extr_init): Don't initialize `now'.
Increment same_permissions_option and same_owner_option if we_are_root
is nonzero; this supports the new --no-same-owner option.
(set_stat): Use start_time instead of `now'.
Paul Eggert [Mon, 20 Sep 1999 06:28:45 +0000 (06:28 +0000)]
(<human.h>): Include.
(print_total_written): Also print human-readable byte count, and bytes/s.
(open_archive, flush_write): Use start_time, not current time.
(flush_read): Report about garbage bytes ignored at end of archive,
but act on non-garbage bytes (instead of ignoring them).
(new_volume): Use WARN for warnings.
Paul Eggert [Sun, 29 Aug 1999 21:32:29 +0000 (21:32 +0000)]
(get_date): Rename outermost local `probe' to `quarter'.
(get_date): Rename latter local `tm' to probe_tm.
From: Jim Meyering <meyering@ascend.com>
Message-ID: <uryn1vafyyc.fsf@ixi.eng.ascend.com>
Paul Eggert [Mon, 23 Aug 1999 09:55:55 +0000 (09:55 +0000)]
Remove lint.
(name_gather): Handle trailing -C option correctly.
(addname): use memcpy, not strncpy, to copy a string of known length.
(name_match): Handle trailing -C option correctly.
Propagate -C option to following files.
Simplify matching code.
(name_scan): Simplify matching code.
Paul Eggert [Mon, 23 Aug 1999 09:55:55 +0000 (09:55 +0000)]
Remove lint.
(long_options, usage, main): -y is now -I (for --bzip).
(usage): Fix misspelling.
(OPTION_STRING): -y is now -I.
(decode_options): Use -1, not EOF, for getopt_long result.
Fix typo when invoking xstrtoumax: look for LONGINT_OK, not LONG_MAX.
Handle operands after any "--" argument.
(main): Report any output errors.
Paul Eggert [Mon, 23 Aug 1999 09:55:55 +0000 (09:55 +0000)]
Add copyright notice.
(<stdio.h>): Include only if testing.
(ISUPPER): Remove.
(ISLOWER): New macro.
(<string.h>): Include if HAVE_STRING_H, not USG.
(bcopy): Remove.
(yymaxdepth, ..., yycheck): Don't bother to redefine, since we can assume
bison.
(EPOCH_YEAR): Renamed from EPOCH.
(table): Renamed from TABLE.
(meridian): Now an anonymous enum.
(struct parser_control): New type.
(YYLEX_PARAM, YYPARSE_PARAM, YYSTYPE): New macros.
(yyInput, ..., yyRelYear): Migrated into struct parser_control.
(%pure_parser): Added, so that the parser is pure.
(%union): Removed; the type is now just plain int.
All %type directives removed.
(tLOCAL_ZONE): New %token.
(month_day_table): Renamed from MonthDayTable.
(gmtime, localtime, mktime, time): Declare only if not defined.
(meridian_table): New table.
(dst_table): New table.
(units_table): renamed from UnitsTable.
(relative_time_table): Renamed from OtherTable.
(time_zone_table): Renamed from TimezoneTable. Modernized.
(military_table): Renamed from MilitaryTable.
(to_hour): Renamed from ToHour.
(to_year): Renamed from ToYear.
(lookup_zone): New function.
(LookupWord): Renamed from lookup_word. Use lookup_zone for time zones.
(yylex): Now reentrant. All callers changed.
(get_date): Add support for local time zone abbreviations.
Make it reentrant.
Paul Eggert [Fri, 20 Aug 1999 08:53:21 +0000 (08:53 +0000)]
(name_next): Use chdir_from_initial_wd, not chdir.
(name_gather): Handle `-C x -C y' correctly.
Do not rely on addname to handle -C.
(addname): New CHANGE_DIR parameter.
Remove ugly calls to getcwd; no longer needed now that we have save-cwd.
(name_match): Use chdir_from_initial_wd, not chdir.
(name_from_list): Likewise.
Paul Eggert [Fri, 20 Aug 1999 08:41:32 +0000 (08:41 +0000)]
(to_chars): Generate GNU base-64 representation if we are generating
an old or new GNU format tar file for a number that can't be represented
with the POSIX format.
Paul Eggert [Fri, 20 Aug 1999 08:41:32 +0000 (08:41 +0000)]
(max): New macro.
(isotime): Now takes time_t, not time_t *. Report the decimal values
of times that can't be broken down.
(print_header): Don't assume that major and minor device numbers can
fit into uintmax_t.
Paul Eggert [Wed, 18 Aug 1999 07:52:26 +0000 (07:52 +0000)]
(read_and, list_archive): Simplify code.
(read_header): Fix computation of signed checksums on machines where
char is unsigned.
Do not consider a block to be zero unless all its bytes are zero,
even the checksum bytes. Do not attempt to parse the checksum of
a zero block. Fix memory leak with long names and links.
(from_chars): Accommodate a buggy tar that outputs leading NUL
if the previous field overflows.
(skip_extended_headers): Don't assume find_next_block yields nonnull.
Paul Eggert [Wed, 18 Aug 1999 07:52:26 +0000 (07:52 +0000)]
(extract_sparse_file, extract_archive): Don't assume find_next_block yields nonnull.
(extract_archive): Fix sparse array bug: we did not find end of array
correctly.
Paul Eggert [Sat, 14 Aug 1999 07:10:19 +0000 (07:10 +0000)]
(time): Don't declare if defined.
(child_open_for_compress): Undo previous change.
(close_archive): Use waitpid, POSIX-style, instead of old BSD style.
(new_volume): Likewise.
Paul Eggert [Sat, 14 Aug 1999 07:10:19 +0000 (07:10 +0000)]
(start_header): Include text of ignored filesystem prefix in warning.
(create_archive): Check for excluded names when doing incremental
pass through directory.
(dump_file): Do not dump old files explicitly given on command line
when using --listed-incremental. Do not strip ./ from front of file names.
Paul Eggert [Sat, 14 Aug 1999 07:10:19 +0000 (07:10 +0000)]
(isotime): Report ??? if localtime returns null.
Don't assume years fit into four digits.
Don't append trailing newline.
(print_header): Report ??? if localtime returns null;
Don't assume years fit into four digits.
Paul Eggert [Wed, 11 Aug 1999 12:47:01 +0000 (12:47 +0000)]
(long_options, usage, OPTION_STRING, decode_options):
New -y or --bzip2 option.
(add_filtered_exclude): New function.
(decode_options): Put excluded patterns with / into excluded_with_slash,
and without / into excluded_without_slash.
Compare newer_mtime_option to its new initial value TYPE_MINIMUM (time_t)
when deciding whether more than one threshold date was specified.