Changeset 13649
- Timestamp:
- 05/11/12 19:53:19 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Readline.cc
r12961 r13649 70 70 using namespace std; 71 71 72 Readline *Readline::This = 0; 72 Readline *Readline::This = 0; 73 int Readline::fLabel = -1; 73 74 74 75 // -------------------------------------------------------------------------- … … 96 97 // 97 98 Readline::Readline(const char *prgname) : 98 fMaxLines(500), fLine(0), f Label(-1), fCompletion(0)99 fMaxLines(500), fLine(0), fCompletion(0) 99 100 { 100 101 if (This) … … 1003 1004 if (str[0]==':') 1004 1005 { 1005 if (fLabel!=atoi(str.substr(1).c_str())) 1006 const int section = atoi(str.substr(1).c_str()); 1007 SetSection(section); 1008 1009 if (fLabel!=section) 1006 1010 return true; 1007 1011 … … 1216 1220 //! 1217 1221 //! @returns 1218 //! -1 if the file couldn't be read and the number of command for which1222 //! -1 if the file couldn't be read and the number of commands for which 1219 1223 //! Process() was callled otherwise 1220 1224 //! … … 1224 1228 return 0; 1225 1229 1230 SetSection(-1); 1226 1231 fLabel = -1; 1227 1232 … … 1265 1270 1266 1271 fLabel = -1; 1272 SetSection(-1); 1267 1273 1268 1274 fCommandLog << "# " << Time() << " - " << name << " (FINISHED)" << endl; -
trunk/FACT++/src/Readline.h
r12961 r13649 26 26 27 27 int fLine; 28 int fLabel;28 static int fLabel; 29 29 30 30 // Static member function which are used to adapt readline to ncurses … … 56 56 char **Complete(const std::vector<std::string> &v, const char *text); 57 57 58 v oid SetLabel(int l) { fLabel = l;}58 virtual void SetSection(int) { } 59 59 60 60 public: … … 98 98 bool IsStopped() const; 99 99 void ProcessLine(const std::string &str); 100 static void SetLabel(int l) { fLabel = l; } 100 101 101 102 int GetLine() const { return fLine; }
Note:
See TracChangeset
for help on using the changeset viewer.