Handle 7-bit ESC-encoding of C1 control characters

This commit is contained in:
Keith Winstein
2011-01-31 05:18:57 -05:00
parent a49378b23b
commit 30f03a52f6
2 changed files with 12 additions and 1 deletions
+10 -1
View File
@@ -108,7 +108,16 @@ void Emulator::CSI_dispatch( Parser::CSI_Dispatch *act )
void Emulator::Esc_dispatch( Parser::Esc_Dispatch *act )
{
dispatch.dispatch( ESCAPE, act, &fb );
/* 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 )