diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-12-18 09:32:48 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-12-18 09:32:48 +0000 |
commit | 6d3622d6cd33022aa35adaa7364b68361c2d6f38 (patch) | |
tree | b431e1b87157090ff40992a2c14e806eb48b57a9 /src/util.c | |
parent | b81abf1464abad4a747033589320e5d7fc2d4f2a (diff) | |
download | cpio-6d3622d6cd33022aa35adaa7364b68361c2d6f38.tar.gz cpio-6d3622d6cd33022aa35adaa7364b68361c2d6f38.tar.bz2 |
(tape_toss_input, warn_if_file_changed): Last argument is off_t
(warn_if_file_changed): Use ngettext
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -384,10 +384,10 @@ tape_buffered_peek (char *peek_buf, int in_des, int num_bytes) /* Skip the next NUM_BYTES bytes of file descriptor IN_DES. */ void -tape_toss_input (int in_des, long num_bytes) +tape_toss_input (int in_des, off_t num_bytes) { - register long bytes_left = num_bytes; /* Bytes needing to be copied. */ - register long space_left; /* Bytes to copy from input buffer. */ + off_t bytes_left = num_bytes; /* Bytes needing to be copied. */ + off_t space_left; /* Bytes to copy from input buffer. */ while (bytes_left > 0) { @@ -566,7 +566,7 @@ copy_files_disk_to_disk (int in_des, int out_des, off_t num_bytes, void warn_if_file_changed (char *file_name, unsigned long old_file_size, - unsigned long old_file_mtime) + off_t old_file_mtime) { struct stat new_file_stat; if ((*xstat) (file_name, &new_file_stat) < 0) @@ -578,8 +578,11 @@ warn_if_file_changed (char *file_name, unsigned long old_file_size, /* Only check growth, shrinkage detected in copy_files_disk_to_{disk,tape}() */ if (new_file_stat.st_size > old_file_size) - error (0, 0, _("File %s grew, %ld new bytes not copied"), - file_name, (long)(new_file_stat.st_size - old_file_size)); + error (0, 0, + ngettext ("File %s grew, %"PRIuMAX" new byte not copied", + "File %s grew, %"PRIuMAX" new bytes not copied", + (long)(new_file_stat.st_size - old_file_size)), + file_name, (uintmax_t) (new_file_stat.st_size - old_file_size)); else if (new_file_stat.st_mtime != old_file_mtime) error (0, 0, _("File %s was modified while being copied"), file_name); |