Debian Codegraph @

reports/gedlist.ll

raw
1 /*
2 * @progname gedlist.ll
3 * @version 1.1
4 * @author Paul B. McBride ([email protected])
5 * @category
6 * @output GEDCOM
7 * @description
8
9 gedlist.ll generates a GEDCOM file for the male line of the
10 input individuals.
11
12 Algorithm:
13 prompt for people
14 add male line of each person to set
15 add all children to set
16 add all spouses to set
17 add all parents to set
18 generate GEDCOM file
19
20 Author: Paul B. McBride ([email protected])
21
22 Version:
23 1.1 January 10, 2001 correct prompt
24 1.0 September 27, 2000 created from gdc.ll dated February 28, 1996
25 */
26
27 include("ged_write.li")
28
29 proc main ()
30 {
31 indiset(set0)
32 indiset(set1) /*declare an indi set*/
33 indiset(set2) /*declare another indi set*/
34
35 getindiset(set0, "Identify people to include in GEDCOM File")
36
37 if(eq(lengthset(set0),0)) { return() }
38
39 /* add everyone in the male line for each person*/
40
41 forindiset(set0, indi, ival, icnt) {
42 addtoset(set1, indi, 1) /*add that person to set1*/
43 set(fath, indi)
44 while(fath, father(fath)) {
45 addtoset(set1, fath, 1) /*add the father to set1*/
46 }
47 }
48
49 set(set2, childset(set1)) /* add all the children */
50 set(set1, union(set1, set2)) /* combine set1 and set2 */
51
52 set(set2, spouseset(set1)) /* add all the spouses */
53 set(set1, union(set1, set2)) /* combine set1 and set2 */
54
55 set(set2, parentset(set1)) /* find everyone's parents */
56 set(set1, union(set1, set2)) /* combine set1 and set2 */
57
58 call ged_write(set1) /* write out GEDCOM file */
59 }
60
61 /* end of report */