aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw/mklatinkbd.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2020-05-18 23:45:03 -0400
committerRuss Cox <rsc@swtch.com>2020-05-18 23:45:03 -0400
commitd25d0ca1a3682d97df67f62789767562aa5bf1b3 (patch)
tree95e736b3189ffd5dbb74fb74c41eb8ac450de8f5 /src/cmd/devdraw/mklatinkbd.c
parentb4cc38f94321c71e8d19fbbd4691e72f7c0d817b (diff)
downloadplan9port-d25d0ca1a3682d97df67f62789767562aa5bf1b3.tar.gz
plan9port-d25d0ca1a3682d97df67f62789767562aa5bf1b3.tar.bz2
plan9port-d25d0ca1a3682d97df67f62789767562aa5bf1b3.zip
devdraw, libdraw: handle keyboard runes > U+FFFF
Runes in Plan 9 were limited to the 16-bit BMP when I drew up the RPC protocol between graphical programs and devdraw a long time ago. Now that they can be 32-bit, use a 32-bit wire encoding too. A new message number to avoid problems with other clients (like 9fans.net/go). Add keyboard shortcut alt : , for U+1F602, face with tears of joy, to test that it all works.
Diffstat (limited to 'src/cmd/devdraw/mklatinkbd.c')
-rw-r--r--src/cmd/devdraw/mklatinkbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/devdraw/mklatinkbd.c b/src/cmd/devdraw/mklatinkbd.c
index db34b6ec..50dd26b0 100644
--- a/src/cmd/devdraw/mklatinkbd.c
+++ b/src/cmd/devdraw/mklatinkbd.c
@@ -191,7 +191,7 @@ readfile(char *fname)
r = strtol(line, nil, 16);
p = strchr(line, ' ');
- if(r == 0 || p != line+4 || p[0] != ' ' || p[1] != ' ') {
+ if(r == 0 || (p != line+4 && p != line+5) || p[0] != ' ' || (p == line+4 && p[1] != ' ')) {
fprint(2, "%s:%d: cannot parse line\n", fname, lineno);
continue;
}