Describe Cell width as a narrow/wide boolean.

A character cell can only be either narrow or wide.  It's more
convenient to represent that as an int containing 1 or 2, but slightly
more correct to represent it as a "boolean" single-bit integer.
This commit is contained in:
John Hood
2016-11-15 21:18:18 -05:00
committed by john hood
parent 71fe4441ef
commit 302c7deb41
4 changed files with 14 additions and 13 deletions
+2 -2
View File
@@ -106,7 +106,7 @@ void Emulator::print( const Parser::Print *act )
fb.reset_cell( this_cell );
this_cell->append( ch );
this_cell->set_width( chwidth );
this_cell->set_wide( chwidth == 2 ); /* chwidth had better be 1 or 2 here */
fb.apply_renditions_to_cell( this_cell );
if ( chwidth == 2 ) { /* erase overlapped cell */
@@ -131,7 +131,7 @@ void Emulator::print( const Parser::Print *act )
base character [e.g. start of line], if the
combining character has been cleared with
a sequence like ED ("J") or EL ("K") */
assert( combining_cell->get_width() == 1 );
assert( !combining_cell->get_wide() );
combining_cell->set_fallback( true );
fb.ds.move_col( 1, true, true );
}