Paul Eggert [Fri, 31 Oct 1997 00:58:55 +0000 (00:58 +0000)]
(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.
Paul Eggert [Fri, 31 Oct 1997 00:58:55 +0000 (00:58 +0000)]
(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.
Paul Eggert [Fri, 31 Oct 1997 00:58:55 +0000 (00:58 +0000)]
(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.
Paul Eggert [Fri, 31 Oct 1997 00:58:55 +0000 (00:58 +0000)]
(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.
Paul Eggert [Fri, 31 Oct 1997 00:58:55 +0000 (00:58 +0000)]
(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.
Paul Eggert [Fri, 31 Oct 1997 00:58:55 +0000 (00:58 +0000)]
(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.