summaryrefslogtreecommitdiff
path: root/source/cbz/mucbz.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2016-10-01 12:54:47 +0800
committerSebastian Rasmussen <sebras@gmail.com>2016-10-09 13:18:47 +0800
commitf3947006fb98c72d06b52c36317585d757cc984c (patch)
treef8f8b796da387e7f0afb3ae3008114388ea1cd9c /source/cbz/mucbz.c
parentd34d3b123fa404e57c6b64d89a61a8f28c05ae5b (diff)
downloadmupdf-f3947006fb98c72d06b52c36317585d757cc984c.tar.xz
Open document file in fz_open_document().
This relieves all document formats from reimplementing opening a fz_stream unless the format wants to do something more than just opening the raw file.
Diffstat (limited to 'source/cbz/mucbz.c')
-rw-r--r--source/cbz/mucbz.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/source/cbz/mucbz.c b/source/cbz/mucbz.c
index 29527a0c..8e281c64 100644
--- a/source/cbz/mucbz.c
+++ b/source/cbz/mucbz.c
@@ -220,24 +220,6 @@ cbz_open_document_with_stream(fz_context *ctx, fz_stream *file)
return doc;
}
-static cbz_document *
-cbz_open_document(fz_context *ctx, const char *filename)
-{
- fz_stream *file;
- cbz_document *doc;
-
- file = fz_open_file(ctx, filename);
-
- fz_try(ctx)
- doc = cbz_open_document_with_stream(ctx, file);
- fz_always(ctx)
- fz_drop_stream(ctx, file);
- fz_catch(ctx)
- fz_rethrow(ctx);
-
- return doc;
-}
-
static int
cbz_recognize(fz_context *ctx, const char *magic)
{
@@ -260,6 +242,6 @@ cbz_recognize(fz_context *ctx, const char *magic)
fz_document_handler cbz_document_handler =
{
(fz_document_recognize_fn *)&cbz_recognize,
- (fz_document_open_fn *)&cbz_open_document,
+ (fz_document_open_fn *)NULL,
(fz_document_open_with_stream_fn *)&cbz_open_document_with_stream
};