File: soundex-isfm.ll

package info (click to toggle)
lifelines 3.0.50-2
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 11,140 kB
  • ctags: 6,517
  • sloc: ansic: 57,468; xml: 8,014; sh: 4,255; makefile: 848; yacc: 601; perl: 170; sed: 16
file content (124 lines) | stat: -rw-r--r-- 5,334 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/*
 * @progname       soundex-isfm.ll
 * @version        1.0
 * @author         Wetmore, Manis, Eggert
 * @category       
 * @output         Text, 132 cols
 * @description    
 *
 *   This program will  produce a report of all the INDI's in the database,
 *   in the format as seen at end of report.  May be sorted easily
 *   to see the Father or Mother column sorted report.
 *
 *   soundex-isfm
 *
 *   Code by Tom Wetmore, ttw@cbnewsl.att.com, 1991
 *   Modifications by Cliff Manis, cmanis@csoftec.csf.com, 1992
 *   Modifications by Jim Eggert, atc.ll.mit.edu!eggertj Fri Feb 26 1993
 *
 *   This report works only with the LifeLines Genealogy program
 *
 *   This report can be used to output everyone in the database,
 *   or selected by a single soundex code.  The soundex code
 *   can be entered either by knowing the code, or by selecting
 *   an individual and using his/her code.
 *
 *   The report name come from: isfm (Indi Spouse Father Mother)
 *   It is designed for 16 pitch, HP laserjet III, 132 column, and
 *   also those who have X-Windows, 132 columns video.
 *
 *   This report produces an ASCII output file.
 */

proc main ()
{
        indiset(idx)
        getintmsg(smethod,
                "0=all persons, 1=given Soundex, 2=Soundex of a given person")
        if (eq(smethod,1)) {
                getstrmsg(scode,
                        "Enter desired Soundex code (return=any, Z999=unknown)")
                if (scode) { set(scode,save(upper(scode))) }
        }
        elsif (eq(smethod,2)) {
                getindimsg(person,"Enter name of person with desired Soundex")
                if (person) {
                        set(scode,save(soundex(person)) )
                }
        }
        if (scode) { print("Using Soundex code ") print(scode) print("\n") }
        else { print("Using all persons in database\n") }
        set(count,0)
        forindi(indi,n) {
                set(getit,1)
                if (scode) {
                        if (strcmp(scode,soundex(indi))) { set(getit,0) }
                }
                if (getit) {
                        addtoset(idx,indi,n)
                        if (scode) {
                                set(count,add(count,1))
                                print(d(count)) print("/")
                        }
                        print(d(n)) print(" ")
                }
        }
        print("\nbegin sorting\n")
        namesort(idx)
        print("done sorting\n")
        col(1) "INDEX OF ALL PERSONS IN DATABASE"
        if (scode) { " WITH SOUNDEX CODE: " scode }
        col(1) "Individual"
        col(34) "Brth"
        col(39) "Deat"
        col(44) "First Spouse"
        col(75) "Father"
        col(106) "Mother"
        col(1) "----------------------------------------"
        "----------------------------------------"
        "----------------------------------------"
        forindiset(idx,indi,v,n) {
                col(1) fullname(indi,1,0,29)
                col(34) year(birth(indi))
                col(39) year(death(indi))
                if(gt(nspouses(indi), 0)) {
                        spouses(indi, spou, fam, n) {
                                if (eq(1,n)) {
                                        col(44) fullname(spou,1,0,29)
                                }
                        }
                }
                if(fath,father(indi)) {
                        col(75) fullname(fath,1,0,29)
                }
                if(moth,mother(indi)) {
                        col(106) fullname(moth,1,0,29)
                }
        }
        nl()
        print(nl())
}


/*      Sample output of report   (132 columns)

INDEX OF ALL PERSONS IN DATABASE WITH SOUNDEX CODE: D340

Individual                       Brth Deat First Spouse                   Father                   Mother
------------------------------------------------------------------------------------------------------------------------
DUDLEY, Alexander                1645                                     DUDLEY, Richard          SEAWELL, Mary
DUDLEY, Ambrose                  1665      DUDLEY, Wife_of Ambrose        DUDLEY, Ambrose          DUDLEY, Wife_of Col_Ambrose
DUDLEY, Ambrose                  1649      DUDLEY, Wife_of Col_Ambrose    DUDLEY, Richard          SEAWELL, Mary
DUDLEY, Christopher              1715 1781                                DUDLEY, Robert           CURTIS, Elizabeth
DUDLEY, Dorcas                   1704 1765 ROUNTREE, William              DUDLEY, Ambrose          DUDLEY, Wife_of Ambrose
DUDLEY, Edward                   1605 1655 PRITCHARD, Elizabeth
DUDLEY, James                    1645 1741 WELCH, Mary                    DUDLEY, Richard          SEAWELL, Mary
DUDLEY, Richard                  1623 1687 SEAWELL, Mary                  DUDLEY, Edward           PRITCHARD, Elizabeth
DUDLEY, Robert                   1647 1701 RANSOM, Elizabeth              DUDLEY, Richard          SEAWELL, Mary
DUDLEY, Robert                   1691 1745 CURTIS, Elizabeth              DUDLEY, Robert           RANSOM, Elizabeth
DUDLEY, Wife_of Ambrose          1640      DUDLEY, Ambrose
DUDLEY, Wife_of Col_Ambrose      1645      DUDLEY, Ambrose
DUDLEY, William                  1621 1672 CARY, Elizabeth                DUDLEY, Edward           PRITCHARD, Elizabeth

  -- end of sample
*/