chiark
/
gitweb
/
~ianmdlvl
/
reprap-play.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6840701
)
commitid.scad.pl: introduce genform_prep to reset form generator info (nfc)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 12 Feb 2016 01:45:56 +0000
(
01:45
+0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 12 Feb 2016 01:45:56 +0000
(
01:45
+0000)
commitid.scad.pl
patch
|
blob
|
history
diff --git
a/commitid.scad.pl
b/commitid.scad.pl
index 8bd4aa71e507d46b1ae6e5a2d588e8a9ac4499f2..7245373abcfe7d82d5cc060323cf4d2785a8006e 100755
(executable)
--- a/
commitid.scad.pl
+++ b/
commitid.scad.pl
@@
-449,6
+449,9
@@
sub ljustt ($$$;$) {
return sprintf "%-${sz}.${sz}s%s", $whole, $suffix;
}
return sprintf "%-${sz}.${sz}s%s", $whole, $suffix;
}
+sub genform_prep() {
+}
+
sub genform ($@) {
my ($form, @lines) = @_;
gentextmodule($form, @lines);
sub genform ($@) {
my ($form, @lines) = @_;
gentextmodule($form, @lines);
@@
-538,6
+541,7
@@
sub do_git () {
gentextmodule_demo_start_batch();
if (defined($git_count)) {
gentextmodule_demo_start_batch();
if (defined($git_count)) {
+ genform_prep();
my $smallstr = rjustt($sz, 'Count', $git_count, $git_dirty);
my $forgitobj = $sz - length($git_count) - 1;
if (defined($git_object) && $forgitobj >= 2) {
my $smallstr = rjustt($sz, 'Count', $git_count, $git_dirty);
my $forgitobj = $sz - length($git_count) - 1;
if (defined($git_object) && $forgitobj >= 2) {
@@
-548,14
+552,17
@@
sub do_git () {
genform_plusq("Small$sz", $smallstr);
}
genform_plusq("Small$sz", $smallstr);
}
+ genform_prep();
genform_plusq("Git$sz", ljustt($sz, 'Objid', $git_object, $git_dirty))
if defined $git_object;
if (defined $git_count && defined $git_object) {
genform_plusq("Git$sz", ljustt($sz, 'Objid', $git_object, $git_dirty))
if defined $git_object;
if (defined $git_count && defined $git_object) {
+ genform_prep();
genform("Full".($sz*2),
ljustt($sz, 'Objid', $git_object),
rjustt($sz, 'Count', $git_count, $git_dirty));
genform("Full".($sz*2),
ljustt($sz, 'Objid', $git_object),
rjustt($sz, 'Count', $git_count, $git_dirty));
+ genform_prep();
my $e = $sz;
genform("Full".($e*3)."T",
ljustt($e*2, 'Objid', $git_object, $git_dirty)
my $e = $sz;
genform("Full".($e*3)."T",
ljustt($e*2, 'Objid', $git_object, $git_dirty)