diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-04-27 13:06:23 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-04-27 13:06:23 +0000 |
| commit | e478874dd9cefb08011c46d43deb850e68a4458b (patch) | |
| tree | be76d07a4e471e225a70ba0ef30b4721dba77879 | |
| parent | readme: link to utf8proc was cut off (diff) | |
term: remove unneeded utf8.left member
| -rw-r--r-- | terminal.h | 1 | ||||
| -rw-r--r-- | vt.c | 15 |
2 files changed, 0 insertions, 16 deletions
@@ -135,7 +135,6 @@ struct vt { struct { uint8_t data[4]; uint8_t idx; - uint8_t left; } utf8; struct { uint8_t *data; @@ -513,27 +513,21 @@ static void action_utf8_2_entry(struct terminal *term, uint8_t c) { term->vt.utf8.idx = 0; - term->vt.utf8.left = 2; term->vt.utf8.data[term->vt.utf8.idx++] = c; - term->vt.utf8.left--; } static void action_utf8_3_entry(struct terminal *term, uint8_t c) { term->vt.utf8.idx = 0; - term->vt.utf8.left = 3; term->vt.utf8.data[term->vt.utf8.idx++] = c; - term->vt.utf8.left--; } static void action_utf8_4_entry(struct terminal *term, uint8_t c) { term->vt.utf8.idx = 0; - term->vt.utf8.left = 4; term->vt.utf8.data[term->vt.utf8.idx++] = c; - term->vt.utf8.left--; } static void @@ -1068,9 +1062,6 @@ static enum state state_utf8_collect_1_switch(struct terminal *term, uint8_t data) { term->vt.utf8.data[term->vt.utf8.idx++] = data; - term->vt.utf8.left--; - - assert(term->vt.utf8.left == 0); action_utf8_print(term, data); return STATE_GROUND; } @@ -1079,9 +1070,6 @@ static enum state state_utf8_collect_2_switch(struct terminal *term, uint8_t data) { term->vt.utf8.data[term->vt.utf8.idx++] = data; - term->vt.utf8.left--; - - assert(term->vt.utf8.left == 1); return STATE_UTF8_COLLECT_1; } @@ -1089,9 +1077,6 @@ static enum state state_utf8_collect_3_switch(struct terminal *term, uint8_t data) { term->vt.utf8.data[term->vt.utf8.idx++] = data; - term->vt.utf8.left--; - - assert(term->vt.utf8.left == 2); return STATE_UTF8_COLLECT_2; } |
