/usr/share/lifelines/interestset.li is in lifelines-reports 3.0.61-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | /*
* @progname interestset.li
* @version 1.0
* @author Vincent Broman
* @category
* @output indiset function value
* @description Extracts subset of the database which are close to direct ancestors
*/
/*
* Return the set of people who are wide-sense ancestors
* of the given individual, plus the children of these wide-sense ancestors,
* where a wide-sense ancestor is either the given individual himself/herself,
* or a parent or step-parent of a wide-sense ancestor.
*/
func interestingforebearsof( indi) {
indiset( res)
addtoset( res, indi, key( indi))
set( pf, parents( indi))
if( not( pf)) { return( res) }
if( h, husband( pf)) {
set( res, union( res, interestingforebearsof( h)))
families( h, f, sp, ctf) {
if( sp) {
set( res, union( res, interestingforebearsof( sp)))
}
children( f, ch, ctc) {
addtoset( res, ch, key( ch))
}
}
set( hk, key( h))
} else {
set( hk, "")
}
if( w, wife( pf)) {
families( w, f, sp, cth) {
/* add only husbands not the father */
if( and( sp, nestr( hk, key( sp)))) {
set( res, union( res, interestingforebearsof( sp)))
} else {
children( f, ch, ctcc) {
addtoset( res, ch, key( ch))
}
}
}
}
return( res)
}
|