git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
607f514
)
keyboard/altgr/index: silence uninitializedness warnings
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 28 Mar 2024 19:12:32 +0000
(20:12 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 22 Apr 2024 22:53:55 +0000
(
00:53
+0200)
keyboard/altgr/index.inc.plp
patch
|
blob
|
history
diff --git
a/keyboard/altgr/index.inc.plp
b/keyboard/altgr/index.inc.plp
index 172d93105074b8d7528fff8a95346c6c9281ee7a..9e4d6b53dc88bf3e2b99995d45a9a61a4bfd6708 100644
(file)
--- a/
keyboard/altgr/index.inc.plp
+++ b/
keyboard/altgr/index.inc.plp
@@
-134,7
+134,8
@@
if (@sample) {
my %idx = map {s/\Q.inc.pl\E$//; ($_ => eval{ Data($_) })} @incs;
my $most = max(map { scalar keys %{$_->{def}{''}} } values %idx);
for my $inc (sort {
my %idx = map {s/\Q.inc.pl\E$//; ($_ => eval{ Data($_) })} @incs;
my $most = max(map { scalar keys %{$_->{def}{''}} } values %idx);
for my $inc (sort {
- $idx{$a}{category} cmp $idx{$b}{category} || $a cmp $b
+ ($idx{$a}{category} // 0) cmp ($idx{$b}{category} // 0)
+ || $a cmp $b
} keys %idx) {
print @sample ? '<tr><th>' : '<figure>';
printf '<a href="/%s">', $inc =~ s/\.eng$//r;
} keys %idx) {
print @sample ? '<tr><th>' : '<figure>';
printf '<a href="/%s">', $inc =~ s/\.eng$//r;
@@
-158,7
+159,7
@@
for my $inc (sort {
$inventory{$_}++ for grep { /^g[2-9]/ } map { s/ (?!ext).*//r }
values %{ $keys->{def}{$mode} };
print '<span class=graph>';
$inventory{$_}++ for grep { /^g[2-9]/ } map { s/ (?!ext).*//r }
values %{ $keys->{def}{$mode} };
print '<span class=graph>';
- print
"<label>$_</label>" for $keys->{key}{$mode} =~ s/\s.*//r
|| ();
+ print
f '<label>%s</label>', s/\s.*//r for $keys->{key}{$mode}
|| ();
for my $g (sort keys %inventory) {
printf '<span class="%s" style="width:%.0f%%" title="%3$d %4$s"> %s</span>',
$g, $_/$most*100, $_,
for my $g (sort keys %inventory) {
printf '<span class="%s" style="width:%.0f%%" title="%3$d %4$s"> %s</span>',
$g, $_/$most*100, $_,
@@
-170,7
+171,7
@@
for my $inc (sort {
say '</span>';
}
print "\t<td class=ni>";
say '</span>';
}
print "\t<td class=ni>";
- print join ' ', map { $caticon{$_} // () } split m{/}, $keys->{category};
+ print join ' ', map { $caticon{$_} // () } split m{/}, $keys->{category}
// ''
;
say '';
$keys->print_key('', $_, ($keys->{def}{''}{$_} // 'ni') =~ s/ mode\S*//r)
for @sample;
say '';
$keys->print_key('', $_, ($keys->{def}{''}{$_} // 'ni') =~ s/ mode\S*//r)
for @sample;