diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-05-29 14:41:05 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-05-29 14:46:25 +0200 |
commit | cff6f809da556624fb1de34725935278093182e1 (patch) | |
tree | 8d166dbabef2c34f3c0cd5ed6feb75476c8abd45 /xps | |
parent | aa1801a463e711c19b09b9be34bf76b18fda126c (diff) | |
download | mupdf-cff6f809da556624fb1de34725935278093182e1.tar.xz |
Rename some find/lookup functions to be in line with documentation.
Diffstat (limited to 'xps')
-rw-r--r-- | xps/xps_outline.c | 6 | ||||
-rw-r--r-- | xps/xps_resource.c | 4 | ||||
-rw-r--r-- | xps/xps_zip.c | 16 |
3 files changed, 13 insertions, 13 deletions
diff --git a/xps/xps_outline.c b/xps/xps_outline.c index aa1121d1..4e2a2620 100644 --- a/xps/xps_outline.c +++ b/xps/xps_outline.c @@ -5,13 +5,13 @@ */ static fz_outline * -xps_find_last_outline_at_level(fz_outline *node, int level, int target_level) +xps_lookup_last_outline_at_level(fz_outline *node, int level, int target_level) { while (node->next) node = node->next; if (level == target_level || !node->down) return node; - return xps_find_last_outline_at_level(node->down, level + 1, target_level); + return xps_lookup_last_outline_at_level(node->down, level + 1, target_level); } static fz_outline * @@ -46,7 +46,7 @@ xps_parse_document_outline(xps_document *doc, fz_xml *root) } else { - tail = xps_find_last_outline_at_level(head, 1, this_level); + tail = xps_lookup_last_outline_at_level(head, 1, this_level); if (this_level > last_level) tail->down = entry; else diff --git a/xps/xps_resource.c b/xps/xps_resource.c index b94b6d3e..3c0f8848 100644 --- a/xps/xps_resource.c +++ b/xps/xps_resource.c @@ -1,7 +1,7 @@ #include "muxps-internal.h" static fz_xml * -xps_find_resource(xps_document *doc, xps_resource *dict, char *name, char **urip) +xps_lookup_resource(xps_document *doc, xps_resource *dict, char *name, char **urip) { xps_resource *head, *node; for (head = dict; head; head = head->parent) @@ -33,7 +33,7 @@ xps_parse_resource_reference(xps_document *doc, xps_resource *dict, char *att, c if (s) *s = 0; - return xps_find_resource(doc, dict, name, urip); + return xps_lookup_resource(doc, dict, name, urip); } void diff --git a/xps/xps_zip.c b/xps/xps_zip.c index 8aa48662..007887cb 100644 --- a/xps/xps_zip.c +++ b/xps/xps_zip.c @@ -79,7 +79,7 @@ xps_compare_entries(const void *a0, const void *b0) } static xps_entry * -xps_find_zip_entry(xps_document *doc, char *name) +xps_lookup_zip_entry(xps_document *doc, char *name) { int l = 0; int r = doc->zip_count - 1; @@ -342,7 +342,7 @@ xps_read_zip_part(xps_document *doc, char *partname) name ++; /* All in one piece */ - ent = xps_find_zip_entry(doc, name); + ent = xps_lookup_zip_entry(doc, name); if (ent) { part = xps_new_part(doc, partname, ent->usize); @@ -364,11 +364,11 @@ xps_read_zip_part(xps_document *doc, char *partname) while (!seen_last) { sprintf(buf, "%s/[%d].piece", name, count); - ent = xps_find_zip_entry(doc, buf); + ent = xps_lookup_zip_entry(doc, buf); if (!ent) { sprintf(buf, "%s/[%d].last.piece", name, count); - ent = xps_find_zip_entry(doc, buf); + ent = xps_lookup_zip_entry(doc, buf); seen_last = (ent != NULL); } if (!ent) @@ -390,7 +390,7 @@ xps_read_zip_part(xps_document *doc, char *partname) sprintf(buf, "%s/[%d].piece", name, i); else sprintf(buf, "%s/[%d].last.piece", name, i); - ent = xps_find_zip_entry(doc, buf); + ent = xps_lookup_zip_entry(doc, buf); fz_try(doc->ctx) { xps_read_zip_entry(doc, ent, part->data + offset); @@ -415,13 +415,13 @@ xps_has_zip_part(xps_document *doc, char *name) char buf[2048]; if (name[0] == '/') name++; - if (xps_find_zip_entry(doc, name)) + if (xps_lookup_zip_entry(doc, name)) return 1; sprintf(buf, "%s/[0].piece", name); - if (xps_find_zip_entry(doc, buf)) + if (xps_lookup_zip_entry(doc, buf)) return 1; sprintf(buf, "%s/[0].last.piece", name); - if (xps_find_zip_entry(doc, buf)) + if (xps_lookup_zip_entry(doc, buf)) return 1; return 0; } |