diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-01-29 12:48:09 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-01-31 11:56:59 +0100 |
commit | dfcdcad55135de602358339bbc3d20bb8bcbf78e (patch) | |
tree | 124b69c0ac41ed72b886187c5645c36069263dc1 /include | |
parent | fbe951f0eaa518e414121495f96080c053a0c759 (diff) | |
download | mupdf-dfcdcad55135de602358339bbc3d20bb8bcbf78e.tar.xz |
Add buffering to fz_output.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/fitz/output.h | 8 |
1 files changed, 7 insertions, 1 deletions
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 @@ -171,6 +172,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. */ void fz_close_output(fz_context *, fz_output *); |