summaryrefslogtreecommitdiff
path: root/stream/filt_faxe.c
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2008-03-21 13:28:39 +0100
committerTor Andersson <tor@ghostscript.com>2008-03-21 13:28:39 +0100
commit4b9181cdb56a9d2015f8d79e90015038f4792334 (patch)
tree507876fcec4f91aa591f3cbf2196f4dcc4deeaad /stream/filt_faxe.c
parent65e3374a2415399ded4624326a01bb9dfa77fa9e (diff)
downloadmupdf-4b9181cdb56a9d2015f8d79e90015038f4792334.tar.xz
Backport of chained error messages from experimental branch.
Diffstat (limited to 'stream/filt_faxe.c')
-rw-r--r--stream/filt_faxe.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/stream/filt_faxe.c b/stream/filt_faxe.c
index 811b5a29..39d46a8c 100644
--- a/stream/filt_faxe.c
+++ b/stream/filt_faxe.c
@@ -75,15 +75,24 @@ fz_newfaxe(fz_filter **fp, fz_obj *params)
fax->c = 0;
fax->ref = fz_malloc(fax->stride);
- if (!fax->ref) { fz_free(fax); return fz_outofmem; }
+ if (!fax->ref)
+ {
+ fz_free(fax);
+ return fz_throw("outofmemory: scanline buffer one");
+ }
fax->src = fz_malloc(fax->stride);
- if (!fax->src) { fz_free(fax); fz_free(fax->ref); return fz_outofmem; }
+ if (!fax->src)
+ {
+ fz_free(fax);
+ fz_free(fax->ref);
+ return fz_throw("outofmemory: scanline buffer two");
+ }
memset(fax->ref, 0, fax->stride);
memset(fax->src, 0, fax->stride);
- return nil;
+ return fz_okay;
}
void
@@ -188,7 +197,7 @@ enc1d(fz_faxe *fax, unsigned char *line, fz_buffer *out)
fax->c = !fax->c;
}
- return 0;
+ return fz_okay;
}
static fz_error *
@@ -245,7 +254,7 @@ enc2d(fz_faxe *fax, unsigned char *ref, unsigned char *src, fz_buffer *out)
}
}
- return 0;
+ return fz_okay;
}
static fz_error *
@@ -349,7 +358,7 @@ process(fz_faxe *fax, fz_buffer *in, fz_buffer *out)
}
if (error)
- return error;
+ return error; /* one of fz_io* */
fax->ridx ++;