From: Ian Jackson Date: Fri, 12 Feb 2016 01:43:08 +0000 (+0000) Subject: commitid: Pass $bestwhat to do_some_best (nfc) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=reprap-play.git;a=commitdiff_plain;h=1350f3a0d3dddf9efa00029166cf060467585650 commitid: Pass $bestwhat to do_some_best (nfc) --- diff --git a/commitid.scad.pl b/commitid.scad.pl index 0af0115..68bd4ce 100755 --- a/commitid.scad.pl +++ b/commitid.scad.pl @@ -565,7 +565,8 @@ sub do_git () { } sub do_some_best ($$) { - my ($modname, $formre) = @_; + my ($bestwhat, $formre) = @_; + my $modname = "Best$bestwhat"; my $fullmodname = "Commitid_${modname}_2D"; my @argl = qw(max_sz margin=Commitid_pixelsz()); p "module $fullmodname(".argl_formal(@argl).") {\n"; @@ -628,8 +629,8 @@ sub do_git_best () { # (decreasing), and then by number of lines (increasing) and # try each one both ways round. - do_some_best('BestCount', 'Small|Full') if $do_git =~ m/c/; - do_some_best('BestObjid', 'Git|Full') if $do_git =~ m/o/; + do_some_best('Count', 'Small|Full') if $do_git =~ m/c/; + do_some_best('Objid', 'Git|Full') if $do_git =~ m/o/; } while (@ARGV) {