[mareframe] Diff of /trunk/gadget/simulation.cc
Diff of /trunk/gadget/simulation.cc
Parent Directory
| Revision Log
| Patch
4 |
#include "interruptinterface.h" |
#include "interruptinterface.h" |
5 |
#include "global.h" |
#include "global.h" |
6 |
|
|
7 |
|
#ifdef INTERRUPT_HANDLER |
8 |
|
extern volatile int interrupted; |
9 |
|
extern volatile int interrupted_print; |
10 |
|
extern Ecosystem* EcoSystem; |
11 |
|
#endif |
12 |
|
|
13 |
|
|
14 |
void Ecosystem::updatePredationOneArea(int area) { |
void Ecosystem::updatePredationOneArea(int area) { |
15 |
int i; |
int i; |
16 |
// calculate the number of preys and predators in area. |
// calculate the number of preys and predators in area. |
127 |
char interruptfile[15]; |
char interruptfile[15]; |
128 |
strncpy(interruptfile, "", 15); |
strncpy(interruptfile, "", 15); |
129 |
strcpy(interruptfile, "interrupt.out"); |
strcpy(interruptfile, "interrupt.out"); |
130 |
this->writeParams(interruptfile, 0); |
EcoSystem->writeParams(interruptfile, 0); |
131 |
handle.logMessage(LOGMESSAGE, "** Gadget interrupted - quitting current simulation **"); |
handle.logMessage(LOGMESSAGE, "** Gadget interrupted - quitting current simulation **"); |
132 |
exit(EXIT_SUCCESS); |
exit(EXIT_SUCCESS); |
133 |
} |
} |
134 |
interrupted = 0; |
interrupted = 0; |
135 |
|
interrupted_print = 0; |
136 |
} |
} |
137 |
#endif |
#endif |
138 |
|
|
|
Legend:
Removed from v.14 |
|
changed lines |
|
Added in v.17 |
|
|
|