/usr/share/lifelines/sealing_line.ll 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 | /*
* @progname sealing_line.ll
* @version none
* @author Tom Wetmore
* @category
* @output function, and driver writing Text
* @description
function sealing_line().
You pass it a person, and it returns the person's
sealing line (if there is one) or nothing (if there isn't). The main
program is only used here to test it. You would call "sealing_line" in the
place you need it in your own program. Yes, it is a little complicated,
but that's why we have modules. Write it, stick it in some library
somewhere, and just call it when you need the info.
Tom Wetmore
*/
proc main ()
{
getindi(i)
if (not(i)) { return() }
if (l, sealing_line(i)) {
print("yes\n")
print(tag(l), " ", value(l), "\n")
} else {
print("no")
}
}
func sealing_line (i)
{
set(f, parents(i))
if (not(f)) { return(0) }
set(ir, inode(i)) set(fr, fnode(f))
fornodes(fr, s) {
if(and(eqstr("CHIL", tag(s)), eqstr(xref(ir), value(s)))) {
fornodes(s, ss) {
if(eqstr("SLGC", tag(ss))) { return(ss) }
}
return(0)
}
}
return (0)
}
|