From: Alex Musolino <alex@musolino.id.au>
To: 9front@9front.org
Subject: Support larger unicode values in mklatin
Date: Thu, 18 Jun 2020 20:15:35 +0930 [thread overview]
Message-ID: <A1CDD37572CBBFD22CFD3550370F2FB0@musolino.id.au> (raw)
Here's a quick little patch to allow >2 byte unicode
values and add some useful values to /lib/keyboard.
👍 or 👎?
diff -r 902035955580 lib/keyboard
--- a/lib/keyboard Thu Jun 18 12:11:06 2020 +0930
+++ b/lib/keyboard Thu Jun 18 20:13:46 2020 +0930
@@ -578,3 +578,6 @@
F015 ZA raw alt (plan 9 specific)
F016 ZS raw shift (plan 9 specific)
F017 ZC raw ctl (plan 9 specific)
+1f44d ok 👍 thumbs up
+1f44e no 👎 thumbs down
+1f595 fu 🖕 middle finger
diff -r 902035955580 sys/src/cmd/aux/kbdfs/mklatin.c
--- a/sys/src/cmd/aux/kbdfs/mklatin.c Thu Jun 18 12:11:06 2020 +0930
+++ b/sys/src/cmd/aux/kbdfs/mklatin.c Thu Jun 18 20:13:46 2020 +0930
@@ -173,12 +173,13 @@
r = strtol(line, nil, 16);
p = strchr(line, ' ');
- if(r == 0 || p != line+4 || p[0] != ' ' || p[1] != ' ') {
+ if(r == 0 || p == 0) {
fprint(2, "%s:%d: cannot parse line\n", fname, lineno);
continue;
}
- p = line+6;
+ while(*p == ' ')
+ p++;
/* 00AE Or rO ® registered trade mark sign */
for(inseq=1, seq=p; (uchar)*p < Runeself; p++) {
if(*p == '\0' || isspace(*p)) {
reply other threads:[~2020-06-18 10:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A1CDD37572CBBFD22CFD3550370F2FB0@musolino.id.au \
--to=alex@musolino.id.au \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).