From b0b36ddf94e93e4dc86a907c7c66d75caedb8a39 Mon Sep 17 00:00:00 2001 From: Keith Winstein Date: Fri, 5 Aug 2011 20:09:54 -0400 Subject: [PATCH] Change rtm to stm --- networktransport.hpp | 9 +++++++-- parse.cpp | 2 +- parser.cpp | 4 ++-- termemu.cpp | 4 ++-- terminaldisplay.cpp | 2 +- terminaluserinput.cpp | 2 +- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/networktransport.hpp b/networktransport.hpp index f840dd5..a8322db 100644 --- a/networktransport.hpp +++ b/networktransport.hpp @@ -10,9 +10,14 @@ namespace Network { class Transport { private: - Connection connection; + Connection connection; - uint64_t last_acknowledged_state; + typedef dense_hash_map< uint64_t, MyState > StateMapper; + + dense_hash_map< uint64_t, MyState > sent; + dense_hash_map< uint64_t, RemoteState > received; + + uint64_t known_receiver_state; uint64_t assumed_receiver_state; uint64_t last_sent_state; diff --git a/parse.cpp b/parse.cpp index f4513b8..db73bd9 100644 --- a/parse.cpp +++ b/parse.cpp @@ -36,7 +36,7 @@ int main( int argc __attribute__((unused)), } if ( strcmp( nl_langinfo( CODESET ), "UTF-8" ) != 0 ) { - fprintf( stderr, "rtm requires a UTF-8 locale.\n" ); + fprintf( stderr, "stm requires a UTF-8 locale.\n" ); exit( 1 ); } diff --git a/parser.cpp b/parser.cpp index bb3acd5..79d8d16 100644 --- a/parser.cpp +++ b/parser.cpp @@ -40,8 +40,8 @@ Parser::UTF8Parser::UTF8Parser() : parser(), buf_len( 0 ) { if ( strcmp( nl_langinfo( CODESET ), "UTF-8" ) != 0 ) { - fprintf( stderr, "rtm requires a UTF-8 locale.\n" ); - throw std::string( "rtm requires a UTF-8 locale." ); + fprintf( stderr, "stm requires a UTF-8 locale.\n" ); + throw std::string( "stm requires a UTF-8 locale." ); } assert( BUF_SIZE >= MB_CUR_MAX ); diff --git a/termemu.cpp b/termemu.cpp index a7ecc9e..34ae148 100644 --- a/termemu.cpp +++ b/termemu.cpp @@ -44,7 +44,7 @@ int main( void ) } if ( strcmp( nl_langinfo( CODESET ), "UTF-8" ) != 0 ) { - fprintf( stderr, "rtm requires a UTF-8 locale.\n" ); + fprintf( stderr, "stm requires a UTF-8 locale.\n" ); exit( 1 ); } @@ -116,7 +116,7 @@ int main( void ) } } - printf( "[rtm is exiting.]\n" ); + printf( "[stm is exiting.]\n" ); return 0; } diff --git a/terminaldisplay.cpp b/terminaldisplay.cpp index db96736..8621df2 100644 --- a/terminaldisplay.cpp +++ b/terminaldisplay.cpp @@ -16,7 +16,7 @@ std::string Display::new_frame( Framebuffer &f ) if ( (!initialized) || (f.get_window_title() != last_frame.get_window_title()) ) { /* set window title */ - frame.append( "\033]0;[rtm] " ); + frame.append( "\033]0;[stm] " ); std::vector window_title = f.get_window_title(); for ( std::vector::iterator i = window_title.begin(); i != window_title.end(); diff --git a/terminaluserinput.cpp b/terminaluserinput.cpp index b9cb820..feed3d4 100644 --- a/terminaluserinput.cpp +++ b/terminaluserinput.cpp @@ -7,7 +7,7 @@ std::string UserInput::input( Parser::UserByte *act, { char translated_str[ 2 ] = { act->c, 0 }; - /* The user will always be in application mode. If rtm is not in + /* The user will always be in application mode. If stm is not in application mode, convert user's cursor control function to an ANSI cursor control sequence */