summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-04-24 16:36:46 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-04-27 15:12:03 +0200
commitce680b96e207c90429eb702c5ee4b9bec177fdfd (patch)
tree2794e8a3efc8ad08d5ca976db4adc3ef10c512a8 /source/pdf
parent9a725130b9b16daa332f8502e24eac9cab4cf9b2 (diff)
downloadmupdf-ce680b96e207c90429eb702c5ee4b9bec177fdfd.tar.xz
Typedef function pointers consistently.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-page.c12
-rw-r--r--source/pdf/pdf-resources.c4
-rw-r--r--source/pdf/pdf-xref.c28
3 files changed, 22 insertions, 22 deletions
diff --git a/source/pdf/pdf-page.c b/source/pdf/pdf-page.c
index 39792c70..f18204fa 100644
--- a/source/pdf/pdf-page.c
+++ b/source/pdf/pdf-page.c
@@ -658,12 +658,12 @@ pdf_new_page(fz_context *ctx, pdf_document *doc)
page->doc = (pdf_document*) fz_keep_document(ctx, &doc->super);
- page->super.drop_page = (fz_page_drop_page_fn *)pdf_drop_page_imp;
- page->super.load_links = (fz_page_load_links_fn *)pdf_load_links;
- page->super.bound_page = (fz_page_bound_page_fn *)pdf_bound_page;
- page->super.first_annot = (fz_page_first_annot_fn *)pdf_first_annot;
- page->super.run_page_contents = (fz_page_run_page_contents_fn *)pdf_run_page_contents;
- page->super.page_presentation = (fz_page_page_presentation_fn *)pdf_page_presentation;
+ page->super.drop_page = (fz_page_drop_page_fn*)pdf_drop_page_imp;
+ page->super.load_links = (fz_page_load_links_fn*)pdf_load_links;
+ page->super.bound_page = (fz_page_bound_page_fn*)pdf_bound_page;
+ page->super.first_annot = (fz_page_first_annot_fn*)pdf_first_annot;
+ page->super.run_page_contents = (fz_page_run_page_contents_fn*)pdf_run_page_contents;
+ page->super.page_presentation = (fz_page_page_presentation_fn*)pdf_page_presentation;
page->obj = NULL;
diff --git a/source/pdf/pdf-resources.c b/source/pdf/pdf-resources.c
index 024beae3..f3b71e23 100644
--- a/source/pdf/pdf-resources.c
+++ b/source/pdf/pdf-resources.c
@@ -77,7 +77,7 @@ pdf_find_image_resource(fz_context *ctx, pdf_document *doc, fz_image *item, unsi
if (!doc->resources.images)
{
- doc->resources.images = fz_new_hash_table(ctx, 4096, 16, -1, (fz_hash_table_drop_fn)pdf_drop_obj);
+ doc->resources.images = fz_new_hash_table(ctx, 4096, 16, -1, (fz_hash_table_drop_fn*)pdf_drop_obj);
pdf_preload_image_resources(ctx, doc);
}
@@ -111,7 +111,7 @@ pdf_find_font_resource(fz_context *ctx, pdf_document *doc, fz_buffer *item, unsi
pdf_obj *res;
if (!doc->resources.fonts)
- doc->resources.fonts = fz_new_hash_table(ctx, 4096, 16, -1, (fz_hash_table_drop_fn)pdf_drop_obj);
+ doc->resources.fonts = fz_new_hash_table(ctx, 4096, 16, -1, (fz_hash_table_drop_fn*)pdf_drop_obj);
/* Create md5 and see if we have the item in our table */
fz_md5_buffer(ctx, item, digest);
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 2b1513fe..2d046bbe 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -2217,15 +2217,15 @@ pdf_new_document(fz_context *ctx, fz_stream *file)
{
pdf_document *doc = fz_new_derived_document(ctx, pdf_document);
- doc->super.drop_document = (fz_document_drop_fn *)pdf_drop_document_imp;
- doc->super.needs_password = (fz_document_needs_password_fn *)pdf_needs_password;
- doc->super.authenticate_password = (fz_document_authenticate_password_fn *)pdf_authenticate_password;
- doc->super.has_permission = (fz_document_has_permission_fn *)pdf_has_permission;
- doc->super.load_outline = (fz_document_load_outline_fn *)pdf_load_outline;
- doc->super.resolve_link = (fz_document_resolve_link_fn *)pdf_resolve_link;
- doc->super.count_pages = (fz_document_count_pages_fn *)pdf_count_pages;
- doc->super.load_page = (fz_document_load_page_fn *)pdf_load_page;
- doc->super.lookup_metadata = (fz_document_lookup_metadata_fn *)pdf_lookup_metadata;
+ doc->super.drop_document = (fz_document_drop_fn*)pdf_drop_document_imp;
+ doc->super.needs_password = (fz_document_needs_password_fn*)pdf_needs_password;
+ doc->super.authenticate_password = (fz_document_authenticate_password_fn*)pdf_authenticate_password;
+ doc->super.has_permission = (fz_document_has_permission_fn*)pdf_has_permission;
+ doc->super.load_outline = (fz_document_load_outline_fn*)pdf_load_outline;
+ doc->super.resolve_link = (fz_document_resolve_link_fn*)pdf_resolve_link;
+ doc->super.count_pages = (fz_document_count_pages_fn*)pdf_count_pages;
+ doc->super.load_page = (fz_document_load_page_fn*)pdf_load_page;
+ doc->super.lookup_metadata = (fz_document_lookup_metadata_fn*)pdf_lookup_metadata;
doc->update_appearance = pdf_update_appearance;
pdf_lexbuf_init(ctx, &doc->lexbuf.base, PDF_LEXBUF_LARGE);
@@ -2610,17 +2610,17 @@ pdf_obj *pdf_progressive_advance(fz_context *ctx, pdf_document *doc, int pagenum
pdf_document *pdf_document_from_fz_document(fz_context *ctx, fz_document *ptr)
{
- return (pdf_document *)((ptr && ptr->count_pages == (void*)pdf_count_pages) ? ptr : NULL);
+ return (pdf_document *)((ptr && ptr->count_pages == (fz_document_count_pages_fn*)pdf_count_pages) ? ptr : NULL);
}
pdf_page *pdf_page_from_fz_page(fz_context *ctx, fz_page *ptr)
{
- return (pdf_page *)((ptr && ptr->bound_page == (void*)pdf_bound_page) ? ptr : NULL);
+ return (pdf_page *)((ptr && ptr->bound_page == (fz_page_bound_page_fn*)pdf_bound_page) ? ptr : NULL);
}
pdf_annot *pdf_annot_from_fz_annot(fz_context *ctx, fz_annot *ptr)
{
- return (pdf_annot *)((ptr && ptr->bound_annot == (void*)pdf_bound_annot) ? ptr : NULL);
+ return (pdf_annot *)((ptr && ptr->bound_annot == (fz_annot_bound_fn*)pdf_bound_annot) ? ptr : NULL);
}
pdf_document *pdf_specifics(fz_context *ctx, fz_document *doc)
@@ -2740,8 +2740,8 @@ static const char *pdf_mimetypes[] =
fz_document_handler pdf_document_handler =
{
NULL,
- (fz_document_open_fn *) pdf_open_document,
- (fz_document_open_with_stream_fn *) pdf_open_document_with_stream,
+ (fz_document_open_fn*)pdf_open_document,
+ (fz_document_open_with_stream_fn*)pdf_open_document_with_stream,
pdf_extensions,
pdf_mimetypes
};