@@ -148,7 +148,7 @@ Instruction FragmentAssembly::get_assembly( void )
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool Fragment::operator==( const Fragment &x )
|
||||
bool Fragment::operator==( const Fragment &x ) const
|
||||
{
|
||||
return ( id == x.id ) && ( fragment_num == x.fragment_num ) && ( final == x.final )
|
||||
&& ( initialized == x.initialized ) && ( contents == x.contents );
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Network {
|
||||
|
||||
string tostring( void );
|
||||
|
||||
bool operator==( const Fragment &x );
|
||||
bool operator==( const Fragment &x ) const;
|
||||
};
|
||||
|
||||
class FragmentAssembly
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Terminal {
|
||||
int wait_time( uint64_t now ) const;
|
||||
|
||||
/* interface for Network::Transport */
|
||||
void subtract( const Complete * ) {}
|
||||
void subtract( const Complete * ) const {}
|
||||
std::string diff_from( const Complete &existing ) const;
|
||||
void apply_string( std::string diff );
|
||||
bool operator==( const Complete &x ) const;
|
||||
|
||||
@@ -123,7 +123,7 @@ void UserStream::apply_string( string diff )
|
||||
}
|
||||
}
|
||||
|
||||
const Parser::Action *UserStream::get_action( unsigned int i )
|
||||
const Parser::Action *UserStream::get_action( unsigned int i ) const
|
||||
{
|
||||
switch( actions[ i ].type ) {
|
||||
case UserByteType:
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace Network {
|
||||
|
||||
bool empty( void ) const { return actions.empty(); }
|
||||
size_t size( void ) const { return actions.size(); }
|
||||
const Parser::Action *get_action( unsigned int i );
|
||||
const Parser::Action *get_action( unsigned int i ) const;
|
||||
|
||||
/* interface for Network::Transport */
|
||||
void subtract( const UserStream *prefix );
|
||||
@@ -92,7 +92,7 @@ namespace Network {
|
||||
void apply_string( string diff );
|
||||
bool operator==( const UserStream &x ) const { return actions == x.actions; }
|
||||
|
||||
bool compare( const UserStream & ) const { return false; }
|
||||
bool compare( const UserStream & ) { return false; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ); }
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ public:
|
||||
FD_ZERO( &all_fds );
|
||||
}
|
||||
|
||||
void add_signal( int signum )
|
||||
static void add_signal( int signum )
|
||||
{
|
||||
fatal_assert( signum >= 0 );
|
||||
fatal_assert( signum <= MAX_SIGNAL_NUMBER );
|
||||
|
||||
Reference in New Issue
Block a user