summaryrefslogtreecommitdiff
path: root/xps
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2012-03-13 13:57:11 +0100
committerTor Andersson <tor.andersson@artifex.com>2012-03-13 13:57:11 +0100
commit48652e529ed1c0ae23cfd45f14d9655ad2849c89 (patch)
treea34e7562a30f3a7e42070f1f5a8763f6d1d608cb /xps
parent9cbfb766564d0e80d259e3e0a919d72a75bbb6ee (diff)
downloadmupdf-48652e529ed1c0ae23cfd45f14d9655ad2849c89.tar.xz
Rename some functions and accessors to be more consistent.
Debug printing functions: debug -> print. Accessors: get noun attribute -> noun attribute. Find -> lookup when the returned value is not reference counted. pixmap_with_rect -> pixmap_with_bbox. We are reserving the word "find" to mean lookups that give ownership of objects to the caller. Lookup is used in other places where the ownership is not transferred, or simple values are returned. The rename is done by the sed script in scripts/rename3.sed
Diffstat (limited to 'xps')
-rw-r--r--xps/muxps-internal.h8
-rw-r--r--xps/xps_doc.c4
-rw-r--r--xps/xps_outline.c2
-rw-r--r--xps/xps_resource.c4
4 files changed, 9 insertions, 9 deletions
diff --git a/xps/muxps-internal.h b/xps/muxps-internal.h
index 3084bdfa..20bab4c1 100644
--- a/xps/muxps-internal.h
+++ b/xps/muxps-internal.h
@@ -86,7 +86,7 @@ struct xps_target_s
};
void xps_read_page_list(xps_document *doc);
-void xps_debug_page_list(xps_document *doc);
+void xps_print_page_list(xps_document *doc);
void xps_free_page_list(xps_document *doc);
int xps_count_pages(xps_document *doc);
@@ -97,7 +97,7 @@ void xps_free_page(xps_document *doc, xps_page *page);
fz_outline *xps_load_outline(xps_document *doc);
-int xps_find_link_target(xps_document *doc, char *target_uri);
+int xps_lookup_link_target(xps_document *doc, char *target_uri);
void xps_add_link(xps_document *doc, fz_rect area, char *base_uri, char *target_uri);
/*
* Images, fonts, and colorspaces.
@@ -126,7 +126,7 @@ int xps_encode_font_char(fz_font *font, int key);
void xps_measure_font_glyph(xps_document *doc, fz_font *font, int gid, xps_glyph_metrics *mtx);
-void xps_debug_path(xps_document *doc);
+void xps_print_path(xps_document *doc);
void xps_parse_color(xps_document *doc, char *base_uri, char *hexstring, fz_colorspace **csp, float *samples);
void xps_set_color(xps_document *doc, fz_colorspace *colorspace, float *samples);
@@ -151,7 +151,7 @@ xps_resource * xps_parse_resource_dictionary(xps_document *doc, char *base_uri,
void xps_free_resource_dictionary(xps_document *doc, xps_resource *dict);
void xps_resolve_resource_reference(xps_document *doc, xps_resource *dict, char **attp, xml_element **tagp, char **urip);
-void xps_debug_resource_dictionary(xps_resource *dict);
+void xps_print_resource_dictionary(xps_resource *dict);
/*
* Fixed page/graphics parsing.
diff --git a/xps/xps_doc.c b/xps/xps_doc.c
index 9988691f..a2665f95 100644
--- a/xps/xps_doc.c
+++ b/xps/xps_doc.c
@@ -20,7 +20,7 @@ xps_rels_for_part(char *buf, char *name, int buflen)
*/
void
-xps_debug_page_list(xps_document *doc)
+xps_print_page_list(xps_document *doc)
{
xps_fixdoc *fixdoc = doc->first_fixdoc;
xps_page *page = doc->first_page;
@@ -192,7 +192,7 @@ xps_add_link_target(xps_document *doc, char *name)
}
int
-xps_find_link_target(xps_document *doc, char *target_uri)
+xps_lookup_link_target(xps_document *doc, char *target_uri)
{
xps_target *target;
char *needle = strrchr(target_uri, '#');
diff --git a/xps/xps_outline.c b/xps/xps_outline.c
index 60e2f779..6bf7fd14 100644
--- a/xps/xps_outline.c
+++ b/xps/xps_outline.c
@@ -34,7 +34,7 @@ xps_parse_document_outline(xps_document *doc, xml_element *root)
entry->title = fz_strdup(doc->ctx, description);
entry->dest.kind = FZ_LINK_GOTO;
entry->dest.ld.gotor.flags = 0;
- entry->dest.ld.gotor.page = xps_find_link_target(doc, target);
+ entry->dest.ld.gotor.page = xps_lookup_link_target(doc, target);
entry->down = NULL;
entry->next = NULL;
diff --git a/xps/xps_resource.c b/xps/xps_resource.c
index 099f378d..aa3cdc75 100644
--- a/xps/xps_resource.c
+++ b/xps/xps_resource.c
@@ -141,7 +141,7 @@ xps_free_resource_dictionary(xps_document *doc, xps_resource *dict)
}
void
-xps_debug_resource_dictionary(xps_resource *dict)
+xps_print_resource_dictionary(xps_resource *dict)
{
while (dict)
{
@@ -151,7 +151,7 @@ xps_debug_resource_dictionary(xps_resource *dict)
if (dict->parent)
{
printf("PARENT = {\n");
- xps_debug_resource_dictionary(dict->parent);
+ xps_print_resource_dictionary(dict->parent);
printf("}\n");
}
dict = dict->next;