diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2019-01-06 18:57:01 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2019-01-06 18:57:01 +0000 |
commit | 0c14fd18747b9f6fbbecb75ba8beef6d449c460a (patch) | |
tree | 6c60915cf22ba35f9f4fff0048ebe3a6c073662d /Build/source/texk/web2c/luatexdir/luapplib/ppxref.c | |
parent | 2a4260012f7ef1890dd351aabe4befd60922d5a6 (diff) |
luatex 1.09.2; r-mpost alias of mpost -restricted
git-svn-id: svn://tug.org/texlive/trunk@49614 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luapplib/ppxref.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/luapplib/ppxref.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luapplib/ppxref.c b/Build/source/texk/web2c/luatexdir/luapplib/ppxref.c index 984f6cbe327..648d7f1d32a 100644 --- a/Build/source/texk/web2c/luatexdir/luapplib/ppxref.c +++ b/Build/source/texk/web2c/luatexdir/luapplib/ppxref.c @@ -87,6 +87,25 @@ ppref * ppxref_find_local (ppxref *xref, ppuint refnumber) return NULL; } +/* +PJ 20180910 + +So far we were resolving references in the context of the current xref: + +- if a given object is found in this xref, than this is the object +- otherwise older xrefs are queried in order +- only in linearized documents older body may refer to object from newer xref + +Hans sent a document where an incremental update (newer body) has only an updated page object +(plus /Metadata and /Info), but /Root (catalog) and /Pages dict refs are defined only in the older body. +If we resolve references using the approach so far, we actually drop the update; newer objects are parsed +and linked to the newest xref, but never linked to objects tree. Assuming we will never need to interpret +older versions, makes sense to assume, that the newest object version is always the correct version. + +*/ + +#if 0 + ppref * ppxref_find (ppxref *xref, ppuint refnumber) { ppref *ref; @@ -115,6 +134,21 @@ ppref * ppxref_find (ppxref *xref, ppuint refnumber) return NULL; } +#else + +ppref * ppxref_find (ppxref *xref, ppuint refnumber) +{ + ppref *ref; + ppxref *other; + + for (other = xref->pdf->xref; other != NULL; other = other->prev) + if ((ref = ppxref_find_local(other, refnumber)) != NULL) + return ref; + return NULL; +} + +#endif + ppdict * ppxref_trailer (ppxref *xref) { switch (xref->trailer.type) |