Fix bug in state diagram, and handle VT. Now passes screens 1 and 2 of vttest
This commit is contained in:
@@ -166,6 +166,10 @@ Transition CSI_Entry::input_state_rule( wchar_t ch )
|
|||||||
|
|
||||||
Transition CSI_Param::input_state_rule( wchar_t ch )
|
Transition CSI_Param::input_state_rule( wchar_t ch )
|
||||||
{
|
{
|
||||||
|
if ( C0_prime( ch ) ) {
|
||||||
|
return Transition( new Execute );
|
||||||
|
}
|
||||||
|
|
||||||
if ( ( (0x30 <= ch) && (ch <= 0x39) ) || ( ch == 0x3B ) ) {
|
if ( ( (0x30 <= ch) && (ch <= 0x39) ) || ( ch == 0x3B ) ) {
|
||||||
return Transition( new Param );
|
return Transition( new Param );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,12 @@ std::string Emulator::input( char c, int actfd )
|
|||||||
/* print out debugging information */
|
/* print out debugging information */
|
||||||
if ( (actfd > 0) && ( !act->handled ) ) {
|
if ( (actfd > 0) && ( !act->handled ) ) {
|
||||||
char actsum[ 64 ];
|
char actsum[ 64 ];
|
||||||
|
if ( (typeid( *act ) == typeid( Parser::CSI_Dispatch ))
|
||||||
|
|| (typeid( *act ) == typeid( Parser::Esc_Dispatch )) ) {
|
||||||
snprintf( actsum, 64, "%s%s ", act->str().c_str(), dispatch.str().c_str() );
|
snprintf( actsum, 64, "%s%s ", act->str().c_str(), dispatch.str().c_str() );
|
||||||
|
} else {
|
||||||
|
snprintf( actsum, 64, "%s ", act->str().c_str() );
|
||||||
|
}
|
||||||
swrite( actfd, actsum );
|
swrite( actfd, actsum );
|
||||||
}
|
}
|
||||||
delete act;
|
delete act;
|
||||||
|
|||||||
@@ -118,8 +118,11 @@ void Ctrl_LF( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
|||||||
fb->move_rows_autoscroll( 1 );
|
fb->move_rows_autoscroll( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* same procedure for index, vertical tab, and form feed control codes */
|
||||||
static Function func_Ctrl_LF( CONTROL, "\x0a", Ctrl_LF );
|
static Function func_Ctrl_LF( CONTROL, "\x0a", Ctrl_LF );
|
||||||
static Function func_Ctrl_IND( CONTROL, "\x84", Ctrl_LF );
|
static Function func_Ctrl_IND( CONTROL, "\x84", Ctrl_LF );
|
||||||
|
static Function func_Ctrl_VT( CONTROL, "\x0b", Ctrl_LF );
|
||||||
|
static Function func_Ctrl_FF( CONTROL, "\x0c", Ctrl_LF );
|
||||||
|
|
||||||
/* carriage return */
|
/* carriage return */
|
||||||
void Ctrl_CR( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
void Ctrl_CR( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
||||||
|
|||||||
Reference in New Issue
Block a user