@@ -76,6 +76,7 @@ Parser::UTF8Parser::UTF8Parser()
|
||||
: parser(), buf_len( 0 )
|
||||
{
|
||||
assert( BUF_SIZE >= (size_t)MB_CUR_MAX );
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
std::list<Parser::Action *> Parser::UTF8Parser::input( char c )
|
||||
|
||||
@@ -65,9 +65,9 @@ namespace Terminal {
|
||||
|
||||
class Display {
|
||||
private:
|
||||
bool ti_flag( const char *capname ) const;
|
||||
int ti_num( const char *capname ) const;
|
||||
const char *ti_str( const char *capname ) const;
|
||||
static bool ti_flag( const char *capname );
|
||||
static int ti_num( const char *capname );
|
||||
static const char *ti_str( const char *capname );
|
||||
|
||||
bool has_ech; /* erase character is part of vt200 but not supported by tmux
|
||||
(or by "screen" terminfo entry, which is what tmux advertises) */
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
using namespace Terminal;
|
||||
|
||||
bool Display::ti_flag( const char *capname ) const
|
||||
bool Display::ti_flag( const char *capname )
|
||||
{
|
||||
int val = tigetflag( const_cast<char *>( capname ) );
|
||||
if ( val == -1 ) {
|
||||
@@ -71,7 +71,7 @@ bool Display::ti_flag( const char *capname ) const
|
||||
return val;
|
||||
}
|
||||
|
||||
int Display::ti_num( const char *capname ) const
|
||||
int Display::ti_num( const char *capname )
|
||||
{
|
||||
int val = tigetnum( const_cast<char *>( capname ) );
|
||||
if ( val == -2 ) {
|
||||
@@ -80,7 +80,7 @@ int Display::ti_num( const char *capname ) const
|
||||
return val;
|
||||
}
|
||||
|
||||
const char *Display::ti_str( const char *capname ) const
|
||||
const char *Display::ti_str( const char *capname )
|
||||
{
|
||||
const char *val = tigetstr( const_cast<char *>( capname ) );
|
||||
if ( val == (const char *)-1 ) {
|
||||
|
||||
@@ -183,7 +183,7 @@ void DrawState::clear_tab( int col )
|
||||
tabs[ col ] = false;
|
||||
}
|
||||
|
||||
int DrawState::get_next_tab( void )
|
||||
int DrawState::get_next_tab( void ) const
|
||||
{
|
||||
for ( int i = cursor_col + 1; i < width; i++ ) {
|
||||
if ( tabs[ i ] ) {
|
||||
@@ -215,12 +215,12 @@ void DrawState::set_scrolling_region( int top, int bottom )
|
||||
}
|
||||
}
|
||||
|
||||
int DrawState::limit_top( void )
|
||||
int DrawState::limit_top( void ) const
|
||||
{
|
||||
return origin_mode ? scrolling_region_top_row : 0;
|
||||
}
|
||||
|
||||
int DrawState::limit_bottom( void )
|
||||
int DrawState::limit_bottom( void ) const
|
||||
{
|
||||
return origin_mode ? scrolling_region_bottom_row : height - 1;
|
||||
}
|
||||
@@ -573,7 +573,7 @@ void Framebuffer::prefix_window_title( const std::deque<wchar_t> &s )
|
||||
}
|
||||
}
|
||||
|
||||
wchar_t Cell::debug_contents( void ) const
|
||||
wint_t Cell::debug_contents( void ) const
|
||||
{
|
||||
if ( contents.empty() ) {
|
||||
return '_';
|
||||
@@ -589,7 +589,7 @@ bool Cell::compare( const Cell &other ) const
|
||||
if ( !contents_match( other ) ) {
|
||||
ret = true;
|
||||
fprintf( stderr, "Contents: %lc vs. %lc\n",
|
||||
(wint_t)debug_contents(), (wint_t)other.debug_contents() );
|
||||
debug_contents(), other.debug_contents() );
|
||||
}
|
||||
|
||||
if ( fallback != other.fallback ) {
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Terminal {
|
||||
&& (wrap == x.wrap) );
|
||||
}
|
||||
|
||||
wchar_t debug_contents( void ) const;
|
||||
wint_t debug_contents( void ) const;
|
||||
|
||||
bool is_blank( void ) const
|
||||
{
|
||||
@@ -228,15 +228,15 @@ namespace Terminal {
|
||||
void clear_tab( int col );
|
||||
void clear_default_tabs( void ) { default_tabs = false; }
|
||||
/* Default tabs can't be restored without resetting the draw state. */
|
||||
int get_next_tab( void );
|
||||
int get_next_tab( void ) const;
|
||||
|
||||
void set_scrolling_region( int top, int bottom );
|
||||
|
||||
int get_scrolling_region_top_row( void ) const { return scrolling_region_top_row; }
|
||||
int get_scrolling_region_bottom_row( void ) const { return scrolling_region_bottom_row; }
|
||||
|
||||
int limit_top( void );
|
||||
int limit_bottom( void );
|
||||
int limit_top( void ) const;
|
||||
int limit_bottom( void ) const;
|
||||
|
||||
void set_foreground_color( int x ) { renditions.set_foreground_color( x ); }
|
||||
void set_background_color( int x ) { renditions.set_background_color( x ); }
|
||||
|
||||
Reference in New Issue
Block a user