git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perl: deobfuscate the year of v5.8 stability end
[sheet.git]
/
tools
/
mkdigraphs-xorg
diff --git
a/tools/mkdigraphs-xorg
b/tools/mkdigraphs-xorg
index 4d25445ba2a9bdeb61203891d7943820e7098e4f..ec88309500c97ddb2c714f6df6cd149baef5c9b5 100755
(executable)
--- a/
tools/mkdigraphs-xorg
+++ b/
tools/mkdigraphs-xorg
@@
-9,7
+9,7
@@
use JSON 'decode_json';
use Data::Dump 'pp';
use Shiar_Sheet::FormatChar;
use Data::Dump 'pp';
use Shiar_Sheet::FormatChar;
-our $VERSION = '1.0
1
';
+our $VERSION = '1.0
2
';
my $matchvim; # enable to prefer best compatibility
my $matchvim; # enable to prefer best compatibility
@@
-42,10
+42,15
@@
while ($_ = readline) {
my ($class, $name, undef, undef, $string) = @{
Shiar_Sheet::FormatChar->glyph_info($cp)
};
my ($class, $name, undef, undef, $string) = @{
Shiar_Sheet::FormatChar->glyph_info($cp)
};
+ my $reverse = substr($mnem, 1, 1) . substr($mnem, 0, 1);
+ my $cmp = $vidi->{key}->{$mnem};
+ my $cmpalt = defined $cmp && !$cmp && $vidi->{key}->{$reverse};
my $comparison = (
my $comparison = (
- !$vidi->{key}->{$mnem} ? 'l3' : # free
- $vidi->{key}->{$mnem}->[0] != $cp ? 'l1' : # conflict
- $vidi->{key}->{$mnem}->[2] eq 'l5' ? 'l5' : # rfc
+ !$cmp ?
+ $cmpalt && $cmpalt->[0] == $cp ? 'l4' : # matches alias
+ 'l3' : # free
+ $cmp->[0] != $cp ? 'l1' : # conflict
+ $cmp->[2] eq 'l5' ? 'l5' : # rfc
'l4' # any
);
'l4' # any
);
@@
-78,7
+83,7
@@
print JSON->new->canonical->indent->encode({
title => 'X.Org',
key => \%table,
intro => join("\n",
title => 'X.Org',
key => \%table,
intro => join("\n",
- 'Character mnemonics following compose key ⎄
:
',
+ 'Character mnemonics following compose key ⎄',
'in the X Window System (Shift+AltGr by default).',
'Differences from <a href="/digraphs">RFC-1345</a> are indicated.',
'Also see <a href="/keyboard/altgr">monograph maps</a>',
'in the X Window System (Shift+AltGr by default).',
'Differences from <a href="/digraphs">RFC-1345</a> are indicated.',
'Also see <a href="/keyboard/altgr">monograph maps</a>',
@@
-87,7
+92,7
@@
print JSON->new->canonical->indent->encode({
keywords => [qw( xorg x11 x )],
flag => {
'l5' => "matching RFC-1345",
keywords => [qw( xorg x11 x )],
flag => {
'l5' => "matching RFC-1345",
- 'l4' => "matching Vim extension",
+ 'l4' => "matching Vim extension
or alternate
",
'l3' => "unique to Xorg",
'l1' => "conflict",
('l0' => "Xorg preference") x !!$matchvim,
'l3' => "unique to Xorg",
'l1' => "conflict",
('l0' => "Xorg preference") x !!$matchvim,