Use keywords from the global headers.
Correctly handle UTF-8 conversions.
(xheader_list_destroy): New function.
(xheader_set_single_keyword,xheader_set_keyword_equal): Added
missing gettext markers
(decode_record): Rewritten using caller-provided handler and
data closure.
(dump_file0): The conditional at line
1296 prevented incremental backups on individual files
from working, as reported by Andreas Schuldei
<andreas@schuldei.org>.
This is due to the condition
(0 < top_level || !incremental_option)
Removing it makes incremental backups work for individual
files as well as for directories. On the other hand, it does
not affect other functionality, as shown by the reasoning below:
To begin with, the two parts of this condition are mutually
superfluous, because
1) when top_level < 0, incremental_option == 1
so the condition yields false
2) when top_level >= 0, incremental_option == 0
so the condition yields true.
In other words, it is completely equivalent to
(!incremental_option)
Now, let's consider the effect of its removal. There are two cases:
1) when incremental_option==1
This means incremental backup in progress. In this case dump_file
is invoked only for directories or for files marked with 'Y' by
get_directory_contents. The latter are those that did not meet the
condition in incremen.c:242, which is exactly the same condition
as this at create.c:1296. So, for these files the check
(!incremental_option) is useless, since the rest of the
conditional will yield false anyway. On the other hand, if
dump_file is invoked on a directory, the conditional will yield
false due to !S_ISDIR assertion, so these will be processed as usual.
Thus, for this case the extra condition (!incremental_option) is
irrelevant, and its removal won't alter the behavior of tar,
*except* that it will enable incremental backups on individual
files, which is the wanted effect.
2) when incremental_option==0
In this case the condition yields true and its removal does not
affect the functionality.
(xheader_format_name): Bugfix.
(xheader_xhdr_name): Changed the default extended header name
to '%d/PaxHeaders.%p/%f', as POSIX requires.
(xheader_ghdr_name): Removed unused argument.
(xheader_write,xheader_write_global): New function.
(xheader_decode): Modified to honor overrides whatever
the current archive format is.
(assert_format): Do not bail out if several
--format arguments are given. This is a common case when
TAR_OPTIONS are used.
(decode_options): New option --show-defaults displays the
compiled-in defaults.
Use POSIX format if no --format option was given and
--pax-option was specified.
Do not allow to use --pax-option unless the archive format is
set to POSIX (or reading subcommand is requested).
(start_private_header): Removed static qualifier.
(write_extended): Removed superfluous last argument. Use
xheader_write()
(simple_finish_header): New function.
(finish_header): Use simple_finish_header() to break recursive
dependency between this function and write_extended().
(new_volume,check_label_pattern): Changed return type.
(time_to_start_writing): Changed data type
(file_to_switch_to): Removed. Variable never assigned to.
(open_archive) Moved option compatibility checks to tar.c
Other minor changes.
uid65697 [Thu, 25 Dec 2003 10:20:54 +0000 (10:20 +0000)]
(safer_name_suffix): Reverted change made 2003-11-14. Reason: Discussion with Paul Eggert and Jean-Louis Martineau. See also ChangeLog entry from 1999-08-14.
uid65697 [Thu, 25 Dec 2003 10:20:43 +0000 (10:20 +0000)]
(code_time,decode_time): Support for subsecond precision. (atime_coder,atime_decoder,ctime_coder,ctime_decoder) (mtime_coder,mtime_decoder): Update invocations of code_time and decode_time. (gid_decoder,size_decoder,uid_decoder,sparse_size_decoder) (sparse_numblocks_decoder,sparse_offset_decoder) (sparse_numbytes_decoder): Updated
uid65697 [Thu, 25 Dec 2003 10:19:40 +0000 (10:19 +0000)]
(safer_name_suffix): Reverted change made 2003-11-14. Reason: Discussion with Paul Eggert and Jean-Louis Martineau. See also ChangeLog entry from 1999-08-14.