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

« back to all changes in this revision

Viewing changes to reports/listsour.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       listsour.ll
 
3
 * @version        2
 
4
 * @author         Hannu Väisänen
 
5
 * @category       
 
6
 * @output         Text
 
7
 * @description
 
8
 
 
9
   List source records.
 
10
 
 
11
   Written by Hannu Väisänen, 1 May 1997.
 
12
*/
 
13
 
 
14
global(sour)
 
15
 
 
16
proc main()
 
17
{
 
18
  table(sour)
 
19
 
 
20
  forindi (person, m) {
 
21
    print ("i")
 
22
    call print (person)
 
23
  }
 
24
  forfam (family, m) {
 
25
    print ("f")
 
26
    call print (family)
 
27
  }
 
28
}
 
29
 
 
30
proc print (p)
 
31
{
 
32
  traverse (root(p), node, i) {
 
33
    if (eqstr(tag(node), "SOUR")) {
 
34
      if (reference(value(node))) {
 
35
        if (not(lookup(sour, value(node)))) {
 
36
          insert (sour, save(value(node)), 1)
 
37
          set (n, dereference(value(node)))
 
38
          value(node) "\n"
 
39
          fornodes (n, m) {
 
40
            tag(m) " " value(m) "\n"
 
41
          }
 
42
          "\n"
 
43
        }
 
44
      }
 
45
    }
 
46
  }
 
47
}