projects
/
calu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d98d2f
)
sim: replace exit() by flag
author
Martin Perner
<martin@perner.cc>
Sat, 13 Nov 2010 23:21:06 +0000
(
00:21
+0100)
committer
Martin Perner
<martin@perner.cc>
Thu, 16 Dec 2010 23:45:36 +0000
(
00:45
+0100)
which will lead to nearly none memleak
3b_sim/sim.cpp
patch
|
blob
|
history
diff --git
a/3b_sim/sim.cpp
b/3b_sim/sim.cpp
index a5c970f46302524d2a5d62235e999aaf5d86c8b9..2102c5a98682f31394273b8f5aea65cea1f492e8 100644
(file)
--- a/
3b_sim/sim.cpp
+++ b/
3b_sim/sim.cpp
@@
-76,9
+76,11
@@
vector<CDat> breakpoints;
bool ignoreBreak = false;
+bool exitProg = false;
+
void doExit(const vector<string>&)
{
- exit
(EXIT_SUCCESS)
;
+ exit
Prog = true
;
}
unsigned int convertStringToNum(const std::string& in)
@@
-632,7
+634,7
@@
int main(int argc, char* argv[])
Func lastFunc = NULL;
- while(
1
) {
+ while(
!exitProg
) {
UserInput = Reader.GetLine("> ", Tokens, EndOfInput);
if(EndOfInput) {
break;