src/gedlib/node.c
/*==================================================
 * find_next -- Find next node in an ongoing iteration
 *================================================*/
- Find next node in an ongoing iteration
- Find next node in an ongoing iteration
static NODE
find_next (NODE_ITER nodeit)
{
	NODE curr = nodeit->next;
	NODE next = nchild(curr);
	if (next)
		return next;
	while (1) {
		if (next == nodeit->start)
			return NULL;
		if (nsibling(curr))
			return nsibling(curr);
		curr = nparent(curr);
		if (!curr)
			return NULL;
	}
}
static NODE find_next ( NODE_ITER nodeit ) { NODE curr = nodeit -> next ; NODE next = nchild ( curr ) ; if ( next ) return next ; while ( 1 ) { if ( next == nodeit -> start ) return NULL ; if ( nsibling ( curr ) ) return nsibling ( curr ) ; curr = nparent ( curr ) ; if ( ! curr ) return NULL ; } }
find_next -- Find next node in an ongoing iteration
find_next -- Find next node in an ongoing iteration
/* goto child if there is one */ /* otherwise try for sibling, going up to ancestors until
	we find one, or we hit the start & give up */