Simple utility to turn swipes into words -- "plugin" for wvkbd to enable swipe-typing under wayland SXMO.
mapScore: Make case-insensitive
Zach DeCook 2023-08-28
parent d601ee0 · commit 0bb685e
-rw-r--r--mapScore.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mapScore.c b/mapScore.c
index 21b0490..f003bc9 100644
--- a/mapScore.c
+++ b/mapScore.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
+#include <ctype.h>
#define BUFSIZE 1024
char buffer[BUFSIZE];
@@ -14,9 +15,12 @@ void makeMap(FILE *f) {
case '\t': x++; break;
case '\n': y++; x=0; break;
default:
+ explicit_label:
map[c][0] = x;
map[c][1] = y;
map[c][2] = 1;
+ c = toupper(c);
+ if (map[toupper(c)][2] == 0) goto explicit_label;
break;
}
}