Commit Graph

751 Commits

Author SHA1 Message Date
Paul Eggert 27b98aa8ae * src/buffer.c (reading_from_pipe): Remove. All uses removed.
(short_read): Don't warn about short reads; they're normal.
* tests/shortrec.at: New file.
* tests/testsuite.at: Include it.
2005-04-18 18:21:50 +00:00
Paul Eggert 005d0d455c Use UTF-8 uniformly, rather than UTF-8 sometimes and Latin-1 sometimes. 2005-04-16 07:22:13 +00:00
Sergey Poznyakoff d7af510d49 (SOLARIS_XHDTYPE): New define 2005-04-14 13:14:38 +00:00
Sergey Poznyakoff ef0e611663 Handle Solaris 'X' type flag 2005-04-14 13:14:23 +00:00
Sergey Poznyakoff 2d34da98d5 Assign orig_file_name
to save_name uniformly over the program. This fixes matching
directory names at the start of an archive volume.
2005-04-07 17:27:07 +00:00
Sergey Poznyakoff 781d3818e5 (diff_init): Read directory file if in listed
incremental. This prevents spurious 'Contents differ' diagnostics.
(diff_archive): Minor fixes to text messages
(diff_file,diff_dumpdir,diff_multivol): Assign orig_file_name
to save_name uniformly over the program. This fixes matching
directory names at the start of an archive volume.
2005-04-07 17:26:42 +00:00
Sergey Poznyakoff c861b96651 (flush_write): Warn when the name of the archive
straddling volume boundary is longer than 100 characters. Earlier
behavior was to issue a fatal error.
(struct zip_magic): Reverted part of changes from 2005-04-04.
They make the maintenance too costly. Removing `unsigned'
qualifier from `magic' member should be enough.
2005-04-07 17:26:11 +00:00
Sergey Poznyakoff 2872a5ae81 Minor fixes to text messages. Proposed by Benno Schulenberg.
(extract_file): Assign orig_file_name
        to save_name uniformly over the program. This fixes matching
        directory names at the start of an archive volume.
2005-04-07 17:25:29 +00:00
Sergey Poznyakoff 62599b5285 Minor fixes to text messages. Proposed by Benno Schulenberg. 2005-04-07 17:24:56 +00:00
Paul Eggert 7d4bd5b38d (struct zip_magic): Use char arrays, not pointers.
The unsigned char * pointer ran afoul of pedantic C compilers, and
we didn't need pointers anyway.  Put the size field before the
data to avoid unnecessary padding.  All uses changed.
(magic) Make it const, since it doesn't change.  All uses changed.
2005-04-04 18:21:55 +00:00
Paul Eggert 95fa3422d7 (decode_record): Don't dump core when given
a corrupted extended header.  Problem reported by Jim Meyering.
Also, check for other ways that the header might be invalid,
e.g., missing newline at end.  Do not allow keys with nulls.
Allow blanks before and after length, as POSIX requires.
Do not allow leading "-" in length.  Check for length overflow.
(xheader_decode, xheader_decode_global): Let decode_record
check for exhaustion of record.
(xheader_read): Null-terminate the extended record;
decode_record relies on this.
2005-04-02 06:39:19 +00:00
Sergey Poznyakoff b320151a23 (sparse_scan_file): Bugfix. offset had incorrect type. 2005-03-03 23:13:30 +00:00
Sergey Poznyakoff 9fc348aae9 Correctly parse empty uname/gname 2005-03-03 23:13:14 +00:00
Sergey Poznyakoff 0fd49f51a0 (print_header): Print UID/GID in case of
empty user/group name. This could occur when dumping
files belonging to non-existing users and when listing
broken archives.
Reported by Igor Lautar.
2005-03-03 23:13:04 +00:00
Sergey Poznyakoff 549a691ada Replace strdup with xstrdup 2005-02-15 15:24:35 +00:00
Sergey Poznyakoff 6e63133691 (read_header): Removed assignment to oldgnu_header.isextended. It was breaking append mode. 2005-02-10 22:51:21 +00:00
Sergey Poznyakoff 5c2e32780e Various fixes in help and diagnostic messages 2005-02-06 20:01:22 +00:00
Sergey Poznyakoff cd02b0855c (options): Improved sorting. Document --backup=off.
(decode_options): Clear backup_option if necessary.
2005-02-05 22:03:10 +00:00
Sergey Poznyakoff 35bb355734 (sys_exec_command): Use xclose, xpipe, xfork, xdup2 and exec_fatal. 2005-02-05 22:02:08 +00:00
Sergey Poznyakoff fa63755f6b (exec_error,fork_error,dup2_error,pipe_error): Removed unneeded functions. 2005-02-05 22:01:49 +00:00
Sergey Poznyakoff ea12939af0 (extract_archive): Do not check for EXTRACT_OVER_PIPE, decode_options() does this. 2005-02-05 22:01:08 +00:00
Sergey Poznyakoff 9a71d32d2f Code clean up. 2005-02-05 22:00:48 +00:00
Sergey Poznyakoff 6609c2a607 (EXTRACT_OVER_PIPE): New macro 2005-02-05 22:00:29 +00:00
Sergey Poznyakoff 4d24adbecb Handle new options --to-command,--ignore-command-error 2005-02-05 10:35:18 +00:00
Sergey Poznyakoff 0b939d7dbc (sys_exec_command,sys_wait_command): New functions 2005-02-05 10:34:46 +00:00
Sergey Poznyakoff 75a16f75a9 (exec_error, fork_error, dup_error,pipe_error): New functions 2005-02-05 10:34:25 +00:00
Sergey Poznyakoff e758088191 (extract_file): Handle to_command_option
Fix error recovery: decrease `size' by `written', not
by `count', otherwise tar misses the next header
Do not diagnose write errror if to_command_option
is set, since the command may have exited prematurely.
It would be better to check for sigpipe, though.
(prepare_to_extract): Handle to_command_option
2005-02-05 10:34:01 +00:00
Sergey Poznyakoff f96dc77bbc (to_command_option)
(ignore_command_error_option): New globals
(sys_exec_command,sys_wait_command): New commands
2005-02-05 10:33:25 +00:00
Sergey Poznyakoff 23cf312ef1 Do not use 8-bit chars in comments 2005-02-05 10:33:05 +00:00
Paul Eggert 8f0112cb23 (from_header): New arg OCTAL_ONLY, normally false.
All uses changed.  Fix typo that sometimes suppressed all "Archive
contains obsolescent base-64 headers" warnings, not just the first
one.
(tar_checksum): Accept only octal checksums, since they aren't
supposed to overflow into weird formats.
2005-02-04 01:52:20 +00:00
Sergey Poznyakoff 0ad4063606 (update_argv): Changed type to void 2005-02-04 01:42:58 +00:00
Sergey Poznyakoff db2d3f2344 Removed unused variables. 2005-02-04 01:42:33 +00:00
Sergey Poznyakoff 5179c0b5e6 Further rewrite 2005-02-04 01:41:32 +00:00
Sergey Poznyakoff d8dc269927 (options) Minor spelling fix 2005-02-04 00:04:40 +00:00
Sergey Poznyakoff 1e2e868af5 Add translators' comments 2005-02-04 00:04:16 +00:00
Sergey Poznyakoff c8764440d9 (extract_archive): Rewritten 2005-02-04 00:03:59 +00:00
Sergey Poznyakoff 59f314a2c4 (start_private_header,write_header_name)
(dump_hard_link): Restore compatibility with 1.13.25
2005-02-04 00:03:42 +00:00
Sergey Poznyakoff 0e45413e1e (OLDGNU_NAME_FIELD_SIZE): New constant 2005-02-04 00:03:15 +00:00
Sergey Poznyakoff 5cf84df777 Add translators' comment 2005-02-03 16:29:08 +00:00
Sergey Poznyakoff 4a7703ff21 Use quote() 2005-02-03 16:28:37 +00:00
Sergey Poznyakoff 91c69c885b (short_read): Use ngettext()
(new_volume): use quote().
2005-02-03 16:28:12 +00:00
Sergey Poznyakoff 198596f161 Extract sparse files even if the output fd is not seekable. 2005-02-02 11:01:49 +00:00
Sergey Poznyakoff 0037ae7f9e Remove inclusion of obstack.h 2005-01-18 01:18:45 +00:00
Sergey Poznyakoff cdb27293db New options --unquote (--no-unquote) and --add-file
(add_file_id,read_name_from_file,update_argv): New functions
(parse_opt): Rewritten handling of -T option. Handle hidden
--HANG option for debugging purposes.
(decode_options): Init unquote_option to true. Init argv_stk.
Remove unneded references to files_from_option
2005-01-18 01:12:34 +00:00
Sergey Poznyakoff 937202acb9 (name_file): Removed variable.
(read_name_from_file): Removed function. All callers changed.
(name_close): Removed function. All callers changed.
2005-01-18 01:11:56 +00:00
Sergey Poznyakoff 3971a56b22 (stat_fatal): New function 2005-01-18 01:11:22 +00:00
Sergey Poznyakoff 18ee9a103a Remove inclusion of obstack.h src/incremen.c 2005-01-18 01:11:05 +00:00
Sergey Poznyakoff de772cad88 Include obstack.h
(files_from_option): Removed
(unquote_option): New variable
(stat_fatal): New function
(name_close): Removed function.
2005-01-18 01:10:39 +00:00
Sergey Poznyakoff 4719a5d55b Use memset instead of bzero, memmove
(or memcpy, if appropriate), instead of bcopy, and
strchr/strrchr instead of index/rindex.
Rename isnumber to isnumber_p. Proposed by Albert Chin.
2005-01-13 15:59:26 +00:00
Sergey Poznyakoff d882e8f39b Reworded docstrings for --[no-]same-permissions 2005-01-11 16:28:07 +00:00