Lines 937-946
open_inarch (const char *archive_filename, const char *file)
Link Here
|
937 |
static void |
937 |
static void |
938 |
print_contents (bfd *abfd) |
938 |
print_contents (bfd *abfd) |
939 |
{ |
939 |
{ |
940 |
size_t ncopied = 0; |
940 |
bfd_size_type ncopied = 0; |
941 |
char *cbuf = (char *) xmalloc (BUFSIZE); |
941 |
char *cbuf = (char *) xmalloc (BUFSIZE); |
942 |
struct stat buf; |
942 |
struct stat buf; |
943 |
size_t size; |
943 |
bfd_size_type size; |
944 |
if (bfd_stat_arch_elt (abfd, &buf) != 0) |
944 |
if (bfd_stat_arch_elt (abfd, &buf) != 0) |
945 |
/* xgettext:c-format */ |
945 |
/* xgettext:c-format */ |
946 |
fatal (_("internal stat error on %s"), bfd_get_filename (abfd)); |
946 |
fatal (_("internal stat error on %s"), bfd_get_filename (abfd)); |
Lines 954-965
print_contents (bfd *abfd)
Link Here
|
954 |
while (ncopied < size) |
954 |
while (ncopied < size) |
955 |
{ |
955 |
{ |
956 |
|
956 |
|
957 |
size_t nread; |
957 |
bfd_size_type nread; |
958 |
size_t tocopy = size - ncopied; |
958 |
bfd_size_type tocopy = size - ncopied; |
959 |
if (tocopy > BUFSIZE) |
959 |
if (tocopy > BUFSIZE) |
960 |
tocopy = BUFSIZE; |
960 |
tocopy = BUFSIZE; |
961 |
|
961 |
|
962 |
nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd); |
962 |
nread = bfd_bread (cbuf, tocopy, abfd); |
963 |
if (nread != tocopy) |
963 |
if (nread != tocopy) |
964 |
/* xgettext:c-format */ |
964 |
/* xgettext:c-format */ |
965 |
fatal (_("%s is not a valid archive"), |
965 |
fatal (_("%s is not a valid archive"), |
Lines 990-998
extract_file (bfd *abfd)
Link Here
|
990 |
{ |
990 |
{ |
991 |
FILE *ostream; |
991 |
FILE *ostream; |
992 |
char *cbuf = (char *) xmalloc (BUFSIZE); |
992 |
char *cbuf = (char *) xmalloc (BUFSIZE); |
993 |
size_t nread, tocopy; |
993 |
bfd_size_type nread, tocopy; |
994 |
size_t ncopied = 0; |
994 |
bfd_size_type ncopied = 0; |
995 |
size_t size; |
995 |
bfd_size_type size; |
996 |
struct stat buf; |
996 |
struct stat buf; |
997 |
|
997 |
|
998 |
if (bfd_stat_arch_elt (abfd, &buf) != 0) |
998 |
if (bfd_stat_arch_elt (abfd, &buf) != 0) |
Lines 1027-1033
extract_file (bfd *abfd)
Link Here
|
1027 |
if (tocopy > BUFSIZE) |
1027 |
if (tocopy > BUFSIZE) |
1028 |
tocopy = BUFSIZE; |
1028 |
tocopy = BUFSIZE; |
1029 |
|
1029 |
|
1030 |
nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd); |
1030 |
nread = bfd_bread (cbuf, tocopy, abfd); |
1031 |
if (nread != tocopy) |
1031 |
if (nread != tocopy) |
1032 |
/* xgettext:c-format */ |
1032 |
/* xgettext:c-format */ |
1033 |
fatal (_("%s is not a valid archive"), |
1033 |
fatal (_("%s is not a valid archive"), |