From: Ian Jackson Date: Sat, 28 Mar 2020 17:07:56 +0000 (+0000) Subject: quacks-ingredients: better counting reports X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=2d779819896f56e15336bc3516a291f3e2edbe57 quacks-ingredients: better counting reports Signed-off-by: Ian Jackson --- diff --git a/quacks-ingredients-counts b/quacks-ingredients-counts index 1016295..e9f6acf 100755 --- a/quacks-ingredients-counts +++ b/quacks-ingredients-counts @@ -38,6 +38,7 @@ s{^}{// }mg; our $name; our $total_count; +our $total_real_count; our $max_nrows=0; our $max_rowsz=0; @@ -48,10 +49,11 @@ sub wrtoplevel () { 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; - 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 <>$f.tmp mv -f $f.tmp $f + +egrep '^//' $f | sort