vte: set FLAG_USE_C1 when C1-8bit mode is requested

We currently do not support sending C1 controls as 8bit characters because
this doesn't make any sense with UTF-8. However, in 7bit/8bit
compatibility mode the client can request this. As nearly all clients are
backwards compatible to VT100 they also support C1 controls as 7bit
sequences, though, so there is really no time pressure to implement
FLAG_USE_C1.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-05-29 14:14:38 +02:00
parent 71db8be57c
commit a7a51fcb80

View File

@ -123,6 +123,7 @@ enum parser_action {
#define FLAG_LINE_FEED_NEW_LINE_MODE 0x04 /* DEC line-feed/new-line mode */
#define FLAG_8BIT_MODE 0x08 /* Disable UTF-8 mode and enable 8bit compatible mode */
#define FLAG_7BIT_MODE 0x10 /* Disable 8bit mode and use 7bit compatible mode */
#define FLAG_USE_C1 0x20 /* Explicitely use 8bit C1 codes; TODO: implement */
struct kmscon_vte {
unsigned long ref;
@ -743,7 +744,7 @@ static void csi_compat_mode(struct kmscon_vte *vte)
* compatibility is requested explicitely. */
if (vte->csi_argv[1] == 1 ||
vte->csi_argv[1] == 2)
log_debug("client requests 8bit controls which we do not support as output");
vte->flags |= FLAG_USE_C1;
vte->flags |= FLAG_8BIT_MODE;
vte->gl = &kmscon_vte_unicode_lower;