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 Oct 2024 17:24:29 -0400 (EDT)

branch: master
commit 8557f485f624e1bef9c5633ca1ca183220fb4656
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Jul 29 12:17:29 2024 +0200

    * tp/texi2any.pl: get file handle from XS for - too.
---
 ChangeLog      |  4 ++++
 tp/texi2any.pl | 29 ++++++++++++++---------------
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d960e80a72..d2fd8a8eed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-07-29  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/texi2any.pl: get file handle from XS for - too.
+
 2024-10-01  Patrice Dumas  <pertusus@free.fr>
 
        * Makefile.am, ChangeLog: remove spurious references to
diff --git a/tp/texi2any.pl b/tp/texi2any.pl
index f80a2039e7..731508e227 100755
--- a/tp/texi2any.pl
+++ b/tp/texi2any.pl
@@ -1983,23 +1983,22 @@ while(@input_files) {
                                $converter->output_files_information());
   if ($converter_unclosed_files) {
     foreach my $unclosed_file (keys(%$converter_unclosed_files)) {
-      if ($unclosed_file eq '-') {
-        $main_unclosed_files{$unclosed_file}
-          = $converter_unclosed_files->{$unclosed_file};
-      } else {
-        my $fh = $converter_unclosed_files->{$unclosed_file};
-        # undefined file handle means that the path comes from XS (normally
-        # through build_output_files_unclosed_files) but is not associated
-        # with a file handle yet, as a file handle can't be directly associated
-        # with a stream in C code, but the stream can be returned through
-        # an XS interface, here
-        # Texinfo::Convert::ConvertXS::get_unclosed_stream.
+      my $fh = $converter_unclosed_files->{$unclosed_file};
+      # undefined file handle means that the path comes from XS (normally
+      # through build_output_files_unclosed_files) but is not associated
+      # with a file handle yet, as a file handle can't be directly associated
+      # with a stream in C code, but the stream can be returned through
+      # an XS interface, here
+      # Texinfo::Convert::ConvertXS::get_unclosed_stream.
+      if (!defined($fh)) {
+        $fh = $converter->XS_get_unclosed_stream($unclosed_file);
         if (!defined($fh)) {
-          $fh = $converter->XS_get_unclosed_stream($unclosed_file);
-          if (!defined($fh)) {
-            next;
-          }
+          next;
         }
+      }
+      if ($unclosed_file eq '-') {
+        $main_unclosed_files{$unclosed_file} = $fh;
+      } else {
         if (!close($fh)) {
           warn(sprintf(__("%s: error on closing %s: %s\n"),
                            $real_command_name, $unclosed_file, $!));



reply via email to

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