m/\+/;
$count{$names[$i]}{$nspots} =
- $which eq 'Both' ? $` + $' :
+ $which eq 'All' ? $` + $' :
$which eq 'Base' ? $` :
$which eq 'Witches' ? $' :
die "$which ?";
our $max_rowsz=0;
sub wrtoplevel () {
- print "module $name(){ ////toplevel\n";
+ print "module ${which}_$name(){ ////toplevel\n";
my $cs = $count{$name};
my $total = 0; $total += $_ foreach values %$cs;
my $rowsz = ceil(sqrt($total));
$max_nrows = $nrows if $nrows > $max_nrows;
$max_rowsz = $rowsz if $rowsz > $max_rowsz;
my $ix = 0;
- printf "// %-10s total=%2d rowsz=$rowsz nrows=$nrows\n",
- "$name", $total;
+ printf "// %-5s %-10s total=%2d rowsz=$rowsz nrows=$nrows\n",
+ $which, "$name", $total;
foreach my $nspots (sort keys %$cs) {
my $c = $cs->{$nspots};
print <<END;
}
print <<END;
-// total_count=$total_count total_real_count=$total_real_count
-// max_rowsz=$max_rowsz max_nrows=$max_nrows
+// $which total_count=$total_count total_real_count=$total_real_count
+// $which max_rowsz=$max_rowsz max_nrows=$max_nrows
END
STDOUT->error and die $!;