diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2017-04-26 13:26:45 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2017-04-27 15:12:03 +0200 |
commit | 2208034206c6085fa07063bcc6fdc834d6472912 (patch) | |
tree | 48fcce51c9bfeb4ccedbfb347e625b4429491cfa /source/fitz | |
parent | 722ff826ea46ef49f57b927435d320c67ae37037 (diff) | |
download | mupdf-2208034206c6085fa07063bcc6fdc834d6472912.tar.xz |
Use FZ_SEEK_SET macros for fz_seek.
Don't depend on stdio.h for our own I/O functions.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/untar.c | 4 | ||||
-rw-r--r-- | source/fitz/unzip.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/source/fitz/untar.c b/source/fitz/untar.c index 90b6f24d..d8ae6336 100644 --- a/source/fitz/untar.c +++ b/source/fitz/untar.c @@ -1,7 +1,7 @@ +#include "mupdf/fitz.h" #include "fitz-imp.h" #include <string.h> -#include <stdio.h> typedef struct tar_entry_s tar_entry; typedef struct fz_tar_archive_s fz_tar_archive; @@ -59,7 +59,7 @@ static void ensure_tar_entries(fz_context *ctx, fz_tar_archive *tar) tar->count = 0; - fz_seek(ctx, file, 0, SEEK_SET); + fz_seek(ctx, file, 0, FZ_SEEK_SET); while (1) { diff --git a/source/fitz/unzip.c b/source/fitz/unzip.c index b0907fe8..f2d4f322 100644 --- a/source/fitz/unzip.c +++ b/source/fitz/unzip.c @@ -1,9 +1,10 @@ +#include "mupdf/fitz.h" #include "fitz-imp.h" -#include <zlib.h> - #include <string.h> +#include <zlib.h> + #if !defined (INT32_MAX) #define INT32_MAX 2147483647L #endif @@ -226,7 +227,7 @@ static void ensure_zip_entries(fz_context *ctx, fz_zip_archive *zip) size_t size, back, maxback; size_t i, n; - fz_seek(ctx, file, 0, SEEK_END); + fz_seek(ctx, file, 0, FZ_SEEK_END); size = fz_tell(ctx, file); maxback = fz_minz(size, 0xFFFF + sizeof buf); |