Debian Codegraph @

reports/soundex-isfm.ll

raw
1 /*
2 * @progname soundex-isfm.ll
3 * @version 1.0
4 * @author Wetmore, Manis, Eggert
5 * @category
6 * @output Text, 132 cols
7 * @description
8 *
9 * This program will produce a report of all the INDI's in the database,
10 * in the format as seen at end of report. May be sorted easily
11 * to see the Father or Mother column sorted report.
12 *
13 * soundex-isfm
14 *
15 * Code by Tom Wetmore, [email protected], 1991
16 * Modifications by Cliff Manis, [email protected], 1992
17 * Modifications by Jim Eggert, atc.ll.mit.edu!eggertj Fri Feb 26 1993
18 *
19 * This report works only with the LifeLines Genealogy program
20 *
21 * This report can be used to output everyone in the database,
22 * or selected by a single soundex code. The soundex code
23 * can be entered either by knowing the code, or by selecting
24 * an individual and using his/her code.
25 *
26 * The report name come from: isfm (Indi Spouse Father Mother)
27 * It is designed for 16 pitch, HP laserjet III, 132 column, and
28 * also those who have X-Windows, 132 columns video.
29 *
30 * This report produces an ASCII output file.
31 */
32
33 proc main ()
34 {
35 indiset(idx)
36 getintmsg(smethod,
37 "0=all persons, 1=given Soundex, 2=Soundex of a given person")
38 if (eq(smethod,1)) {
39 getstrmsg(scode,
40 "Enter desired Soundex code (return=any, Z999=unknown)")
41 if (scode) { set(scode,save(upper(scode))) }
42 }
43 elsif (eq(smethod,2)) {
44 getindimsg(person,"Enter name of person with desired Soundex")
45 if (person) {
46 set(scode,save(soundex(person)) )
47 }
48 }
49 if (scode) { print("Using Soundex code ") print(scode) print("\n") }
50 else { print("Using all persons in database\n") }
51 set(count,0)
52 forindi(indi,n) {
53 set(getit,1)
54 if (scode) {
55 if (strcmp(scode,soundex(indi))) { set(getit,0) }
56 }
57 if (getit) {
58 addtoset(idx,indi,n)
59 if (scode) {
60 set(count,add(count,1))
61 print(d(count)) print("/")
62 }
63 print(d(n)) print(" ")
64 }
65 }
66 print("\nbegin sorting\n")
67 namesort(idx)
68 print("done sorting\n")
69 col(1) "INDEX OF ALL PERSONS IN DATABASE"
70 if (scode) { " WITH SOUNDEX CODE: " scode }
71 col(1) "Individual"
72 col(34) "Brth"
73 col(39) "Deat"
74 col(44) "First Spouse"
75 col(75) "Father"
76 col(106) "Mother"
77 col(1) "----------------------------------------"
78 "----------------------------------------"
79 "----------------------------------------"
80 forindiset(idx,indi,v,n) {
81 col(1) fullname(indi,1,0,29)
82 col(34) year(birth(indi))
83 col(39) year(death(indi))
84 if(gt(nspouses(indi), 0)) {
85 spouses(indi, spou, fam, n) {
86 if (eq(1,n)) {
87 col(44) fullname(spou,1,0,29)
88 }
89 }
90 }
91 if(fath,father(indi)) {
92 col(75) fullname(fath,1,0,29)
93 }
94 if(moth,mother(indi)) {
95 col(106) fullname(moth,1,0,29)
96 }
97 }
98 nl()
99 print(nl())
100 }
101
102
103 /* Sample output of report (132 columns)
104
105 INDEX OF ALL PERSONS IN DATABASE WITH SOUNDEX CODE: D340
106
107 Individual Brth Deat First Spouse Father Mother
108 ------------------------------------------------------------------------------------------------------------------------
109 DUDLEY, Alexander 1645 DUDLEY, Richard SEAWELL, Mary
110 DUDLEY, Ambrose 1665 DUDLEY, Wife_of Ambrose DUDLEY, Ambrose DUDLEY, Wife_of Col_Ambrose
111 DUDLEY, Ambrose 1649 DUDLEY, Wife_of Col_Ambrose DUDLEY, Richard SEAWELL, Mary
112 DUDLEY, Christopher 1715 1781 DUDLEY, Robert CURTIS, Elizabeth
113 DUDLEY, Dorcas 1704 1765 ROUNTREE, William DUDLEY, Ambrose DUDLEY, Wife_of Ambrose
114 DUDLEY, Edward 1605 1655 PRITCHARD, Elizabeth
115 DUDLEY, James 1645 1741 WELCH, Mary DUDLEY, Richard SEAWELL, Mary
116 DUDLEY, Richard 1623 1687 SEAWELL, Mary DUDLEY, Edward PRITCHARD, Elizabeth
117 DUDLEY, Robert 1647 1701 RANSOM, Elizabeth DUDLEY, Richard SEAWELL, Mary
118 DUDLEY, Robert 1691 1745 CURTIS, Elizabeth DUDLEY, Robert RANSOM, Elizabeth
119 DUDLEY, Wife_of Ambrose 1640 DUDLEY, Ambrose
120 DUDLEY, Wife_of Col_Ambrose 1645 DUDLEY, Ambrose
121 DUDLEY, William 1621 1672 CARY, Elizabeth DUDLEY, Edward PRITCHARD, Elizabeth
122
123 -- end of sample
124 */