texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: replace in_gdt by accept_internalvalue


From: Patrice Dumas
Subject: branch master updated: replace in_gdt by accept_internalvalue
Date: Thu, 26 Aug 2021 15:53:34 -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 32d802e  replace in_gdt by accept_internalvalue
32d802e is described below

commit 32d802ee9caca822656e8a0501f1b9ddd58f8d6d
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Aug 26 21:53:23 2021 +0200

    replace in_gdt by accept_internalvalue
    
    * tp/Texinfo/ParserNonXS.pm, tp/Texinfo/Report.pm,
    tp/Texinfo/XS/parsetexi/Parsetexi.pm,
    tp/Texinfo/XS/parsetexi/Parsetexi.xs, tp/Texinfo/XS/parsetexi/api.c,
    tp/Texinfo/XS/parsetexi/command_data.txt,
    tp/Texinfo/XS/parsetexi/commands.c, tp/Texinfo/XS/parsetexi/parser.c,
    tp/Texinfo/XS/parsetexi/parser.h
---
 ChangeLog                                | 11 +++++++++++
 tp/Texinfo/ParserNonXS.pm                | 12 ++++++++----
 tp/Texinfo/Report.pm                     |  6 +++---
 tp/Texinfo/XS/parsetexi/Parsetexi.pm     |  4 ++--
 tp/Texinfo/XS/parsetexi/Parsetexi.xs     |  2 +-
 tp/Texinfo/XS/parsetexi/api.c            |  2 +-
 tp/Texinfo/XS/parsetexi/command_data.txt |  2 +-
 tp/Texinfo/XS/parsetexi/commands.c       |  6 +++---
 tp/Texinfo/XS/parsetexi/parser.c         |  6 +++---
 tp/Texinfo/XS/parsetexi/parser.h         |  4 ++--
 10 files changed, 35 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0f7e804..622e16a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2021-08-26  Patrice Dumas  <pertusus@free.fr>
 
+       replace in_gdt by accept_internalvalue
+
+       * tp/Texinfo/ParserNonXS.pm, tp/Texinfo/Report.pm,
+       tp/Texinfo/XS/parsetexi/Parsetexi.pm,
+       tp/Texinfo/XS/parsetexi/Parsetexi.xs, tp/Texinfo/XS/parsetexi/api.c,
+       tp/Texinfo/XS/parsetexi/command_data.txt,
+       tp/Texinfo/XS/parsetexi/commands.c, tp/Texinfo/XS/parsetexi/parser.c,
+       tp/Texinfo/XS/parsetexi/parser.h
+
+2021-08-26  Patrice Dumas  <pertusus@free.fr>
+
        Internal command @txiinternalvalue for gdt strings value labels in
        tree
 
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 7d9d0ac..27118e4 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -138,7 +138,9 @@ my %parser_state_configuration = (
     'input_encoding_name' => 'utf-8',
     'input_perl_encoding' => 'utf-8'
   },
-  'in_gdt' => 0, # whether we are being called by gdt.
+  'accept_internalvalue' => 0, # whether @txiinternalvalue should be added
+                               # to the tree or considered invalid.
+                               # currently set if called by gdt.
   'clickstyle' => 'arrow',
   'kbdinputstyle' => 'distinct',
   # this is not really used, but this allows to have an
@@ -3704,7 +3706,8 @@ sub _parse_texi($;$)
                $name), $self->{'macros'}->{$name}->{'element'}->{'line_nr'});
               }
               if ($all_commands{$name}
-                  or ($name eq 'txiinternalvalue' and $self->{'in_gdt'})) {
+                  or ($name eq 'txiinternalvalue'
+                      and $self->{'accept_internalvalue'})) {
                 $self->line_warn(sprintf(__(
                                   "redefining Texinfo language command: 
\@%s"), 
                                           $name), $current->{'line_nr'});
@@ -4100,8 +4103,9 @@ sub _parse_texi($;$)
             and !$self->{'definfoenclose'}->{$command}
             and !$self->{'aliases'}->{$command}
             and !$self->{'command_index'}->{$command}
-            # @txiinternalvalue is invalid unless in_gdt is set
-            and !($command eq 'txiinternalvalue' and $self->{'in_gdt'})) {
+            # @txiinternalvalue is invalid unless accept_internalvalue is set
+            and !($command eq 'txiinternalvalue'
+                  and $self->{'accept_internalvalue'})) {
           $self->line_error(sprintf(__("unknown command `%s'"), 
                                       $command), $line_nr);
           _abort_empty_line($self, $current);
diff --git a/tp/Texinfo/Report.pm b/tp/Texinfo/Report.pm
index 3855571..0697490 100644
--- a/tp/Texinfo/Report.pm
+++ b/tp/Texinfo/Report.pm
@@ -377,7 +377,7 @@ sub gdt($$;$$)
         if (defined($current_parser->{$duplicated_conf}));
     }
   }
-  $parser_conf->{'in_gdt'} = 1;
+  $parser_conf->{'accept_internalvalue'} = 1;
   #my $parser = Texinfo::Parser::parser($parser_conf);
   my $parser = Texinfo::Parser::simple_parser($parser_conf);
   if ($parser->{'DEBUG'}) {
@@ -421,8 +421,8 @@ sub _substitute_element_array ($$) {
   } @{$array};
 }
 
-# Recursively substitute @value elements in $TREE with their values given
-# in $CONTEXT.
+# Recursively substitute @txiinternalvalue elements in $TREE with 
+# their values given in $CONTEXT.
 sub _substitute ($$);
 sub _substitute ($$) {
   my $tree = shift; my $context = shift;
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.pm 
b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
index 5a4100b..37dbc61 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.pm
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.pm
@@ -117,8 +117,8 @@ sub parser (;$$)
         conf_set_CPP_LINE_DIRECTIVES($conf->{$key});
       } elsif ($key eq 'DEBUG') {
         set_debug($conf->{$key}) if $conf->{'key'};
-      } elsif ($key eq 'in_gdt') {
-        set_in_gdt();
+      } elsif ($key eq 'accept_internalvalue') {
+        set_accept_internalvalue();
       } elsif ($key eq 'ENABLE_ENCODING'
                or $key eq 'novalidate'
                or 
defined($Texinfo::Common::default_structure_customization_values{$key})) {
diff --git a/tp/Texinfo/XS/parsetexi/Parsetexi.xs 
b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
index f1f8cad..705a4cc 100644
--- a/tp/Texinfo/XS/parsetexi/Parsetexi.xs
+++ b/tp/Texinfo/XS/parsetexi/Parsetexi.xs
@@ -110,4 +110,4 @@ void
 set_debug (int i)
 
 void
-set_in_gdt()
+set_accept_internalvalue()
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index 3f84e1a..cf3fabe 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -147,7 +147,7 @@ reset_parser (void)
   wipe_values ();
   clear_expanded_formats ();
   reset_conf ();
-  global_in_gdt = 0;
+  global_accept_internalvalue = 0;
 }
 
 /* Set ROOT to root of tree obtained by parsing FILENAME. */
diff --git a/tp/Texinfo/XS/parsetexi/command_data.txt 
b/tp/Texinfo/XS/parsetexi/command_data.txt
index 4aca817..b57f674 100644
--- a/tp/Texinfo/XS/parsetexi/command_data.txt
+++ b/tp/Texinfo/XS/parsetexi/command_data.txt
@@ -19,7 +19,7 @@
 
 # Not in Common.pm
 value                   brace
-# invalid if not in_gdt set in configuration
+# invalid if not accept_internalvalue set in configuration
 txiinternalvalue        brace
 
 ##############################################################
diff --git a/tp/Texinfo/XS/parsetexi/commands.c 
b/tp/Texinfo/XS/parsetexi/commands.c
index 2f28a6b..9f9d254 100644
--- a/tp/Texinfo/XS/parsetexi/commands.c
+++ b/tp/Texinfo/XS/parsetexi/commands.c
@@ -22,10 +22,10 @@
 #include "commands.h"
 #include "errors.h"
 
-/* FIXME pass global_in_gdt to lookup_command instead of
+/* FIXME pass global_accept_internalvalue to lookup_command instead of
  * #include parser.h to get the global variable value? */
 
-/* for global_in_gdt */
+/* for global_accept_internalvalue */
 #include "parser.h"
 
 #include "command_data.c"
@@ -79,7 +79,7 @@ lookup_command (char *cmdname)
 
       /* txiinternalvalue is invalid if the corresponding configuration
        * is not set */
-      if (cmd == CM_txiinternalvalue && !global_in_gdt) {
+      if (cmd == CM_txiinternalvalue && !global_accept_internalvalue) {
         return 0;
       }
 
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index b22228d..30aa5da 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -136,7 +136,7 @@ COUNTER count_cells;
 GLOBAL_INFO global_info;
 char *global_clickstyle = 0;
 char *global_documentlanguage = 0;
-int global_in_gdt = 0;
+int global_accept_internalvalue = 0;
 
 enum kbd_enum global_kbdinputstyle = kbd_distinct;
 
@@ -148,9 +148,9 @@ set_documentlanguage (char *value)
 }
 
 void
-set_in_gdt()
+set_accept_internalvalue()
 {
-  global_in_gdt = 1;
+  global_accept_internalvalue = 1;
 }
 
 /* Record the information from a command of global effect. */
diff --git a/tp/Texinfo/XS/parsetexi/parser.h b/tp/Texinfo/XS/parsetexi/parser.h
index 421852b..045327c 100644
--- a/tp/Texinfo/XS/parsetexi/parser.h
+++ b/tp/Texinfo/XS/parsetexi/parser.h
@@ -157,7 +157,7 @@ int format_expanded_p (char *format);
 int is_end_current_command (ELEMENT *current, char **line,
                             enum command_id *end_cmd);
 void set_documentlanguage (char *);
-void set_in_gdt ();
+void set_accept_internalvalue ();
 char *element_type_name (ELEMENT *e);
 
 /* Return values */
@@ -176,7 +176,7 @@ extern ELEMENT *current_part;
 extern GLOBAL_INFO global_info;
 extern char *global_clickstyle;
 extern char *global_documentlanguage;
-extern int global_in_gdt;
+extern int global_accept_internalvalue;
 
 enum kbd_enum {kbd_none, kbd_code, kbd_example, kbd_distinct };
 extern enum kbd_enum global_kbdinputstyle;



reply via email to

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