Got rid of one nested function.
This commit is contained in:
parent
792eaab09c
commit
61beae203b
@ -319,15 +319,15 @@ roledef_iterate_events (Roledef rd, int (*func) ())
|
|||||||
* but this just shows the use of the iteration.
|
* but this just shows the use of the iteration.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
roledef_length (const Roledef rd)
|
roledef_length (Roledef rd)
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int countplus (Roledef rd)
|
|
||||||
|
while (rd != NULL)
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
return 1;
|
rd = rd->next;
|
||||||
}
|
}
|
||||||
roledef_iterate_events (rd, countplus);
|
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ Role roleCreate (Term nameterm);
|
|||||||
void rolePrint (Role r);
|
void rolePrint (Role r);
|
||||||
void rolesPrint (Role r);
|
void rolesPrint (Role r);
|
||||||
int roledef_iterate_events (Roledef rd, int (*func) ());
|
int roledef_iterate_events (Roledef rd, int (*func) ());
|
||||||
int roledef_length (const Roledef rd);
|
int roledef_length (Roledef rd);
|
||||||
Roledef roledef_shift (Roledef rd, int i);
|
Roledef roledef_shift (Roledef rd, int i);
|
||||||
int roledefSubTerm (Roledef rd, Term tsub);
|
int roledefSubTerm (Roledef rd, Term tsub);
|
||||||
Roledef firstEventWithTerm (Roledef rd, Term t);
|
Roledef firstEventWithTerm (Roledef rd, Term t);
|
||||||
|
Loading…
Reference in New Issue
Block a user