Commit Graph

496 Commits

Author SHA1 Message Date
Sergey Poznyakoff
006d3dc1d5 [MSDOS]: Fixed spelling of EACCES. Added macro overriding broken mkdir prototypes. 2003-10-08 11:18:01 +00:00
Sergey Poznyakoff
80e978dc2e Removed spurious includes. 2003-10-08 11:17:52 +00:00
Sergey Poznyakoff
89d2ad35e6 Added missing includes. 2003-10-08 11:17:36 +00:00
Paul Eggert
1e7d274cd8 Fix some misspellings. 2003-10-04 22:30:52 +00:00
Sergey Poznyakoff
0008f61237 Added system.c 2003-10-04 18:19:34 +00:00
Sergey Poznyakoff
a0d91086c4 Moved system dependencies to system.c 2003-10-04 18:18:02 +00:00
Sergey Poznyakoff
c1b9212b16 Moved system dependencies to system.c 2003-10-04 18:14:32 +00:00
Sergey Poznyakoff
3b76d26206 (SET_BINARY_MODE, ERRNO_IS_EACCESS): New defines 2003-10-04 18:13:51 +00:00
Sergey Poznyakoff
719c762d80 Prototypes for functions from system.c 2003-10-04 18:13:37 +00:00
Sergey Poznyakoff
b085ca3097 System-dependent functions 2003-10-04 18:13:02 +00:00
Sergey Poznyakoff
eb6bef9909 New option --occurrence 2003-10-04 14:08:16 +00:00
Sergey Poznyakoff
91493ea9b6 Count number of occurrences of each name in the
archive.
(name_match): Honor --occurence option.
(names_done): Removed
(all_names_found,names_notfound): Rewritten.
2003-10-04 13:50:41 +00:00
Sergey Poznyakoff
dcb7c93527 (read_and): Honor --occurence option. 2003-10-04 13:50:20 +00:00
Sergey Poznyakoff
f4935ab55d (delete_archive_members): Honor --occurence option. 2003-10-04 13:49:46 +00:00
Sergey Poznyakoff
660c6d9b64 (occurrence_option): New global
(struct name): Changed `found' member to `uintmax_t
found_count'.
(names_done): Removed
(all_names_found): Changed prototype.
(ISFOUND,WASFOUND): New macros
2003-10-04 13:49:25 +00:00
Sergey Poznyakoff
a6344f97a6 Removed extra precaution regarding subcommand_option == CAT_SUBCOMMAND 2003-10-02 14:37:24 +00:00
Sergey Poznyakoff
f364d50661 Take regexps into account 2003-10-02 10:41:48 +00:00
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
Sergey Poznyakoff
05b3fdccc1 (read_and): Use all_names_found() as `while' condition. 2003-10-02 10:28:45 +00:00
Sergey Poznyakoff
9373182407 (names_done): New function. 2003-10-02 10:28:30 +00:00
Paul Eggert
00ac26f00c Don't translate "Copyright". 2003-09-24 19:11:44 +00:00
Paul Eggert
07286647fb --strip strips file system prefix too, and it counts adjacent
slashes as if they were one slash.
2003-09-22 18:54:50 +00:00
Sergey Poznyakoff
0289902e4a (cut_path_elements): Added proto. 2003-09-17 10:17:09 +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
3590887776 (cut_path_elements): New functon. 2003-09-04 15:47:26 +00:00
Sergey Poznyakoff
ddab1f615e (extract_archive): Implemented --strip-path 2003-09-04 15:44:44 +00:00
Sergey Poznyakoff
d93cbfbf0b (strip_path_elements): New variable. 2003-09-04 15:44:07 +00:00
Sergey Poznyakoff
f3875c4a26 (xheader_decode): Store the header as well (for eventual delete). 2003-09-04 13:59:52 +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
7645d20465 (read_header): Minor change. 2003-09-04 13:59:03 +00:00
Sergey Poznyakoff
08780d289d Fixed deletion from the POSIX archives. 2003-09-04 13:58:42 +00:00
Sergey Poznyakoff
3f998f69b9 (decode_record): Reversed the return condition. 2003-09-04 09:37:48 +00:00
Sergey Poznyakoff
aea0a1d970 Support for "linkpath" extended keyword 2003-09-04 09:37:05 +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
10edb315da (struct xhdr_tab.keyword): Now pointer to const.
(struct xhdr_tab.coder, struct xhdr_tab.decoder, locate_handler,
decode_record, xheader_store, xheader_print, code_string, code_time,
code_num, dummy_coder, dummy_decoder, atime_coder, atime_decoder,
gid_coder, gid_decoder, gname_coder, gname_decoder, linkpath_coder,
linkpath_decoder, ctime_coder, ctime_decoder, mtime_coder,
mtime_decoder, path_coder, path_decoder, size_coder, size_decoder,
uid_coder, uid_decoder, uname_coder, uname_decoder):
Use pointers to const when possible.
(xhdr_tab): Now const.

(struct xhdr_tab.decoder, dummy_decoder,
atime_decoder, gid_decoder, gname_decoder, linkpath_decoder,
ctime_decoder, mtime_decoder, path_decoder, size_decoder,
uid_decoder, uname_decoder): Remove unused keyword arg.
All uses changed.

(xhdr_tab, format_uintmax): Now static.

(dummy_coder, dummy_decoder, atime_coder,
atime_decoder, gid_coder, gid_decoder, gname_coder, gname_decoder,
linkpath_coder, linkpath_decoder, mtime_coder, mtime_decoder,
ctime_coder, ctime_decoder, path_coder, path_decoder, size_coder,
size_decoder, uid_coder, uid_decoder, uname_coder, uname_decoder):
Remove forward decls; no longer needed.
(xhdr_tab): Move to end, so that the forward decls aren't needed.
Add a forward declaration.

(decode_record): Return bool, not int.

(decode_record): Fix misspelling in diagnostic
"extended headed" -> "extended header".

(decode_record, xheader_decode):
Do not use decls like "char *p, *q;".
2003-09-03 06:22:34 +00:00
Paul Eggert
df06a57b8c (update_archive): Abort if HEADER_SUCCESS_EXTENDED occurs,
as it's not possible.
Pass false to read_header, not 0.
2003-09-03 06:20:41 +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
Paul Eggert
a546fc7c21 (read_and): Abort if HEADER_SUCCESS_EXTENDED occurs, as it's not
possible.  Pass false to read_header, not 0.
2003-09-03 06:15:32 +00:00
Paul Eggert
86a9b9261d (delete_archive_members): Handle case of
HEADER_SUCCESS_EXTENDED followed by HEADER_FAILURE.
Pass true/false to read_header, not 1/0.
2003-09-03 06:14:37 +00:00
Paul Eggert
7653d2f6b8 (write_extended): Remove unused local 'bufsize'. 2003-09-03 06:13:26 +00:00
Paul Eggert
2c390b2c21 (verify_volume): read_header (0) -> read_header (false), since
read_header accepts a bool.
2003-09-03 06:11:52 +00:00
Paul Eggert
c4d396f8d1 (destroy_stat, xheader_decode, xheader_store,
xheader_read, xheader_finish, xheader_destroy): Add decls;
required in C99.
2003-09-03 06:10:55 +00:00
Sergey Poznyakoff
99a5f5d4f9 (xhdr_tab): Reserved GNU keywords (commented out for the time being) 2003-09-03 00:03:32 +00:00
Sergey Poznyakoff
01decb5737 (list_archive): Always decode the header. This
is necessary so the extended header is processed and the correct
filename is printed no matter what the state of verbose_option.
2003-09-03 00:03:09 +00:00
Sergey Poznyakoff
ce059f3cc8 (start_header): Store long file names
in "path" keyword of an extended header if in POSIX
mode.
(finish_header): print header before calling write_extended().
2003-09-03 00:02:32 +00:00
Sergey Poznyakoff
4189af3785 Implemented coder functions. 2003-09-01 17:03:33 +00:00
Sergey Poznyakoff
33b63ebe94 (OLDGNU_COMPATIBILITY): Removed
(struct extra_header): Removed unused structure.
(union block.extra_header): Removed unused member.
2003-09-01 17:03:07 +00:00
Sergey Poznyakoff
879ae47aa1 New option --format 2003-09-01 17:02:45 +00:00