- Added termlist iterator.

- Fixed role instance resetting role var substitutions.
This commit is contained in:
ccremers
2004-08-12 09:28:50 +00:00
parent 0f470cf6a2
commit fe960cfb6a
3 changed files with 20 additions and 0 deletions

View File

@@ -774,3 +774,19 @@ termlistOrder (Termlist tl1, Termlist tl2)
else
return 1;
}
//! Iterate over terms in termlist
/**
* Function gets terms
*/
int
termlist_iterate (Termlist tl, int (*func) ())
{
while (tl != NULL)
{
if (!func (tl->term))
return 0;
tl = tl->next;
}
return 1;
}