texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Thu, 23 May 2024 13:15:53 -0400 (EDT)

branch: master
commit d20e10714e239605b19b0a1b34f54382b5851a71
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu May 23 19:15:30 2024 +0200

    * tp/Texinfo/XS/main/document.c (wipe_document_errors)
    (wipe_document_parser_errors): rename clear_document_parser_errors as
    wipe_document_parser_errors and clear_document_errors as
    wipe_document_errors.  Update caller.
---
 ChangeLog                         | 7 +++++++
 tp/TODO                           | 7 -------
 tp/Texinfo/ParserNonXS.pm         | 9 +++++----
 tp/Texinfo/XS/main/document.c     | 5 +++--
 tp/Texinfo/XS/main/document.h     | 4 ++--
 tp/Texinfo/XS/main/translations.c | 2 +-
 6 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5e7327dcb0..1d4ee5bf91 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-05-23  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/XS/main/document.c (wipe_document_errors)
+       (wipe_document_parser_errors): rename clear_document_parser_errors as
+       wipe_document_parser_errors and clear_document_errors as
+       wipe_document_errors.  Update caller.
+
 2024-05-23  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm: access 'accept_internalvalue' in 'conf'.
diff --git a/tp/TODO b/tp/TODO
index 3ff484fe55..39445f5236 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -57,13 +57,6 @@ Document *XS_EXTERNAL_FORMATTING *XS_EXTERNAL_CONVERSION?
 Delayed bugs/features
 =====================
 
-call after/in pass_document_parser_errors_to_registrar?
-clear_document_parser_errors (document_descriptor);
-
-Parser API is inconsistent between Perl and XS.  The Perl API allows
-reuse of parser and parallel use of parsers, which is not really
-possible with XS.
-
 Gavin idea to use see/See for cross references in --plaintext output.
 More generally, the plaintext ref_commands formatting code
 could be completly different from the Info code, which is the current
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index c0de51b17c..03ce0246c0 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -235,7 +235,8 @@ my %parser_state_initialization = 
(%parser_document_state_initialization,
 # set                     points to the value set when initializing, for
 #                         configuration items that are not to be overriden
 #                         by @-commands.  For example documentlanguage.
-# conf                    Customization
+# conf                    Customization and document state configuration
+#                         based on defaults and parser argument.
 
 # A source information is an hash reference with the keys:
 # line_nr        the line number.
@@ -611,9 +612,9 @@ sub parser(;$)
     $parser->{'registrar'} = Texinfo::Report::new();
   }
 
-  # variables set to the parser initialization values
-  # only.  What is found in the document has no effect.  Also used to
-  # initialize parsing state.
+  # variables set to the parser initialization values only.  What is
+  # found in the document has no effect.  Also used to initialize some
+  # parsing state.
   $parser->{'conf'} = $parser_conf;
 
   return $parser;
diff --git a/tp/Texinfo/XS/main/document.c b/tp/Texinfo/XS/main/document.c
index e49e4160f0..eef425e0ee 100644
--- a/tp/Texinfo/XS/main/document.c
+++ b/tp/Texinfo/XS/main/document.c
@@ -516,8 +516,9 @@ unregister_document_merge_with_document (int 
document_descriptor,
   return tree;
 }
 
+/* does not seems to be used */
 void
-clear_document_errors (int document_descriptor)
+wipe_document_errors (int document_descriptor)
 {
   DOCUMENT *document = retrieve_document (document_descriptor);
   if (document)
@@ -525,7 +526,7 @@ clear_document_errors (int document_descriptor)
 }
 
 void
-clear_document_parser_errors (int document_descriptor)
+wipe_document_parser_errors (int document_descriptor)
 {
   DOCUMENT *document = retrieve_document (document_descriptor);
   if (document)
diff --git a/tp/Texinfo/XS/main/document.h b/tp/Texinfo/XS/main/document.h
index 3aa709928a..813f3da37b 100644
--- a/tp/Texinfo/XS/main/document.h
+++ b/tp/Texinfo/XS/main/document.h
@@ -44,7 +44,7 @@ COLLATION_INDICES_SORTED_BY_LETTER *sorted_indices_by_letter (
 void remove_document_descriptor (int document_descriptor);
 ELEMENT *unregister_document_merge_with_document (int document_descriptor,
                                                   DOCUMENT *document);
-void clear_document_parser_errors (int document_descriptor);
-void clear_document_errors (int document_descriptor);
+void wipe_document_parser_errors (int document_descriptor);
+void wipe_document_errors (int document_descriptor);
 
 #endif
diff --git a/tp/Texinfo/XS/main/translations.c 
b/tp/Texinfo/XS/main/translations.c
index f8143cd4c7..83313c2d23 100644
--- a/tp/Texinfo/XS/main/translations.c
+++ b/tp/Texinfo/XS/main/translations.c
@@ -495,7 +495,7 @@ replace_convert_substrings (char *translated_string,
       for (i = 0; i < error_messages->number; i++)
         fprintf (stderr, "%s", error_messages->list[i].error_line);
     }
-  clear_document_parser_errors (document_descriptor);
+  wipe_document_parser_errors (document_descriptor);
 
   if (replaced_substrings)
     {



reply via email to

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