chiark / gitweb /
quacks-ingredients: better counting reports, more
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 28 Mar 2020 17:10:32 +0000 (17:10 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 28 Mar 2020 17:10:32 +0000 (17:10 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
quacks-ingredients-L1.scad
quacks-ingredients-L2.scad
quacks-ingredients-L3.scad
quacks-ingredients-L4.scad
quacks-ingredients-L5.scad
quacks-ingredients-counts
quacks-ingredients-counts.scad
quacks-ingredients-update-levels

index 9e2f9f5326f4637adb06a7b99cc652358efdac9a..5a85e58d8265b2e80d7ced7a8a7a4906496e4b62 100644 (file)
@@ -1,4 +1,4 @@
-// autogenerated by quacks-ingredients-updates-levels - do not edit
+//  autogenerated by quacks-ingredients-updates-levels - do not edit
 $phase=1;
 module Token_L(){ Token_L1(); }
 //// toplevels-from:
index 1472e4147045fdf336dea3545c6666366117b3ef..6c7a08758d2a5dcb6657638b543b9ce6c5490c0c 100644 (file)
@@ -1,4 +1,4 @@
-// autogenerated by quacks-ingredients-updates-levels - do not edit
+//  autogenerated by quacks-ingredients-updates-levels - do not edit
 $phase=2;
 module Token_L(){ Token_L2(); }
 //// toplevels-from:
index 5de96bc1408c68aebf5230cf5d78152618082cdd..b39277d9c604757da9ff4f612f43f1c83e9603cf 100644 (file)
@@ -1,4 +1,4 @@
-// autogenerated by quacks-ingredients-updates-levels - do not edit
+//  autogenerated by quacks-ingredients-updates-levels - do not edit
 $phase=3;
 module Token_L(){ Token_L3(); }
 //// toplevels-from:
index f5f9b078f0affb5d19ca63803692152ca4d67f0d..9f86e2a5e5e1d026816181677a438f9514043d3b 100644 (file)
@@ -1,4 +1,4 @@
-// autogenerated by quacks-ingredients-updates-levels - do not edit
+//  autogenerated by quacks-ingredients-updates-levels - do not edit
 $phase=4;
 module Token_L(){ Token_L4(); }
 //// toplevels-from:
index 88de61f94964c304262a242a7c90294fa96ebc34..2f35fd308abb24baf3bbd36f6c39af2bf7096d23 100644 (file)
@@ -1,4 +1,4 @@
-// autogenerated by quacks-ingredients-updates-levels - do not edit
+//  autogenerated by quacks-ingredients-updates-levels - do not edit
 $phase=5;
 module Token_L(){ Token_L5(); }
 //// toplevels-from:
index e9f6acf1fde58562a48736930c091853e559579f..3e49a9528c227f2b1a8c48ae3cced84429741a78 100755 (executable)
@@ -53,7 +53,8 @@ sub wrtoplevel () {
     $max_nrows = $nrows if $nrows > $max_nrows;
     $max_rowsz = $rowsz if $rowsz > $max_rowsz;
     my $ix = 0;
-    print "// $name: total=$total, rowsz=$rowsz, nrows=$nrows\n";
+    printf "// %-10s  total=%2d  rowsz=$rowsz  nrows=$nrows\n",
+       "$name", $total;
     foreach my $nspots (sort keys %$cs) {
        my $c = $cs->{$nspots};
        print <<END;
@@ -80,8 +81,8 @@ foreach $name (sort keys %count) {
 }
 
 print <<END;
-// total_count=$total_count total_real_count=$total_real_count
-// max_rowsz=$max_rowsz max_nrows=$max_nrows
+// total_count=$total_count   total_real_count=$total_real_count
+// max_rowsz=$max_rowsz       max_nrows=$max_nrows
 END
 
 STDOUT->error and die $!;
index 46b4f555f9ca4d07adf6b2e95f3a7a397fc0b843..1eeb70ce4f088a6ca42f654c89ce7ef3ea394286 100644 (file)
@@ -1,8 +1,8 @@
-// autogenerated - do not edit
-//  update script is quacks-ingredients-updates-levels
-//  source is quacks-ingredients-counts
+//  autogenerated - do not edit
+//   update script is quacks-ingredients-updates-levels
+//   source is quacks-ingredients-counts
 module 1xFour(){ ////toplevel
-// 1xFour: 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;
@@ -22,7 +22,7 @@ module 1xFour(){ ////toplevel
   };
 }
 module 1xOne(){ ////toplevel
-// 1xOne: 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;
@@ -42,7 +42,7 @@ module 1xOne(){ ////toplevel
   };
 }
 module 1xThree(){ ////toplevel
-// 1xThree: 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;
@@ -62,7 +62,7 @@ module 1xThree(){ ////toplevel
   };
 }
 module 1xTwo(){ ////toplevel
-// 1xTwo: 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;
@@ -82,7 +82,7 @@ module 1xTwo(){ ////toplevel
   };
 }
 module 2xFour(){ ////toplevel
-// 2xFour: 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;
@@ -103,7 +103,7 @@ module 2xFour(){ ////toplevel
   };
 }
 module 2xOne(){ ////toplevel
-// 2xOne: 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;
@@ -124,7 +124,7 @@ module 2xOne(){ ////toplevel
   };
 }
 module 2xThree(){ ////toplevel
-// 2xThree: 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;
@@ -145,7 +145,7 @@ module 2xThree(){ ////toplevel
   };
 }
 module 2xTwo(){ ////toplevel
-// 2xTwo: 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;
@@ -166,7 +166,7 @@ module 2xTwo(){ ////toplevel
   };
 }
 module 3xFour(){ ////toplevel
-// 3xFour: 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;
@@ -188,7 +188,7 @@ module 3xFour(){ ////toplevel
   };
 }
 module 3xOne(){ ////toplevel
-// 3xOne: 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;
@@ -210,7 +210,7 @@ module 3xOne(){ ////toplevel
   };
 }
 module 3xThree(){ ////toplevel
-// 3xThree: 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;
@@ -232,7 +232,7 @@ module 3xThree(){ ////toplevel
   };
 }
 module 3xTwo(){ ////toplevel
-// 3xTwo: 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;
@@ -254,7 +254,7 @@ module 3xTwo(){ ////toplevel
   };
 }
 module Black(){ ////toplevel
-// Black: 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;
@@ -291,7 +291,7 @@ module Black(){ ////toplevel
   };
 }
 module Blue(){ ////toplevel
-// Blue: 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;
@@ -344,7 +344,7 @@ module Blue(){ ////toplevel
   };
 }
 module Green(){ ////toplevel
-// Green: 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;
@@ -401,7 +401,7 @@ module Green(){ ////toplevel
   };
 }
 module Orange(){ ////toplevel
-// Orange: 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;
@@ -440,7 +440,7 @@ module Orange(){ ////toplevel
   };
 }
 module Purple(){ ////toplevel
-// Purple: 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;
@@ -474,7 +474,7 @@ module Purple(){ ////toplevel
   };
 }
 module Red(){ ////toplevel
-// Red: 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;
@@ -523,7 +523,7 @@ module Red(){ ////toplevel
   };
 }
 module White(){ ////toplevel
-// White: 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;
@@ -574,7 +574,7 @@ module White(){ ////toplevel
   };
 }
 module Yellow(){ ////toplevel
-// Yellow: 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;
@@ -621,5 +621,5 @@ module Yellow(){ ////toplevel
     translate(token_pitch * [   2.5,   1.0 ]) Token_L();
   };
 }
-// total_count=240 total_real_count=216
-// max_rowsz=7 max_nrows=6
+// total_count=240   total_real_count=216
+// max_rowsz=7       max_nrows=6
index b54cca69f00ee4d8f8039f49866f497f45dca4f5..f0dbd4bfe4f1653a116c498309ef3d862d555008 100755 (executable)
@@ -4,7 +4,7 @@ set -e
 for l in 1 2 3 4 5; do
        f=quacks-ingredients-L$l.scad
        cat >$f.tmp <<END
-// autogenerated by quacks-ingredients-updates-levels - do not edit
+//  autogenerated by quacks-ingredients-updates-levels - do not edit
 \$phase=$l;
 module Token_L(){ Token_L$l(); }
 //// toplevels-from:
@@ -15,12 +15,12 @@ done
 
 f=quacks-ingredients-counts.scad
 cat >$f.tmp <<END
-// autogenerated - do not edit
-//  update script is quacks-ingredients-updates-levels
-//  source is quacks-ingredients-counts
+//  autogenerated - do not edit
+//   update script is quacks-ingredients-updates-levels
+//   source is quacks-ingredients-counts
 END
 
 ./quacks-ingredients-counts >>$f.tmp
 mv -f $f.tmp $f
 
-egrep '^//' $f | sort
+egrep '^// [A-Za-z]' $f | sort