[BACK]Return to regress.pl CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc / regress

Diff for /mandoc/regress/regress.pl between version 1.8 and 1.9

version 1.8, 2017/07/18 18:47:06 version 1.9, 2018/12/16 00:17:04
Line 79  sub syshtml ($@) {
Line 79  sub syshtml ($@) {
         open my $outfd, '>', $outfile or die "$outfile: $!";          open my $outfd, '>', $outfile or die "$outfile: $!";
         my $infd;          my $infd;
         my $pid = open3 undef, $infd, undef, @_;          my $pid = open3 undef, $infd, undef, @_;
         my $state;          my $state = 0;
         while (<$infd>) {          while (<$infd>) {
                 chomp;                  chomp;
                 if (!$state && s/.*<math class="eqn">//) {                  if (!$state && s/.*<math class="eqn">//) {
                         $state = 1;                          $state = 'math';
                         next unless length;                          next unless length;
                   } elsif (/^BEGINTEST/) {
                           $state = 'other';
                 }                  }
                 $state = 1 if /^BEGINTEST/;                  if ($state eq 'math') {
                 if ($state && s/<\/math>.*//) {  
                         s/^ *//;                          s/^ *//;
                         print $outfd "$_\n" if length;                          if (s/<\/math>.*//) {
                         undef $state;                                  print $outfd "$_\n" if length;
                         next;                                  $state = 0;
                                   next;
                           }
                 }                  }
                 s/^ *//;  
                 print $outfd "$_\n" if $state;                  print $outfd "$_\n" if $state;
                 undef $state if /^ENDTEST/;                  $state = 0 if /^ENDTEST/;
         }          }
         close $outfd;          close $outfd;
         close $infd;          close $infd;

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

CVSweb