~ubuntu-branches/ubuntu/trusty/lifelines/trusty

« back to all changes in this revision

Viewing changes to reports/gedn.ll

  • Committer: Bazaar Package Importer
  • Author(s): Felipe Augusto van de Wiel (faw)
  • Date: 2007-05-23 23:49:53 UTC
  • mfrom: (3.1.3 edgy)
  • Revision ID: james.westby@ubuntu.com-20070523234953-ogno9rnbmth61i7p
Tags: 3.0.50-2etch1
* Changing docs/ll-reportmanual.xml and docs/ll-userguide.xml to fix
  documentation build problems (Closes: #418347).

* lifelines-reports
  - Adding a dependency to lifelines >= 3.0.50 to prevent file conflict.
    (Closes: #405500).

* Updating French translation. Thanks to Bernard Adrian. (Closes: #356671).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * @progname       gedn.ll
 
3
 * @version        none
 
4
 * @author         anon
 
5
 * @category       
 
6
 * @output         GEDCOM
 
7
 * @description
 
8
 *
 
9
 * The output of this report is a GEDCOM file of the following: 
 
10
 * N generations of ancestors, 
 
11
 * all spouses and 
 
12
 * all children of these ancestors and 
 
13
 * all descendents of a person, 
 
14
 * as well as the person him/herself 
 
15
 */
 
16
 
 
17
include("ged_write.li")
 
18
 
 
19
proc main ()
 
20
{
 
21
        indiset(set1)           /*declare an indi set*/
 
22
        indiset(set2)           /*declare another indi set*/
 
23
        indiset(set3)           /*declare another indi set*/
 
24
 
 
25
        getindi(ind1)           /*ask user to identify person*/
 
26
        if(ind1) {
 
27
                getintmsg(maxgen, "Number of Generations")
 
28
                print("Finding Ancestors... ")
 
29
                addtoset(set1, ind1, 1)
 
30
                set(set2, ancestorset(set1))
 
31
                print(d(lengthset(set2)), nl())
 
32
                print("Triming Ancestors to ", d(maxgen), " generations... ")
 
33
                forindiset(set2, ind1, ival, icnt) {
 
34
                  if(le(ival,maxgen)) {
 
35
                    addtoset(set3, ind1, ival)
 
36
                  }
 
37
                }
 
38
                print(d(lengthset(set3)), nl())
 
39
 
 
40
                set(set2, spouseset(set3))      /* add their spouses */
 
41
                set(set1, union(set3, set2))    /* combine set1 and set2 */
 
42
 
 
43
                set(set2, childset(set1))       /* find everyone's children */
 
44
                set(set1, union(set1, set2))    /* combine set1 and set2 */
 
45
 
 
46
                call ged_write(set1)            /* write out GEDCOM file */
 
47
        }
 
48
}