texinfo-commits
[Top][All Lists]
Advanced

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

[no subject]


From: Patrice Dumas
Date: Tue, 1 Mar 2022 13:19:23 -0500 (EST)

branch: master
commit 02d5ceeee22f3b2b8f7f627c937a4cd133f5260c
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Tue Mar 1 12:34:16 2022 +0100

    tp/Texinfo/ParserNonXS.pm: input_file_name instead of name in input 
structure
---
 tp/TODO                   |  7 +++++--
 tp/Texinfo/ParserNonXS.pm | 14 +++++++-------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/tp/TODO b/tp/TODO
index 4413452578..6256e600c5 100644
--- a/tp/TODO
+++ b/tp/TODO
@@ -32,8 +32,11 @@ bytes.  To check that they can never be upgraded + document
 * ParserNonXS.pm
  l 3226 ParserNonXS.pm
                unshift @{$self->{'input'}}, {
-                 'name' => $file,
-  -> sets file_name in _next_text: 'file_name' => $input->{'name'}
+                 'input_file_name' => $file,
+  -> sets file_name in _next_text: 'file_name' => $input->{'input_file_name'}
+
+ l 2067 decode $previous_input->{'input_file_name'}
+
  $self->{'info'}->{'input_file_name'}
  $self->{'info'}->{'input_directory'}
 
diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
index bc2a025d12..a6066f261a 100644
--- a/tp/Texinfo/ParserNonXS.pm
+++ b/tp/Texinfo/ParserNonXS.pm
@@ -1006,7 +1006,7 @@ sub parse_texi_file($$)
   
   $self->{'input'} = [{
        'pending' => [],
-       'name' => $file_name,
+       'input_file_name' => $file_name,
        'line_nr' => 0,
        'fh' => $filehandle
         }];
@@ -2009,7 +2009,7 @@ sub _save_line_directive
   if (defined($file_name)) {
     my ($encoded_file_name, $file_name_encoding)
        = _encode_file_name($self, $file_name);
-    $input->{'name'} = $encoded_file_name;
+    $input->{'input_file_name'} = $encoded_file_name;
   }
 }
 
@@ -2034,7 +2034,7 @@ sub _next_text($$)
       my $input_error = 0;
       local $SIG{__WARN__} = sub {
         my $message = shift;
-        print STDERR "$input->{'name'}" . ":"
+        print STDERR "$input->{'input_file_name'}" . ":"
                . ($input->{'line_nr'} + 1) . ": input error: $message";
         $input_error = 1;
       };
@@ -2055,17 +2055,17 @@ sub _next_text($$)
         $line =~ s/\x{7F}.*\s*//;
         $input->{'line_nr'}++;
         return ($line, {'line_nr' => $input->{'line_nr'}, 
-            'file_name' => $input->{'name'},
+            'file_name' => $input->{'input_file_name'},
             'macro' => ''});
       }
     }
     my $previous_input = shift(@{$self->{'input'}});
     # Don't close STDIN
-    if ($previous_input->{'fh'} and $previous_input->{'name'} ne '-') {
+    if ($previous_input->{'fh'} and $previous_input->{'input_file_name'} ne 
'-') {
       if (!close($previous_input->{'fh'})) {
         $self->{'registrar'}->document_warn($self,
                              sprintf(__("error on closing %s: %s"),
-                                     $previous_input->{'name'}, $!));
+                                $previous_input->{'input_file_name'}, $!));
       }
     }
   }
@@ -3239,7 +3239,7 @@ sub _end_line($$$)
               my ($directories, $suffix);
               ($file, $directories, $suffix) = fileparse($file);
               unshift @{$self->{'input'}}, { 
-                'name' => $file,
+                'input_file_name' => $file,
                 'line_nr' => 0,
                 'pending' => [],
                 'fh' => $filehandle };



reply via email to

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