src/gedlib/node.c
/*==================================================
 * indi_to_prev_sib -- Return previous sib of person
 *  returns addref'd record
 *================================================*/
- Return previous sib of person
returns addref'd record
- Return previous sib of person returns addref ' d record
static RECORD
indi_to_prev_sib_impl (NODE indi)
{
	NODE fam, prev, node;
	if (!indi) return NULL;
	if (!(fam = indi_to_famc(indi))) return NULL;
	prev = NULL;
	node = CHIL(fam);
	while (node) {
		if (eqstr(nxref(indi), nval(node))) {
			if (!prev) return NULL;
			return key_to_record(rmvat(nval(prev)));
		}
		if (eqstr(ntag(node),"CHIL"))
			prev = node;
		node = nsibling(node);
	}
	return NULL;
}
static RECORD indi_to_prev_sib_impl ( NODE indi ) { NODE fam , prev , node ; if ( ! indi ) return NULL ; if ( ! ( fam = indi_to_famc ( indi ) ) ) return NULL ; prev = NULL ; node = CHIL ( fam ) ; while ( node ) { if ( eqstr ( nxref ( indi ) , nval ( node ) ) ) { if ( ! prev ) return NULL ; return key_to_record ( rmvat ( nval ( prev ) ) ) ; } if ( eqstr ( ntag ( node ) , " " ) ) prev = node ; node = nsibling ( node ) ; } return NULL ; }
indi_to_prev_sib -- Return previous sib of person
  returns addref'd record
indi_to_prev_sib -- Return previous sib of person returns addref ' d record
/* loop thru all nodes following first child, keeping most recent CHIL */