Changeset 11048 for trunk/FACT++
- Timestamp:
- 06/16/11 23:05:19 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Readline.cc
r11046 r11048 1117 1117 int Readline::Execute(const string &fname) 1118 1118 { 1119 if (IsStopped()) 1120 return 0; 1121 1119 1122 int rc = 0; 1120 1123 … … 1134 1137 continue; 1135 1138 1136 if (buffer[0]=='#')1137 continue;1138 1139 1139 rc++; 1140 1141 if (buffer=="quit" || buffer==".q") 1142 { 1143 Stop(); 1144 break; 1145 } 1140 1146 1141 1147 if (Process(buffer)) … … 1163 1169 rl_pending_input = 4; // EOT (end of transmission, ctrl-d) 1164 1170 } 1171 1172 bool Readline::IsStopped() const 1173 { 1174 return rl_done==1 && rl_pending_input==4; 1175 }; -
trunk/FACT++/src/Readline.h
r10976 r11048 90 90 virtual void Run(const char *prompt=0); 91 91 static void Stop(); 92 int Execute(const std::string &fname); 92 int Execute(const std::string &fname); 93 bool IsStopped() const; 93 94 94 95 int GetLine() const { return fLine; }
Note:
See TracChangeset
for help on using the changeset viewer.