diff options
Diffstat (limited to 'vt.c')
| -rw-r--r-- | vt.c | 23 |
1 files changed, 7 insertions, 16 deletions
@@ -184,11 +184,13 @@ action_execute(struct terminal *term, uint8_t c) case '\x0e': /* SO - shift out */ term->charsets.selected = 1; /* G1 */ + term_update_ascii_printer(term); break; case '\x0f': /* SI - shift in */ term->charsets.selected = 0; /* G0 */ + term_update_ascii_printer(term); break; /* @@ -230,21 +232,7 @@ action_execute(struct terminal *term, uint8_t c) static void action_print(struct terminal *term, uint8_t c) { - /* 0x60 - 0x7e */ - static const wchar_t vt100_0[] = { - L'◆', L'▒', L'␉', L'␌', L'␍', L'␊', L'°', L'±', /* ` - g */ - L'', L'␋', L'┘', L'┐', L'┌', L'└', L'┼', L'⎺', /* h - o */ - L'⎻', L'─', L'⎼', L'⎽', L'├', L'┤', L'┴', L'┬', /* p - w */ - L'│', L'≤', L'≥', L'π', L'≠', L'£', L'·', /* x - ~ */ - }; - - if (unlikely(term->charsets.set[term->charsets.selected] == CHARSET_GRAPHIC) && - c >= 0x60 && c <= 0x7e) - { - term_print(term, vt100_0[c - 0x60], 1); - } else { - term_print(term, c, 1); - } + term->ascii_printer(term, c); } static void @@ -414,11 +402,13 @@ action_esc_dispatch(struct terminal *term, uint8_t final) case 'N': /* SS2 - Single Shift 2 */ term->charsets.selected = 2; /* G2 */ + term_update_ascii_printer(term); break; case 'O': /* SS3 - Single Shift 3 */ term->charsets.selected = 3; /* G3 */ + term_update_ascii_printer(term); break; case '\\': @@ -453,6 +443,7 @@ action_esc_dispatch(struct terminal *term, uint8_t final) '+' ? 3 : -1; xassert(idx != -1); term->charsets.set[idx] = CHARSET_GRAPHIC; + term_update_ascii_printer(term); break; } @@ -465,7 +456,7 @@ action_esc_dispatch(struct terminal *term, uint8_t final) '+' ? 3 : -1; xassert(idx != -1); term->charsets.set[idx] = CHARSET_ASCII; - + term_update_ascii_printer(term); break; } } |
