terminal: add glyphs to character list

This adds the actual glyphs/utf-8 characters to the comments of CS_SPECIAL
(DEC special graphics set). They all work on my system with "Monospace" or
"Bitstream" font. But keep the mnemonics so if the UTF8 characters are not
displayed correctly, the comments are still readable.

I don't know if gcc actually reads data as UTF-8 or if C code actually
allows all UTF8 characters. However, unless it reads as "*/" in ASCII, it
shouldn't matter inside of comments.

Anyway, it compiles fine with gcc-4.7.0/amd64 here.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
David Herrmann 13 years ago committed by Kristian Høgsberg
parent 516b9e1753
commit a6128d6183
  1. 64
      clients/terminal.c

@ -176,41 +176,41 @@ struct char_sub CS_US[] = {
{{{0, }}, {{0, }}} {{{0, }}, {{0, }}}
}; };
static struct char_sub CS_UK[] = { static struct char_sub CS_UK[] = {
{{{'#', 0, }}, {{0xC2, 0xA3, 0, }}}, {{{'#', 0, }}, {{0xC2, 0xA3, 0, }}}, /* POUND: £ */
{{{0, }}, {{0, }}} {{{0, }}, {{0, }}}
}; };
static struct char_sub CS_SPECIAL[] = { static struct char_sub CS_SPECIAL[] = {
{{{'`', 0, }}, {{0xE2, 0x99, 0xA6, 0}}}, /* diamond */ {{{'`', 0, }}, {{0xE2, 0x99, 0xA6, 0}}}, /* diamond: ♦ */
{{{'a', 0, }}, {{0xE2, 0x96, 0x92, 0}}}, /* 50% cell */ {{{'a', 0, }}, {{0xE2, 0x96, 0x92, 0}}}, /* 50% cell: ▒ */
{{{'b', 0, }}, {{0xE2, 0x90, 0x89, 0}}}, /* HT */ {{{'b', 0, }}, {{0xE2, 0x90, 0x89, 0}}}, /* HT: ␉ */
{{{'c', 0, }}, {{0xE2, 0x90, 0x8C, 0}}}, /* FF */ {{{'c', 0, }}, {{0xE2, 0x90, 0x8C, 0}}}, /* FF: ␌ */
{{{'d', 0, }}, {{0xE2, 0x90, 0x8D, 0}}}, /* CR */ {{{'d', 0, }}, {{0xE2, 0x90, 0x8D, 0}}}, /* CR: ␍ */
{{{'e', 0, }}, {{0xE2, 0x90, 0x8A, 0}}}, /* LF */ {{{'e', 0, }}, {{0xE2, 0x90, 0x8A, 0}}}, /* LF: ␊ */
{{{'f', 0, }}, {{0xC2, 0xB0, 0, }}}, /* Degree */ {{{'f', 0, }}, {{0xC2, 0xB0, 0, }}}, /* Degree: ° */
{{{'g', 0, }}, {{0xC2, 0xB1, 0, }}}, /* Plus/Minus */ {{{'g', 0, }}, {{0xC2, 0xB1, 0, }}}, /* Plus/Minus: ± */
{{{'h', 0, }}, {{0xE2, 0x90, 0xA4, 0}}}, /* NL */ {{{'h', 0, }}, {{0xE2, 0x90, 0xA4, 0}}}, /* NL: ␤ */
{{{'i', 0, }}, {{0xE2, 0x90, 0x8B, 0}}}, /* VT */ {{{'i', 0, }}, {{0xE2, 0x90, 0x8B, 0}}}, /* VT: ␋ */
{{{'j', 0, }}, {{0xE2, 0x94, 0x98, 0}}}, /* CN_RB */ {{{'j', 0, }}, {{0xE2, 0x94, 0x98, 0}}}, /* CN_RB: ┘ */
{{{'k', 0, }}, {{0xE2, 0x94, 0x90, 0}}}, /* CN_RT */ {{{'k', 0, }}, {{0xE2, 0x94, 0x90, 0}}}, /* CN_RT: ┐ */
{{{'l', 0, }}, {{0xE2, 0x94, 0x8C, 0}}}, /* CN_LT */ {{{'l', 0, }}, {{0xE2, 0x94, 0x8C, 0}}}, /* CN_LT: ┌ */
{{{'m', 0, }}, {{0xE2, 0x94, 0x94, 0}}}, /* CN_RB */ {{{'m', 0, }}, {{0xE2, 0x94, 0x94, 0}}}, /* CN_LB: └ */
{{{'n', 0, }}, {{0xE2, 0x94, 0xBC, 0}}}, /* CROSS */ {{{'n', 0, }}, {{0xE2, 0x94, 0xBC, 0}}}, /* CROSS: ┼ */
{{{'o', 0, }}, {{0xE2, 0x8E, 0xBA, 0}}}, /* Horiz. Scan Line 1 */ {{{'o', 0, }}, {{0xE2, 0x8E, 0xBA, 0}}}, /* Horiz. Scan Line 1: ⎺ */
{{{'p', 0, }}, {{0xE2, 0x8E, 0xBB, 0}}}, /* Horiz. Scan Line 3 */ {{{'p', 0, }}, {{0xE2, 0x8E, 0xBB, 0}}}, /* Horiz. Scan Line 3: ⎻ */
{{{'q', 0, }}, {{0xE2, 0x94, 0x80, 0}}}, /* Horiz. Scan Line 5 */ {{{'q', 0, }}, {{0xE2, 0x94, 0x80, 0}}}, /* Horiz. Scan Line 5: ─ */
{{{'r', 0, }}, {{0xE2, 0x8E, 0xBC, 0}}}, /* Horiz. Scan Line 7 */ {{{'r', 0, }}, {{0xE2, 0x8E, 0xBC, 0}}}, /* Horiz. Scan Line 7: ⎼ */
{{{'s', 0, }}, {{0xE2, 0x8E, 0xBD, 0}}}, /* Horiz. Scan Line 9 */ {{{'s', 0, }}, {{0xE2, 0x8E, 0xBD, 0}}}, /* Horiz. Scan Line 9: ⎽ */
{{{'t', 0, }}, {{0xE2, 0x94, 0x9C, 0}}}, /* TR */ {{{'t', 0, }}, {{0xE2, 0x94, 0x9C, 0}}}, /* TR: ├ */
{{{'u', 0, }}, {{0xE2, 0x94, 0xA4, 0}}}, /* TL */ {{{'u', 0, }}, {{0xE2, 0x94, 0xA4, 0}}}, /* TL: ┤ */
{{{'v', 0, }}, {{0xE2, 0x94, 0xB4, 0}}}, /* TU */ {{{'v', 0, }}, {{0xE2, 0x94, 0xB4, 0}}}, /* TU: ┴ */
{{{'w', 0, }}, {{0xE2, 0x94, 0xAC, 0}}}, /* TD */ {{{'w', 0, }}, {{0xE2, 0x94, 0xAC, 0}}}, /* TD: ┬ */
{{{'x', 0, }}, {{0xE2, 0x94, 0x82, 0}}}, /* V */ {{{'x', 0, }}, {{0xE2, 0x94, 0x82, 0}}}, /* V: │ */
{{{'y', 0, }}, {{0xE2, 0x89, 0xA4, 0}}}, /* LE */ {{{'y', 0, }}, {{0xE2, 0x89, 0xA4, 0}}}, /* LE: ≤ */
{{{'z', 0, }}, {{0xE2, 0x89, 0xA5, 0}}}, /* GE */ {{{'z', 0, }}, {{0xE2, 0x89, 0xA5, 0}}}, /* GE: ≥ */
{{{'{', 0, }}, {{0xCF, 0x80, 0, }}}, /* PI */ {{{'{', 0, }}, {{0xCF, 0x80, 0, }}}, /* PI: π */
{{{'|', 0, }}, {{0xE2, 0x89, 0xA0, 0}}}, /* NEQ */ {{{'|', 0, }}, {{0xE2, 0x89, 0xA0, 0}}}, /* NEQ: ≠ */
{{{'}', 0, }}, {{0xC2, 0xA3, 0, }}}, /* POUND */ {{{'}', 0, }}, {{0xC2, 0xA3, 0, }}}, /* POUND: £ */
{{{'~', 0, }}, {{0xE2, 0x8B, 0x85, 0}}}, /* DOT */ {{{'~', 0, }}, {{0xE2, 0x8B, 0x85, 0}}}, /* DOT: ⋅ */
{{{0, }}, {{0, }}} {{{0, }}, {{0, }}}
}; };

Loading…
Cancel
Save