Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
our $name;
our $total_count;
our $name;
our $total_count;
our $max_nrows=0;
our $max_rowsz=0;
our $max_nrows=0;
our $max_rowsz=0;
my $rowsz = ceil(sqrt($total));
my $nrows = ceil($total / $rowsz);
$total_count += $total;
my $rowsz = ceil(sqrt($total));
my $nrows = ceil($total / $rowsz);
$total_count += $total;
+ $total_real_count += $total if $name =~ m/^[A-Z][a-z]+$/;
$max_nrows = $nrows if $nrows > $max_nrows;
$max_rowsz = $rowsz if $rowsz > $max_rowsz;
my $ix = 0;
$max_nrows = $nrows if $nrows > $max_nrows;
$max_rowsz = $rowsz if $rowsz > $max_rowsz;
my $ix = 0;
- print "// total=$total, rowsz=$rowsz, nrows=$nrows\n";
+ print "// $name: total=$total, rowsz=$rowsz, nrows=$nrows\n";
foreach my $nspots (sort keys %$cs) {
my $c = $cs->{$nspots};
print <<END;
foreach my $nspots (sort keys %$cs) {
my $c = $cs->{$nspots};
print <<END;
-// total_count=$total_count
+// total_count=$total_count total_real_count=$total_real_count
// max_rowsz=$max_rowsz max_nrows=$max_nrows
END
// max_rowsz=$max_rowsz max_nrows=$max_nrows
END
// update script is quacks-ingredients-updates-levels
// source is quacks-ingredients-counts
module 1xFour(){ ////toplevel
// update script is quacks-ingredients-updates-levels
// source is quacks-ingredients-counts
module 1xFour(){ ////toplevel
-// total=1, rowsz=1, nrows=1
+// 1xFour: total=1, rowsz=1, nrows=1
union(){
Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
$nspots = 1;
};
}
module 1xOne(){ ////toplevel
};
}
module 1xOne(){ ////toplevel
-// total=1, rowsz=1, nrows=1
+// 1xOne: total=1, rowsz=1, nrows=1
union(){
Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
$nspots = 1;
};
}
module 1xThree(){ ////toplevel
};
}
module 1xThree(){ ////toplevel
-// total=1, rowsz=1, nrows=1
+// 1xThree: total=1, rowsz=1, nrows=1
union(){
Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
$nspots = 1;
};
}
module 1xTwo(){ ////toplevel
};
}
module 1xTwo(){ ////toplevel
-// total=1, rowsz=1, nrows=1
+// 1xTwo: total=1, rowsz=1, nrows=1
union(){
Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]);
$nspots = 1;
};
}
module 2xFour(){ ////toplevel
};
}
module 2xFour(){ ////toplevel
-// total=2, rowsz=2, nrows=1
+// 2xFour: total=2, rowsz=2, nrows=1
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
$nspots = 1;
};
}
module 2xOne(){ ////toplevel
};
}
module 2xOne(){ ////toplevel
-// total=2, rowsz=2, nrows=1
+// 2xOne: total=2, rowsz=2, nrows=1
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
$nspots = 1;
};
}
module 2xThree(){ ////toplevel
};
}
module 2xThree(){ ////toplevel
-// total=2, rowsz=2, nrows=1
+// 2xThree: total=2, rowsz=2, nrows=1
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
$nspots = 1;
};
}
module 2xTwo(){ ////toplevel
};
}
module 2xTwo(){ ////toplevel
-// total=2, rowsz=2, nrows=1
+// 2xTwo: total=2, rowsz=2, nrows=1
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]);
$nspots = 1;
};
}
module 3xFour(){ ////toplevel
};
}
module 3xFour(){ ////toplevel
-// total=3, rowsz=2, nrows=2
+// 3xFour: total=3, rowsz=2, nrows=2
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
$nspots = 1;
};
}
module 3xOne(){ ////toplevel
};
}
module 3xOne(){ ////toplevel
-// total=3, rowsz=2, nrows=2
+// 3xOne: total=3, rowsz=2, nrows=2
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
$nspots = 1;
};
}
module 3xThree(){ ////toplevel
};
}
module 3xThree(){ ////toplevel
-// total=3, rowsz=2, nrows=2
+// 3xThree: total=3, rowsz=2, nrows=2
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
$nspots = 1;
};
}
module 3xTwo(){ ////toplevel
};
}
module 3xTwo(){ ////toplevel
-// total=3, rowsz=2, nrows=2
+// 3xTwo: total=3, rowsz=2, nrows=2
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]);
$nspots = 1;
};
}
module Black(){ ////toplevel
};
}
module Black(){ ////toplevel
-// total=18, rowsz=5, nrows=4
+// Black: total=18, rowsz=5, nrows=4
union(){
Frame($phase, token_pitch * [ 5 + 1.00, 4 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 5 + 1.00, 4 + 0.50 ]);
$nspots = 1;
};
}
module Blue(){ ////toplevel
};
}
module Blue(){ ////toplevel
-// total=34, rowsz=6, nrows=6
+// Blue: total=34, rowsz=6, nrows=6
union(){
Frame($phase, token_pitch * [ 6 + 1.00, 6 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 6 + 1.00, 6 + 0.50 ]);
$nspots = 1;
};
}
module Green(){ ////toplevel
};
}
module Green(){ ////toplevel
-// total=38, rowsz=7, nrows=6
+// Green: total=38, rowsz=7, nrows=6
union(){
Frame($phase, token_pitch * [ 7 + 1.00, 6 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 7 + 1.00, 6 + 0.50 ]);
$nspots = 1;
};
}
module Orange(){ ////toplevel
};
}
module Orange(){ ////toplevel
-// total=20, rowsz=5, nrows=4
+// Orange: total=20, rowsz=5, nrows=4
union(){
Frame($phase, token_pitch * [ 5 + 1.00, 4 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 5 + 1.00, 4 + 0.50 ]);
$nspots = 1;
};
}
module Purple(){ ////toplevel
};
}
module Purple(){ ////toplevel
-// total=15, rowsz=4, nrows=4
+// Purple: total=15, rowsz=4, nrows=4
union(){
Frame($phase, token_pitch * [ 4 + 1.00, 4 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 4 + 1.00, 4 + 0.50 ]);
$nspots = 1;
};
}
module Red(){ ////toplevel
};
}
module Red(){ ////toplevel
-// total=30, rowsz=6, nrows=5
+// Red: total=30, rowsz=6, nrows=5
union(){
Frame($phase, token_pitch * [ 6 + 1.00, 5 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 6 + 1.00, 5 + 0.50 ]);
$nspots = 1;
};
}
module White(){ ////toplevel
};
}
module White(){ ////toplevel
-// total=32, rowsz=6, nrows=6
+// White: total=32, rowsz=6, nrows=6
union(){
Frame($phase, token_pitch * [ 6 + 1.00, 6 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 6 + 1.00, 6 + 0.50 ]);
$nspots = 1;
};
}
module Yellow(){ ////toplevel
};
}
module Yellow(){ ////toplevel
-// total=29, rowsz=6, nrows=5
+// Yellow: total=29, rowsz=6, nrows=5
union(){
Frame($phase, token_pitch * [ 6 + 1.00, 5 + 0.50 ]);
$nspots = 1;
union(){
Frame($phase, token_pitch * [ 6 + 1.00, 5 + 0.50 ]);
$nspots = 1;
translate(token_pitch * [ 2.5, 1.0 ]) Token_L();
};
}
translate(token_pitch * [ 2.5, 1.0 ]) Token_L();
};
}
+// total_count=240 total_real_count=216
// max_rowsz=7 max_nrows=6
// max_rowsz=7 max_nrows=6
./quacks-ingredients-counts >>$f.tmp
mv -f $f.tmp $f
./quacks-ingredients-counts >>$f.tmp
mv -f $f.tmp $f