diff --git a/src/conio/cterm.c b/src/conio/cterm.c index 071be82b2e3db859ebc22fe7c652377e9873100e..0adbce1eafb45d617df89f2e1791e633ed266ea2 100644 --- a/src/conio/cterm.c +++ b/src/conio/cterm.c @@ -1543,6 +1543,34 @@ static void do_ansi(struct cterminal *cterm, char *retbuf, size_t retsize, int * } } break; + case 'c': + /* SyncTERM Device Attributes */ + if (seq->param_str[0] == '<' && parse_parameters(seq)) { + seq_default(seq, 0, 0); + tmp[0] = 0; + for (i=0; i<seq->param_count; i++) { + switch (seq->param_int[i]) { + case 0: /* Advanced features */ + strcpy(tmp, "\x1b[<0"); + if (cio_api.options & CONIO_OPT_LOADABLE_FONTS) + strcat(tmp, ";1"); + if (cio_api.options & CONIO_OPT_BRIGHT_BACKGROUND) + strcat(tmp, ";2"); + if (cio_api.options & CONIO_OPT_PALETTE_SETTING) + strcat(tmp, ";3"); + if (cio_api.options & CONIO_OPT_SET_PIXEL) + strcat(tmp, ";4"); + if (cio_api.options & CONIO_OPT_FONT_SELECT) + strcat(tmp, ";5"); + if (cio_api.options & CONIO_OPT_EXTENDED_PALETTE) + strcat(tmp, ";6"); + strcat(tmp, "n"); + } + } + if(*tmp && strlen(retbuf) + strlen(tmp) < retsize) + strcat(retbuf, tmp); + } + break; case 'h': if (seq->param_str[0] == '?' && parse_parameters(seq)) { attr2palette(cterm->attr, &oldfg, &oldbg);