File: descged.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 (62 lines) | stat: -rw-r--r-- 1,944 bytes parent folder | download | duplicates (5)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
 * @progname       descged.ll
 * @version        2000-07
 * @author         Tom Wetmore, Cliff Manis, and Chris Eagle
 * @category       
 * @output         Text
 * @description
 *
 * The output of this report is a GEDCOM file of the following:
 * all descendents of a named individual
 * all spouses of the named indivdual
 * spouses of all descendents of the named individual
 * (i.e. this program looks only down the tree, never up)
 *
 * This form of the program is probably the most useful for extracting
 * data when a person requests data about someone from your database.
 *
 *   July 2000
 *
 *   modified by Chris Eagle from genancc1 by:
 *
 *   by Tom Wetmore, ttw@cbnewsl.att.com
 *         (as sent to Cliff Manis in August 1992)
 *
 *   This report works only with the LifeLines Genealogy program
 *
 *   [I have only given it a name and added lots of comments] /cliff
 *
 *   August 1992
 *
 */

proc main ()
{
   indiset(set1)     /*declare an indi set*/
   indiset(set2)     /*declare another indi set*/

   getindi(indi)     /*ask user to identify person*/
   addtoset(set1, indi, n) /*add that person to set1*/

   set(set2, spouseset(set1))      /* get individuals spouse(s) */
   set(set1, union(set1, set2))    /* combine set1 and set2 */

   indiset(set3)  /* set used in determining when to stop */
   set(set3, set1)

   set(set2, childset(set1))     /* find first generation of children */
   set(set1, union(set1, set2))  /* combine set1 and set2 */

   while (lengthset(difference(set1, set3))) {
      set(set2, spouseset(set1))    /* add the childrens spouses */
      set(set1, union(set1, set2))  /* combine set1 and set2 */

      set(set3, set1)               /* remember the previous state */
      set(set2, childset(set1))     /* find more children */
      set(set1, union(set1, set2))  /* combine set1 and set2 */
   }

   gengedcom(set1)      /*write final set as GEDCOM file*/
}

/* end of report */