| 1 |
/* |
| 2 |
* @progname ps-fan1.ll |
| 3 |
* @version 1993-08-16 |
| 4 |
* @author Andrew Deacon ([email protected]) |
| 5 |
* @category |
| 6 |
* @output PostScript |
| 7 |
* @description |
| 8 |
* |
| 9 |
* Write a PostScript fan chart. |
| 10 |
* |
| 11 |
* Code (by Tom re-arranged) by Andrew Deacon, [email protected] |
| 12 |
* |
| 13 |
* This report works only with the LifeLines Genealogy program |
| 14 |
* |
| 15 |
* This report was adapted from a file made by Cliff Manis using the |
| 16 |
* GEDCHART software written by Tom Blumer. |
| 17 |
* |
| 18 |
* Output is a PostScript file. The file "ps-fan.ps" is included |
| 19 |
* when the report is generated. This file consists of the PostScript |
| 20 |
* commands used by the GEDCHART software written by Tom Blumer. |
| 21 |
* |
| 22 |
*/ |
| 23 |
|
| 24 |
global(PS_HDR_FILE) |
| 25 |
|
| 26 |
proc main () |
| 27 |
{ |
| 28 |
set (nl,nl()) |
| 29 |
getindi(indi) |
| 30 |
set(PS_HDR_FILE, "ps-fan.ps") /* PostScript Header file name */ |
| 31 |
copyfile(PS_HDR_FILE) |
| 32 |
call pedigree(0, 1, 1, indi) |
| 33 |
"showpage" nl() /* PostScript Tail command */ |
| 34 |
} |
| 35 |
|
| 36 |
proc pedigree (in, lev, ah, indi) |
| 37 |
{ |
| 38 |
"(" fullname(indi,1,1,50) ")" |
| 39 |
" (" if (evt, birth(indi)) { "b. " date(birth(indi)) } ")" |
| 40 |
" (" if (evt, death(indi)) { "d. " date(death(indi)) } ")" |
| 41 |
" " d(in) |
| 42 |
" " d(sub(ah, lev)) |
| 43 |
" i" |
| 44 |
nl() |
| 45 |
|
| 46 |
if (lt(in,4)) { |
| 47 |
if (par, father(indi)) { |
| 48 |
call pedigree(add(1,in), mul(2,lev), mul(2,ah), par) |
| 49 |
} |
| 50 |
if (par, mother(indi)) { |
| 51 |
call pedigree(add(1,in), mul(2,lev), add(1,mul(2,ah)), par) |
| 52 |
} |
| 53 |
} |
| 54 |
} |