File: ttable.ll

package info (click to toggle)
lifelines 3.0.50-2
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 11,140 kB
  • ctags: 6,517
  • sloc: ansic: 57,468; xml: 8,014; sh: 4,255; makefile: 848; yacc: 601; perl: 170; sed: 16
file content (32 lines) | stat: -rw-r--r-- 1,002 bytes parent folder | download | duplicates (2)
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
/*
 * @progname       ttable.ll
 * @version        none
 * @author         anon
 * @category       
 * @output         Text
 * @description
 *
 * Compute Pete Cook's C-Table comparison vector, as modified by Tom.
 */

proc main ()
{
        getindi(i, "Compute C-Table for what person?")
        if (not(i)) { return() }
        set(b, getyear(birth(i)))
        set(f,  father(i)) set(m,  mother(i))
        set(ff, father(f)) set(fm, mother(f))
        set(mf, father(m)) set(mm, mother(m))
        set(bf,  getyear(birth(f))) set(bm,  getyear(birth(m)))
        set(bff, getyear(birth(ff))) set(bfm, getyear(birth(fm)))
        set(bmf, getyear(birth(mf))) set(bmm, getyear(birth(mm)))
        print( b, " ", bf, " ", bm, " ")
        print(bff, " ", bfm, " ", bmf, " ", bmm, " ")
        print(sex(i), " ", soundex(i), " ", trim(givens(i), 1), "\n")
}
func getyear(event)
{
        set(y, atoi(year(event)))
        if (and(ge(y, 1000), le(y, 2000))) {return(year(event))}
        return("0000")
}