if ( Z_OK != r)
{
- ds_put_format (zm->errs, _("Cannot initialize inflator: %s"), zError (r));
+ ds_put_format (zm->errmsgs, _("Cannot initialize inflator: %s"), zError (r));
return false;
}
return n - inf->zss.avail_out;
}
- ds_put_format (zm->errs, _("Error inflating: %s"), zError (r));
+ ds_put_format (zm->errmsgs, _("Error inflating: %s"), zError (r));
return -1;
}
comp_code (struct zip_member *zm, uint16_t c)
{
enum compression which;
+ assert (zm->errmsgs);
switch (c)
{
case 0:
which = COMPRESSION_INFLATE;
break;
default:
- ds_put_format (zm->errs, _("Unsupported compression type (%d)"), c);
+ ds_put_format (zm->errmsgs, _("Unsupported compression type (%d)"), c);
which = n_COMPRESSION;
break;
}
void
zip_member_finish (struct zip_member *zm)
{
- ds_clear (zm->errs);
+ ds_clear (zm->errmsgs);
/* Probably not useful, because we would have to read right to the end of the member
if (zm->expected_crc != zm->crc)
{
{
int bytes_read = 0;
- ds_clear (zm->errs);
+ ds_clear (zm->errmsgs);
if ( bytes > zm->bytes_unread)
bytes = zm->bytes_unread;
uint16_t comp_type;
ds_clear (zr->errs);
+ zm->errmsgs = zr->errs;
if ( ! check_magic (zr->fr, MAGIC_SOCD, zr->errs))
return NULL;
zm->fp = fopen (zr->filename, "rb");
zm->ref_cnt = 1;
- zm->errs = zr->errs;
+
return zm;
}
if ( 0 != fseeko (zm->fp, zm->offset, SEEK_SET))
{
const char *mm = strerror (errno);
- ds_put_format (zm->errs, _("Failed to seek to start of member `%s': %s"), zm->name, mm);
+ ds_put_format (zm->errmsgs, _("Failed to seek to start of member `%s': %s"), zm->name, mm);
return NULL;
}
if (strcmp (name, zm->name) != 0)
{
- ds_put_format (zm->errs,
+ ds_put_format (zm->errmsgs,
_("Name mismatch in zip archive. Central directory says `%s'; local file header says `%s'"),
zm->name, name);
free (name);