texinfo-commits
[Top][All Lists]
Advanced

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

texinfo/tp/Texinfo/Convert Info.pm


From: Patrice Dumas
Subject: texinfo/tp/Texinfo/Convert Info.pm
Date: Sun, 13 Nov 2011 23:31:35 +0000

CVSROOT:        /sources/texinfo
Module name:    texinfo
Changes by:     Patrice Dumas <pertusus>        11/11/13 23:31:35

Modified files:
        tp/Texinfo/Convert: Info.pm 

Log message:
        Remove spurious push to 'opened_files', this is not needed as open_out
        already does it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/texinfo/tp/Texinfo/Convert/Info.pm?cvsroot=texinfo&r1=1.75&r2=1.76

Patches:
Index: Info.pm
===================================================================
RCS file: /sources/texinfo/texinfo/tp/Texinfo/Convert/Info.pm,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -b -r1.75 -r1.76
--- Info.pm     13 Nov 2011 23:04:30 -0000      1.75
+++ Info.pm     13 Nov 2011 23:31:35 -0000      1.76
@@ -83,7 +83,6 @@
                                     $self->{'output_file'}, $!));
       return undef;
     }
-    push @{$self->{'opened_files'}}, $self->{'output_file'};
   }
   print STDERR "DOCUMENT\n" if ($self->get_conf('DEBUG'));
   my $out_file_nr = 0;
@@ -141,10 +140,9 @@
             return undef;
           }
           # remove the main file from opened files since it was renamed
-          my $outfile = pop @{$self->{'opened_files'}};
-          if ($outfile ne $self->{'output_file'}) {
-            die "BUG: on top of opened_files $outfile and not 
$self->{'output_file'}\n";
-          }
+          # and add the file with a number.
+          @{$self->{'opened_files'}} = grep {$_ ne $self->{'output_file'}}
+               @{$self->{'opened_files'}};
           push @{$self->{'opened_files'}}, 
                    $self->{'output_file'}.'-'.$out_file_nr;
           push @indirect_files, [$self->{'output_filename'}.'-'.$out_file_nr,
@@ -168,8 +166,6 @@
                   $self->{'output_file'}.'-'.$out_file_nr, $!));
            return undef;
         }
-        push @{$self->{'opened_files'}}, 
-                $self->{'output_file'}.'-'.$out_file_nr;
         print $fh $header;
         $self->{'count_context'}->[-1]->{'bytes'} += $header_bytes;
         push @indirect_files, [$self->{'output_filename'}.'-'.$out_file_nr,
@@ -193,7 +189,6 @@
             $self->{'output_file'}, $!));
       return undef;
     }
-    push @{$self->{'opened_files'}}, $self->{'output_file'};
     $tag_text = $header;
     $tag_text .= "\x{1F}\nIndirect:";
     foreach my $indirect (@indirect_files) {



reply via email to

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