texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Common.pm (debug_print_element): ren


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Common.pm (debug_print_element): rename debug_print_element_short as debug_print_element as both functions are almost the same, and remove the former debug_print_element function. Update callers.
Date: Sun, 19 Feb 2023 19:02:30 -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 dcd4e5de83 * tp/Texinfo/Common.pm (debug_print_element): rename 
debug_print_element_short as debug_print_element as both functions are almost 
the same, and remove the former debug_print_element function. Update callers.
dcd4e5de83 is described below

commit dcd4e5de83413e24ca355e3bc8c533e90be4c8a5
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Feb 20 01:02:17 2023 +0100

    * tp/Texinfo/Common.pm (debug_print_element): rename
    debug_print_element_short as debug_print_element as both functions are
    almost the same, and remove the former debug_print_element function.
    Update callers.
    
    * tp/Texinfo/XS/parsetexi/debug.c (debug_print_element): rename
    debug_print_element_short as debug_print_element.  Update callers.
    
    * tp/Texinfo/ParserNonXS.pm (_print_current): inline and remove.
---
 ChangeLog                              | 12 ++++++++
 tp/Texinfo/Common.pm                   | 54 +++++++---------------------------
 tp/Texinfo/Convert/Converter.pm        |  2 +-
 tp/Texinfo/Convert/DocBook.pm          |  5 ++--
 tp/Texinfo/Convert/HTML.pm             | 17 ++++++-----
 tp/Texinfo/Convert/LaTeX.pm            |  6 ++--
 tp/Texinfo/Convert/Text.pm             |  2 +-
 tp/Texinfo/ParserNonXS.pm              | 44 +++++++++++++--------------
 tp/Texinfo/Structuring.pm              |  2 +-
 tp/Texinfo/Transformations.pm          |  2 +-
 tp/Texinfo/XS/parsetexi/close.c        |  6 ++--
 tp/Texinfo/XS/parsetexi/debug.c        |  2 +-
 tp/Texinfo/XS/parsetexi/end_line.c     |  2 +-
 tp/Texinfo/XS/parsetexi/parser.c       |  6 ++--
 tp/Texinfo/XS/parsetexi/parser.h       |  2 +-
 tp/Texinfo/XS/parsetexi/source_marks.c |  2 +-
 16 files changed, 71 insertions(+), 95 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9c26f5022f..680aba3750 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2023-02-19  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Common.pm (debug_print_element): rename
+       debug_print_element_short as debug_print_element as both functions are
+       almost the same, and remove the former debug_print_element function.
+       Update callers.
+
+       * tp/Texinfo/XS/parsetexi/debug.c (debug_print_element): rename
+       debug_print_element_short as debug_print_element.  Update callers.
+
+       * tp/Texinfo/ParserNonXS.pm (_print_current): inline and remove.
+
 2023-02-19  Patrice Dumas  <pertusus@free.fr>
 
        * doc/texinfo.texi (Other Customization Variables),
diff --git a/tp/Texinfo/Common.pm b/tp/Texinfo/Common.pm
index 6f98ed3208..9597d73783 100644
--- a/tp/Texinfo/Common.pm
+++ b/tp/Texinfo/Common.pm
@@ -1609,7 +1609,7 @@ sub split_custom_heading_command_contents($)
   while (scalar(@contents)) {
     my $current_content = $contents[0];
     #print STDERR "$nr_split_contents ".scalar(@contents).": "
-    #          .debug_print_element_short($current_content)."\n";
+    #          .debug_print_element($current_content)."\n";
     if (defined($current_content->{'cmdname'})
         and $current_content->{'cmdname'} eq '|') {
       shift @contents;
@@ -2031,7 +2031,8 @@ sub _protect_text($$)
   my $current = shift;
   my $to_protect = shift;
 
-  #print STDERR "_protect_text: $to_protect: $current 
".debug_print_element($current)."\n";
+  #print STDERR "_protect_text: $to_protect: $current "
+  #                         .debug_print_element($current, 1)."\n";
   if (defined($current->{'text'}) and $current->{'text'} =~ /$to_protect/
       and !(defined($current->{'type'}) and $current->{'type'} eq 'raw')) {
     my @result = ();
@@ -2313,16 +2314,16 @@ sub _parent_string($)
 }
 
 # informations on a tree element, short version
-sub debug_print_element_short($;$)
+sub debug_print_element($;$)
 {
   my $current = shift;
   my $print_parent = shift;
 
   if (!defined($current)) {
-    return "debug_print_element_short: UNDEF\n";
+    return "debug_print_element: UNDEF\n";
   }
   if (ref($current) ne 'HASH') {
-    return "debug_print_element_short: $current not a hash\n";
+    return "debug_print_element: $current not a hash\n";
   }
   my $type = '';
   my $cmd = '';
@@ -2352,48 +2353,13 @@ sub debug_print_element_short($;$)
   return "$cmd$type$text$args$contents$parent_string";
 }
 
-# informations on a tree element, long version
-sub debug_print_element($)
-{
-  my $current = shift;
-  if (ref($current) ne 'HASH') {
-    return  "debug_print_element: $current not a hash\n";
-  }
-  my $type = '';
-  my $cmd = '';
-  my $text = '';
-  $type = "($current->{'type'})" if (defined($current->{'type'}));
-  # specific of HTML
-  $type .= '{'.$current->{'extra'}->{'special_element_type'}.'}'
-    if (defined($current->{'extra'})
-      and defined($current->{'extra'}->{'special_element_type'}));
-  $cmd = "\@$current->{'cmdname'}" if (defined($current->{'cmdname'}));
-  $cmd .= "($current->{'structure'}->{'section_level'})"
-        if (defined($current->{'structure'}->{'section_level'}));
-  if (defined($current->{'text'})) {
-    my $text_str = $current->{'text'};
-    $text_str =~ s/\n/\\n/g;
-    $text = "[T: $text_str]";
-  }
-  my $parent_string = _parent_string($current);
-  if (defined($parent_string)) {
-    $parent_string .= "\n";
-  } else {
-    $parent_string = '';
-  }
-  my $args = '';
-  my $contents = '';
-  $args = "[A".scalar(@{$current->{'args'}}).']' if $current->{'args'};
-  $contents = "[C".scalar(@{$current->{'contents'}}).']'
-    if $current->{'contents'};
-  return "$cmd$type$text$args$contents\n$parent_string";
-}
-
 # for debugging
-sub debug_print_element_details($)
+sub debug_print_element_details($;$)
 {
   my $current = shift;
-  my $string = debug_print_element($current);
+  my $print_parent = shift;
+
+  my $string = debug_print_element($current, $print_parent);
   foreach my $key (keys (%$current)) {
     $string .= "   $key: $current->{$key}\n";
   }
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index b77e651e59..ae0c01de3a 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -1157,7 +1157,7 @@ sub present_bug_message($$;$)
     }
     if ($current) {
       $current_element_message = "current: ".
-        Texinfo::Common::debug_print_element($current);
+        Texinfo::Common::debug_print_element($current, 1);
     }
   }
   my $additional_information = '';
diff --git a/tp/Texinfo/Convert/DocBook.pm b/tp/Texinfo/Convert/DocBook.pm
index 72115af2e4..21dde72142 100644
--- a/tp/Texinfo/Convert/DocBook.pm
+++ b/tp/Texinfo/Convert/DocBook.pm
@@ -782,7 +782,7 @@ sub _convert($$;$)
                     and $element->{'parent'}->{'type'}
                     and $element->{'parent'}->{'type'} eq 'row') {
           warn "BUG: multitable cell command not in a row "
-            .Texinfo::Common::debug_print_element($element);
+            .Texinfo::Common::debug_print_element($element, 1);
         }
         $result .= "<entry>";
         push @close_format_elements, 'entry';
@@ -1679,7 +1679,8 @@ sub _convert($$;$)
     #my $nr = -1;
     foreach my $content (@{$element->{'contents'}}) {
       #$nr++;
-      #print STDERR "C$debug_element_nr[$nr] 
".Texinfo::Common::debug_print_element_short($content)."\n";
+      #print STDERR "C$debug_element_nr[$nr] "
+      #   .Texinfo::Common::debug_print_element($content)."\n";
       $result .= $self->_convert($content);
     }
     pop @{$self->{'document_context'}->[-1]->{'monospace'}}
diff --git a/tp/Texinfo/Convert/HTML.pm b/tp/Texinfo/Convert/HTML.pm
index 1acbc61b07..d875c826b4 100644
--- a/tp/Texinfo/Convert/HTML.pm
+++ b/tp/Texinfo/Convert/HTML.pm
@@ -1323,7 +1323,7 @@ sub from_element_direction($$$;$$$)
     ######## debug
     if (!$target_element->{'type'}) {
       die "No type for element_target $direction $target_element: "
-       . Texinfo::Common::debug_print_element_details($target_element)
+       . Texinfo::Common::debug_print_element_details($target_element, 1)
        . "directions :"
            . Texinfo::Structuring::print_element_directions($source_element);
     }
@@ -3971,7 +3971,7 @@ sub _default_format_element_header($$$$)
   print STDERR "FORMAT elt header "
      # uncomment to get perl object names
      #."$tree_unit (@{$tree_unit->{'contents'}}) ".
-     . "(".join('|', map{Texinfo::Common::debug_print_element_short($_)}
+     . "(".join('|', map{Texinfo::Common::debug_print_element($_)}
              @{$tree_unit->{'contents'}}) . ") ".
      Texinfo::Structuring::root_or_external_element_cmd_texi($tree_unit) ."\n"
         if ($self->get_conf('DEBUG'));
@@ -6197,7 +6197,7 @@ sub _convert_preformatted_type($$$$)
 
   if (!defined($content)) {
     cluck "content undef in _convert_preformatted_type "
-       .Texinfo::Common::debug_print_element($element);
+       .Texinfo::Common::debug_print_element($element, 1);
   }
 
   $content = $self->get_associated_formatted_inline_content($element).$content;
@@ -8605,7 +8605,7 @@ sub _html_get_tree_root_element($$;$)
   #my $debug = 1;
 
   my $current = $command;
-  #print STDERR "START 
".Texinfo::Common::debug_print_element_short($current)."\n" if ($debug);
+  #print STDERR "START ".Texinfo::Common::debug_print_element($current)."\n" 
if ($debug);
 
   my ($root_element, $root_command);
   while (1) {
@@ -8659,13 +8659,13 @@ sub _html_get_tree_root_element($$;$)
     }
     if ($current->{'structure'}
         and $current->{'structure'}->{'associated_unit'}) {
-      #print STDERR "ASSOCIATED_UNIT 
".Texinfo::Common::debug_print_element_short($current->{'structure'}->{'associated_unit'})."\n"
 if ($debug);
+      #print STDERR "ASSOCIATED_UNIT 
".Texinfo::Common::debug_print_element($current->{'structure'}->{'associated_unit'})."\n"
 if ($debug);
       $current = $current->{'structure'}->{'associated_unit'};
     } elsif ($current->{'parent'}) {
-      #print STDERR "PARENT 
".Texinfo::Common::debug_print_element_short($current->{'parent'})."\n" if 
($debug);
+      #print STDERR "PARENT 
".Texinfo::Common::debug_print_element($current->{'parent'})."\n" if ($debug);
       $current = $current->{'parent'};
     } else {
-      #print STDERR "UNKNOWN ROOT 
".Texinfo::Common::debug_print_element_short($current)."\n" if ($debug);
+      #print STDERR "UNKNOWN ROOT 
".Texinfo::Common::debug_print_element($current)."\n" if ($debug);
       return (undef, $root_command);
     }
   }
@@ -9228,7 +9228,8 @@ sub _prepare_tree_units_global_targets($$)
   } elsif ($node_top) {
     my $tree_unit_top = $node_top->{'structure'}->{'associated_unit'};
     if (!$tree_unit_top) {
-      die "No parent for node_top: 
".Texinfo::Common::debug_print_element($node_top);
+      die "No associated unit for node_top: "
+         .Texinfo::Common::debug_print_element($node_top, 1);
     }
     $self->{'global_target_elements_directions'}->{'Top'} = $tree_unit_top;
   } else {
diff --git a/tp/Texinfo/Convert/LaTeX.pm b/tp/Texinfo/Convert/LaTeX.pm
index cba7cb0529..555ecb440c 100644
--- a/tp/Texinfo/Convert/LaTeX.pm
+++ b/tp/Texinfo/Convert/LaTeX.pm
@@ -2548,7 +2548,7 @@ sub _convert($$)
 
   if ($self->{'debug'}) {
     print STDERR "CONVLTX "
-         .Texinfo::Common::debug_print_element_short($element)."\n";
+         .Texinfo::Common::debug_print_element($element)."\n";
     if ($self->{'debug'} > 4) {
       print STDERR "    CTX "._show_top_context_stack($self)."\n";
     }
@@ -4232,10 +4232,10 @@ sub _convert($$)
         my @str_contents = ();
         foreach my $item_content (@contents) {
           push @str_contents,
-               Texinfo::Common::debug_print_element_short($item_content);
+               Texinfo::Common::debug_print_element($item_content);
         }
         print STDERR "C "
-           .Texinfo::Common::debug_print_element_short($element)
+           .Texinfo::Common::debug_print_element($element)
                                      .": ".join("|", @str_contents)."\n";
       }
     }
diff --git a/tp/Texinfo/Convert/Text.pm b/tp/Texinfo/Convert/Text.pm
index 4439ec13e0..1e697962b5 100644
--- a/tp/Texinfo/Convert/Text.pm
+++ b/tp/Texinfo/Convert/Text.pm
@@ -390,7 +390,7 @@ sub _convert($;$)
   #                         ? $options->{'_code_state'} : 'UNDEF')
   #   ." r: ".(defined($options->{'_raw_state'})
   #                         ? $options->{'_raw_state'} : 'UNDEF')
-  #   .", ".Texinfo::Common::debug_print_element_short($element, 1)."\n";
+  #   .", ".Texinfo::Common::debug_print_element($element, 1)."\n";
 
   if (!defined($element)) {
     confess("Texinfo::Convert::Text::_convert: element undef");
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index 9d8ef49823..35856a8798 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -1100,20 +1100,14 @@ sub _bug_message($$;$$)
   my $message_context_stack = "context_stack: (@context_stack)\n";
   my $current_element_message = '';
   if ($current) {
-    $current_element_message = "current: ". _print_current($current);
+    $current_element_message = "current: "
+                    .Texinfo::Common::debug_print_element($current);
   }
   warn "You found a bug: $message\n\n".
        "Additional information:\n".
        $line_message.$message_context_stack.$current_element_message;
 }
 
-# for debugging
-sub _print_current($)
-{
-  my $current = shift;
-  return Texinfo::Common::debug_print_element($current);
-}
-
 # for debugging
 sub _print_command_args_texi($)
 {
@@ -1220,8 +1214,8 @@ sub _place_source_mark
   }
 
   print STDERR "MARK: "._debug_show_source_mark($source_mark)
-     ." $add_element 
".Texinfo::Common::debug_print_element_short($mark_element)
-      .' '.Texinfo::Common::debug_print_element_short($element)."\n"
+     ." $add_element ".Texinfo::Common::debug_print_element($mark_element)
+      .' '.Texinfo::Common::debug_print_element($element)."\n"
         if ($self->{'DEBUG'});
         ;
 
@@ -1564,8 +1558,8 @@ sub _remove_empty_content($$)
         and _is_container_empty($child_element)) {
       _transfer_source_marks($child_element, $current);
       print STDERR "REMOVE empty child "
-         .Texinfo::Common::debug_print_element_short($child_element)
-          .' '.Texinfo::Common::debug_print_element_short($current)."\n"
+         .Texinfo::Common::debug_print_element($child_element)
+          .' '.Texinfo::Common::debug_print_element($current)."\n"
             if ($self->{'DEBUG'});
       _pop_element_from_contents($self, $current);
     }
@@ -1601,7 +1595,7 @@ sub _close_container($$)
       and scalar(@{$current->{'contents'}})
       and $current->{'contents'}->[-1] eq $element_to_remove) {
     print STDERR "REMOVE empty type "
-      .Texinfo::Common::debug_print_element_short($element_to_remove)."\n"
+      .Texinfo::Common::debug_print_element($element_to_remove)."\n"
         if ($self->{'DEBUG'});
     _pop_element_from_contents($self, $current);
   }
@@ -2207,8 +2201,8 @@ sub _merge_text {
     # Append text
     $merged_to->{'text'} .= $text;
     print STDERR "MERGED TEXT: $text|||in "
-      .Texinfo::Common::debug_print_element_short($merged_to)
-      ." last of: ".Texinfo::Common::debug_print_element_short($current)."\n"
+      .Texinfo::Common::debug_print_element($merged_to)
+      ." last of: ".Texinfo::Common::debug_print_element($current)."\n"
          if ($self->{'DEBUG'});
   } else {
     my $new_element = { 'text' => $text, 'parent' => $current };
@@ -2780,7 +2774,7 @@ sub _isolate_last_space
   my $debug_str;
   if ($self->{'DEBUG'}) {
     $debug_str = 'p: '
-         .Texinfo::Common::debug_print_element_short($current)."; c ";
+         .Texinfo::Common::debug_print_element($current)."; c ";
     if (scalar(@{$current->{'contents'}})) {
       if ($current->{'contents'}->[-1]->{'type'}) {
         $debug_str .= "($current->{'contents'}->[-1]->{'type'})";
@@ -3670,7 +3664,7 @@ sub _end_line_def_line($$$)
   my $def_command = $current->{'parent'}->{'extra'}->{'def_command'};
 
   print STDERR "END DEF LINE $def_command; current: "
-    .Texinfo::Common::debug_print_element_short($current)."\n"
+    .Texinfo::Common::debug_print_element($current)."\n"
       if ($self->{'DEBUG'});
 
   my $arguments = _parse_def($self, $def_command, $current, $source_info);
@@ -3771,7 +3765,7 @@ sub _end_line_starting_block($$$)
                       'in block_line_arg');
 
   print STDERR "END BLOCK LINE: "
-     .Texinfo::Common::debug_print_element_short($current, 1)."\n"
+     .Texinfo::Common::debug_print_element($current, 1)."\n"
        if ($self->{'DEBUG'});
 
   # @multitable args
@@ -4299,7 +4293,7 @@ sub _end_line($$$)
   my $top_context = $self->_top_context();
   if ($top_context eq 'ct_line' or $top_context eq 'ct_def') {
     print STDERR "Still opened line/block command $top_context:"
-      ._print_current($current)
+      .Texinfo::Common::debug_print_element($current)
         if ($self->{'DEBUG'});
     if ($top_context eq 'ct_def') {
       while ($current->{'parent'} and !($current->{'parent'}->{'type'}
@@ -4317,11 +4311,13 @@ sub _end_line($$$)
     # check for infinite loop bugs...
     if ($current eq $current_old) {
       my $indent_str = '- ';
-      my $tree_msg = $indent_str . _print_current($current);
+      my $tree_msg
+            = $indent_str . Texinfo::Common::debug_print_element($current);
       while ($current->{'parent'}) {
         $indent_str = '-'.$indent_str;
         $current = $current->{'parent'};
-        $tree_msg .= $indent_str . _print_current($current);
+        $tree_msg
+            .= $indent_str . Texinfo::Common::debug_print_element($current);
       }
       $self->_bug_message("Nothing closed while a line context remains\n"
                                                                 . $tree_msg,
@@ -4993,7 +4989,7 @@ sub _process_remaining_on_line($$$$)
   #   at the end of an expanded Texinfo fragment
   while ($line eq '') {
     print STDERR "EMPTY TEXT in: "
-     .Texinfo::Common::debug_print_element_short($current)."\n"
+     .Texinfo::Common::debug_print_element($current)."\n"
       if ($self->{'DEBUG'});
     ($line, $source_info) = _next_text($self, $current);
     if (!defined($line)) {
@@ -6599,7 +6595,7 @@ sub _process_remaining_on_line($$$$)
   # end of line
   } else {
     print STDERR "END LINE: "
-        .Texinfo::Common::debug_print_element_short($current, 1)."\n"
+        .Texinfo::Common::debug_print_element($current, 1)."\n"
           if ($self->{'DEBUG'});
     if ($line =~ s/^(\n)//) {
       $current = _merge_text($self, $current, $1);
@@ -6641,7 +6637,7 @@ sub _parse_texi($$$)
          .join('|', $self->_get_context_stack())
          .":@cond_commands:$source_info_text): $line";
       #print STDERR "  $current: "
-      #             .Texinfo::Common::debug_print_element_short($current)."\n";
+      #             .Texinfo::Common::debug_print_element($current)."\n";
     }
 
     # This almost never happens in the tests, because empty lines are mostly
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index b151ad3303..0f50cdd0e6 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -1408,7 +1408,7 @@ sub root_or_external_element_cmd_texi($)
   }
   if (!$element->{'type'}) {
     return "element $element without type: ".
-       Texinfo::Common::debug_print_element_details($element);
+       Texinfo::Common::debug_print_element_details($element, 1);
   }
 
   if ($element->{'type'} eq 'external_node') {
diff --git a/tp/Texinfo/Transformations.pm b/tp/Texinfo/Transformations.pm
index 7094461f44..722a4b1031 100644
--- a/tp/Texinfo/Transformations.pm
+++ b/tp/Texinfo/Transformations.pm
@@ -825,7 +825,7 @@ sub _protect_hashchar_at_line_beginning($$$)
 
   my ($registrar, $customization_information, $elements_to_protect) = 
@$argument;
 
-  #print STDERR "$type $current ".debug_print_element($current)."\n";
+  #print STDERR "$type $current ".debug_print_element($current, 1)."\n";
   # if the next is a hash character at line beginning, mark it
   if (defined($current->{'text'}) and $current->{'text'} =~ /\n$/
       and $current->{'parent'} and $current->{'parent'}->{'contents'}) {
diff --git a/tp/Texinfo/XS/parsetexi/close.c b/tp/Texinfo/XS/parsetexi/close.c
index b1d72ed271..4f19dc4cd1 100644
--- a/tp/Texinfo/XS/parsetexi/close.c
+++ b/tp/Texinfo/XS/parsetexi/close.c
@@ -123,7 +123,7 @@ remove_empty_content (ELEMENT *current)
           transfer_source_marks (child_element, current);
 
           debug_nonl ("REMOVE empty child ");
-          debug_print_element_short (child_element, 1); debug ("");
+          debug_print_element (child_element, 1); debug ("");
           destroy_element (pop_element_from_contents (current));
         }
     }
@@ -153,7 +153,7 @@ close_container (ELEMENT *current)
         {
           element_to_remove = current;
           debug_nonl ("CONTAINER EMPTY ");
-          debug_print_element_short (current, 1); debug ("");
+          debug_print_element (current, 1); debug ("");
         }
     }
 
@@ -167,7 +167,7 @@ close_container (ELEMENT *current)
       if (last_child == element_to_remove)
         {
           debug_nonl ("REMOVE empty type ");
-          debug_print_element_short (last_child, 1); debug ("");
+          debug_print_element (last_child, 1); debug ("");
           destroy_element (pop_element_from_contents (current));
         }
     }
diff --git a/tp/Texinfo/XS/parsetexi/debug.c b/tp/Texinfo/XS/parsetexi/debug.c
index f34b0cf868..e120f6a8f5 100644
--- a/tp/Texinfo/XS/parsetexi/debug.c
+++ b/tp/Texinfo/XS/parsetexi/debug.c
@@ -47,7 +47,7 @@ debug_nonl (char *s, ...)
 }
 
 void
-debug_print_element_short (ELEMENT *e, int print_parent)
+debug_print_element (ELEMENT *e, int print_parent)
 {
   if (e->cmd)
     debug_nonl("@%s", command_name(e->cmd));
diff --git a/tp/Texinfo/XS/parsetexi/end_line.c 
b/tp/Texinfo/XS/parsetexi/end_line.c
index c99e6c09c1..9c9194a16c 100644
--- a/tp/Texinfo/XS/parsetexi/end_line.c
+++ b/tp/Texinfo/XS/parsetexi/end_line.c
@@ -2385,7 +2385,7 @@ end_line (ELEMENT *current)
   if (current_context () == ct_line || current_context () == ct_def)
     {
       debug_nonl ("Still opened line command %d:", current_context ());
-      debug_print_element_short (current, 1); debug("");
+      debug_print_element (current, 1); debug("");
       if (current_context () == ct_def)
         {
           while (current->parent
diff --git a/tp/Texinfo/XS/parsetexi/parser.c b/tp/Texinfo/XS/parsetexi/parser.c
index d9d06d600b..a73c1d6162 100644
--- a/tp/Texinfo/XS/parsetexi/parser.c
+++ b/tp/Texinfo/XS/parsetexi/parser.c
@@ -1917,10 +1917,10 @@ process_remaining_on_line (ELEMENT **current_inout, 
char **line_inout)
                  for the removed elements */
               /*
               debug_nonl ("REMOVE content. Accent: ");
-              debug_print_element_short (current, 1);
+              debug_print_element (current, 1);
               debug ("");
               debug_nonl ("       removed: ");
-              debug_print_element_short (popped_element, 0);
+              debug_print_element (popped_element, 0);
               debug ("");
               */
               destroy_element (popped_element);
@@ -2197,7 +2197,7 @@ process_remaining_on_line (ELEMENT **current_inout, char 
**line_inout)
   else /*  End of line */
     {
       debug_nonl ("END LINE ");
-      debug_print_element_short (current, 1);
+      debug_print_element (current, 1);
       debug ("");
 
       if (*line == '\n')
diff --git a/tp/Texinfo/XS/parsetexi/parser.h b/tp/Texinfo/XS/parsetexi/parser.h
index 1b28cfc91c..1c07e5d1e3 100644
--- a/tp/Texinfo/XS/parsetexi/parser.h
+++ b/tp/Texinfo/XS/parsetexi/parser.h
@@ -148,7 +148,7 @@ extern size_t floats_space;
 void debug (char *s, ...);
 void debug_nonl (char *s, ...);
 extern int debug_output;
-void debug_print_element_short (ELEMENT *e, int print_parent);
+void debug_print_element (ELEMENT *e, int print_parent);
 
 
 /* In separator.c */
diff --git a/tp/Texinfo/XS/parsetexi/source_marks.c 
b/tp/Texinfo/XS/parsetexi/source_marks.c
index 2bfadc5222..4021761b37 100644
--- a/tp/Texinfo/XS/parsetexi/source_marks.c
+++ b/tp/Texinfo/XS/parsetexi/source_marks.c
@@ -100,7 +100,7 @@ place_source_mark (ELEMENT *e, SOURCE_MARK *source_mark)
   debug_nonl ("MARKS: %d c: %d, %d %d ", source_mark->type,
               source_mark->counter, source_mark->position,
               source_mark->status);
-  debug_print_element_short (mark_element, 1);
+  debug_print_element (mark_element, 1);
   debug("");
   add_source_mark (source_mark, mark_element);
 }



reply via email to

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