Commit Graph

483 Commits

Author SHA1 Message Date
Paul Eggert
e6d8e9279f (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.
1999-09-24 23:44:52 +00:00
Paul Eggert
825b72c52b (<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.
1999-09-24 23:44:52 +00:00
Paul Eggert
6e36ce5668 (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.
1999-09-23 06:22:31 +00:00
Paul Eggert
a7002a034e (to_chars): Fix typo in decl.
Don't assign through char const *.
Rename name_expand back to collect_and_sort_names.
1999-09-22 06:14:23 +00:00
Paul Eggert
e4e624848b (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.
1999-09-22 06:14:23 +00:00
Paul Eggert
d591c42003 (<time.h>): Remove; not used.
(time): Do not declare.
1999-09-22 06:14:23 +00:00
Paul Eggert
0d70f547f3 (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.
1999-09-21 15:13:33 +00:00
Paul Eggert
5ae88d8a13 (<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'.
1999-09-21 15:13:33 +00:00
Paul Eggert
17e0cd7065 (<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.
1999-09-20 06:28:45 +00:00
Paul Eggert
8793fc2ca2 Initial revision 1999-09-20 06:12:58 +00:00
Paul Eggert
ed0fa614f7 Add --no-same-owner, --no-same-permissions.
Modernize sample backup script.
1999-09-20 06:12:58 +00:00
Paul Eggert
a9e349319b (EXTRA_DIST): Add fnmatch.m4. 1999-09-20 06:12:58 +00:00
Paul Eggert
26fd2b79db (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>
1999-08-29 21:32:29 +00:00
Paul Eggert
269a3b3ed2 (PC): New macro; use it when possible.
(number): Handle `Nov 11 1996' example correctly.
See Risks Digest 20.55 (1999-08-27).
1999-08-28 07:50:29 +00:00
Paul Eggert
77de7dbb2f Fix typo in previous change. 1999-08-23 11:03:47 +00:00
Paul Eggert
4732e8a4da (first_mangle, mangled_num): Remove. 1999-08-23 10:55:51 +00:00
Paul Eggert
edf0754a95 spelling fix 1999-08-23 09:55:55 +00:00
Paul Eggert
0b277662d5 spelling corrections 1999-08-23 09:55:55 +00:00
Paul Eggert
bd5bbd4f65 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.
1999-08-23 09:55:55 +00:00
Paul Eggert
db16e89362 Remove lint.
(main): status is ssize_t, not long.
1999-08-23 09:55:55 +00:00
Paul Eggert
276d317d88 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.
1999-08-23 09:55:55 +00:00
Paul Eggert
43085596a3 Remove lint. 1999-08-23 09:55:55 +00:00
Paul Eggert
cc9d6c88f9 Lint removal. 1999-08-23 09:55:55 +00:00
Paul Eggert
b8ae0938a4 Lint cleanup.
(open_archive): Use American spelling in diagnostic.
1999-08-23 09:55:55 +00:00
Paul Eggert
aeef457460 Lint cleanup.
(linklist): Now static.
(to_chars): Fix wording of message to match from_chars.
1999-08-23 09:55:55 +00:00
Paul Eggert
aa904fd8ec Lint cleanup.
(from_chars): Report out-of-range values more precisely.
(off_from_chars): Do not allow negative offsets.
(uid_from_chars): Allow negative uids.
1999-08-23 09:55:55 +00:00
Paul Eggert
c270f6f1b2 Lint cleanup. 1999-08-23 09:55:55 +00:00
Paul Eggert
c0d324c43c 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.
1999-08-23 09:55:55 +00:00
Paul Eggert
38d825f34b 1.13.11 1999-08-23 09:55:55 +00:00
Paul Eggert
6b6064c3fa --bzip2 is now -I. Remove bogus time zone info.
Fix spelling.
1999-08-23 09:55:55 +00:00
Paul Eggert
984190dcc6 (time): Do not declare if defined.
(first_mangle, mangled_num): Now static.
1999-08-23 09:55:55 +00:00
Paul Eggert
2ac3be1648 version 1.13.10 1999-08-20 09:13:42 +00:00
Paul Eggert
f74aea3ae3 (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.
1999-08-20 08:53:21 +00:00
Paul Eggert
2eaf29f3fb (decode_options): Adjust to addname's new signature. 1999-08-20 08:53:21 +00:00
Paul Eggert
2c3d0a2dcd (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.
1999-08-20 08:41:32 +00:00
Paul Eggert
6dccec3ba4 (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.
1999-08-20 08:41:32 +00:00
Paul Eggert
f34eafea87 (TimezoneTable): Modernize to current tz data. 1999-08-20 08:41:32 +00:00
Paul Eggert
6a5e9283fb (EXTRA_DIST): Add getline.m4. 1999-08-20 08:41:32 +00:00
Paul Eggert
22ee808ffe (from_chars): Skip only the initial null byte from buggy tars, so that
we don't complain about all-null fields.
1999-08-18 09:24:42 +00:00
Paul Eggert
3c47b1f080 (EXTRA_DIST): Add signedchar.m4. 1999-08-18 08:37:16 +00:00
Paul Eggert
d9c7673472 version 1.13.9 1999-08-18 08:05:06 +00:00
Paul Eggert
f9d278ba35 Comment fix. 1999-08-18 07:52:26 +00:00
Paul Eggert
f5116dd1db (write_eot): Write at least two zero blocks. 1999-08-18 07:52:26 +00:00
Paul Eggert
c62fe41ec5 (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.
1999-08-18 07:52:26 +00:00
Paul Eggert
72290b64a6 (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.
1999-08-18 07:52:26 +00:00
Paul Eggert
34183f8d77 Fix a few more white-space glitches. 1999-08-18 07:49:49 +00:00
Paul Eggert
9939476576 Comment fix. 1999-08-18 07:49:49 +00:00
Paul Eggert
fcde5487eb Ghostscript 6.0 1999-08-17 19:59:28 +00:00
Paul Eggert
c977f9dd60 version 1.13.8 1999-08-16 08:13:20 +00:00
Paul Eggert
0357ce3365 indenting fixes. 1999-08-16 08:13:20 +00:00