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 )
|
||||
{
|
||||
if ( C0_prime( ch ) ) {
|
||||
return Transition( new Execute );
|
||||
}
|
||||
|
||||
if ( ( (0x30 <= ch) && (ch <= 0x39) ) || ( ch == 0x3B ) ) {
|
||||
return Transition( new Param );
|
||||
}
|
||||
|
||||
+6
-1
@@ -29,7 +29,12 @@ std::string Emulator::input( char c, int actfd )
|
||||
/* print out debugging information */
|
||||
if ( (actfd > 0) && ( !act->handled ) ) {
|
||||
char actsum[ 64 ];
|
||||
snprintf( actsum, 64, "%s%s ", act->str().c_str(), dispatch.str().c_str() );
|
||||
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() );
|
||||
} else {
|
||||
snprintf( actsum, 64, "%s ", act->str().c_str() );
|
||||
}
|
||||
swrite( actfd, actsum );
|
||||
}
|
||||
delete act;
|
||||
|
||||
@@ -118,8 +118,11 @@ void Ctrl_LF( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
||||
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_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 */
|
||||
void Ctrl_CR( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
||||
@@ -137,7 +140,7 @@ void Ctrl_BS( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
||||
|
||||
static Function func_Ctrl_BS( CONTROL, "\x08", Ctrl_BS );
|
||||
|
||||
/* reverse index -- like a backwards linefeed */
|
||||
/* reverse index -- like a backwards line feed */
|
||||
void Ctrl_RI( Framebuffer *fb, Dispatcher *dispatch __attribute((unused)) )
|
||||
{
|
||||
fb->move_rows_autoscroll( -1 );
|
||||
|
||||
Reference in New Issue
Block a user