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

« back to all changes in this revision

Viewing changes to reports/partition.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
1
/*
2
 
 * @progname       partition
3
 
 * @version        8.0
 
2
 * @progname       partition.ll
 
3
 * @version        11
4
4
 * @author         Eggert
5
5
 * @category       
6
6
 * @output         GEDCOM
25
25
    Version 7,  21 September1994 (can partition about selected person)
26
26
    Version 8,  31 March    1995 (allow non-traditional families)
27
27
    Version 9,  23 February 1999 (changed to depth-first algorithm)
28
 
    Version 10, 24 September2001 (use cumcount, not forindi loop variable)
 
28
    Version 10, 24 September 2001(use cumcount, not forindi loop variable)
 
29
    Version 11, 7 November 2005  (add header, switch to use gengedcomstrong
 
30
                                  change output gedcom files to end in .ged
 
31
                                  changes by Stephen A. Dum)
29
32
 
30
33
This program partitions individuals in a database into disjoint
31
34
partitions.  A partition is composed of people related by one or more
111
114
    getintmsg(report_type,
112
115
    "Enter 0 for overview, 1 for full, 2 for GEDCOM report:")
113
116
    if (eq(report_type,2)) {
114
 
    if (person_root) {
115
 
        set(prompt,"Enter filename for GEDCOM partition:")
116
 
    }
117
 
    else {
118
 
        set(prompt,"Enter root filename for GEDCOM partitions:")
119
 
    }
120
 
    getstrmsg(gedcom_root,prompt)
121
 
    set(gedcom_root,save(concat(gedcom_root,".")))
 
117
        if (person_root) {
 
118
            set(prompt,"Enter filename for GEDCOM partition:")
 
119
        }
 
120
        else {
 
121
            set(prompt,"Enter root filename for GEDCOM partitions:")
 
122
        }
 
123
        getstrmsg(gedcom_root,prompt)
 
124
        set(gedcom_root,save(concat(gedcom_root,"_")))
122
125
    }
123
126
    else { set(gedcom_root,0) }
124
127
 
199
202
        "------------------------------------------------------------\n"
200
203
    }
201
204
    if (eq(report_type,2)) {
202
 
        newfile(concat(gedcom_root,d(setcount)),0)
203
 
        gengedcom(pset)
 
205
        newfile(concat(gedcom_root,d(setcount),".ged"),0)
 
206
        /* output a gedcom header */
 
207
        "0 HEAD\n"
 
208
        "1 SOUR Lifelines\n"
 
209
        "2 VERS " version() "\n"
 
210
        "1 DEST ANY\n"
 
211
        "1 DATE " date(gettoday()) "\n"
 
212
        "1 SUBM\n"
 
213
        "1 GEDC\n"
 
214
        "2 VERS 5.5\n"
 
215
        "2 FORM LINEAGE-LINKED\n"
 
216
        "1 CHAR ASCII\n"
 
217
        gengedcomstrong(pset)
204
218
        "0 TRLR\n"
205
219
    }
206
220
    set(cumcount,add(cumcount,pcount))