diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-08-17 15:01:09 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-11-01 13:08:56 +0100 |
commit | f595e889b91a674eb94db7ca4d832da54f5194cd (patch) | |
tree | 273b4a7cc465477e428d0c628a19a61301baaae0 /source/fitz/filter-basic.c | |
parent | 2910531c99e80bede06d2f1460459e8f6ce79961 (diff) | |
download | mupdf-f595e889b91a674eb94db7ca4d832da54f5194cd.tar.xz |
Use int64_t for public file API offsets.
Don't mess with conditional compilation with LARGEFILE -- always expose
64-bit file offsets in our public API.
Diffstat (limited to 'source/fitz/filter-basic.c')
-rw-r--r-- | source/fitz/filter-basic.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/fitz/filter-basic.c b/source/fitz/filter-basic.c index 959006f9..b64d8b66 100644 --- a/source/fitz/filter-basic.c +++ b/source/fitz/filter-basic.c @@ -16,7 +16,7 @@ struct null_filter { fz_stream *chain; size_t remain; - fz_off_t offset; + int64_t offset; unsigned char buffer[4096]; }; @@ -41,8 +41,8 @@ next_null(fz_context *ctx, fz_stream *stm, size_t max) return EOF; state->chain->rp += n; state->remain -= n; - state->offset += (fz_off_t)n; - stm->pos += (fz_off_t)n; + state->offset += (int64_t)n; + stm->pos += (int64_t)n; return *stm->rp++; } @@ -56,7 +56,7 @@ close_null(fz_context *ctx, void *state_) } fz_stream * -fz_open_null(fz_context *ctx, fz_stream *chain, int len, fz_off_t offset) +fz_open_null(fz_context *ctx, fz_stream *chain, int len, int64_t offset) { struct null_filter *state = NULL; @@ -106,7 +106,7 @@ next_concat(fz_context *ctx, fz_stream *stm, size_t max) { stm->rp = state->chain[state->current]->rp; stm->wp = state->chain[state->current]->wp; - stm->pos += (fz_off_t)n; + stm->pos += (int64_t)n; return *stm->rp++; } else @@ -581,7 +581,7 @@ next_arc4(fz_context *ctx, fz_stream *stm, size_t max) stm->wp = state->buffer + n; fz_arc4_encrypt(&state->arc4, stm->rp, state->chain->rp, n); state->chain->rp += n; - stm->pos += (fz_off_t)n; + stm->pos += (int64_t)n; return *stm->rp++; } |