[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * info/footnotes.c (make_footnotes_node): use fn_
From: |
Patrice Dumas |
Subject: |
branch master updated: * info/footnotes.c (make_footnotes_node): use fn_node directly to determine if the node associated to the footnote was found. |
Date: |
Fri, 11 Oct 2024 13:11:25 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new db81b55353 * info/footnotes.c (make_footnotes_node): use fn_node
directly to determine if the node associated to the footnote was found.
db81b55353 is described below
commit db81b553534e879e43afebf820c5453ebf5850a8
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Oct 11 19:11:14 2024 +0200
* info/footnotes.c (make_footnotes_node): use fn_node directly to
determine if the node associated to the footnote was found.
---
ChangeLog | 5 +++++
info/footnotes.c | 18 +++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7d1cb6fb63..327297c515 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-11-10 Patrice Dumas <pertusus@free.fr>
+
+ * info/footnotes.c (make_footnotes_node): use fn_node directly to
+ determine if the node associated to the footnote was found.
+
2024-11-10 Patrice Dumas <pertusus@free.fr>
* info/window.c: reindent, replace tabs by spaces, remove spaces.
diff --git a/info/footnotes.c b/info/footnotes.c
index 8f1d9a0d38..e33d72da2e 100644
--- a/info/footnotes.c
+++ b/info/footnotes.c
@@ -49,14 +49,12 @@ find_footnotes_window (void)
NODE *
make_footnotes_node (NODE *node)
{
- NODE *fn_node, *footnotes_node = NULL, *result = NULL;
- long fn_start = -1;
+ NODE *fn_node = 0, *footnotes_node = NULL, *result = NULL;
+ long fn_start;
char *fnptr;
/* Make the initial assumption that the footnotes appear as simple
text within this windows node. */
- fn_node = node;
-
/* See if this node contains the magic footnote label. */
{
char saved = node->contents[node->nodelen];
@@ -65,10 +63,12 @@ make_footnotes_node (NODE *node)
node->contents[node->nodelen] = saved;
}
if (fnptr)
- fn_start = fnptr - node->contents;
-
+ {
+ fn_node = node;
+ fn_start = fnptr - node->contents;
+ }
/* If it doesn't, check to see if it has an associated footnotes node. */
- if (!fnptr)
+ else
{
REFERENCE **refs;
@@ -108,8 +108,8 @@ make_footnotes_node (NODE *node)
}
}
- /* If we never found the start of a footnotes area, quit now. */
- if (fn_start == -1)
+ /* Quit if we never found the node associated to the footnote. */
+ if (fn_node == 0)
return NULL;
/* Make the new node. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * info/footnotes.c (make_footnotes_node): use fn_node directly to determine if the node associated to the footnote was found.,
Patrice Dumas <=