texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/XS/parsetexi/indices.c (init_index_c


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/XS/parsetexi/indices.c (init_index_commands), tp/Texinfo/XS/parsetexi/parser.c (parse_texi): reinitialize static variables related to indices numbers in init_index_commands, which is called right after new_document in initialize_parsing in parsetexi/api.c and therefore rigth after setting parsed_document->indices_info to 0, instead of doing it at the end of the parsing. Remove forget_indices.
Date: Sat, 16 Nov 2024 09:37:12 -0500

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 07c0efbf9d * tp/Texinfo/XS/parsetexi/indices.c (init_index_commands), 
tp/Texinfo/XS/parsetexi/parser.c (parse_texi): reinitialize static variables 
related to indices numbers in init_index_commands, which is called right after 
new_document in initialize_parsing in parsetexi/api.c and therefore rigth after 
setting parsed_document->indices_info to 0, instead of doing it at the end of 
the parsing.  Remove forget_indices.
07c0efbf9d is described below

commit 07c0efbf9dc5ed1c1d0f9ed0b4033fe78ff072bf
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Nov 16 15:37:08 2024 +0100

    * tp/Texinfo/XS/parsetexi/indices.c (init_index_commands),
    tp/Texinfo/XS/parsetexi/parser.c (parse_texi): reinitialize static
    variables related to indices numbers in init_index_commands, which is
    called right after new_document in initialize_parsing in
    parsetexi/api.c and therefore rigth after setting
    parsed_document->indices_info to 0, instead of doing it at the end of
    the parsing.  Remove forget_indices.
---
 ChangeLog                         | 10 ++++++++++
 tp/Texinfo/XS/parsetexi/indices.c | 10 +++-------
 tp/Texinfo/XS/parsetexi/indices.h |  2 --
 tp/Texinfo/XS/parsetexi/parser.c  |  3 +--
 4 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 11bf932e69..0a259bcd00 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-11-16  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/parsetexi/indices.c (init_index_commands),
+       tp/Texinfo/XS/parsetexi/parser.c (parse_texi): reinitialize static
+       variables related to indices numbers in init_index_commands, which is
+       called right after new_document in initialize_parsing in
+       parsetexi/api.c and therefore rigth after setting
+       parsed_document->indices_info to 0, instead of doing it at the end of
+       the parsing.  Remove forget_indices.
+
 2024-11-16  Patrice Dumas  <pertusus@free.fr>
 
        * tp/tests/many_input_files/tex_l2h_output_dir_non_ascii.sh,
diff --git a/tp/Texinfo/XS/parsetexi/indices.c 
b/tp/Texinfo/XS/parsetexi/indices.c
index 888359e505..4ec3cffd94 100644
--- a/tp/Texinfo/XS/parsetexi/indices.c
+++ b/tp/Texinfo/XS/parsetexi/indices.c
@@ -150,6 +150,9 @@ init_index_commands (void)
   INDEX *idx;
   INDEX_LIST *indices = &parsed_document->indices_info;
 
+  space_for_indices = 0;
+  num_index_commands = 0;
+
   struct def { char *name; int in_code;
                enum command_id cmd2; enum command_id cmd1;}
   *p, default_indices[] = {
@@ -349,13 +352,6 @@ set_non_ignored_space_in_index_before_command (ELEMENT 
*content)
 
 
 
-void
-forget_indices (void)
-{
-  space_for_indices = 0;
-  num_index_commands = 0;
-}
-
 void
 resolve_indices_merged_in (const INDEX_LIST *indices_info)
 {
diff --git a/tp/Texinfo/XS/parsetexi/indices.h 
b/tp/Texinfo/XS/parsetexi/indices.h
index 6fce0a09ca..6e1ea5c879 100644
--- a/tp/Texinfo/XS/parsetexi/indices.h
+++ b/tp/Texinfo/XS/parsetexi/indices.h
@@ -14,8 +14,6 @@ void enter_index_entry (enum command_id index_type_cmd,
                         ELEMENT *current);
 void set_non_ignored_space_in_index_before_command (ELEMENT *content);
 
-void forget_indices (void);
-
 void resolve_indices_merged_in (const INDEX_LIST *indices_info);
 void complete_indices (DOCUMENT *document, int debug_level);
 
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index a999381d37..fd13721bf1 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -52,7 +52,7 @@
 #include "labels.h"
 /* MACRO lookup_macro new_macro handle_macro fetch_value */
 #include "macro.h"
-/* for forget_indices complete_indices */
+/* for complete_indices */
 #include "indices.h"
 /* handle_other_command handle_line_command
    handle_block_command handle_brace_command */
@@ -2811,7 +2811,6 @@ parse_texi (ELEMENT *root_elt, ELEMENT *current_elt)
                                    &document->listoffloats);
 
   parsed_document = 0;
-  forget_indices ();
 
   complete_indices (document, global_parser_conf.debug);
 



reply via email to

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