csi: implement "send device attributes"

This commit is contained in:
Daniel Eklöf 2019-06-24 20:01:41 +02:00
parent 722c2e7ed2
commit 86519f93ba
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

21
csi.c
View file

@ -657,6 +657,27 @@ csi_dispatch(struct terminal *term, uint8_t final)
return true;
}
else if (term->vt.intermediates.idx == 1 &&
term->vt.intermediates.data[0] == '>') {
switch (final) {
case 'c': {
int param = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 0;
if (param != 0) {
LOG_ERR(
"unimplemented: send device attributes with param = %d",
param);
return false;
}
return write(term->ptmx, "\033[?6c", 5) == 5;
}
default:
LOG_ERR("CSI: intermediate '>': unimplemented final: %c", final);
abort();
}
}
else {
LOG_ERR("CSI: unimplemented: intermediates: %.*s",
(int)term->vt.intermediates.idx,