Changeset 13731
- Timestamp:
- 05/15/12 08:42:32 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Readline.cc
r13714 r13731 70 70 using namespace std; 71 71 72 Readline *Readline::This = 0; 73 int Readline::fLabel = -3; 72 Readline *Readline::This = 0; 73 int Readline::fLabel = -3; 74 std::string Readline::fScript; 74 75 75 76 // -------------------------------------------------------------------------- … … 1005 1006 if (str[0]==':') 1006 1007 { 1007 const int section = atoi(str.substr(1).c_str()); 1008 SetSection(section); 1009 1010 if (fLabel!=section) 1008 try 1009 { 1010 const int section = stoi(str.substr(1)); 1011 SetSection(section); 1012 1013 if (fLabel!=section) 1014 return true; 1015 } 1016 catch (const logic_error &e) 1017 { 1018 fCommandLog << "# ERROR - Inavlid label '" << str.substr(1) << "'" << endl; 1019 fLabel = -2; 1011 1020 return true; 1021 } 1012 1022 1013 1023 fLabel=-1; … … 1256 1266 return 0; 1257 1267 1268 string name = Tools::Trim(fname); 1269 fScript = name; 1270 1258 1271 SetSection(-2); 1259 1272 fLabel = -1; 1260 1261 string name = Tools::Trim(fname);1262 1273 1263 1274 const size_t p = name.find_last_of(':'); -
trunk/FACT++/src/Readline.h
r13702 r13731 28 28 int fLine; 29 29 static int fLabel; 30 static std::string fScript; 30 31 31 32 // Static member function which are used to adapt readline to ncurses … … 102 103 static int GetLabel() { return fLabel; } 103 104 105 static std::string GetScript() { return fScript; } 106 104 107 int GetLine() const { return fLine; } 105 108 virtual std::string GetLinePrompt() const;
Note:
See TracChangeset
for help on using the changeset viewer.