return sprintf "%-${sz}.${sz}s%s", $whole, $suffix;
}
-sub gentextmodule_q ($$$) {
+sub genform ($@) {
+ my ($form, @lines) = @_;
+ gentextmodule($form, @lines);
+}
+
+sub genform_q ($$$) {
my ($form, $s, $lines) = @_;
$gtm_demo_j++;
my $l = length $s;
my $e = $l/$lines;
return if $e < 2;
$gtm_demo_j--;
- gentextmodule($form, $s =~ m/.{$e}/g);
+ genform($form, $s =~ m/.{$e}/g);
}
-sub gentextmodule_plusq ($$) {
+sub genform_plusq ($$) {
my ($form, $s) = @_;
- gentextmodule($form, $s);
- gentextmodule_q("${form}S", $s, 2);
- gentextmodule_q("${form}T", $s, 3);
+ genform($form, $s);
+ genform_q("${form}S", $s, 2);
+ genform_q("${form}T", $s, 3);
}
our @gcmd;
foreach my $sz (2..10) {
gentextmodule_demo_start_batch();
- gentextmodule_plusq("Small$sz", rjustt($sz, $git_count, $git_dirty))
+ genform_plusq("Small$sz", rjustt($sz, $git_count, $git_dirty))
if defined $git_count;
- gentextmodule_plusq("Git$sz", ljustt($sz, $git_object, $git_dirty))
+ genform_plusq("Git$sz", ljustt($sz, $git_object, $git_dirty))
if defined $git_object;
if (defined $git_count && defined $git_object) {
- gentextmodule("Full".($sz*2),
- ljustt($sz, $git_object),
- rjustt($sz, $git_count, $git_dirty));
+ genform("Full".($sz*2),
+ ljustt($sz, $git_object),
+ rjustt($sz, $git_count, $git_dirty));
my $e = $sz;
- gentextmodule("Full".($e*3)."T",
- ljustt($e*2, $git_object, $git_dirty)
- =~ m/.{$e}/g,
- rjustt($e, $git_count));
+ genform("Full".($e*3)."T",
+ ljustt($e*2, $git_object, $git_dirty)
+ =~ m/.{$e}/g,
+ rjustt($e, $git_count));
}
}
}