9front - general discussion about 9front
 help / color / mirror / Atom feed
* Support larger unicode values in mklatin
@ 2020-06-18 10:45 Alex Musolino
  0 siblings, 0 replies; only message in thread
From: Alex Musolino @ 2020-06-18 10:45 UTC (permalink / raw)
  To: 9front

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)) {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-18 10:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 10:45 Support larger unicode values in mklatin Alex Musolino

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).