From dfcdcad55135de602358339bbc3d20bb8bcbf78e Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 29 Jan 2018 12:48:09 +0100 Subject: Add buffering to fz_output. --- include/mupdf/fitz/output.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mupdf/fitz/output.h b/include/mupdf/fitz/output.h index 2530be47..e9e13c8e 100644 --- a/include/mupdf/fitz/output.h +++ b/include/mupdf/fitz/output.h @@ -80,6 +80,7 @@ struct fz_output_s fz_output_close_fn *close; fz_output_drop_fn *drop; fz_stream_from_output_fn *as_stream; + char *bp, *wp, *ep; }; /* @@ -93,7 +94,7 @@ struct fz_output_s close: Cleanup function to destroy state when output closed. May permissibly be null. */ -fz_output *fz_new_output(fz_context *ctx, void *state, fz_output_write_fn *write, fz_output_close_fn *close, fz_output_drop_fn *drop); +fz_output *fz_new_output(fz_context *ctx, int bufsiz, void *state, fz_output_write_fn *write, fz_output_close_fn *close, fz_output_drop_fn *drop); /* fz_new_output_with_path: Open an output stream that writes to a @@ -170,6 +171,11 @@ void fz_seek_output(fz_context *ctx, fz_output *out, int64_t off, int whence); */ int64_t fz_tell_output(fz_context *ctx, fz_output *out); +/* + fz_flush_output: Flush unwritten data. +*/ +void fz_flush_output(fz_context *ctx, fz_output *out); + /* fz_close_output: Flush pending output and close an output stream. */ -- cgit v1.2.3