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 /include/mupdf/fitz/stream.h | |
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 'include/mupdf/fitz/stream.h')
-rw-r--r-- | include/mupdf/fitz/stream.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/include/mupdf/fitz/stream.h b/include/mupdf/fitz/stream.h index be59a7a0..e336fd5d 100644 --- a/include/mupdf/fitz/stream.h +++ b/include/mupdf/fitz/stream.h @@ -33,7 +33,6 @@ typedef struct fz_stream_s fz_stream; */ fz_stream *fz_open_file(fz_context *ctx, const char *filename); -fz_stream *fz_open_file_ptr_progressive(fz_context *ctx, FILE *file, int bps); fz_stream *fz_open_file_progressive(fz_context *ctx, const char *filename, int bps); /* @@ -47,17 +46,6 @@ fz_stream *fz_open_file_progressive(fz_context *ctx, const char *filename, int b fz_stream *fz_open_file_w(fz_context *ctx, const wchar_t *filename); /* - fz_open_file: Wrap an open file descriptor in a stream. - - file: An open file descriptor supporting bidirectional - seeking. The stream will take ownership of the file - descriptor, so it may not be modified or closed after the call - to fz_open_file_ptr. When the stream is closed it will also close - the file descriptor. -*/ -fz_stream *fz_open_file_ptr(fz_context *ctx, FILE *file); - -/* fz_open_memory: Open a block of memory as a stream. data: Pointer to start of data block. Ownership of the data block is @@ -107,7 +95,7 @@ void fz_drop_stream(fz_context *ctx, fz_stream *stm); /* fz_tell: return the current reading position within a stream */ -fz_off_t fz_tell(fz_context *ctx, fz_stream *stm); +int64_t fz_tell(fz_context *ctx, fz_stream *stm); /* fz_seek: Seek within a stream. @@ -118,7 +106,7 @@ fz_off_t fz_tell(fz_context *ctx, fz_stream *stm); whence: From where the offset is measured (see fseek). */ -void fz_seek(fz_context *ctx, fz_stream *stm, fz_off_t offset, int whence); +void fz_seek(fz_context *ctx, fz_stream *stm, int64_t offset, int whence); /* fz_read: Read from a stream into a given data block. @@ -256,7 +244,7 @@ typedef void (fz_stream_close_fn)(fz_context *ctx, void *state); The stream can find it's private state in stm->state. */ -typedef void (fz_stream_seek_fn)(fz_context *ctx, fz_stream *stm, fz_off_t offset, int whence); +typedef void (fz_stream_seek_fn)(fz_context *ctx, fz_stream *stm, int64_t offset, int whence); /* fz_stream_meta_fn: A function type for use when implementing @@ -273,7 +261,7 @@ struct fz_stream_s int refs; int error; int eof; - fz_off_t pos; + int64_t pos; int avail; int bits; unsigned char *rp, *wp; |