Debian Codegraph @

reports/descged.ll

raw
1 /*
2 * @progname descged.ll
3 * @version 2000-07
4 * @author Tom Wetmore, Cliff Manis, and Chris Eagle
5 * @category
6 * @output Text
7 * @description
8 *
9 * The output of this report is a GEDCOM file of the following:
10 * all descendents of a named individual
11 * all spouses of the named indivdual
12 * spouses of all descendents of the named individual
13 * (i.e. this program looks only down the tree, never up)
14 *
15 * This form of the program is probably the most useful for extracting
16 * data when a person requests data about someone from your database.
17 *
18 * July 2000
19 *
20 * modified by Chris Eagle from genancc1 by:
21 *
22 * by Tom Wetmore, [email protected]
23 * (as sent to Cliff Manis in August 1992)
24 *
25 * This report works only with the LifeLines Genealogy program
26 *
27 * [I have only given it a name and added lots of comments] /cliff
28 *
29 * August 1992
30 *
31 */
32
33 proc main ()
34 {
35 indiset(set1) /*declare an indi set*/
36 indiset(set2) /*declare another indi set*/
37
38 getindi(indi) /*ask user to identify person*/
39 addtoset(set1, indi, n) /*add that person to set1*/
40
41 set(set2, spouseset(set1)) /* get individuals spouse(s) */
42 set(set1, union(set1, set2)) /* combine set1 and set2 */
43
44 indiset(set3) /* set used in determining when to stop */
45 set(set3, set1)
46
47 set(set2, childset(set1)) /* find first generation of children */
48 set(set1, union(set1, set2)) /* combine set1 and set2 */
49
50 while (lengthset(difference(set1, set3))) {
51 set(set2, spouseset(set1)) /* add the childrens spouses */
52 set(set1, union(set1, set2)) /* combine set1 and set2 */
53
54 set(set3, set1) /* remember the previous state */
55 set(set2, childset(set1)) /* find more children */
56 set(set1, union(set1, set2)) /* combine set1 and set2 */
57 }
58
59 gengedcom(set1) /*write final set as GEDCOM file*/
60 }
61
62 /* end of report */