Don't use *_t for our own typedefs

It's reserved by POSIX.

(closes #158 pull request)
This commit is contained in:
Keegan McAllister
2012-04-14 17:39:10 -04:00
committed by Keith Winstein
parent 937882caff
commit cd2d482484
8 changed files with 38 additions and 38 deletions
+15 -15
View File
@@ -299,7 +299,7 @@ void TitleEngine::set_prefix( const wstring s )
void ConditionalOverlayRow::apply( Framebuffer &fb, uint64_t confirmed_epoch, bool flag ) const void ConditionalOverlayRow::apply( Framebuffer &fb, uint64_t confirmed_epoch, bool flag ) const
{ {
for ( overlay_cells_t::const_iterator it = overlay_cells.begin(); for ( overlay_cells_type::const_iterator it = overlay_cells.begin();
it != overlay_cells.end(); it != overlay_cells.end();
it++ ) { it++ ) {
it->apply( fb, confirmed_epoch, row_num, flag ); it->apply( fb, confirmed_epoch, row_num, flag );
@@ -313,13 +313,13 @@ void PredictionEngine::apply( Framebuffer &fb ) const
|| (display_preference == Always) ); || (display_preference == Always) );
if ( show ) { if ( show ) {
for ( cursors_t::const_iterator it = cursors.begin(); for ( cursors_type::const_iterator it = cursors.begin();
it != cursors.end(); it != cursors.end();
it++ ) { it++ ) {
it->apply( fb, confirmed_epoch ); it->apply( fb, confirmed_epoch );
} }
for ( overlays_t::const_iterator it = overlays.begin(); for ( overlays_type::const_iterator it = overlays.begin();
it != overlays.end(); it != overlays.end();
it++ ) { it++ ) {
it->apply( fb, confirmed_epoch, flagging ); it->apply( fb, confirmed_epoch, flagging );
@@ -337,10 +337,10 @@ void PredictionEngine::kill_epoch( uint64_t epoch, const Framebuffer &fb )
prediction_epoch ) ); prediction_epoch ) );
cursor().active = true; cursor().active = true;
for ( overlays_t::iterator i = overlays.begin(); for ( overlays_type::iterator i = overlays.begin();
i != overlays.end(); i != overlays.end();
i++ ) { i++ ) {
for ( overlay_cells_t::iterator j = i->overlay_cells.begin(); for ( overlay_cells_type::iterator j = i->overlay_cells.begin();
j != i->overlay_cells.end(); j != i->overlay_cells.end();
j++ ) { j++ ) {
if ( j->tentative( epoch - 1 ) ) { if ( j->tentative( epoch - 1 ) ) {
@@ -413,9 +413,9 @@ void PredictionEngine::cull( const Framebuffer &fb )
/* go through cell predictions */ /* go through cell predictions */
overlays_t::iterator i = overlays.begin(); overlays_type::iterator i = overlays.begin();
while ( i != overlays.end() ) { while ( i != overlays.end() ) {
overlays_t::iterator inext = i; overlays_type::iterator inext = i;
inext++; inext++;
if ( (i->row_num < 0) || (i->row_num >= fb.ds.get_height()) ) { if ( (i->row_num < 0) || (i->row_num >= fb.ds.get_height()) ) {
overlays.erase( i ); overlays.erase( i );
@@ -423,7 +423,7 @@ void PredictionEngine::cull( const Framebuffer &fb )
continue; continue;
} }
for ( overlay_cells_t::iterator j = i->overlay_cells.begin(); for ( overlay_cells_type::iterator j = i->overlay_cells.begin();
j != i->overlay_cells.end(); j != i->overlay_cells.end();
j++ ) { j++ ) {
switch ( j->get_validity( fb, i->row_num, switch ( j->get_validity( fb, i->row_num,
@@ -532,7 +532,7 @@ void PredictionEngine::cull( const Framebuffer &fb )
} }
/* NB: switching from list to another STL container could break this code. /* NB: switching from list to another STL container could break this code.
So we don't use the cursors_t typedef. */ So we don't use the cursors_type typedef. */
for ( list<ConditionalCursorMove>::iterator it = cursors.begin(); for ( list<ConditionalCursorMove>::iterator it = cursors.begin();
it != cursors.end(); ) { it != cursors.end(); ) {
if ( it->get_validity( fb, local_frame_acked, local_frame_late_acked ) != Pending ) { if ( it->get_validity( fb, local_frame_acked, local_frame_late_acked ) != Pending ) {
@@ -545,7 +545,7 @@ void PredictionEngine::cull( const Framebuffer &fb )
ConditionalOverlayRow & PredictionEngine::get_or_make_row( int row_num, int num_cols ) ConditionalOverlayRow & PredictionEngine::get_or_make_row( int row_num, int num_cols )
{ {
overlays_t::iterator it = overlays_type::iterator it =
find_if( overlays.begin(), overlays.end(), find_if( overlays.begin(), overlays.end(),
bind2nd( mem_fun_ref( &ConditionalOverlayRow::row_num_eq ), row_num ) ); bind2nd( mem_fun_ref( &ConditionalOverlayRow::row_num_eq ), row_num ) );
@@ -755,11 +755,11 @@ void PredictionEngine::newline_carriage_return( const Framebuffer &fb )
init_cursor( fb ); init_cursor( fb );
cursor().col = 0; cursor().col = 0;
if ( cursor().row == fb.ds.get_height() - 1 ) { if ( cursor().row == fb.ds.get_height() - 1 ) {
for ( overlays_t::iterator i = overlays.begin(); for ( overlays_type::iterator i = overlays.begin();
i != overlays.end(); i != overlays.end();
i++ ) { i++ ) {
i->row_num--; i->row_num--;
for ( overlay_cells_t::iterator j = i->overlay_cells.begin(); for ( overlay_cells_type::iterator j = i->overlay_cells.begin();
j != i->overlay_cells.end(); j != i->overlay_cells.end();
j++ ) { j++ ) {
if ( j->active ) { if ( j->active ) {
@@ -770,7 +770,7 @@ void PredictionEngine::newline_carriage_return( const Framebuffer &fb )
/* make blank prediction for last row */ /* make blank prediction for last row */
ConditionalOverlayRow &the_row = get_or_make_row( cursor().row, fb.ds.get_width() ); ConditionalOverlayRow &the_row = get_or_make_row( cursor().row, fb.ds.get_width() );
for ( overlay_cells_t::iterator j = the_row.overlay_cells.begin(); for ( overlay_cells_type::iterator j = the_row.overlay_cells.begin();
j != the_row.overlay_cells.end(); j != the_row.overlay_cells.end();
j++ ) { j++ ) {
j->active = true; j->active = true;
@@ -799,10 +799,10 @@ bool PredictionEngine::active( void ) const
return true; return true;
} }
for ( overlays_t::const_iterator i = overlays.begin(); for ( overlays_type::const_iterator i = overlays.begin();
i != overlays.end(); i != overlays.end();
i++ ) { i++ ) {
for ( overlay_cells_t::const_iterator j = i->overlay_cells.begin(); for ( overlay_cells_type::const_iterator j = i->overlay_cells.begin();
j != i->overlay_cells.end(); j != i->overlay_cells.end();
j++ ) { j++ ) {
if ( j->active ) { if ( j->active ) {
+7 -7
View File
@@ -112,8 +112,8 @@ namespace Overlay {
public: public:
int row_num; int row_num;
typedef vector<ConditionalOverlayCell> overlay_cells_t; typedef vector<ConditionalOverlayCell> overlay_cells_type;
overlay_cells_t overlay_cells; overlay_cells_type overlay_cells;
void apply( Framebuffer &fb, uint64_t confirmed_epoch, bool flag ) const; void apply( Framebuffer &fb, uint64_t confirmed_epoch, bool flag ) const;
@@ -159,13 +159,13 @@ namespace Overlay {
char last_byte; char last_byte;
Parser::UTF8Parser parser; Parser::UTF8Parser parser;
typedef list<ConditionalOverlayRow> overlays_t; typedef list<ConditionalOverlayRow> overlays_type;
overlays_t overlays; overlays_type overlays;
typedef list<ConditionalCursorMove> cursors_t; typedef list<ConditionalCursorMove> cursors_type;
cursors_t cursors; cursors_type cursors;
typedef ConditionalOverlayRow::overlay_cells_t overlay_cells_t; typedef ConditionalOverlayRow::overlay_cells_type overlay_cells_type;
uint64_t local_frame_sent, local_frame_acked, local_frame_late_acked; uint64_t local_frame_sent, local_frame_acked, local_frame_late_acked;
+1 -1
View File
@@ -181,7 +181,7 @@ void TransportSender<MyState>::add_sent_state( uint64_t the_timestamp, uint64_t
{ {
sent_states.push_back( TimestampedState<MyState>( the_timestamp, num, state ) ); sent_states.push_back( TimestampedState<MyState>( the_timestamp, num, state ) );
if ( sent_states.size() > 32 ) { /* limit on state queue */ if ( sent_states.size() > 32 ) { /* limit on state queue */
typename sent_states_t::iterator last = sent_states.end(); typename sent_states_type::iterator last = sent_states.end();
for ( int i = 0; i < 16; i++ ) { last--; } for ( int i = 0; i < 16; i++ ) { last--; }
sent_states.erase( last ); /* erase state from middle of queue */ sent_states.erase( last ); /* erase state from middle of queue */
} }
+3 -3
View File
@@ -59,13 +59,13 @@ namespace Network {
MyState current_state; MyState current_state;
typedef list< TimestampedState<MyState> > sent_states_t; typedef list< TimestampedState<MyState> > sent_states_type;
sent_states_t sent_states; sent_states_type sent_states;
/* first element: known, acknowledged receiver state */ /* first element: known, acknowledged receiver state */
/* last element: last sent state */ /* last element: last sent state */
/* somewhere in the middle: the assumed state of the receiver */ /* somewhere in the middle: the assumed state of the receiver */
typename sent_states_t::iterator assumed_receiver_state; typename sent_states_type::iterator assumed_receiver_state;
/* for fragment creation */ /* for fragment creation */
Fragmenter fragmenter; Fragmenter fragmenter;
+2 -2
View File
@@ -113,7 +113,7 @@ bool Complete::set_echo_ack( uint64_t now )
bool ret = false; bool ret = false;
uint64_t newest_echo_ack = 0; uint64_t newest_echo_ack = 0;
for ( input_history_t::const_iterator i = input_history.begin(); for ( input_history_type::const_iterator i = input_history.begin();
i != input_history.end(); i != input_history.end();
i++ ) { i++ ) {
if ( i->second < now - ECHO_TIMEOUT ) { if ( i->second < now - ECHO_TIMEOUT ) {
@@ -143,7 +143,7 @@ int Complete::wait_time( uint64_t now ) const
return INT_MAX; return INT_MAX;
} }
input_history_t::const_iterator it = input_history.begin(); input_history_type::const_iterator it = input_history.begin();
it++; it++;
uint64_t next_echo_ack_time = it->second + ECHO_TIMEOUT; uint64_t next_echo_ack_time = it->second + ECHO_TIMEOUT;
+2 -2
View File
@@ -34,8 +34,8 @@ namespace Terminal {
Terminal::Emulator terminal; Terminal::Emulator terminal;
Terminal::Display display; Terminal::Display display;
typedef std::list< std::pair<uint64_t, uint64_t> > input_history_t; typedef std::list< std::pair<uint64_t, uint64_t> > input_history_type;
input_history_t input_history; input_history_type input_history;
uint64_t echo_ack; uint64_t echo_ack;
static const int ECHO_TIMEOUT = 50; /* for late ack */ static const int ECHO_TIMEOUT = 50; /* for late ack */
+4 -4
View File
@@ -322,10 +322,10 @@ void Framebuffer::soft_reset( void )
void Framebuffer::posterize( void ) void Framebuffer::posterize( void )
{ {
for ( rows_t::iterator i = rows.begin(); for ( rows_type::iterator i = rows.begin();
i != rows.end(); i != rows.end();
i++ ) { i++ ) {
for ( Row::cells_t::iterator j = i->cells.begin(); for ( Row::cells_type::iterator j = i->cells.begin();
j != i->cells.end(); j != i->cells.end();
j++ ) { j++ ) {
j->renditions.posterize(); j->renditions.posterize();
@@ -340,7 +340,7 @@ void Framebuffer::resize( int s_width, int s_height )
rows.resize( s_height, newrow() ); rows.resize( s_height, newrow() );
for ( rows_t::iterator i = rows.begin(); for ( rows_type::iterator i = rows.begin();
i != rows.end(); i != rows.end();
i++ ) { i++ ) {
i->set_wrap( false ); i->set_wrap( false );
@@ -540,7 +540,7 @@ void Renditions::posterize( void )
void Row::reset( int background_color ) void Row::reset( int background_color )
{ {
for ( cells_t::iterator i = cells.begin(); for ( cells_type::iterator i = cells.begin();
i != cells.end(); i != cells.end();
i++ ) { i++ ) {
i->reset( background_color ); i->reset( background_color );
+4 -4
View File
@@ -106,8 +106,8 @@ namespace Terminal {
class Row { class Row {
public: public:
typedef std::vector<Cell> cells_t; typedef std::vector<Cell> cells_type;
cells_t cells; cells_type cells;
Row( size_t s_width, int background_color ) Row( size_t s_width, int background_color )
: cells( s_width, Cell( background_color ) ) : cells( s_width, Cell( background_color ) )
@@ -224,8 +224,8 @@ namespace Terminal {
class Framebuffer { class Framebuffer {
private: private:
typedef std::deque<Row> rows_t; typedef std::deque<Row> rows_type;
rows_t rows; rows_type rows;
std::deque<wchar_t> icon_name; std::deque<wchar_t> icon_name;
std::deque<wchar_t> window_title; std::deque<wchar_t> window_title;
unsigned int bell_count; unsigned int bell_count;