Next | Program Repair Shop | 252 |
The printout function now has two nearly identical branches
26 sub printout { 27 if ($ct_scanout ) { 28 for ($i=0;$i<@{$chain[3]};$i++){ 29 for (@chain) { 30 next unless defined; 31 $_->[$i] =~ s/0/L/g; 32 $_->[$i] =~ s/1/H/g; 33 } 34 my @chars = map $_->[$i], @chain; 35 print OUTFILE "\n(ct_so\n", join("", @chars), "\n )"; 36 } 37 $ct_scanout=0; 38 } elsif ($ct_scanout==0) { 39 for ($i=0;$i<@{$chain[3]};$i++) { 40 for (@chain) { 41 next unless defined; 42 $_->[$i] =~ s/X/0/g; 43 } 44 my @chars = map $_->[$i], @chain; 45 print OUTFILE "\n(ct_si $ct_si{tdi}\n", join("", @chars), "\n )"; 46 } 47 } 48 }
We can (and should) see what happens if we merge them
Next | Copyright © 2002 M. J. Dominus |