texinfo-devel
[Top][All Lists]
Advanced

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

Re: strange situation with bytes counting


From: Sergey Poznyakoff
Subject: Re: strange situation with bytes counting
Date: Wed, 21 Aug 2013 12:15:18 +0300

Hi Patrice,

> In texi2any in that case, if the info file is split there is a bug, the 
> additional text appears in the first subfile with nodes in the preamble
> but it is not counted in the tag table.  I have prepared a fix for that.

The fix is ok, but the overall behavior and output is quite different
from what makeinfo produced and that's why info chokes on it.  In fact
it is not related to the patch itself.

With the old makeinfo, any material that appeared between @setfilename
and @top was included in the header of each output file:

-- <cut> ---
$ head -6 split_test_before_first_node.info*
==> split_test_before_first_node.info <==
This is split_test_before_first_node.info, produced by makeinfo version
4.13 from tsplit/split_test_before_first_node.texi.

truc machin et reuc machin  ze aze zea zae eaz eaz zae

^_

==> split_test_before_first_node.info-1 <==
This is split_test_before_first_node.info, produced by makeinfo version
4.13 from tsplit/split_test_before_first_node.texi.

truc machin et reuc machin  ze aze zea zae eaz eaz zae

^_

==> split_test_before_first_node.info-2 <==
This is split_test_before_first_node.info, produced by makeinfo version
4.13 from tsplit/split_test_before_first_node.texi.

truc machin et reuc machin  ze aze zea zae eaz eaz zae

^_
-- <cut> ---

In contrast, texi2any outputs it only before the top node (both with and
without the patch):

-- <cut> ---
$ head -6 split_test_before_first_node.info*
==> split_test_before_first_node.info <==
This is split_test_before_first_node.info, produced by texi2any version
5.1.90+dev from split_test_before_first_node.texi.

^_
Indirect:
split_test_before_first_node.info-1: 124

==> split_test_before_first_node.info-1 <==
This is split_test_before_first_node.info, produced by texi2any version
5.1.90+dev from split_test_before_first_node.texi.

truc machin et reuc machin ze aze zea zae eaz eaz zae

^_

==> split_test_before_first_node.info-2 <==
This is split_test_before_first_node.info, produced by texi2any version
5.1.90+dev from split_test_before_first_node.texi.

^_
File: split_test_before_first_node.info,  Node: chap1,  Prev: Top,  Up: Top
-- <cut> ---

Now, info supposes that the file header (i.e. the material before the
first ^_) is the same for each file within the split document and relies
on this fact when computing node offsets.  In the latter case the header
length differs between split_test_before_first_node.info and
split_test_before_first_node.info-1, that's why it is unable to find the
Top node.  In contrast, it is able to find the chap1 node, because
the header length in split_test_before_first_node.info-2 is the same.

So we have basically two possibilities: one is to change texi2any so
that it treats the text between @setfilename and @top as makeinfo did.
This will ensure compatibility with older info versions.  The other is
to modify info so that it is able to cope with split files in new
format.  I'm ok with either of them, but rather incline to the former
one (because of backward compatibility).  Wdyt?

Regards,
Sergey




reply via email to

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