diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2012-08-28 17:34:23 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-08-28 17:34:23 +0200 |
commit | 2597722d7aa1be523058bc8449120d32768f44b3 (patch) | |
tree | 63090b06d0479a237e32d28795d279c511eee25f /xps/xps_zip.c | |
parent | 25552e9f2ec3f17a0ce1cbd8d7818170d132959a (diff) | |
download | mupdf-2597722d7aa1be523058bc8449120d32768f44b3.tar.xz |
Add fz_open_document_with_stream function.
Use a "magic" string for filetype detection: filename or mime-type.
Diffstat (limited to 'xps/xps_zip.c')
-rw-r--r-- | xps/xps_zip.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/xps/xps_zip.c b/xps/xps_zip.c index 099bbf46..e0d1eae9 100644 --- a/xps/xps_zip.c +++ b/xps/xps_zip.c @@ -576,9 +576,8 @@ xps_open_document_with_directory(fz_context *ctx, char *directory) } xps_document * -xps_open_document_with_stream(fz_stream *file) +xps_open_document_with_stream(fz_context *ctx, fz_stream *file) { - fz_context *ctx = file->ctx; xps_document *doc; doc = fz_malloc_struct(ctx, xps_document); @@ -624,7 +623,7 @@ xps_open_document(fz_context *ctx, char *filename) fz_try(ctx) { - doc = xps_open_document_with_stream(file); + doc = xps_open_document_with_stream(ctx, file); } fz_always(ctx) { |