| 1 |
/* |
| 2 |
* @progname fam_ged.ll |
| 3 |
* @version 1.1 of 1994-06-08 |
| 4 |
* @author Wetmore and Prinke |
| 5 |
* @category |
| 6 |
* @output GEDCOM |
| 7 |
* @description |
| 8 |
|
| 9 |
This program extracts a gedcom file of all male line descendants |
| 10 |
of a specified person, with their spouses and parents (including |
| 11 |
those of the specified person and of all spouses). Also included |
| 12 |
are possibly illegitimate children of females - when they have |
| 13 |
the same surname as the mother but different than the father (also |
| 14 |
if there is no father recorded). |
| 15 |
|
| 16 |
------------------------------------------------------------------- |
| 17 |
fam_ged - a LifeLines family gedcom extraction program |
| 18 |
|
| 19 |
Version 1, 18 May 1994 by Thomas Wetmore IV, [email protected] |
| 20 |
modified 8 June 1994 by Rafal T. Prinke, [email protected] |
| 21 |
|
| 22 |
*/ |
| 23 |
|
| 24 |
proc main () |
| 25 |
{ |
| 26 |
list(ilist) |
| 27 |
indiset(idex) |
| 28 |
getindi(indi) |
| 29 |
enqueue(ilist, indi) |
| 30 |
set(out,1) set(in,2) |
| 31 |
while (indi, dequeue(ilist)) { |
| 32 |
print("OUT: ", d(out), " ", name(indi), "\n") |
| 33 |
addtoset(idex, indi, 0) |
| 34 |
set(out, add(out, 1)) |
| 35 |
if (male(indi)) { |
| 36 |
families(indi, fam, spouse, nfam) { |
| 37 |
children(fam, child, nchl) { |
| 38 |
print("IN: ", d(in), " ", name(child), "\n") |
| 39 |
set(in, add(in, 1)) |
| 40 |
enqueue(ilist, child) |
| 41 |
} |
| 42 |
} |
| 43 |
} |
| 44 |
if (female(indi)) { |
| 45 |
families(indi, fam, spouse, nfam) { |
| 46 |
children(fam, child, nchl) { |
| 47 |
if (eq(strcmp(surname(indi), surname(child)), 0)) { |
| 48 |
if (ne(strcmp(surname(indi), surname(spouse)), 0)) { |
| 49 |
print("INfem: ", d(in), " ", name(child), "\n") |
| 50 |
set(in, add(in, 1)) |
| 51 |
enqueue(ilist, child) |
| 52 |
} |
| 53 |
} |
| 54 |
} |
| 55 |
} |
| 56 |
} |
| 57 |
} |
| 58 |
set(idex, union(idex, spouseset(idex))) |
| 59 |
set(idex, union(idex, parentset(idex))) |
| 60 |
gengedcom(idex) |
| 61 |
} |