Commit Graph
529 Commits
Author SHA1 Message Date
Paul Eggert a78ab36e1e (<quotearg.h>): New include.
(append_file):
Don't assume that gettext preserves errno.
Quote arbitrary strings in diagnostics.
Check for close error.
1999-12-13 05:11:05 +00:00
Paul Eggert c6720c5a8b ("quotearg.h"): New include.
(usage): Now has __attribute__ ((noreturn)).
(confirm): Report errno if we can't open tty.
(confirm, decode_options):
Quote arbitrary strings in diagnostics.
(OVERWRITE_OPTION): New constant.
(long_options, usage, decode_options): New --overwrite option.
(decode_options): --keep-old-files, --overwrite, and --unlink-first
are now mutually exclusive.
Don't assume that gettext preserves errno.
(main): Set default quoting style to escape_quoting_style.
1999-12-13 05:11:05 +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 aef747068b (decode_oflag): O_APPEND might not be defined. 1999-12-13 04:52:26 +00:00
Paul Eggert a3f819a9d7 (REM_BIAS): Increase from 128 to (1 << 30). 1999-12-13 04:52:26 +00:00
Paul Eggert f0429c4a22 (<quotearg.h>): New include.
(name_init, name_next, name_close, names_notfound, collect_and_sort_names):
Don't assume that gettext preserves errno.
Quote arbitrary strings in diagnostics.
(excluded_name): Fix typo that caused empty patterns to be mishandled.
1999-12-13 04:52:26 +00:00
Paul Eggert 6e9d1539b6 (<quotearg.h>): New include.
(enum permstatus): New enum.
(struct delayed_set_stat): file_name is now at end of buffer, to avoid
two mallocs.  New members file_name_len, invert_permissions, permstatus.
(extr_init): Remove hack that silently adjusted newdir_umask.
(set_mode, set_stat): New args invert_permissions, permstatus, typeflag.
Use these args to decide whether and how to set modes.
(set_mode, set_stat, prepare_to_extract, extract_sparse_file, extract_archive):
Don't assume that gettext preserves errno.
(set_stat): Remove arg symlink_flag; subsumed by typeflag.
(delay_set_stat, repair_delayed_set_stat): New functions.
(make_directories): Avoid mkdir where last part of path is "..".
Create a struct delayed_set_stat for each directory made.
(prepare_to_extract): Renamed from unlink_destination, and
return 0 immediately if to_stdout_option; all callers changed.
(maybe_recoverable): New parameter interdir_made.
Add support for --overwrite.
(extract_sparse_file, extract_archive):
Quote arbitrary strings in diagnostics.
(extract_archive): By default, warn about ".." in member names, and skip them.
Don't open files with O_NONBLOCK or O_APPEND.
Open with O_TRUNC only if --overwrite; otherwise, use O_EXCL to avoid
overwriting them.  Pass only rwxrwxrwx permissions to `open' and `mkdir',
minus the current umask.  Keep track of intermediate directories made,
to avoid looping when making x/../x when x doesn't exist; the
earlier code solved this in a different way that didn't fit well
into the new scheme.  Don't extract permissions onto existing
directories unless --overwrite is given.  Do not add -wx------
permissions to new directories permanently; just do it temporarily.
Remove no-longer-needed hack with MSDOS and directory time stamps.
(apply_delayed_set_stat): New argument specifies which directories to
fix statuses of.  Do not wait until the end of extraction to fix
statuses; instead, fix a directory's status once we exit that directory.
This requires less memory and does the right thing in some cases
where the old method didn't.
(fatal_exit): New function.
1999-12-13 03:26:04 +00:00
Paul Eggert ed7e2ec8a3 (<quotearg.h>): New include.
(start_header): Use `member names' to refer to archive member names, not
`archive names'.  Warn about `..' in member names.
(finish_sparse_file, dump_file):
Quote arbitrary strings in diagnostics.
(finish_sparse_file, dump_file):
Don't assume that gettext preserves errno.
(dump_file): Don't use `access' to determine whether a directory is readable;
this isn't reliable if tar is setuid.  Use `opendir' instead.
Check for readdir and closedir failures.
Don't dump sockets as if they were fifos; just warn and skip.
1999-12-13 03:07:14 +00:00
Paul Eggert 196caec187 (xclose, xdup2, child_open_for_compress, child_open_for_uncompress,
archive_write_error, archive_read_error, flush_archive, close_archive,
init_volume_number, new_volume):
Don't assume that gettext preserves errno.

(xdup2): Don't report errno if dup returns an unexpected nonnegative value.
(open_archive): Reject multivolume verify attempts a bit earlier.
Rename local variable `access', in case it's defined by system header.

(open_archive, backspace_output): Use `Cannot' uniformly, instead of
`Could not' sometimes and `Cannot' others.

(open_archive, flush_read, flush_archive, close_archive, new_volume):
Quote arbitrary strings in diagnostics.

(read_error): Set archive to STDOUT_FILENO temporarily when writing
archive buffer.

(init_volume_number): Check for input and output errors in volno_file.

(new_volume): Use new fatal_exit function to exit, and new xfork
function to fork.
1999-12-13 02:51:14 +00:00
Paul Eggert c291b38642 Use ## on copyright notice. 1999-12-13 02:24:29 +00:00
Paul Eggert 1d0be6dc89 Initial revision 1999-12-13 02:24:29 +00:00
Paul Eggert 79dd2b901c Add --overwrite.
--absolute-names rejects ".." in names.
1999-12-13 02:24:29 +00:00
Paul Eggert 8ac581c8d7 (EXTRA_DIST): Add c-bs-a.m4. 1999-12-13 02:24:29 +00:00
Paul Eggert c05634ea03 Initial revision 1999-12-13 02:18:40 +00:00
Paul Eggert 1b1811108a version 1.13.15 1999-12-03 13:52:46 +00:00
Paul Eggert 86b765527a (dump_file): Undo previous change about diagnosing unexpectely missing
files.  Instead, diagnose them a bit better.

Report that a file changed if its ctime changes; this is more
sensitive than mtime+size, and more accurate.
1999-12-03 13:46:09 +00:00
Paul Eggert c9f5ead8de Remove bogus errno FIXMEs. 1999-12-03 13:04:17 +00:00
Paul Eggert bc9dc01ec3 (name_next): If file names are given both in the
command line (e.g. via -C) and in a file (via -T), do not
ignore the command-line names.
1999-12-03 13:04:17 +00:00
Paul Eggert 3495d84e27 (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.
1999-12-03 13:04:17 +00:00
Paul Eggert f02e40005c Clarify getdate authorship. 1999-12-03 13:03:44 +00:00
Paul Eggert 20db0a5cf1 Backport to autoconf 2.13. 1999-12-03 12:51:25 +00:00
Paul Eggert 822d481ab8 Version 1.13.14. 1999-11-07 22:05:04 +00:00
Paul Eggert 04f1deefad (finish_header): Report block numbers with origin 0, not origin 1. 1999-11-07 22:01:27 +00:00
Paul Eggert 23842e32bb New node create options for --ignore-failed-read.
Remove unused version control symbols.
Modernize texinfo usage.
1999-11-07 21:27:40 +00:00
Paul Eggert 859a4ec01f (usage): Add examples. 1999-11-07 21:15:15 +00:00
Paul Eggert 02519e5575 Include getopt.h.
(long_opts): New constant.
(usage): New function.
(main): Implement --help and --version.
Output usage message if arguments are bad.
1999-11-07 21:06:38 +00:00
Paul Eggert f87e585c51 (to_chars): Remove trailing newline from warning.
(dump_file): Ignore doors.
1999-11-07 21:06:38 +00:00
Paul Eggert 7be178a4d4 (set_stat): Remove duplicate code. 1999-11-07 21:06:38 +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 0ca48105ea (AC_FUNC_FNMATCH): Include fnmatch.h when testing fnmatch. 1999-11-07 21:06:38 +00:00
Paul Eggert 12fa57c63b Fix comment (from meyering fileutils). 1999-10-31 15:47:44 +00:00
Paul Eggert a3bbec5628 Initial revision 1999-10-30 08:03:14 +00:00
Paul Eggert 598799956c version 1.13.13 1999-10-11 06:56:17 +00:00
Paul Eggert bf9a7d3d97 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'.
1999-10-11 06:56:17 +00:00
Paul Eggert 23d6aeb946 Clarify documentation for portable file names. 1999-10-11 06:56:17 +00:00
Paul Eggert a46a204436 (update_archive): Fix typo: last two args to dump_file were interchanged. 1999-10-11 06:56:17 +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 3f3860fd6a (dump_file): Fix typo: last two args to dump_file were interchanged. 1999-10-11 06:56:17 +00:00
Paul Eggert cf4065dfe9 (decode_options): Invalid dates are now treated as (time_t) -1.
Redo version message to conform to GNU standards.
1999-10-11 06:56:17 +00:00
Paul Eggert 9f9336cb0a (__attribute__): Don't use if GCC claims to be before 2.8; this is
needed for OPENStep 4.2 cc.  Also, don't use if strict ANSI.
1999-10-03 23:30:09 +00:00
Paul Eggert f4f13c4705 Initial revision 1999-09-26 19:03:20 +00:00
Paul Eggert 5af183358f A read error now causes a nonzero exit status. 1999-09-25 05:50:48 +00:00
Paul Eggert 29929863e8 (write_error): Read error is an error, not just a warning. 1999-09-25 05:47:17 +00:00
Paul Eggert 559eeb2b52 (to_chars): Fix base-256 output. 1999-09-25 05:47:17 +00:00
Paul Eggert edf35a92f8 Version 1.13.12 1999-09-25 00:33:06 +00:00
Paul Eggert 10f585ea2f (print_total_written): Use a format compatible with
Amanda 2.4.1p1.
1999-09-25 00:25:36 +00:00
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