groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] pdfmark macros


From: Keith MARSHALL
Subject: Re: [Groff] pdfmark macros
Date: Tue, 28 Sep 2004 11:48:45 +0100

>Werner Lemberg wrote:
>> I wonder whether your current implementation is optimal.
>
> I'm sure it isn't -- it is still at alpha status, after all :-)
>
>> Wouldn't it be better to create pseudo-arrays (i.e., `foo-1',
>> `foo-2', ...), passing indices to the recursive macro calls,
>> instead of a very long string which has to be parsed into
>> single arguments again and again?
>
> Thanks for the tip.  I'll give some thought as to how such a
> strategy might be fitted into the existing code framework.  As
> you suggest, it must be more efficient to have each macro call
> deal with only those page mapping arguments which it actually
> needs, without having to also handle a long list which are not
> needed until some later, independent call to the same macro.

Thanks again, Werner, for this tip.  It turned out to be not too
difficult to implement something along the lines you suggested.

I tried to post the attached patch from home, last night, but the
ntlworld mail servers were off line when I tried, and thereafter
until I gave up :-(

This is against the preview tarball I posted on Sunday, and may
be applied, (assuming the tarball was unpacked in groff-srcdir),
by executing:

  cd groff-srcdir
  gunzip -c <path-to>/pdfmark.tmac.patch-20040927.gz | patch -p1

With this patch applied, the "pdf:href.map" string, which was
originally a very large pseudo-array, is broken into a series of
four element fragments, with only one fragment at a time passed
in macro calls, and thus avoids the 'input stack limit exceeded'
error previously noted, (even without Werner's latest change in
troff's input.cpp, which I haven't yet had time to test, but
will do so when I get a chance).

Best regards,
Keith.

Attachment: pdfmark.tmac.patch-20040927.gz
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]