Commit Graph

69 Commits

Author SHA1 Message Date
Sergey Poznyakoff
17878ad672 New option --first-copy 2003-10-02 10:29:43 +00:00
Sergey Poznyakoff
6c16197226 New option --first-copy 2003-10-02 10:29:00 +00:00
Paul Eggert
00ac26f00c Don't translate "Copyright". 2003-09-24 19:11:44 +00:00
Sergey Poznyakoff
91b2d65e9d Use ngettext where appropriate. 2003-09-05 13:24:15 +00:00
Sergey Poznyakoff
eada0a9b35 New option --strip-path=NUM.
(decode_options) Assign boolean values to bool variables.
2003-09-04 15:48:02 +00:00
Sergey Poznyakoff
8b4453b4e2 (main): Do not check for volume_label_option unless subcommand_option is CREATE_SUBCOMMAND. 2003-09-04 13:59:35 +00:00
Sergey Poznyakoff
0ba3b75ad4 Use DEFAULT_ARCHIVE_FORMAT macro
(archive_format_string): New function.
(usage): Updated help output.
2003-09-03 11:03:07 +00:00
Paul Eggert
14e8c10222 (struct fmttab.name): Now char const *. All uses changed.
(fmttab): Now const.  All uses changed.  Avoid GCC warning by
not eliding initializers.
(set_archive_format): Report an error if no format name matches,
instead of returning an undefined value.
(set_archive_format): Now static.
2003-09-03 06:19:00 +00:00
Sergey Poznyakoff
879ae47aa1 New option --format 2003-09-01 17:02:45 +00:00
Sergey Poznyakoff
db783659b0 (destroy_stat): New function. 2003-08-31 22:45:58 +00:00
Sergey Poznyakoff
a687cf05b7 Removed support for the obsolete command line options. 2003-07-28 11:40:35 +00:00
Sergey Poznyakoff
d52a1bb366 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.
2003-07-27 12:01:59 +00:00
Paul Eggert
42d05fcb6e 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.
2003-07-05 08:18:46 +00:00
Paul Eggert
5a5f4d06e7 Include print-copyr.h, not copysym.h.
(decode_options): Use print_copyright, not copyright_symbol.
(OVERWRITE_DIR_OPTION): New constant.
(long_options, usage, decode_options): Add --overwrite-dir.
2001-09-22 00:47:09 +00:00
Paul Eggert
8571998faa Include copysym.h.
(decode_options): Use copyright_symbol to translate copyright notice,
instead of gettext.
2001-09-14 00:27:39 +00:00
Paul Eggert
8f207b89cf (decode_options):
Use "Copyright %d" to simplify the translator's job in the future.
Advise translator about circle-C.
2001-08-29 06:55:23 +00:00
Paul Eggert
17afd0438f (ANCHORED_OPTION, IGNORE_CASE_OPTION, NO_ANCHORED_OPTION,
NO_IGNORE_CASE_OPTION, NO_WILDCARDS_OPTION, NO_WILDCARDS_MATCH_SLASH_OPTION,
WILDCARDS_OPTION, WILDCARDS_MATCH_SLASH_OPTION): New enum values.

(long_options, usage, decode_options): Add support for --anchored,
--ignore-case, --no-anchored, --no-ignore-case, --no-wildcards,
--no-wildcards-match-slash, --recursion, --wildcards,
--wildcards-match-slash.

(decode_options): Implement the new way of interpreting exclude patterns.

(usage): --newer-mtime takes a DATE operand.  DATE may be a file name.

(OPTION_STRING, decode_options): Add -I, -y.  Currently these options
just print error messages suggesting alternatives.

(add_filtered_exclude): Remove.
2001-08-27 14:41:56 +00:00
Paul Eggert
d32dfe5d5e (time): Do not declare.
(usage): Remove -I as an alias for -T>
(OPTION_STRING): Remove -I.
(decode_options): Dates that look like an absolute path name,
or that start with '.', are presumed to be file names whose
dates are taken.
Remove 'I' as an aliase for 'T'.
Update copyright.
2001-01-13 05:59:29 +00:00
Paul Eggert
04182eb50c Include fnmatch.h. 2000-10-29 22:37:07 +00:00
Paul Eggert
f7767dbad2 (NO_RECURSE_OPTION): Remove.
(long_options): Have getopt set the --no-recursion flag.
(decode_options): Initialize recursion_option to FNM_LEADING_DIR.
Remove case for NO_RECURSE_OPTION.
2000-10-29 05:30:02 +00:00
Paul Eggert
d2f18d9ecb (decode_options): Check that volume label is not too long to overflow
name in tar header block.
2000-10-25 05:21:06 +00:00
Paul Eggert
caf6047e1e Include localedir.h, prepargs.h.
(long_options): Now static.
(long_options, usage, decode_options): -j is now short for --bzip2,
and -I is now an alias for -T.
(decode_options, main): argv is not const pointer now.
(decode_options): Invoke prepend_default_options to support TAR_OPTIONS.
In diagnostic, mention the string that was the invalid blocking factor,
tape length, group, owner, or record size.
--delete is no longer incompatible with -f -, undoing 2000-01-07 change.
(main): Invoke extract_finish at end of extraction.
2000-10-24 06:18:37 +00:00
Paul Eggert
ba2ef4d075 Update copyright year. 2000-01-07 23:02:32 +00:00
Paul Eggert
c598438dd2 (decode_options): Use xalloc_die to report memory exhaustion.
--delete and -f - are now incompatible, since we didn't have time
to fix their bugs.
2000-01-07 19:25:23 +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
859a4ec01f (usage): Add examples. 1999-11-07 21:15:15 +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
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
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
2eaf29f3fb (decode_options): Adjust to addname's new signature. 1999-08-20 08:53:21 +00:00
Paul Eggert
981a4bf1ff -g now implies after_date_option = 1.
-g and -N are now incompatible options.
1999-08-14 07:10:19 +00:00
Paul Eggert
33a2b1fc06 (decode_options): Fix typo in invoking add_exclude_file. 1999-08-11 13:41:56 +00:00
Paul Eggert
cd47c9d597 (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.
1999-08-11 12:47:01 +00:00
Paul Eggert
1f27dca976 (decode_options): ERROR ((TAREXIT_FAILURE, ... -> FATAL_ERROR ((0,
for consistency.
1999-07-20 19:48:30 +00:00
Paul Eggert
617f136b46 (decode_options): Set newer_time_option to TYPE_MINIMUM, so that
negative timestamps are handled correctly.
Replace invocations of xstrtol and xstrtoul with xstrtoumax, for
uniformity (and so that we don't need to have the other fns).
(main): Remove call to init_total_written; no longer needed.
1999-07-17 01:49:35 +00:00
Paul Eggert
9e15f49bd0 (usage): tar-bugs@gnu.org -> bug-tar@gnu.org 1999-07-14 15:13:25 +00:00
Paul Eggert
07f380748c (decode_options): Initialize `excluded'.
Use new add_exclude_file and add_exclude functions.
1999-07-08 03:45:21 +00:00
Paul Eggert
a8c32ecff2 Include signal.h.
(SIGCHLD): Define to SIGCLD if SIGCLD is defined but SIGCHLD is not.
(main): Ensure SIGCHLD is not ignored, so that we can fork and wait.
1999-07-03 00:00:19 +00:00
Paul Eggert
6f1783ad43 (BACKUP_OPTION, DELETE_OPTION, EXCLUDE_OPTION, GROUP_OPTION,
MODE_OPTION, NEWER_MTIME_OPTION, NO_RECURSE_OPTION, NULL_OPTION,
OWNER_OPTION, POSIX_OPTION, PRESERVE_OPTION, RECORD_SIZE_OPTION,
RSH_COMMAND_OPTION, SUFFIX_OPTION, USE_COMPRESS_PROGRAM_OPTION,
VOLNO_FILE_OPTION, OBSOLETE_ABSOLUTE_NAMES, OBSOLETE_BLOCK_COMPRESS,
OBSOLETE_BLOCKING_FACTOR, OBSOLETE_BLOCK_NUMBER,
OBSOLETE_READ_FULL_RECORDS, OBSOLETE_TOUCH, OBSOLETE_VERSION_CONTROL):
Make sure they can't be valid chars, so they don't overlap with char codes.
Use an enum instead of a lot of #defines.
(long_options, main, usage): Remove --ending-file option.
(OPTION_STRING): Remove -E.
1999-07-02 21:33:51 +00:00
Paul Eggert
6290150c47 Fix copyright notice. 1999-07-01 21:01:44 +00:00
Paul Eggert
ec424c77a9 Move include of backupfile.h to common.h. 1999-06-16 12:44:52 +00:00
Paul Eggert
72adbbda36 (backup_type): Remove decl; backupfile.h now has it.
(intconv): Remove; use xstrto* fns instead.
("xstrtol.h"): Include.
(check_decimal): Remove.
(long_options, usage, OPTION_STRING, decode_options):
Remove -y, --bzip2, --unbzip2.
(decode_options): Use xget_version instead of get_version.
Check for overflow with -b and -L and RECORD_SIZE_OPTION.
Replace invocations of check_decimal  with xstrtoumax.
1999-06-16 11:14:15 +00:00
Paul Eggert
f561403bad (long_options, usage): Prefer --unbzip2 to --bunzip2. 1999-02-20 06:04:28 +00:00
Paul Eggert
16368da655 Update copyright. 1999-02-01 08:10:25 +00:00
Paul Eggert
6ccb513321 (long_options, usage, OPTION_STRING, decode_options):
Add -y or --bzip2 or --bunzip2 option.
1999-02-01 07:51:19 +00:00
Paul Eggert
562d543b2d (decode_options): Don't pass names longer than UNAME_FIELD_SIZE to
uname_to_uid, as it messes up the cache.  Similarly for gname_to_uid.
1999-01-31 02:52:16 +00:00
junio
d1f1e3a189 Implement -E (ending-file) option. 1997-12-04 06:37:52 +00:00
Paul Eggert
88ea940c0e (check_decimal): Now returns 1 if successful, 0 otherwise, and returns
uintmax_t value into new arg.  Check for arithmetic overflow.
(decode_options): Avoid overflow if record_size fits in size_t but not int.
Check for overflow on user or group ids.
1997-10-31 00:58:55 +00:00
Paul Eggert
5e0e89eac1 GNU tar 1.12 1997-04-25 20:09:49 +00:00
François Pinard
2c4ed788dd *** empty log message *** 1994-11-16 03:03:54 +00:00