vte: add 8bit C1 7bit equivalents (dummy)

Many 8bit C1 codes have 7bit escape sequences as equivalents. This adds handlers
for all of them with comments what they are supposed to do. They are dummies for
now but they will be implemented later.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-02-29 17:21:53 +01:00
parent ea81381be5
commit c343e6cef2

View File

@ -272,6 +272,8 @@ static void do_execute(struct kmscon_vte *vte, uint32_t ctrl)
/* End control string */
/* nothing to do here */
break;
default:
log_warn("vte: unhandled control char %u\n", ctrl);
}
}
@ -284,6 +286,10 @@ static void do_clear(struct kmscon_vte *vte)
vte->csi_argv[i] = -1;
}
static void do_collect(struct kmscon_vte *vte, uint32_t data)
{
}
static void do_param(struct kmscon_vte *vte, uint32_t data)
{
int new;
@ -311,6 +317,46 @@ static void do_param(struct kmscon_vte *vte, uint32_t data)
}
}
static void do_esc(struct kmscon_vte *vte, uint32_t data)
{
switch (data) {
case 'D': /* IND */
/* Move down one row, perform scroll-up if needed */
/* TODO */
break;
case 'E': /* NEL */
/* CR/NL with scroll-up if needed */
/* TODO */
break;
case 'H': /* HTS */
/* Set tab stop at current position */
/* TODO */
break;
case 'M': /* RI */
/* Move up one row, perform scroll-down if needed */
/* TODO */
break;
case 'N': /* SS2 */
/* Temporarily map G2 into GL for next char only */
/* TODO */
break;
case 'O': /* SS3 */
/* Temporarily map G3 into GL for next char only */
/* TODO */
break;
case 'Z': /* DECID */
/* Send device attributes response like ANSI DA */
/* TODO*/
break;
case '\\': /* ST */
/* End control string */
/* nothing to do here */
break;
default:
log_warn("vte: unhandled escape seq %u\n", data);
}
}
static void do_csi(struct kmscon_vte *vte, uint32_t data)
{
int num;
@ -387,11 +433,13 @@ static void do_action(struct kmscon_vte *vte, uint32_t data, int action)
do_clear(vte);
break;
case ACTION_COLLECT:
do_collect(vte, data);
break;
case ACTION_PARAM:
do_param(vte, data);
break;
case ACTION_ESC_DISPATCH:
do_esc(vte, data);
break;
case ACTION_CSI_DISPATCH:
do_csi(vte, data);