Debian Codegraph @

reports/nonpatronymics.ll

raw
1 /*
2 * @progname nonpatronymics.ll
3 * @version 1.0
4 * @author Eggert
5 * @category
6 * @output Text
7 * @description
8 *
9 * Find all cases of nonpatronymic inheritances in the database.
10 * If the child's surname is not identical to the father's surname,
11 * print both out. If the two surnames have different soundex
12 * codes, undent the printout. Print statistics at the end.
13 *
14 * nonpatronymics
15 *
16 * Code by Jim Eggert, [email protected]
17 *
18 * This report works only with the LifeLines Genealogy program
19 *
20 * version one of this report was written by Jim Eggert, in 1992.
21 *
22 * Output is an ASCII file.
23 */
24
25 proc main ()
26 {
27 set(n,0)
28 set(ns,0)
29 set(header,0)
30 forindi(indi,num1) {
31 if (fath,father(indi)) {
32 if (ne(0,strcmp(surname(indi),surname(fath)))) {
33 if (eq(header,0)) {
34 "Dissimilar surnames" nl()
35 " Similar surnames" nl()
36 set(header,1)
37 }
38 if (eq(strcmp(save(soundex(indi)),
39 save(soundex(fath))),0)) {
40 " "
41 set(ns,add(ns,1))
42 }
43 d(num1) " " name(indi)
44 " <> "
45 name(fath)
46 nl()
47 set(n,add(n,1))
48 }
49 }
50 }
51 nl() d(num1) " individuals scanned." nl()
52 d(n) " nonpatronymic inheritances found"
53 if (eq(n,0)) { "." nl() }
54 else { "," nl()
55 d(sub(n,ns)) " of which were soundex-dissimilar." nl()
56 }
57 }