Commit Graph

287 Commits

Author SHA1 Message Date
Paul Eggert
8d5fcefaa2 GNU tar 1.13 1997-12-31 11:01:18 +00:00
junio
4559fdbfb1 Implement -E (ending-file) option. 1997-12-04 07:07:11 +00:00
junio
d1f1e3a189 Implement -E (ending-file) option. 1997-12-04 06:37:52 +00:00
Paul Eggert
83406bb4c3 gtar 1.12 1997-11-19 20:42:34 +00:00
Paul Eggert
56569a0f75 (main): Don't assume mt_count is of type daddr_t. 1997-11-10 19:13:12 +00:00
Paul Eggert
48be206fbf (to_oct): Now static. Value arg is now uintmax_t. Accept new args
giving name of type of octal field, for error messages.  Report an
error if the value is too large to fit in the field.
(gid_to_oct, major_to_oct, minor_to_oct, mode_to_oct, off_to_oct,
size_to_oct, time_to_oct, uid_to_oct, uintmax_to_oct): New functions.

(write_eot, write_long, finish_header, deal_with_sparse,
finish_sparse_file, dump_file): Use dev_t, off_t, ssize_t, size_t when
appropriate.  Remove now-useless casts.  Use unsigned long to print
*_t types, except use STRINGIFY_BIGINT for off_t.

(find_new_file_size): 1st arg is now off_t*.
(finish_sparse_file): Args now use off_t, not long.
Check for lseek error.
(create_archive, dump_file): Cast -1 to dev_t when necessary.
(dump_file): Device arg is now dev_t.
Avoid overflow when testing whether file has holes
by using the new ST_NBLOCKSIZE macro.
1997-10-31 00:58:55 +00:00
Paul Eggert
293c604c5d (rmt_read__, rmt_write__): Now returns ssize_t.
(rmt_lseek): Now returns off_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
ac8cfdacf6 (record_start_block, save_totsize, save_sizeleft, real_s_totsize,
real_s_sizeleft, current_block_ordinal): Now off_t.
(write_error): Arg is now ssize_t.
(child_pid): Now pid_t.
(available_space_after): Now size_t.

(child_open_for_compress, child_open_for_uncompress, flush_write,
open_archive, flush_write, write_error, flush_read, close_archive):
Use pid_t, ssize_t, size_t when appropriate.  Remove now-useless
casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
241bbee81b (read_and, list_archive, read_header, decode_mode, print_header,
print_for_mkdir): Use mode_t, off_t, size_t when appropriate.  Remove
now-useless casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.

(read_header): Check for overflow when converting header size.

(from_oct): Now static.  Now returns uintmax_t.  `where' arg is now
const char *.  Size arg is now size_t.  Now takes new type and maxval
args.  Compute result using uintmax_t, not long.  Report error if
field does not contain octal number in range.
(gid_from_oct, major_from_oct, minor_from_oct, mode_from_oct,
off_from_oct, size_from_oct, time_from_oct, uid_from_oct,
uintmax_from_oct): New functions.

(stringify_uintmax_t_backwards): New function.

(decode_mode, print_for_mkdir): Mode arg is now mode_t.
(skip_file): Offset arg is now off_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
49086e2770 (newdir_umask, current_umask): Now mode_t.
(extract_sparse_file): Args now use off_t.

(set_mode, set_stat, make_directories, extract_sparse_file,
extract_archive): Use off_t, size_t, ssize_t when appropriate.  Remove
now-useless casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
f3531f64fb (name_init): Fix typo in error message: FILE* was passed, but char*
was wanted.

(read_name_from_file, name_gather, addname, name_match, name_scan,
add_exclude): Use size_t when appropriate.  Remove now-useless casts.

(exclude_pool_size, allocated_exclude_pool_size): Now size_t.
1997-10-31 00:58:55 +00:00
Paul Eggert
f2bad2db48 (extract_mangle): Check for overflow when converting off_t to size_t.
Use off_t, size_t when appropriate.  Remove now-useless casts.
1997-10-31 00:58:55 +00:00
Paul Eggert
dab18c15bd (do_command, rmt_open__, rmt_read__, rmt_lseek__, rmt_ioctl__): Use
pid_t, size_t, ssize_t when appropriate.  Remove now-useless casts.
Use unsigned long to print *_t types, except use STRINGIFY_BIGINT for
off_t.

(get_status_string, get_status_off): New function.
(get_status): Now returns long, so that it can store ssize_t.
Invoke get_status_string to do the real work.
(rmt_read__, rmt_write__): Now returns ssize_t.  Size arg is now size_t.
(rmt_lseek__): Now returns off_t, using new get_status_off function.
(rmt_ioctl__): Convert mt_count by hand, since it might be longer than long.
1997-10-31 00:58:55 +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
ac65803ac9 (append_file) Use off_t, size_t, ssize_t when appropriate. Remove
now-useless casts.  Use unsigned long to print *_t types, except use
STRINGIFY_BIGINT for off_t.
(update_archive): Cast -1 to dev_t when necessary.
1997-10-31 00:58:55 +00:00
Paul Eggert
998e6e081d (allocated_size): Now size_t, and now initialized to 0.
(prepare_record_buffer): Arg is now size_t.
Remove now-useless casts.

(main): Use `long' for status, so that it can store ssize_t.
Use daddr_t, mode_t, size_t, off_t when appropriate.
Convert daddr_t and off_t values ourselves, since they might be longer
than long.  Convert other types using `long' primitives.
When processing MTIOCTOP, do not try to pass resulting
count back, since it won't work (it could be too large) and it's
not expected anyway.
1997-10-31 00:58:55 +00:00
Paul Eggert
66f1606886 Clarify 12am vs 12pm vs 12m. 1997-10-27 15:04:02 +00:00
Paul Eggert
41c4811c30 Initial revision 1997-06-09 22:22:27 +00:00
Paul Eggert
3289dce552 GNU tar 1.12 1997-04-25 20:37:23 +00:00
Paul Eggert
1e809b7276 GNU tar 1.13 1997-04-25 20:21:24 +00:00
Paul Eggert
2eec797e22 Initial revision 1997-04-25 20:21:03 +00:00
Paul Eggert
b7890ac757 GNU tar 1.12 1997-04-25 20:16:30 +00:00
Paul Eggert
f112b1363b GNU tar 1.12 1997-04-25 20:11:23 +00:00
Paul Eggert
5e0e89eac1 GNU tar 1.12 1997-04-25 20:09:49 +00:00
Paul Eggert
1d0c64017d GNU tar 1.12 1997-04-25 20:02:46 +00:00
Paul Eggert
ea6fcdf217 gtar 1.12 1997-04-25 17:33:20 +00:00
Paul Eggert
3e3d9b7e39 GNU tar 1.12 1997-04-25 17:10:08 +00:00
Paul Eggert
27e87f4f2f GNU tar 1.12 1997-04-25 13:48:46 +00:00
Paul Eggert
1a110ed9de GNU tar 1.13 1997-04-25 12:50:05 +00:00
Paul Eggert
f6440fc226 GNU tar 1.12 1997-04-25 12:40:32 +00:00
Paul Eggert
89cf4ccc6f GNU tar 1.13 1997-04-25 00:08:58 +00:00
Paul Eggert
0772ef9315 block-size -> blocking 1997-04-24 23:59:17 +00:00
Paul Eggert
ef26f3e717 block-size -> blocking 1997-04-24 23:58:02 +00:00
Paul Eggert
27cd5655e5 GNU tar 1.12 1997-04-24 23:33:59 +00:00
Paul Eggert
1da46c233d GNU tar 1.12 1997-04-24 22:59:57 +00:00
Paul Eggert
3728196fa6 GNU tar 1.12 1997-04-24 14:41:50 +00:00
Paul Eggert
70b61d565b GNU tar 1.12 1997-04-24 14:09:23 +00:00
Paul Eggert
093b818930 GNU tar 1.12 1997-04-24 13:19:40 +00:00
Paul Eggert
077dbd77d4 GNU tar 1.12 1997-04-24 05:53:28 +00:00
Paul Eggert
76dce03c2e GNU tar 1.12 1997-04-24 02:25:57 +00:00
Paul Eggert
51d54e051a GNU tar 1.13 1997-04-23 00:53:18 +00:00
Paul Eggert
818c240503 GNU tar 1.12 1997-04-23 00:05:57 +00:00
Paul Eggert
40480cd3bc GNU tar 1.12 1997-04-22 13:17:00 +00:00
Paul Eggert
be2c991f7b GNU tar 1.12 1997-04-22 06:31:03 +00:00
Paul Eggert
5540d5aaff tar 1.13 1997-04-22 06:05:29 +00:00
Paul Eggert
c782efa45f Initial revision 1997-04-22 05:59:41 +00:00
Paul Eggert
768c69b838 GNU tar 1.12 1997-04-22 05:35:50 +00:00
Paul Eggert
3bc4fa60f3 GNU tar 1.12 1997-04-20 02:43:34 +00:00
Paul Eggert
eed93f9a58 GNU tar 1.12 1997-04-19 22:44:12 +00:00
Paul Eggert
b7ecba0a53 tar 1.12 1997-04-19 19:17:45 +00:00