Commit Graph

40 Commits

Author SHA1 Message Date
Paul Eggert
ba2ef4d075 Update copyright year. 2000-01-07 23:02:32 +00:00
Paul Eggert
c18999bad5 (read_and): Invoke apply_nonancestor_delayed_set_stat on file names
after handling them.
(list_archive): Use consistent message for unexpected EOF.
Use error message functions to report errors consistently.
(read_header): Use xalloc_die to report memory exhaustion.
Use consistent message for unexpected EOF.
(decode_mode): Remove; moved to misc.c.
(skip_file): Use consistent message for unexpected EOF.
(skip_extended_headers): Likewise.
2000-01-07 19:25:23 +00:00
Paul Eggert
df2ff9e4e4 (read_and, list_archive):
Quote arbitrary strings in diagnostics.
(from_header): Use locale_quoting_style to quote diagnostics.
(print_header, print_for_mkdir): Quote with quotearg, not quote_copy_string.
1999-12-13 04:52:26 +00:00
Paul Eggert
c9f5ead8de Remove bogus errno FIXMEs. 1999-12-03 13:04:17 +00:00
Paul Eggert
26505948d9 (from_header): Handle 32-bit two's complement negative time stamps
even if the leading octal digit is 2 or 3.
1999-11-07 21:06:38 +00:00
Paul Eggert
51f0c7c364 (tartime): Now extern.
(read_and): Invalid headers cause errors, not warnings.
1999-10-11 06:56:17 +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
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
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
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
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
da82a07e93 Fix bugs when interpreting POSIX-compliant headers that do not
contain null bytes in the header or link names.
1999-08-16 08:13:20 +00:00
Paul Eggert
eaef08322e (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.
1999-08-14 07:10:19 +00:00
Paul Eggert
67f20a741a (read_header): Don't parse OLDGNU_FORMAT incremental headers
as POSIX prefixes.
1999-08-11 14:43:46 +00:00
Paul Eggert
dc4a8aa0c6 (<fnmatch.h>): Do not include.
(from_chars): Renamed from from_oct.  New parameter specifing
the negative of the minimum allowed value.  Support negative
and base-64 values.
(base64_map): New var.
(base64_init): New function.
(print_header): Output numeric uids and gids if numeric_owner_option.
1999-08-11 12:47:01 +00:00
Paul Eggert
52eb0695e8 Remove S_IS* ifdefs. 1999-07-20 07:09:27 +00:00
Paul Eggert
be4c265a8d (read_and): Exclude pathnames if any of their components are excluded.
(from_oct): Use C quoting style for error; omit trailing nuls.
1999-07-17 01:49:35 +00:00
Paul Eggert
2016526b1a (decode_header): Do not assume that S_IFBLK and S_IFCHR are defined. 1999-07-12 13:03:58 +00:00
Paul Eggert
7962e1901b (read_and): Use excluded_filename instead of check_exclude.
Check base name of incoming file name, not entire file name, when
deciding whether to exclude it.
1999-07-08 03:45:21 +00:00
Paul Eggert
bc88be110b Don't include <ctype.h>; system.h already does this.
(ISODIGIT, ISSPACE): Remove; now in system.h.
(read_and): Excise ending_file_option.
(decode_header): No need to AND mode with 07777; MODE_FROM_OCT
does this now.
(from_oct): Cast ISSPACE arg to unsigned char.
(mode_from_oct): Translate modes from external to internal form.
Do not complain about unrecognized mode bits.
(decode_mode): Do not assume mode bits have traditional Unix values.
1999-07-02 21:25:09 +00:00
Paul Eggert
6290150c47 Fix copyright notice. 1999-07-01 21:01:44 +00:00
Paul Eggert
69e400d4e0 (print_header): Change sizes of uform and gform from 11 to
UINTMAX_STRSIZE_BOUND.
1999-06-16 11:04:02 +00:00
Paul Eggert
f31b9d842b Include <quotearg.h>.
(from_oct): Add forward decl.
(read_header): Return HEADER_FAILURE if we can't parse the checksum.
(from_oct): Report an error only if TYPE is nonzero.
Quote any funny characters in bad header.
1999-03-22 22:06:22 +00:00
Paul Eggert
545ec1a3fa (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct, off_from_oct,
size_from_oct, time_from_oct, uid_from_oct, uintmax_from_oct):
Use TYPE_MAXIMUM instead of macros like OFF_MAX, which are not reliable
(e.g. OFF_MAX in AIX 4.2 is incorrect).
1999-03-02 00:10:11 +00:00
Paul Eggert
c7f56e640d (gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
off_from_oct, size_from_oct, time_from_oct, uid_from_oct):
Cast limit to uintmax_t, for
benefit of pre-ANSI compilers with long long.
1999-01-27 20:42:30 +00:00
Paul Eggert
e1ac06bcca (read_header): Accept file names as specified by POSIX.1-1996 section 10.1.1. 1998-12-07 22:36:22 +00:00
junio
d1f1e3a189 Implement -E (ending-file) option. 1997-12-04 06:37:52 +00:00
Paul Eggert
241bbee81b (read_and, list_archive, read_header, decode_mode, print_header,
print_for_mkdir): Use mode_t, off_t, size_t when appropriate.  Remove
now-useless casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.

(read_header): Check for overflow when converting header size.

(from_oct): Now static.  Now returns uintmax_t.  `where' arg is now
const char *.  Size arg is now size_t.  Now takes new type and maxval
args.  Compute result using uintmax_t, not long.  Report error if
field does not contain octal number in range.
(gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
uintmax_from_oct): New functions.

(stringify_uintmax_t_backwards): New function.

(decode_mode, print_for_mkdir): Mode arg is now mode_t.
(skip_file): Offset arg is now off_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
b7890ac757 GNU tar 1.12 1997-04-25 20:16:30 +00:00
François Pinard
f809340f62 *** empty log message *** 1994-11-16 02:56:17 +00:00
François Pinard
2a29aa0b1d *** empty log message *** 1994-11-16 02:56:14 +00:00
François Pinard
fa8cdce447 *** empty log message *** 1994-11-16 02:56:09 +00:00
François Pinard
05f5fdb687 *** empty log message *** 1994-11-16 02:56:06 +00:00
François Pinard
01474cfa92 *** empty log message *** 1994-11-16 02:56:03 +00:00
François Pinard
35802ae44c *** empty log message *** 1994-11-16 02:56:01 +00:00
François Pinard
5f80b268a8 *** empty log message *** 1994-11-16 02:55:58 +00:00
François Pinard
71c2c8c303 *** empty log message *** 1994-11-16 02:55:53 +00:00
François Pinard
a6961b8e22 Initial revision 1994-11-16 02:55:45 +00:00
François Pinard
5aac7fa0e7 *** empty log message *** 1994-11-16 02:55:42 +00:00
François Pinard
06d985ed13 *** empty log message *** 1994-11-16 02:55:29 +00:00