Skip to content
Snippets Groups Projects
Commit 6b0845de authored by deuce's avatar deuce
Browse files

Add CSI < Ps c command to query extended device attributes.

Sixel support, loadable fonts, etc.
parent 3758d347
Branches
Tags
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment