[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Info reader fails to follow xrefs to anchors
From: |
Gavin Smith |
Subject: |
Re: Info reader fails to follow xrefs to anchors |
Date: |
Mon, 13 Jul 2015 23:01:08 +0100 |
On 13 July 2015 at 21:21, Ludovic Courtès <address@hidden> wrote:
> File attached. As an example: Go to “Substitutes” and try to follow the
> anchors ‘daemon-substitute-urls’ and ‘client-substitute-urls’ (see
> <http://git.savannah.gnu.org/cgit/guix.git/tree/doc/guix.texi#n1439>.)
Here's the fix. I expect it could be used with little modification on
the 6.0 release. What I am going to commit to the development version
will be slightly different.
Index: info/info-utils.c
===================================================================
--- info/info-utils.c (revision 6428)
+++ info/info-utils.c (working copy)
@@ -1611,8 +1611,9 @@
If FB is non-null, it is the file containing the node, and TAG_PTR is an
offset into FB->tags. If the node contents are rewritten, adjust anchors
- that occur in the node. */
-
+ that occur in the node and store adjusted value as TAG->nodestart_adjusted,
+ otherwise simply copy TAG->nodestart to TAG->nodestart_adjusted for each
+ anchor in the node. */
void
scan_node_contents (NODE *node, FILE_BUFFER *fb, TAG **tag_ptr)
{
@@ -1749,6 +1750,16 @@
null, that is, the length. */
node->nodelen = text_buffer_off (&output_buf) - 1;
}
+ else if (fb && tag_ptr)
+ {
+ /* Set nodestart_adjusted for all of the anchors in this node. */
+ tag_ptr++;
+ while (*tag_ptr && (*tag_ptr)->nodelen == 0)
+ {
+ (*tag_ptr)->nodestart_adjusted = (*tag_ptr)->nodestart;
+ tag_ptr++;
+ }
+ }
}