[DVIPDFMx] Re: latest change to pdfnames.c

Matthias Franz matthias at ktug.or.kr
Fri Jun 27 21:39:15 KST 2008


On Thu, Jun 19, 2008 at 10:58:22AM +0900, Jin-Hwan Cho wrote:
> On Jun 18, 2008, at 5:18 PM, Matthias.Franz at ujf-grenoble.fr wrote:
> 
> >Quoting Jin-Hwan Cho <chofchof at ktug.or.kr>:
> >>>What should we do if an object reference is redefined? Currently
> >>>we discard the new value (BTW, there is a memory leak, i.e., no
> >>>pdf_release_obj). If you think of the situation where DVI files are
> >>>concatenated, it might be better to replace the old value.
> >>
> >>It would be better to support both ways. How? I have no idea yet.
> >>In many cases, I also wanted to replace the previous value, but we
> >>should think about the compatibility to the previous versions.
> >
> >Do you have an example where the new value should be discarded?
> >I can only think of broken DVI files made by buggy TeX macros
> >and not of a situation where the new definition was deliberately
> >inserted. And I don't think we should take buggy software as our
> >guiding line.
> 
> You are right.

I've found out that it's not that easy: Currently one can refer to
an object before it is defined. A reference to a dummy object is
created and later the dummy object is replaced by the real object
(which gets the same object number). I don't know if anyone uses
this feature but it might be useful sometimes.

Now the problem is that this feature does not work any more if one
starts to concatenate two DVI files: the second file might refer
to a not-yet defined object, but in the concatenated file this
object is already defined because it was defined in the first file.

Conclusion: the current mode (early references allowed, but no
redefinitions) makes sense and should not be dropped. The "new"
mode (redefinitions allowed, but no early references) makes sense
as well, hence could be added as a new feature.

Cheers,
-- 
Matthias



More information about the dvipdfmx mailing list