summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-repair.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-01-05 17:34:29 +0000
committerRobin Watts <robin.watts@artifex.com>2015-01-06 17:16:03 +0000
commit90c560641d9b459a658029eefc4cbb02fdbca0b5 (patch)
tree036e64aef09d403c0d2f5d699a9c858eebe556f9 /source/pdf/pdf-repair.c
parente460246943441078ff28dd413a19ee6f186c3764 (diff)
downloadmupdf-90c560641d9b459a658029eefc4cbb02fdbca0b5.tar.xz
Add xref_index to speed searching of sparse xrefs.
Add a new index that quickly maps object number to the first xref in which an object appears. This appears to get us the speed back that we lost when moving to sparse xrefs.
Diffstat (limited to 'source/pdf/pdf-repair.c')
-rw-r--r--source/pdf/pdf-repair.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/pdf/pdf-repair.c b/source/pdf/pdf-repair.c
index 7e35c5fb..3bd3850a 100644
--- a/source/pdf/pdf-repair.c
+++ b/source/pdf/pdf-repair.c
@@ -235,7 +235,7 @@ pdf_repair_obj_stm(pdf_document *doc, int num, int gen)
}
void
-pdf_repair_xref(pdf_document *doc, pdf_lexbuf *buf)
+pdf_repair_xref(pdf_document *doc)
{
pdf_obj *dict, *obj = NULL;
pdf_obj *length;
@@ -258,6 +258,7 @@ pdf_repair_xref(pdf_document *doc, pdf_lexbuf *buf)
int next;
int i, n, c;
fz_context *ctx = doc->ctx;
+ pdf_lexbuf *buf = &doc->lexbuf.base;
fz_var(encrypt);
fz_var(id);