src/gedlib/node.c
/*=================================================
 * fam_to_last_chil -- Return last child of family
 *===============================================*/
- Return last child of family
- Return last child of family
NODE
fam_to_last_chil (NODE node)
{
	CNSTRING key=0;
	NODE prev = NULL;
	if (!node) return NULL;
	if (!(node = find_tag(nchild(node), "CHIL"))) return NULL;
	while (node) {
		if (eqstr(ntag(node),"CHIL"))
			prev = node;
		node = nsibling(node);
	}
	key = rmvat(nval(prev));
	return qkey_to_indi(key);
}
NODE fam_to_last_chil ( NODE node ) { CNSTRING key = 0 ; NODE prev = NULL ; if ( ! node ) return NULL ; if ( ! ( node = find_tag ( nchild ( node ) , " " ) ) ) return NULL ; while ( node ) { if ( eqstr ( ntag ( node ) , " " ) ) prev = node ; node = nsibling ( node ) ; } key = rmvat ( nval ( prev ) ) ; return qkey_to_indi ( key ) ; }
fam_to_last_chil -- Return last child of family
fam_to_last_chil -- Return last child of family
/* find first CHIL in fam */ /* cycle thru all remaining nodes, keeping most recent CHIL node */