- Rewrote roleInstance to cope with Arachne needs.

- Introduced some iterators for e.g. term leaves and roledefs. These are
  not used everywhere yet.
This commit is contained in:
ccremers
2004-08-12 09:14:31 +00:00
parent ac174b8130
commit 0f470cf6a2
10 changed files with 277 additions and 96 deletions

View File

@@ -193,6 +193,7 @@ roleCreate (Term name)
r->nameterm = name;
r->next = NULL;
r->locals = NULL;
r->variables = NULL;
r->roledef = NULL;
return r;
}
@@ -238,3 +239,19 @@ rolesPrint (Role r)
}
}
}
//! Iterate over the events in a roledef list
/**
* Function gets roledef pointer
*/
int
roledef_iterate_events (Roledef rd, int (*func) ())
{
while (rd != NULL)
{
if (!func (rd))
return 0;
rd = rd->next;
}
return 1;
}