aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-08-16 16:04:03 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-08-16 16:04:03 +0000
commitece09cc76f300911d512d174f26cf8344fca68b4 (patch)
tree0184d5f849270fdc3fee0a091bfd22da2bbf6d77
parentvt: there is no default charset for \e0 and \eB (diff)
vt: remove support for urxvt 'extended' line drawing character set
-rw-r--r--vt.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/vt.c b/vt.c
index 94c19c33..e227bef8 100644
--- a/vt.c
+++ b/vt.c
@@ -771,11 +771,8 @@ action_print(struct terminal *term, uint8_t c)
print_insert(term);
- static const char *const vt100_0[62] = { /* 0x41 - 0x7e */
- "↑", "↓", "→", "←", "█", "▚", "☃", /* A - G */
- 0, 0, 0, 0, 0, 0, 0, 0, /* H - O */
- 0, 0, 0, 0, 0, 0, 0, 0, /* P - W */
- 0, 0, 0, 0, 0, 0, 0, " ", /* X - _ */
+ /* 0x60 - 0x7e */
+ static const char *const vt100_0[] = {
"◆", "▒", "␉", "␌", "␍", "␊", "°", "±", /* ` - g */
"␤", "␋", "┘", "┐", "┌", "└", "┼", "⎺", /* h - o */
"⎻", "─", "⎼", "⎽", "├", "┤", "┴", "┬", /* p - w */
@@ -783,14 +780,12 @@ action_print(struct terminal *term, uint8_t c)
};
if (unlikely(term->charset[term->selected_charset] == CHARSET_GRAPHIC) &&
- c >= 0x41 && c <= 0x7e)
+ c >= 0x60 && c <= 0x7e)
{
- const char *glyph = vt100_0[c - 0x41];
- if (glyph != NULL) {
- mbstate_t ps = {0};
- if (mbrtowc(&cell->wc, glyph, strlen(glyph), &ps) < 0)
- cell->wc = 0;
- }
+ const char *glyph = vt100_0[c - 0x60];
+ mbstate_t ps = {0};
+ if (mbrtowc(&cell->wc, glyph, strlen(glyph), &ps) < 0)
+ cell->wc = 0;
} else {
//LOG_DBG("print: ASCII: %c", c);
cell->wc = c;