Down to 20.
This commit is contained in:
parent
38d57ed91d
commit
15c64c8a55
16
src/system.c
16
src/system.c
@ -1110,16 +1110,22 @@ int
|
|||||||
iterateEventsType (const System sys, const int run, const int evtype,
|
iterateEventsType (const System sys, const int run, const int evtype,
|
||||||
int (*callback) (Roledef rd, int ev))
|
int (*callback) (Roledef rd, int ev))
|
||||||
{
|
{
|
||||||
int selectEvent (Roledef rd, int e)
|
int e;
|
||||||
|
Roledef rd;
|
||||||
|
|
||||||
|
rd = sys->runs[run].start;
|
||||||
|
for (e = 0; e < sys->runs[run].step; e++)
|
||||||
{
|
{
|
||||||
if (evtype == ANYEVENT || rd->type == evtype)
|
if (evtype == ANYEVENT || rd->type == evtype)
|
||||||
{
|
{
|
||||||
return callback (rd, e);
|
if (!callback (rd, e))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rd = rd->next;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return iterateEvents (sys, run, selectEvent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Iterate over all 'others': local variables of a run that are instantiated and contain some term of another run.
|
// Iterate over all 'others': local variables of a run that are instantiated and contain some term of another run.
|
||||||
|
Loading…
Reference in New Issue
Block a user