From f5f7c0e4dd83257f526b158e3998970717852a0e Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 17 Jul 2013 18:42:33 +0100 Subject: 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 --- source/fitz/error.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/fitz/error.c') 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); +} -- cgit v1.2.3