2
* @progname dump-ances.ll
4
* @author Stephen Woodbridge
6
* @output Text, 80 cols
9
* Program walks thru one's ancestors and dumps information
10
* about each family. It prunes the tree so an individual is
11
* only output once. It is a simple program that is easy to
12
* make changes to, if you want more or less info printed. I
13
* have included three date routines get_dates(), get_sdates(),
14
* and get_ldates for variations in the amount of event info that
15
* gets output to the file. The program lists all children of the
16
* families as it walks the tree. The ">>>>" marker on a child
17
* signifies the line of descent.
19
* Writen by Stephen Woodbridge, Nov 1992
33
set(UNKNOWN, "____?____")
36
getintmsg(max, " Maximum Depth :")
40
while (me, dequeue(ILIST))
42
set(depth, dequeue(NLIST))
43
if (not(lookup(DONE, key(me))))
45
call do_me(me, depth, max)
50
proc do_me(me, depth, max)
52
call out_me(me, depth)
53
insert(DONE, save(key(me)), 1)
54
if (le(add(depth, 1), max))
59
enqueue(NLIST, add(depth, 1))
64
enqueue(NLIST, add(depth, 1))
69
proc out_me(me, depth)
71
"-------------------- " d(depth) " --------------------\n"
75
call print_name(dad, 1)
76
pop(RVAL) col(45) pop(RVAL) "\n"
83
call print_name(mom, 1)
84
pop(RVAL) col(45) pop(RVAL) "\n"
90
" m. " long(marriage(fam)) "\n"
92
children( fam, child, nchild)
94
if (eq(me, child)) { ">>>> " } else { " " }
95
call get_sdates(child)
96
call print_name(child, 1)
97
pop(RVAL) col(50) pop(RVAL) "\n"
105
call print_name(me, 1)
106
pop(RVAL) col(50) pop(RVAL) "\n"
110
proc print_name (me, last)
113
push(RVAL, save(concat(fullname(me, 1, not(last), 45), pop(RVAL))))
118
fornodes(inode(me), node)
120
if (not(strcmp("TITL", tag(node)))) { set(n, node) }
122
if (n) { push(RVAL, save(concat(" ", value(n)))) }
123
else { push(RVAL, "") }
128
if (e, birth(me)) { set(b, save(concat("( ", short(e)))) }
129
else { set(b, "( ") }
130
if (e, death(me)) { set(d, save(concat(" - " , short(e)))) }
131
else { set(d, " - ") }
132
push(RVAL, save(concat(b, concat(d, " )"))))
137
if (e, birth(me)) { set(b, save(concat("( ", long(e)))) }
138
else { set(b, "( ") }
139
if (e, death(me)) { set(d, save(concat(" - " , long(e)))) }
140
else { set(d, " - ") }
141
push(RVAL, save(concat(b, concat(d, " )"))))
146
if (e, birth(me)) { set(b, save(concat("( ", date(e)))) }
147
else { set(b, "( ") }
148
if (e, death(me)) { set(d, save(concat(" - " , date(e)))) }
149
else { set(d, " - ") }
150
push(RVAL, save(concat(b, concat(d, " )"))))