%define;same()
%if;(ancestor.same != "")
%ancestor.anc_sosa; -
%ancestor; %ancestor.dates; ==
%ancestor.same;
%end;
%end;
%define;same_consang()
%reset_count;
[*display smallest sosa number relative to ancestor] + [*consanguinity]
%apply;togen()
%foreach;ancestor_level(l_v)
- [*generation/generations]0 %level;
%foreach;ancestor
%if;(ancestor.same = "" and ancestor.has_consanguinity)
%incr_count;
-
%ancestor.anc_sosa; -
%ancestor; %ancestor.dates; :
%ancestor.consanguinity;
%end;
%apply;same()
%end;
%end;
[*total] = %evar.same; + %count; = %expr(evar.same + count)
%end;
%define;same_same()
%reset_count;
[*display smallest sosa number relative to ancestor]
%apply;togen()
%foreach;ancestor_level(l_v)
- [*generation/generations]0 %level;
%foreach;ancestor
%apply;same()
%end;
%end;
[*total] = %evar.same;
%end;
%(short display smallest sosa number relative to ancestor %)
%if;(bvar.show_consang != "no" or manitou)
%apply;same_consang()
%else;
%apply;same_same()
%end;