Changeset 10429 for trunk/FACT++/src/LocalControl.cc
- Timestamp:
- 04/20/11 16:58:05 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/LocalControl.cc
r10266 r10429 1 1 #include "LocalControl.h" 2 3 #include "tools.h"4 2 5 3 string LocalConsole::GetUpdatePrompt() const 6 4 { 7 // Compile a string like "server:state> " 8 const string end = 9 Form("\033[34m\033[1m%s\033[0m:\033[32m\033[1m%s\033[0m> ", 10 fName.c_str(), fStateMachine->GetStateName().c_str()); 11 12 // If we are continously flushing the buffer omit the buffer size 13 // If we are buffering show the buffer size 14 return GetLinePrompt() + " " + end; 5 return GetLinePrompt()+" " 6 "\033[34m\033[1m"+fName+"\033[0m:" 7 "\033[32m\033[1m"+fStateMachine->GetStateName()+"\033[0m> "; 15 8 } 16 17 //#include <boost/regex.hpp>18 9 19 10 string LocalShell::GetUpdatePrompt() const 20 11 { 21 //const string s = (beg[0]=='\n'?beg.substr(1):beg) + " " + end; 22 //return boost::regex_replace(s, boost::regex("\033[[0-9]+m"), ""); 23 24 const string end = 25 Form("%s:%s> ", fName.c_str(), 26 fStateMachine->GetStateName().c_str()); 27 28 return GetLinePrompt() + " " + end; 12 return GetLinePrompt()+' '+fName+':'+fStateMachine->GetStateName()+"> "; 29 13 }
Note:
See TracChangeset
for help on using the changeset viewer.