about summary refs log tree commit diff
path: root/keyboard.c
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2022-01-20 14:46:06 -0500
committerZach DeCook <zachdecook@librem.one>2022-01-20 14:46:06 -0500
commit06b2a395645406fc8b07678205fe1888ac0c4488 (patch)
treefd0a59ee789c4befaeb731c963152b6a1d8446f9 /keyboard.c
parentd5adf949cf7b2920c3c2d4a84f43b0bac12e74b1 (diff)
downloadsuggpicker-06b2a395645406fc8b07678205fe1888ac0c4488.tar.gz
layer names: don't take argument
Diffstat (limited to 'keyboard.c')
-rw-r--r--keyboard.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/keyboard.c b/keyboard.c
index dbdae68..1e2e0a5 100644
--- a/keyboard.c
+++ b/keyboard.c
@@ -39,7 +39,7 @@ kbd_get_rows(struct layout *l) {
 }
 
 void
-kbd_init(struct kbd *kb, struct layout *layouts, char *layer_names_list) {
+kbd_init(struct kbd *kb, struct layout *layouts) {
 	char *s;
 	int i;
 	bool found;
@@ -54,26 +54,6 @@ kbd_init(struct kbd *kb, struct layout *layouts, char *layer_names_list) {
 
 	kb->layer_index = 0;
 
-	if (layer_names_list) {
-		uint8_t numlayers = 0;
-		kb->layers = malloc(MAX_LAYERS * sizeof(enum layout_id));
-		s = strtok(layer_names_list, ",");
-		while (s != NULL) {
-			if (numlayers + 1 == MAX_LAYERS) {
-				fprintf(stderr, "too many layers specified");
-				exit(3);
-			}
-			found = false;
-			kb->layers[numlayers++] = 0;
-			s = strtok(NULL, ",");
-		}
-		kb->layers[numlayers] = NumLayouts; // mark the end of the sequence
-		if (numlayers == 0) {
-			fprintf(stderr, "No layers defined\n");
-			exit(3);
-		}
-	}
-
 	i = 0;
 	enum layout_id lid = kb->layers[0];
 	while (lid != NumLayouts) {