mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-19 05:33:44 -04:00
vt: remove support for urxvt 'extended' line drawing character set
This commit is contained in:
parent
8586c9cb91
commit
ece09cc76f
1 changed files with 7 additions and 12 deletions
19
vt.c
19
vt.c
|
|
@ -771,11 +771,8 @@ action_print(struct terminal *term, uint8_t c)
|
||||||
|
|
||||||
print_insert(term);
|
print_insert(term);
|
||||||
|
|
||||||
static const char *const vt100_0[62] = { /* 0x41 - 0x7e */
|
/* 0x60 - 0x7e */
|
||||||
"↑", "↓", "→", "←", "█", "▚", "☃", /* A - G */
|
static const char *const vt100_0[] = {
|
||||||
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 - _ */
|
|
||||||
"◆", "▒", "␉", "␌", "␍", "␊", "°", "±", /* ` - g */
|
"◆", "▒", "␉", "␌", "␍", "␊", "°", "±", /* ` - g */
|
||||||
"", "␋", "┘", "┐", "┌", "└", "┼", "⎺", /* h - o */
|
"", "␋", "┘", "┐", "┌", "└", "┼", "⎺", /* h - o */
|
||||||
"⎻", "─", "⎼", "⎽", "├", "┤", "┴", "┬", /* p - w */
|
"⎻", "─", "⎼", "⎽", "├", "┤", "┴", "┬", /* p - w */
|
||||||
|
|
@ -783,14 +780,12 @@ action_print(struct terminal *term, uint8_t c)
|
||||||
};
|
};
|
||||||
|
|
||||||
if (unlikely(term->charset[term->selected_charset] == CHARSET_GRAPHIC) &&
|
if (unlikely(term->charset[term->selected_charset] == CHARSET_GRAPHIC) &&
|
||||||
c >= 0x41 && c <= 0x7e)
|
c >= 0x60 && c <= 0x7e)
|
||||||
{
|
{
|
||||||
const char *glyph = vt100_0[c - 0x41];
|
const char *glyph = vt100_0[c - 0x60];
|
||||||
if (glyph != NULL) {
|
mbstate_t ps = {0};
|
||||||
mbstate_t ps = {0};
|
if (mbrtowc(&cell->wc, glyph, strlen(glyph), &ps) < 0)
|
||||||
if (mbrtowc(&cell->wc, glyph, strlen(glyph), &ps) < 0)
|
cell->wc = 0;
|
||||||
cell->wc = 0;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
//LOG_DBG("print: ASCII: %c", c);
|
//LOG_DBG("print: ASCII: %c", c);
|
||||||
cell->wc = c;
|
cell->wc = c;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue