diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-07-17 18:42:33 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-07-19 19:54:27 +0100 |
commit | f5f7c0e4dd83257f526b158e3998970717852a0e (patch) | |
tree | c34ee93ab7773e4fbe48506c97fb515c03707e57 /source/fitz/error.c | |
parent | 3c559928d88fccfe17da4953ea1c93ceb42a90cb (diff) | |
download | mupdf-f5f7c0e4dd83257f526b158e3998970717852a0e.tar.xz |
Initial work on progressive loading
We are testing this using a new -p flag to mupdf that sets a bitrate at
which data will appear to arrive progressively as time goes on. For
example:
mupdf -p 102400 pdf_reference17.pdf
Details of the scheme used here are presented in docs/progressive.txt
Diffstat (limited to 'source/fitz/error.c')
-rw-r--r-- | source/fitz/error.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/fitz/error.c b/source/fitz/error.c index fb0dc77e..0da7d29e 100644 --- a/source/fitz/error.c +++ b/source/fitz/error.c @@ -180,3 +180,10 @@ void fz_rethrow_message(fz_context *ctx, const char *fmt, ...) throw(ctx->error); } + +void fz_rethrow_if(fz_context *ctx, int err) +{ + assert(ctx && ctx->error && ctx->error->errcode >= FZ_ERROR_NONE); + if (ctx->error->errcode == err) + fz_rethrow(ctx); +} |