Handle 7-bit ESC-encoding of C1 control characters
This commit is contained in:
@@ -108,8 +108,17 @@ void Emulator::CSI_dispatch( Parser::CSI_Dispatch *act )
|
||||
|
||||
void Emulator::Esc_dispatch( Parser::Esc_Dispatch *act )
|
||||
{
|
||||
/* handle 7-bit ESC-encoding of C1 control characters */
|
||||
if ( (dispatch.get_dispatch_chars().size() == 0)
|
||||
&& (0x40 <= act->ch)
|
||||
&& (act->ch <= 0x5F) ) {
|
||||
act->ch += 0x40;
|
||||
dispatch.dispatch( CONTROL, act, &fb );
|
||||
act->ch -= 0x40;
|
||||
} else {
|
||||
dispatch.dispatch( ESCAPE, act, &fb );
|
||||
}
|
||||
}
|
||||
|
||||
void Emulator::debug_printout( int fd )
|
||||
{
|
||||
|
||||
@@ -111,6 +111,7 @@ void Ctrl_LF( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
||||
}
|
||||
|
||||
static Function func_Ctrl_LF( CONTROL, "\x0a", Ctrl_LF );
|
||||
static Function func_Ctrl_IND( CONTROL, "\x84", Ctrl_LF );
|
||||
|
||||
void Ctrl_CR( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
||||
{
|
||||
@@ -125,3 +126,4 @@ void Ctrl_BS( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
||||
}
|
||||
|
||||
static Function func_Ctrl_BS( CONTROL, "\x08", Ctrl_BS );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user