[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * info/nodes.h, info/session.c: separate flag for
From: |
Patrice Dumas |
Subject: |
branch master updated: * info/nodes.h, info/session.c: separate flag for tags from flags for nodes. Use a leading T_ for for tag flags. Move tag flag near TAG. |
Date: |
Sat, 12 Oct 2024 09:49:38 -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 fe054aa9c2 * info/nodes.h, info/session.c: separate flag for tags from
flags for nodes. Use a leading T_ for for tag flags. Move tag flag near TAG.
fe054aa9c2 is described below
commit fe054aa9c21989c832d7d0ae47d01c66005ed621
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Oct 12 15:49:32 2024 +0200
* info/nodes.h, info/session.c: separate flag for tags from flags for
nodes. Use a leading T_ for for tag flags. Move tag flag near TAG.
---
ChangeLog | 5 +++++
info/nodes.h | 6 ++++--
info/session.c | 12 ++++++------
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 0de02b3e9c..d90c76829f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-12 Patrice Dumas <pertusus@free.fr>
+
+ * info/nodes.h, info/session.c: separate flag for tags from flags for
+ nodes. Use a leading T_ for for tag flags. Move tag flag near TAG.
+
2024-10-12 Patrice Dumas <pertusus@free.fr>
* info/nodes.c (info_node_of_tag_ext): do not copy tag flags to node.
diff --git a/info/nodes.h b/info/nodes.h
index 4deb9d38a7..e67a78b20e 100644
--- a/info/nodes.h
+++ b/info/nodes.h
@@ -60,7 +60,6 @@ typedef struct {
#define N_IsIndex 0x08 /* An index node. */
#define N_IsDir 0x10 /* A dir node. */
#define N_Simple 0x20 /* Data about cross-references is missing. */
-#define N_SeenBySearch 0x40 /* Node has already been seen in a search. */
/* String constants. */
#define INFO_FILE_LABEL "File:"
@@ -98,10 +97,13 @@ typedef struct {
long nodestart; /* The value read from the tag table.
Should never be negative */
long nodestart_adjusted; /* Where the node or anchor actually is. */
- int flags; /* Same as NODE.flags. */
+ int flags; /* See immediately below. */
NODE cache; /* Saved information about pointed-to node. */
} TAG;
+/* Values for TAG.flags. */
+#define T_SeenBySearch 0x01 /* Tag has already been seen in a search. */
+
/* The following structure is used to remember information about the contents
of Info files that we have loaded at least once before. The FINFO member
is present so that we can reload the file if it has been modified since
diff --git a/info/session.c b/info/session.c
index dc35832d05..7ece1afd13 100644
--- a/info/session.c
+++ b/info/session.c
@@ -4461,9 +4461,9 @@ check_menus:
if (!tag_of_reference (r, window, &file_buffer, &tag))
continue;
- if ((*tag)->flags & N_SeenBySearch)
+ if ((*tag)->flags & T_SeenBySearch)
continue;
- (*tag)->flags |= N_SeenBySearch;
+ (*tag)->flags |= T_SeenBySearch;
window->node->active_menu = ref_index + 1;
node = info_node_of_tag (file_buffer, tag);
@@ -4582,7 +4582,7 @@ check_menus:
/* This inverts what is done for the forwards search. It's
possible that we will visit the nodes in a different order if
there is more than one reference to a node. */
- if (!((*tag)->flags & N_SeenBySearch))
+ if (!((*tag)->flags & T_SeenBySearch))
continue;
node = info_node_of_tag (file_buffer, tag);
@@ -4623,7 +4623,7 @@ go_up:
we set this flag just before going down. */
if (r && tag_of_reference (r, window, &file_buffer, &tag))
{
- (*tag)->flags &= ~N_SeenBySearch;
+ (*tag)->flags &= ~T_SeenBySearch;
}
goto check_menus;
@@ -4637,7 +4637,7 @@ funexit:
} /*********** end tree_search_check_node_backwards *************/
-/* Clear N_SeenBySearch for all nodes. */
+/* Clear T_SeenBySearch for all node tags. */
void
wipe_seen_flags (void)
{
@@ -4651,7 +4651,7 @@ wipe_seen_flags (void)
continue; /* Probably a sub-file of a split file. */
for (; *t; t++)
{
- (*t)->flags &= ~N_SeenBySearch;
+ (*t)->flags &= ~T_SeenBySearch;
}
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * info/nodes.h, info/session.c: separate flag for tags from flags for nodes. Use a leading T_ for for tag flags. Move tag flag near TAG.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * info/nodes.c (info_node_of_tag_ext): do not copy tag flags to node. The only flag set in tag is N_SeenBySearch and it is not used in nodes.
- Next by Date:
branch master updated: * info/indices.c (info_indices_of_file_buffer), info/nodes.c (build_tag_table, get_nodes_of_tags_table, info_create_tag) (info_node_of_tag_ext), info/nodes.h (T_IsAnchor), info/scan.c (copy_input_to_output, scan_node_contents), info/session.c (info_last_node, info_first_node, info_search_internal): add T_IsAnchor tag flag to mark that a tag is a Ref anchor tag. Do not use TAG cache.nodelen to determine if a tag is an anchor, use the flag. Initialize TAG cache.nodelen to 0 and consider th [...]
- Previous by thread:
branch master updated: * info/nodes.c (info_node_of_tag_ext): do not copy tag flags to node. The only flag set in tag is N_SeenBySearch and it is not used in nodes.
- Next by thread:
branch master updated: * info/indices.c (info_indices_of_file_buffer), info/nodes.c (build_tag_table, get_nodes_of_tags_table, info_create_tag) (info_node_of_tag_ext), info/nodes.h (T_IsAnchor), info/scan.c (copy_input_to_output, scan_node_contents), info/session.c (info_last_node, info_first_node, info_search_internal): add T_IsAnchor tag flag to mark that a tag is a Ref anchor tag. Do not use TAG cache.nodelen to determine if a tag is an anchor, use the flag. Initialize TAG cache.nodelen to 0 and consider th [...]
- Index(es):