From ea6e06d689f437841e9680f8160a68ec7545eb48 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 4 Jul 2019 19:17:18 +0200 Subject: vt: track charsets G0-G3 and support either ASCII or graphical mode --- vt.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'vt.c') diff --git a/vt.c b/vt.c index dd0f78ae..fd7ee630 100644 --- a/vt.c +++ b/vt.c @@ -572,15 +572,10 @@ esc_dispatch(struct terminal *term, uint8_t final) char param = term->vt.params.idx > 0 ? term->vt.params.v[0].value : '('; switch (param) { - case '(': - /* This is the default charset */ - break; - - case ')': - case '*': - case '+': - LOG_WARN("unimplemented: charset %c uses ASCII", param); - return false; + case '(': term->charset[0] = CHARSET_ASCII; break; + case ')': term->charset[1] = CHARSET_ASCII; break; + case '*': term->charset[2] = CHARSET_ASCII; break; + case '+': term->charset[3] = CHARSET_ASCII; break; default: LOG_ERR("%cB: invalid charset identifier", param); @@ -594,12 +589,10 @@ esc_dispatch(struct terminal *term, uint8_t final) char param = term->vt.params.idx > 0 ? term->vt.params.v[0].value : '('; switch (param) { - case '(': - case ')': - case '*': - case '+': - LOG_WARN("unimplemented: charset %c uses special characters and line drawings", param); - break; + case '(': term->charset[0] = CHARSET_GRAPHIC; break; + case ')': term->charset[1] = CHARSET_GRAPHIC; break; + case '*': term->charset[2] = CHARSET_GRAPHIC; break; + case '+': term->charset[3] = CHARSET_GRAPHIC; break; default: LOG_ERR("%c0: invalid charset identifier", param); -- cgit v1.3