texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * INSTALL: describe TEXINFO_XS_PARSER use.


From: Patrice Dumas
Subject: branch master updated: * INSTALL: describe TEXINFO_XS_PARSER use.
Date: Fri, 31 Dec 2021 08:46:59 -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 22c77479dd * INSTALL: describe TEXINFO_XS_PARSER use.
22c77479dd is described below

commit 22c77479dd7c50e9c6c8438b1bd38cdec914b59c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Dec 31 14:46:48 2021 +0100

    * INSTALL: describe TEXINFO_XS_PARSER use.
    
    * tp/Texinfo/XS/parsetexi/README: update.
    
    * tp/Texinfo/XS/misc.c (xs_abort_empty_line): use the modified
    context strings from ParserNonXS.
    
    * tp/Texinfo/XS/misc.c (xs_merge_text): no more warning when creating
    a new content.
---
 ChangeLog                      | 12 ++++++++++++
 INSTALL                        |  3 +++
 tp/Texinfo/ParserNonXS.pm      |  2 +-
 tp/Texinfo/XS/misc.c           | 14 +++++++-------
 tp/Texinfo/XS/parsetexi/README |  5 +----
 5 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e94669163b..893cf79399 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2021-12-30  Patrice Dumas  <pertusus@free.fr>
+
+       * INSTALL: describe TEXINFO_XS_PARSER use.
+
+       * tp/Texinfo/XS/parsetexi/README: update.
+        
+       * tp/Texinfo/XS/misc.c (xs_abort_empty_line): use the modified
+       context strings from ParserNonXS.
+
+       * tp/Texinfo/XS/misc.c (xs_merge_text): no more warning when creating
+       a new content.
+
 2021-12-30  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/ParserNonXS.pm (parse_texi_text, parse_texi_file)
diff --git a/INSTALL b/INSTALL
index 7988ae1563..84299cbc8a 100644
--- a/INSTALL
+++ b/INSTALL
@@ -39,6 +39,9 @@ Installation notes specific to Texinfo:
   information as the modules are looked for and loaded, TEXINFO_XS=omit
   to disable their use, and TEXINFO_XS=required to force their use.
 
+  If you want to use the XS modules but not the XS parser, you can set
+  the `TEXINFO_XS_PARSER' environment variable to 0.
+
 * For instructions on compiling this distribution with DJGPP tools
   for MS-DOS and MS-Windows, see the file djgpp/README.
 
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 8fecd4ef95..e4fa772e7f 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -4318,7 +4318,7 @@ sub _parse_texi($$$)
             if ($in_heading_commands{$command}) {
               # TODO use a more generic system for check of @-command nesting
               # in command on context stack
-              if (not 
$headings_specification_commands{$self->_top_context_command}) {
+              if (not 
$headings_specification_commands{$self->_top_context_command()}) {
                 $self->_line_error(
                   sprintf(__("\@%s should only appear in heading or footing"),
                         $command), $line_nr);
diff --git a/tp/Texinfo/XS/misc.c b/tp/Texinfo/XS/misc.c
index 1501ef87b3..97bfc84b3a 100644
--- a/tp/Texinfo/XS/misc.c
+++ b/tp/Texinfo/XS/misc.c
@@ -177,12 +177,12 @@ xs_abort_empty_line (HV *self, HV *current, SV 
*additional_spaces_in)
 
       /* Change type to "empty_spaces_before_paragraph" unless we are in
          one of these contexts. */
-      if (strcmp (top_context, "math")
-          && strcmp (top_context, "menu")
-          && strcmp (top_context, "preformatted")
-          && strcmp (top_context, "rawpreformatted")
-          && strcmp (top_context, "def")
-          && strcmp (top_context, "inlineraw"))
+      if (strcmp (top_context, "ct_math")
+          && strcmp (top_context, "ct_menu")
+          && strcmp (top_context, "ct_preformatted")
+          && strcmp (top_context, "ct_rawpreformatted")
+          && strcmp (top_context, "ct_def")
+          && strcmp (top_context, "ct_inlineraw"))
         {
           hv_store (spaces_elt, "type", strlen ("type"),
                     newSVpv ("empty_spaces_before_paragraph", 0), 0);
@@ -340,7 +340,7 @@ xs_merge_text (HV *self, HV *current, SV *text_in)
       contents_ref = newRV_inc ((SV *) contents_array);
       hv_store (current, "contents", strlen ("contents"),
                 contents_ref, 0);
-      fprintf (stderr, "NEW CONTENTS %p\n", contents_array);
+      /* fprintf (stderr, "NEW CONTENTS %p\n", contents_array); */
       goto NEW_TEXT;
     }
   else
diff --git a/tp/Texinfo/XS/parsetexi/README b/tp/Texinfo/XS/parsetexi/README
index 0a11d89cb9..bb818b8924 100644
--- a/tp/Texinfo/XS/parsetexi/README
+++ b/tp/Texinfo/XS/parsetexi/README
@@ -1,9 +1,6 @@
-This is an experimental program intended to replicate the functionality 
-in tp/Texinfo/Parser.pm.
+This program replicates the functionality in tp/Texinfo/ParserNonXS.pm.
 
 
-Set TEXINFO_XS_PARSER in environment to use.
-
 =====================================================================
 Notes -
 



reply via email to

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