Skip to content

Commit

Permalink
dos/watcom vt100 fixes for multiplan
Browse files Browse the repository at this point in the history
  • Loading branch information
davidly committed Mar 10, 2024
1 parent 20f4be9 commit 3def1d1
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions ntvcm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,10 @@ void match_vt100( char * pc, size_t len )
uint8_t val = atoi( pnext );

if ( 0 == val ) // reset all attributes
{
_settextcolor( 7 );
_setbkcolor( 0 );
}
else if ( 1 == val ) // bright
_settextcolor( 15 );
else if ( 2 == val ) // dim
Expand Down Expand Up @@ -830,7 +833,9 @@ void match_vt100( char * pc, size_t len )
else if ( '?' == pc[ 2 ] && 'h' == orig_last ) // cursor commands
{
uint8_t cmd = atoi( pc + 3 );
if ( 25 == cmd ) // show cursor
if ( 7 == cmd ) // enable text wrap mode
_wrapon( _GWRAPON );
else if ( 25 == cmd ) // show cursor
_settextcursor( 0x607 );
else
tracer.Trace( " vt100: unhandled h cursor command %u\n", cmd );
Expand All @@ -839,7 +844,9 @@ void match_vt100( char * pc, size_t len )
else if ( '?' == pc[ 2 ] && 'l' == orig_last ) // cursor commands
{
uint8_t cmd = atoi( pc + 3 );
if ( 25 == cmd ) // hide cursor
if ( 7 == cmd ) // reset text wrap mode
_wrapon( _GWRAPOFF );
else if ( 25 == cmd ) // hide cursor
_settextcursor( 0x2000 );
else
tracer.Trace( " vt100: unhandled l cursor command %u\n", cmd );
Expand All @@ -852,6 +859,11 @@ void match_vt100( char * pc, size_t len )
pc[ 0 ] = 0;
}
}
else if ( '<' == pc[ 1 ] )
{
// enter ANSI mode (already there)
pc[ 0 ] = 0;
}
else
{
tracer.Trace( " vt100: output unhandled escape sequence doesn't start with a [: '%s'\n", pc + 1 );
Expand Down

0 comments on commit 3def1d1

Please sign in to comment.