Commit 668173e1 authored by Christian Persch's avatar Christian Persch

parser: charset: Add a DEC private OCS

parent d3d9ce88
......@@ -208,6 +208,9 @@ static uint8_t const charset_control_single[] = {
* ESC 2/5 F
*/
static uint8_t const charset_ocs_with_return[] = {
/* 3/0..3/15 */
NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, DEC(IBM_PROPRINTER), NA, NA,
/* 4/0..4/8 */
RET, IR(108), IR(178), IR(131), IR(145), IR(160), IR(161), IR(196),
IR(188)
......
......@@ -295,6 +295,10 @@ ALIAS(SUPPLEMENTAL_NAME(LATIN_2), IR_NAME(101))
ALIAS(SUPPLEMENTAL_NAME(LATIN_5), IR_NAME(148))
ALIAS(SUPPLEMENTAL_NAME(LATIN_CYRILLIC), IR_NAME(144))
/* Other coding systems */
DEC(IBM_PROPRINTER) /* DEC PPLV2; ESC 2/5 3/13 */
#undef IR_NAME
#undef DEC_NAME
#undef NRCS_NAME
......
......@@ -578,7 +578,7 @@ test_seq_esc_charset_other(void)
test_seq_esc_charset(i, 1,
charset_ocs_with_return,
G_N_ELEMENTS(charset_ocs_with_return),
0x40, VTE_CMD_DOCS, VTE_CHARSET_NONE, 0);
0x30, VTE_CMD_DOCS, VTE_CHARSET_NONE, 0);
i[1] = 0x2f;
test_seq_esc_charset(i, 2,
......
......@@ -253,8 +253,8 @@ static unsigned int vte_parse_charset_ocs(uint32_t raw,
switch (VTE_SEQ_INTERMEDIATE(intermediates)) {
case VTE_SEQ_INTERMEDIATE_NONE: /* OCS with standard return */
if (remaining_intermediates == 0 &&
raw >= 0x40 && raw < (0x40 + G_N_ELEMENTS(charset_ocs_with_return)))
return charset_ocs_with_return[raw - 0x40];
raw >= 0x30 && raw < (0x30 + G_N_ELEMENTS(charset_ocs_with_return)))
return charset_ocs_with_return[raw - 0x30];
break;
case VTE_SEQ_INTERMEDIATE_SLASH: /* OCS without standard return */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment