| 1 |
/* |
| 2 |
* @progname pedigreelhs.ll |
| 3 |
* @version none |
| 4 |
* @author Wetmore, Manis, Hume Smith |
| 5 |
* @category |
| 6 |
* @output Text |
| 7 |
* @description |
| 8 |
* |
| 9 |
* Select and produce an ancestor report for the person selected. |
| 10 |
* |
| 11 |
* Code by Tom Wetmore, [email protected] |
| 12 |
* With modifications by: Cliff Manis |
| 13 |
* more by Hume Smith (who refuses to learn YACL and so may do odd things): |
| 14 |
* - optional depth limit |
| 15 |
* - draws helpful lines |
| 16 |
* |
| 17 |
* This report works only with the LifeLines Genealogy program |
| 18 |
* |
| 19 |
* version one of this report was written by Tom Wetmore, in 1990, |
| 20 |
* name is from pedigreel (long format) |
| 21 |
* |
| 22 |
* Output is an ASCII file, and will probably need to be printed |
| 23 |
* using 132 column format. Sample (depth 2): |
| 24 |
|
| 25 |
+! |
| 26 |
+-Ivan Cottnam "Cott" SMITH (10 Jan 1932- ) #2 |
| 27 |
| +! |
| 28 |
+-Hume Cottnam Llewellyn SMITH (18 Dec 1966- ) #1 |
| 29 |
| +! |
| 30 |
+-Gail Ida HUME (26 Mar 1943- ) #3 |
| 31 |
+! |
| 32 |
|
| 33 |
* ! indicates more is known beyond that depth. |
| 34 |
*/ |
| 35 |
|
| 36 |
proc main () |
| 37 |
{ |
| 38 |
getindi(indi) |
| 39 |
getintmsg(depth,"How many generations (-1 for all)?") |
| 40 |
dayformat(0) |
| 41 |
monthformat(4) |
| 42 |
dateformat(0) |
| 43 |
call pedigree(1, depth, indi, "", " ", " ") |
| 44 |
} |
| 45 |
|
| 46 |
proc pedigree (ah, depth, indi, indent, above, below) |
| 47 |
{ |
| 48 |
if (eq(depth,0)) { |
| 49 |
indent "+!" nl() |
| 50 |
} else { |
| 51 |
if (par, father(indi)) { |
| 52 |
call pedigree(mul(2,ah), sub(depth,1), par, concat(indent, above), " ", "| ") |
| 53 |
} |
| 54 |
|
| 55 |
indent "+-" |
| 56 |
fullname(indi,1,1,50) |
| 57 |
set(flag,0) |
| 58 |
set(birth," ") |
| 59 |
set(death," ") |
| 60 |
if (evt, birth(indi)) { |
| 61 |
set(flag,1) |
| 62 |
set(birth, stddate(evt)) |
| 63 |
} |
| 64 |
if (evt, death(indi)) { |
| 65 |
set(flag,1) |
| 66 |
set(death, stddate(evt)) |
| 67 |
} |
| 68 |
if (flag) { " (" birth "-" death ")" } |
| 69 |
" #" d(ah) nl() |
| 70 |
|
| 71 |
if (par, mother(indi)) { |
| 72 |
call pedigree(add(1,mul(2,ah)), sub(depth,1), par, concat(indent, below), "| ", " ") |
| 73 |
} |
| 74 |
} |
| 75 |
} |