From cfc3fd27a3743b7cfe5b73508f65eaf79ab8149a Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 14 Feb 2016 23:07:34 +0000 Subject: [PATCH 1/1] commitid: Provide an internal debugging facility (no callers yet, so nfc) --- commitid.scad.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/commitid.scad.pl b/commitid.scad.pl index 4c7371f..d646c32 100755 --- a/commitid.scad.pl +++ b/commitid.scad.pl @@ -261,8 +261,17 @@ use strict; $SIG{__WARN__} = sub { die @_; }; +our $debug=0; + +if (@ARGV && $ARGV[0] =~ m/^-(D+)$/) { + $debug = length $1; + shift @ARGV; +} + sub p { print @_ or die $!; } +sub p_debug { print STDERR @_ if $debug; } + p <<'END'; // *** AUTOGENERATED - DO NOT EDIT *** // function Commitid_pixelsz() = -- 2.30.2