texinfo-commits
[Top][All Lists]
Advanced

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

[6429] fix following xref to anchor


From: Gavin D. Smith
Subject: [6429] fix following xref to anchor
Date: Mon, 13 Jul 2015 22:04:00 +0000

Revision: 6429
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6429
Author:   gavin
Date:     2015-07-13 22:03:59 +0000 (Mon, 13 Jul 2015)
Log Message:
-----------
fix following xref to anchor

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/info/info-utils.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog     2015-07-13 21:36:52 UTC (rev 6428)
+++ trunk/ChangeLog     2015-07-13 22:03:59 UTC (rev 6429)
@@ -1,5 +1,12 @@
 2015-07-13  Gavin Smith  <address@hidden>
 
+       * info/info-utils.c (scan_node_contents): Always set 
+       nodestart_adjusted for anchors in a node, whether rewriting the 
+       node's contents or not.  Failure to follow a cross-reference to 
+       an anchor reported by Ludovic Courtes.
+
+2015-07-13  Gavin Smith  <address@hidden>
+
        * info/nodes.h (TAG): New field "cache".  Remove nodelen field.  
        All uses of TAG.nodelen changed to use TAG.cache.nodelen.
        * info/nodes.c (info_node_of_tag): Save information about node,

Modified: trunk/info/info-utils.c
===================================================================
--- trunk/info/info-utils.c     2015-07-13 21:36:52 UTC (rev 6428)
+++ trunk/info/info-utils.c     2015-07-13 22:03:59 UTC (rev 6429)
@@ -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)->cache.nodelen == 0)
+        {
+          (*tag_ptr)->nodestart_adjusted = (*tag_ptr)->nodestart;
+          tag_ptr++;
+        }
+    }
 }
 
 




reply via email to

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