summaryrefslogtreecommitdiff
path: root/samus
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2005-06-02 11:34:46 +0200
committerTor Andersson <tor@ghostscript.com>2005-06-02 11:34:46 +0200
commit4ad40244021880e90d670720ac4c3beeac70aebc (patch)
tree7bdf4abc06168d7da4b24998adc2e47ca9f70c84 /samus
parent987d58dfaf4030f43b2a8854e2d246f75465cc57 (diff)
downloadmupdf-4ad40244021880e90d670720ac4c3beeac70aebc.tar.xz
heh. forgot a bunch of files for the new stream stuff.
Diffstat (limited to 'samus')
-rw-r--r--samus/sa_xml.c2
-rw-r--r--samus/sa_zip.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/samus/sa_xml.c b/samus/sa_xml.c
index a7b2c764..4b9ac07a 100644
--- a/samus/sa_xml.c
+++ b/samus/sa_xml.c
@@ -197,7 +197,7 @@ sa_openxml(sa_xmlparser **spp, fz_stream *file, int ns)
len = fz_read(file, buf, XMLBUFLEN);
if (len < 0)
{
- error = fz_throw("ioerror: read failed");
+ error = fz_ioerror(file);
goto cleanup;
}
diff --git a/samus/sa_zip.c b/samus/sa_zip.c
index eb182c01..865d6129 100644
--- a/samus/sa_zip.c
+++ b/samus/sa_zip.c
@@ -131,8 +131,8 @@ static fz_error *findzipendofdir(sa_zip *zip)
int n, i;
filesize = fz_seek(zip->file, 0, 2);
- if (filesize == -1)
- return fz_throw("ioerror: seek failed");
+ if (filesize < 0)
+ return fz_ioerror(zip->file);
maxback = MIN(filesize, 0xFFFF + sizeof buf);
back = MIN(maxback, sizeof buf);
@@ -142,7 +142,7 @@ static fz_error *findzipendofdir(sa_zip *zip)
fz_seek(zip->file, filesize - back, 0);
n = fz_read(zip->file, buf, sizeof buf);
if (n < 0)
- return fz_throw("ioerror: read failed");
+ return fz_ioerror(zip->file);
for (i = n - 4; i > 0; i--)
if (!memcmp(buf + i, "\120\113\5\6", 4))
@@ -241,7 +241,7 @@ static fz_error *reallyopenzipentry(fz_stream **stmp, sa_zip *zip, int idx)
t = fz_seek(zip->file, zip->table[idx].offset, 0);
if (t < 0)
- return fz_throw("ioerror: seek failed");
+ return fz_ioerror(zip->file);
sign = read4(zip->file);
if (sign != 0x04034b50)
@@ -266,7 +266,7 @@ static fz_error *reallyopenzipentry(fz_stream **stmp, sa_zip *zip, int idx)
t = fz_seek(zip->file, namesize + metasize, 1);
if (t < 0)
- return fz_throw("ioerror: seek failed");
+ return fz_ioerror(zip->file);
switch (method)
{