| 1 |
/* |
| 2 |
* @progname famtree1.ll |
| 3 |
* @version 2 |
| 4 |
* @author James P. Jones, [email protected] |
| 5 |
* @category |
| 6 |
* @output PostScript |
| 7 |
* @description |
| 8 |
* |
| 9 |
* This report builds a postscript ancestry chart, a "tree", containing |
| 10 |
* data on five generations. It prompts for the individual to begin with |
| 11 |
* and draws the tree including this person. The further from this person |
| 12 |
* the less data is printed. Maximum data include: |
| 13 |
* o date and place of birth |
| 14 |
* o date and place of marriage |
| 15 |
* o date and place of death |
| 16 |
* o last place of residence |
| 17 |
* o spouses of person #1 (up to five) |
| 18 |
* as well as: |
| 19 |
* o name, address, phone number and e-mail address of compiler |
| 20 |
* o date of chart |
| 21 |
* |
| 22 |
* version one: 9 May 1993 |
| 23 |
* |
| 24 |
* Code by James P. Jones, [email protected] |
| 25 |
* |
| 26 |
* Contains code from: |
| 27 |
* "famrep4" - By yours truely, [email protected] |
| 28 |
* "pedigree" - By Tom Wetmore, [email protected] |
| 29 |
* - and Cliff Manis, [email protected] |
| 30 |
* "ancestor.ps" - orginial postscript program by Phil Lloyd, |
| 31 |
* [email protected] (See disclaimer below). |
| 32 |
* |
| 33 |
* |
| 34 |
* This report works only with the LifeLines Genealogy program |
| 35 |
* |
| 36 |
* Note: |
| 37 |
* |
| 38 |
* o Change the "compiler" data below to reflect yourself. |
| 39 |
* o In order to take advantage of the "residence" slots on the chart, |
| 40 |
* use either ADDR (address) or ADDL (address living) tags in your |
| 41 |
* database, e.g.: |
| 42 |
* |
| 43 |
* 1 ADDL |
| 44 |
* 2 DATE 20 Jun 1992 |
| 45 |
* 2 PLAC 619 W Remington Drive, Sunnyvale, CA 94087 |
| 46 |
* |
| 47 |
* Put the full address on one line, separated by commas (,) and this |
| 48 |
* program will parse the street address from the city/state/zip for |
| 49 |
* the report. |
| 50 |
*/ |
| 51 |
|
| 52 |
/* |
| 53 |
* Updated the filename to famtree2 after fixing problems with list vs |
| 54 |
* table variables. 22 September 2002. Paul Buckley. |
| 55 |
*/ |
| 56 |
|
| 57 |
global(chart) |
| 58 |
global(id) |
| 59 |
global(savfam) |
| 60 |
global(addrnode) |
| 61 |
global(compiler) |
| 62 |
|
| 63 |
proc main () |
| 64 |
{ |
| 65 |
dayformat(2) |
| 66 |
monthformat(6) |
| 67 |
dateformat(0) |
| 68 |
set(addrnode, NULL) |
| 69 |
|
| 70 |
/* |
| 71 |
* Change the compiler name, address, phone, and email to reflect |
| 72 |
* yourself. |
| 73 |
*/ |
| 74 |
table(compiler) |
| 75 |
insert(compiler,"name", getproperty("user.fullname")) |
| 76 |
insert(compiler,"addr", getproperty("user.address")) |
| 77 |
insert(compiler,"phone", getproperty("user.phone")) |
| 78 |
insert(compiler,"email", getproperty("user.email")) |
| 79 |
|
| 80 |
getindi(indi) |
| 81 |
if (eq(indi, NULL)) { |
| 82 |
print("Individual not found...try again.") |
| 83 |
print(nl()) |
| 84 |
} |
| 85 |
else { |
| 86 |
table(chart) |
| 87 |
print("Creating chart...") |
| 88 |
call buildlist(0, 1, indi) |
| 89 |
call doheader() |
| 90 |
call dochart() |
| 91 |
print("done.") |
| 92 |
print(nl()) |
| 93 |
} |
| 94 |
} |
| 95 |
|
| 96 |
/* |
| 97 |
* Load global array (chart) with all INDI records of all direct ancestors |
| 98 |
* for individual, (indi + 4 generations), indexed by ah number. |
| 99 |
*/ |
| 100 |
proc buildlist(in, ah, indi) |
| 101 |
{ |
| 102 |
if (par, father(indi)) { |
| 103 |
if (lt(ah, 16)) { |
| 104 |
call buildlist(add(1,in), mul(2,ah), par) |
| 105 |
} |
| 106 |
} |
| 107 |
/* setel(par, ah, indi)*/ |
| 108 |
/* setel(chart, ah, indi)*/ |
| 109 |
insert(chart, d(ah), indi) |
| 110 |
|
| 111 |
|
| 112 |
if (par, mother(indi)) { |
| 113 |
if (lt(ah, 16)) { |
| 114 |
call buildlist(add(1,in), add(1,mul(2,ah)), par) |
| 115 |
} |
| 116 |
} |
| 117 |
} |
| 118 |
|
| 119 |
/* |
| 120 |
* Find last residence of PERSON by traversing all ADDR and ADDL nodes; |
| 121 |
* save result in global addrnode variable. |
| 122 |
*/ |
| 123 |
proc residence(person) |
| 124 |
{ |
| 125 |
if (not(person)) { |
| 126 |
set(addrnode, NULL) |
| 127 |
} |
| 128 |
else { |
| 129 |
traverse(inode(person), node, lev) { |
| 130 |
if (or(eq(strcmp(tag(node),"ADDR"),0),eq(strcmp(tag(node),"ADDL"),0))) { |
| 131 |
set(addrnode, node) |
| 132 |
} |
| 133 |
} |
| 134 |
} |
| 135 |
} |
| 136 |
|
| 137 |
/* |
| 138 |
* Write postscript header to output file. This is database independant |
| 139 |
* code. The actual genealogical data will be added below. |
| 140 |
*/ |
| 141 |
proc doheader() |
| 142 |
{ |
| 143 |
"%! " nl() |
| 144 |
"% famtree.ps " nl() |
| 145 |
"% " nl() |
| 146 |
"% This postscript Ancestry Chart was produced by the LifeLines report " nl() |
| 147 |
"% program, famtree1, by James P. Jones. The orginal postscript code " nl() |
| 148 |
"% was written by Phil Lloyd 11th November 1986, the blanks filled in " nl() |
| 149 |
"% with data extracted from a LifeLines Genealogy database. " nl() |
| 150 |
"% ------------------------------------------------------------------- " nl() |
| 151 |
"% " nl() |
| 152 |
"% This original PostScript program was written by Phil Lloyd. " nl() |
| 153 |
"% It may be freely copied, distributed and used, provided these comments " nl() |
| 154 |
"% remain unchanged, and that no fee of any kind is charged for the " nl() |
| 155 |
"% software. " nl() |
| 156 |
"% " nl() |
| 157 |
"% (Except for VERY long names, it should always be possible to condense the " nl() |
| 158 |
"% text to fit into the boxes, without sacrificing readability [by changing " nl() |
| 159 |
"% the font/point size].) " nl() |
| 160 |
"% " nl() |
| 161 |
"% [email protected] " nl() |
| 162 |
" " nl() |
| 163 |
"% create a standard 1 point Helvetica-Bold font " nl() |
| 164 |
"/bold /Helvetica-Bold findfont def " nl() |
| 165 |
" " nl() |
| 166 |
"% create a standard 1 point Helvetica-Oblique font " nl() |
| 167 |
"/ital /Helvetica-Oblique findfont def " nl() |
| 168 |
" " nl() |
| 169 |
"% box procedure " nl() |
| 170 |
"% 5 arguments: x and y of middle of left-hand side " nl() |
| 171 |
"% n: entry number ( 1 - 31 ) " nl() |
| 172 |
"% style: font (bold or ital) " nl() |
| 173 |
"% point: point size (vertical) " nl() |
| 174 |
"% cond: `point size' (horizontal) " nl() |
| 175 |
"% p: person's name " nl() |
| 176 |
"/mtrx matrix def " nl() |
| 177 |
"/box " nl() |
| 178 |
" { /p exch def " nl() |
| 179 |
" /cond exch def /point exch def /style exch def " nl() |
| 180 |
" /n exch def /y exch def /x exch def " nl() |
| 181 |
" " nl() |
| 182 |
" /savematrix mtrx currentmatrix def " nl() |
| 183 |
" " nl() |
| 184 |
" 0 setlinewidth " nl() |
| 185 |
" " nl() |
| 186 |
" /d 16 def /str 2 string def " nl() |
| 187 |
" /w 170 def /h 14 def /hh h 2 div def /brad 3 def " nl() |
| 188 |
" x y translate " nl() |
| 189 |
" " nl() |
| 190 |
" n 0 ne { " nl() |
| 191 |
" % black box for number " nl() |
| 192 |
" newpath " nl() |
| 193 |
" 0.0 0.0 moveto " nl() |
| 194 |
" 0.0 hh d hh brad arcto 4 {pop} repeat " nl() |
| 195 |
" d hh d hh neg brad arcto 4 {pop} repeat " nl() |
| 196 |
" d hh neg 0.0 hh neg brad arcto 4 {pop} repeat " nl() |
| 197 |
" 0.0 hh neg 0.0 0.0 brad arcto 4 {pop} repeat " nl() |
| 198 |
" 0.0 0.0 lineto " nl() |
| 199 |
" fill " nl() |
| 200 |
" " nl() |
| 201 |
" % white number " nl() |
| 202 |
" /Helvetica findfont 10 scalefont setfont " nl() |
| 203 |
" 0.0 hh neg moveto " nl() |
| 204 |
" n str cvs " nl() |
| 205 |
" dup stringwidth pop " nl() |
| 206 |
" neg d add 2 div -3.5 moveto " nl() |
| 207 |
" 1.0 setgray show 0.0 setgray " nl() |
| 208 |
" } if " nl() |
| 209 |
" " nl() |
| 210 |
" % box for name " nl() |
| 211 |
" newpath " nl() |
| 212 |
" d 0.0 moveto " nl() |
| 213 |
" d hh w hh brad arcto 4 {pop} repeat " nl() |
| 214 |
" w hh w hh neg brad arcto 4 {pop} repeat " nl() |
| 215 |
" w hh neg d hh neg brad arcto 4 {pop} repeat " nl() |
| 216 |
" d hh neg d 0.0 brad arcto 4 {pop} repeat " nl() |
| 217 |
" d 0.0 lineto " nl() |
| 218 |
" stroke " nl() |
| 219 |
" " nl() |
| 220 |
" % name in chosen font " nl() |
| 221 |
" d 5 add hh neg 3 add moveto " nl() |
| 222 |
" style [cond 0 0 point 0 0] makefont setfont " nl() |
| 223 |
" p show " nl() |
| 224 |
" /Helvetica findfont 10 scalefont setfont " nl() |
| 225 |
" " nl() |
| 226 |
" savematrix setmatrix " nl() |
| 227 |
" } def " nl() |
| 228 |
" " nl() |
| 229 |
"% tie procedure " nl() |
| 230 |
"% 4 arguments: x and y of top right-hand end of tie " nl() |
| 231 |
"% vh: half vertical span of the tie " nl() |
| 232 |
"% bmul: multiplier to redirect central tail " nl() |
| 233 |
"% 1: tail faces left " nl() |
| 234 |
"% 0: tail faces right " nl() |
| 235 |
"/mtrx matrix def " nl() |
| 236 |
"/tie " nl() |
| 237 |
" { /bmul exch def /vh exch def /y exch def /x exch def " nl() |
| 238 |
" " nl() |
| 239 |
" /savematrix mtrx currentmatrix def " nl() |
| 240 |
" " nl() |
| 241 |
" 1 setlinewidth " nl() |
| 242 |
" " nl() |
| 243 |
" /h 10 def /h2 h 2 mul def /v vh 2 mul def /trad 4 def " nl() |
| 244 |
" x y translate " nl() |
| 245 |
" " nl() |
| 246 |
" newpath " nl() |
| 247 |
" 0.0 0.0 moveto " nl() |
| 248 |
" h neg 0.0 h neg vh neg trad arcto 4 {pop} repeat " nl() |
| 249 |
" h neg vh neg h2 neg bmul mul vh neg trad arcto 4 {pop} repeat " nl() |
| 250 |
" h2 neg bmul mul vh neg lineto " nl() |
| 251 |
" 0.0 v neg moveto " nl() |
| 252 |
" h neg v neg h neg vh neg trad arcto 4 {pop} repeat " nl() |
| 253 |
" h neg vh neg h2 neg bmul mul vh neg trad arcto 4 {pop} repeat " nl() |
| 254 |
" stroke " nl() |
| 255 |
" " nl() |
| 256 |
" savematrix setmatrix " nl() |
| 257 |
" } def " nl() |
| 258 |
" " nl() |
| 259 |
"% dates1 procedure " nl() |
| 260 |
"% 34 arguments: x and y start of first line of text " nl() |
| 261 |
"% sb1, pb1, cb1: font for the following text " nl() |
| 262 |
"% b1: first line of text for "born" " nl() |
| 263 |
"% sb2, pb2, cb2: font for following text: " nl() |
| 264 |
"% b2: second line of text for "born" " nl() |
| 265 |
"% sm1, pm1, cm1: font for following text: " nl() |
| 266 |
"% m1: first line of text for "married" " nl() |
| 267 |
"% sm2, pm2, cm2: font for following text: " nl() |
| 268 |
"% m2: second line of text for "married" " nl() |
| 269 |
"% sr1, pr1, cr1: font for following text: " nl() |
| 270 |
"% r1: first line of text for "resident" " nl() |
| 271 |
"% sr2, pr2, cr2: font for following text: " nl() |
| 272 |
"% r2: second line of text for "resident" " nl() |
| 273 |
"% sd1, pd1, cd1: font for following text: " nl() |
| 274 |
"% d1: first line of text for "died" " nl() |
| 275 |
"% sd2, pd2, cd2: font for following text: " nl() |
| 276 |
"% d2: second line of text for "died" " nl() |
| 277 |
"/mtrx matrix def " nl() |
| 278 |
"/dates1 " nl() |
| 279 |
" { /d2 exch def /cd2 exch def /pd2 exch def /sd2 exch def " nl() |
| 280 |
" /d1 exch def /cd1 exch def /pd1 exch def /sd1 exch def " nl() |
| 281 |
" /r2 exch def /cr2 exch def /pr2 exch def /sr2 exch def " nl() |
| 282 |
" /r1 exch def /cr1 exch def /pr1 exch def /sr1 exch def " nl() |
| 283 |
" /m2 exch def /cm2 exch def /pm2 exch def /sm2 exch def " nl() |
| 284 |
" /m1 exch def /cm1 exch def /pm1 exch def /sm1 exch def " nl() |
| 285 |
" /b2 exch def /cb2 exch def /pb2 exch def /sb2 exch def " nl() |
| 286 |
" /b1 exch def /cb1 exch def /pb1 exch def /sb1 exch def " nl() |
| 287 |
" /y exch def /x exch def " nl() |
| 288 |
" " nl() |
| 289 |
" /savematrix mtrx currentmatrix def " nl() |
| 290 |
" /voff 23 neg def /v 19 def /vv 9 def /hoff 45 def " nl() |
| 291 |
" x y translate " nl() |
| 292 |
" " nl() |
| 293 |
" newpath " nl() |
| 294 |
" 0.0 voff moveto (born) show " nl() |
| 295 |
" 0.0 voff v sub moveto (married) show " nl() |
| 296 |
" 0.0 voff v 2 mul sub moveto (resident) show " nl() |
| 297 |
" 0.0 voff v 3 mul sub moveto (died) show " nl() |
| 298 |
" sb1 [cb1 0 0 pb1 0 0] makefont setfont " nl() |
| 299 |
" hoff voff moveto b1 show " nl() |
| 300 |
" sb2 [cb2 0 0 pb2 0 0] makefont setfont " nl() |
| 301 |
" hoff voff vv sub moveto b2 show " nl() |
| 302 |
" sm1 [cm1 0 0 pm1 0 0] makefont setfont " nl() |
| 303 |
" hoff voff v sub moveto m1 show " nl() |
| 304 |
" sm2 [cm2 0 0 pm2 0 0] makefont setfont " nl() |
| 305 |
" hoff voff v sub vv sub moveto m2 show " nl() |
| 306 |
" sr1 [cr1 0 0 pr1 0 0] makefont setfont " nl() |
| 307 |
" hoff voff v 2 mul sub moveto r1 show " nl() |
| 308 |
" sr2 [cr2 0 0 pr2 0 0] makefont setfont " nl() |
| 309 |
" hoff voff v 2 mul sub vv sub moveto r2 show " nl() |
| 310 |
" sd1 [cd1 0 0 pd1 0 0] makefont setfont " nl() |
| 311 |
" hoff voff v 3 mul sub moveto d1 show " nl() |
| 312 |
" sd2 [cd2 0 0 pd2 0 0] makefont setfont " nl() |
| 313 |
" hoff voff v 3 mul sub vv sub moveto d2 show " nl() |
| 314 |
" " nl() |
| 315 |
" savematrix setmatrix " nl() |
| 316 |
" } def " nl() |
| 317 |
" " nl() |
| 318 |
"% dates2 procedure " nl() |
| 319 |
"% 10 arguments: x and y start of first line of text " nl() |
| 320 |
"% sb1, pb1, cb1: font for following text: " nl() |
| 321 |
"% b1: first line of text for "born" " nl() |
| 322 |
"% sb2, pb2, cb2: font for following text: " nl() |
| 323 |
"% b2: second line of text for "born" " nl() |
| 324 |
"% sd1, pd1, cd1: font for following text: " nl() |
| 325 |
"% d1: first line of text for "died" " nl() |
| 326 |
"% sd2, pd2, cd2: font for following text: " nl() |
| 327 |
"% d2: second line of text for "died" " nl() |
| 328 |
"/mtrx matrix def " nl() |
| 329 |
"/dates2 " nl() |
| 330 |
" { /d2 exch def /cd2 exch def /pd2 exch def /sd2 exch def " nl() |
| 331 |
" /d1 exch def /cd1 exch def /pd1 exch def /sd1 exch def " nl() |
| 332 |
" /b2 exch def /cb2 exch def /pb2 exch def /sb2 exch def " nl() |
| 333 |
" /b1 exch def /cb1 exch def /pb1 exch def /sb1 exch def " nl() |
| 334 |
" /y exch def /x exch def " nl() |
| 335 |
" " nl() |
| 336 |
" /savematrix mtrx currentmatrix def " nl() |
| 337 |
" /voff 23 neg def /v 19 def /vv 9 def /hoff 30 def " nl() |
| 338 |
" x y translate " nl() |
| 339 |
" " nl() |
| 340 |
" newpath " nl() |
| 341 |
" 0.0 voff moveto (born) show " nl() |
| 342 |
" 0.0 voff v sub moveto (died) show " nl() |
| 343 |
" sb1 [cb1 0 0 pb1 0 0] makefont setfont " nl() |
| 344 |
" hoff voff moveto b1 show " nl() |
| 345 |
" sb2 [cb2 0 0 pb2 0 0] makefont setfont " nl() |
| 346 |
" hoff voff vv sub moveto b2 show " nl() |
| 347 |
" sd1 [cd1 0 0 pd1 0 0] makefont setfont " nl() |
| 348 |
" hoff voff v sub moveto d1 show " nl() |
| 349 |
" sd2 [cd2 0 0 pd2 0 0] makefont setfont " nl() |
| 350 |
" hoff voff v sub vv sub moveto d2 show " nl() |
| 351 |
" " nl() |
| 352 |
" savematrix setmatrix " nl() |
| 353 |
" } def " nl() |
| 354 |
" " nl() |
| 355 |
"% dates3 procedure " nl() |
| 356 |
"% 10 arguments: x and y start of first line of text " nl() |
| 357 |
"% sb1, pb1, cb1: font for following text: " nl() |
| 358 |
"% b1: line of text for "born" " nl() |
| 359 |
"% sm1, pm1, cm1: font for following text: " nl() |
| 360 |
"% m1: line of text for "married" " nl() |
| 361 |
"% sr1, pr1, cr1: font for following text: " nl() |
| 362 |
"% r1: line of text for "resident" " nl() |
| 363 |
"% sd1, pd1, cd1: font for following text: " nl() |
| 364 |
"% d1: line of text for "died" " nl() |
| 365 |
"/mtrx matrix def " nl() |
| 366 |
"/dates3 " nl() |
| 367 |
" { /d1 exch def /cd1 exch def /pd1 exch def /sd1 exch def " nl() |
| 368 |
" /r1 exch def /cr1 exch def /pr1 exch def /sr1 exch def " nl() |
| 369 |
" /m1 exch def /cm1 exch def /pm1 exch def /sm1 exch def " nl() |
| 370 |
" /b1 exch def /cb1 exch def /pb1 exch def /sb1 exch def " nl() |
| 371 |
" /y exch def /x exch def " nl() |
| 372 |
" " nl() |
| 373 |
" /savematrix mtrx currentmatrix def " nl() |
| 374 |
" /voff 17 neg def /v 11 def /hoff 30 def " nl() |
| 375 |
" x y translate " nl() |
| 376 |
" " nl() |
| 377 |
" newpath " nl() |
| 378 |
" 0.0 voff moveto (born) show " nl() |
| 379 |
" 0.0 voff v sub moveto (mrrd) show " nl() |
| 380 |
" 0.0 voff v 2 mul sub moveto (rsdnt) show " nl() |
| 381 |
" 0.0 voff v 3 mul sub moveto (died) show " nl() |
| 382 |
" sb1 [cb1 0 0 pb1 0 0] makefont setfont " nl() |
| 383 |
" hoff voff moveto b1 show " nl() |
| 384 |
" sm1 [cm1 0 0 pm1 0 0] makefont setfont " nl() |
| 385 |
" hoff voff v sub moveto m1 show " nl() |
| 386 |
" sr1 [cr1 0 0 pr1 0 0] makefont setfont " nl() |
| 387 |
" hoff voff v 2 mul sub moveto r1 show " nl() |
| 388 |
" sd1 [cd1 0 0 pd1 0 0] makefont setfont " nl() |
| 389 |
" hoff voff v 3 mul sub moveto d1 show " nl() |
| 390 |
" " nl() |
| 391 |
" savematrix setmatrix " nl() |
| 392 |
" } def " nl() |
| 393 |
" " nl() |
| 394 |
"% dates4 procedure " nl() |
| 395 |
"% 6 arguments: x and y start of first line of text " nl() |
| 396 |
"% sb1, pb1, cb1: font for following text: " nl() |
| 397 |
"% b1: line of text for "born" " nl() |
| 398 |
"% sd1, pd1, cd1: font for following text: " nl() |
| 399 |
"% d1: line of text for "died" " nl() |
| 400 |
"/mtrx matrix def " nl() |
| 401 |
"/dates4 " nl() |
| 402 |
" { /d1 exch def /cd1 exch def /pd1 exch def /sd1 exch def " nl() |
| 403 |
" /b1 exch def /cb1 exch def /pb1 exch def /sb1 exch def " nl() |
| 404 |
" /y exch def /x exch def " nl() |
| 405 |
" " nl() |
| 406 |
" /savematrix mtrx currentmatrix def " nl() |
| 407 |
" /voff 17 neg def /v 11 def /hoff 30 " nl() |
| 408 |
" x y translate " nl() |
| 409 |
" " nl() |
| 410 |
" newpath " nl() |
| 411 |
" 0.0 voff moveto (born) show " nl() |
| 412 |
" 0.0 voff v sub moveto (died) show " nl() |
| 413 |
" sb1 [cb1 0 0 pb1 0 0] makefont setfont " nl() |
| 414 |
" hoff voff moveto b1 show " nl() |
| 415 |
" sd1 [cd1 0 0 pd1 0 0] makefont setfont " nl() |
| 416 |
" hoff voff v sub moveto d1 show " nl() |
| 417 |
" " nl() |
| 418 |
" savematrix setmatrix " nl() |
| 419 |
" } def " nl() |
| 420 |
" " nl() |
| 421 |
"% dates5 procedure " nl() |
| 422 |
"% 10 arguments: x and y start of first line of text " nl() |
| 423 |
"% sb1, pb1, cb1: font for following text: " nl() |
| 424 |
"% b1: text for "born" " nl() |
| 425 |
"% sm1, pm1, cm1: font for following text: " nl() |
| 426 |
"% m1: text for "married" " nl() |
| 427 |
"% sr1, pr1, cr1: font for following text: " nl() |
| 428 |
"% r1: text for "resident" " nl() |
| 429 |
"% sd1, pd1, cd1: font for following text: " nl() |
| 430 |
"% d1: text for "died" " nl() |
| 431 |
"/mtrx matrix def " nl() |
| 432 |
"/dates5 " nl() |
| 433 |
" { /d1 exch def /cd1 exch def /pd1 exch def /sd1 exch def " nl() |
| 434 |
" /r1 exch def /cr1 exch def /pr1 exch def /sr1 exch def " nl() |
| 435 |
" /m1 exch def /cm1 exch def /pm1 exch def /sm1 exch def " nl() |
| 436 |
" /b1 exch def /cb1 exch def /pb1 exch def /sb1 exch def " nl() |
| 437 |
" /y exch def /x exch def " nl() |
| 438 |
" " nl() |
| 439 |
" /savematrix mtrx currentmatrix def " nl() |
| 440 |
" /voff 15 neg def /v 10 def /wh 85 def /hoff 15 def " nl() |
| 441 |
" x y translate " nl() |
| 442 |
" " nl() |
| 443 |
" newpath " nl() |
| 444 |
" 0.0 voff moveto (b) show " nl() |
| 445 |
" 0.0 voff v sub moveto (m) show " nl() |
| 446 |
" wh voff v sub moveto (r) show " nl() |
| 447 |
" wh voff moveto (d) show " nl() |
| 448 |
" sb1 [cb1 0 0 pb1 0 0] makefont setfont " nl() |
| 449 |
" hoff voff moveto b1 show " nl() |
| 450 |
" sm1 [cm1 0 0 pm1 0 0] makefont setfont " nl() |
| 451 |
" hoff voff v sub moveto m1 show " nl() |
| 452 |
" sr1 [cr1 0 0 pr1 0 0] makefont setfont " nl() |
| 453 |
" wh hoff add voff v sub moveto r1 show " nl() |
| 454 |
" sd1 [cd1 0 0 pd1 0 0] makefont setfont " nl() |
| 455 |
" wh hoff add voff moveto d1 show " nl() |
| 456 |
" " nl() |
| 457 |
" savematrix setmatrix " nl() |
| 458 |
" } def " nl() |
| 459 |
" " nl() |
| 460 |
"% dates6 procedure " nl() |
| 461 |
"% 6 arguments: x and y start of text " nl() |
| 462 |
"% sb1, pb1, cb1: font for following text: " nl() |
| 463 |
"% b1: text for "born" " nl() |
| 464 |
"% sd1, pd1, cd1: font for following text: " nl() |
| 465 |
"% d1: text for "died" " nl() |
| 466 |
"/mtrx matrix def " nl() |
| 467 |
"/dates6 " nl() |
| 468 |
" { /d1 exch def /cd1 exch def /pd1 exch def /sd1 exch def " nl() |
| 469 |
" /b1 exch def /cb1 exch def /pb1 exch def /sb1 exch def " nl() |
| 470 |
" /y exch def /x exch def " nl() |
| 471 |
" " nl() |
| 472 |
" /savematrix mtrx currentmatrix def " nl() |
| 473 |
" /voff 15 neg def /v 10 def /wh 85 def /hoff 15 def " nl() |
| 474 |
" x y translate " nl() |
| 475 |
" " nl() |
| 476 |
" newpath " nl() |
| 477 |
" 0.0 voff moveto (b) show " nl() |
| 478 |
" wh voff moveto (d) show " nl() |
| 479 |
" sb1 [cb1 0 0 pb1 0 0] makefont setfont " nl() |
| 480 |
" hoff voff moveto b1 show " nl() |
| 481 |
" sd1 [cd1 0 0 pd1 0 0] makefont setfont " nl() |
| 482 |
" wh hoff add voff moveto d1 show " nl() |
| 483 |
" " nl() |
| 484 |
" savematrix setmatrix " nl() |
| 485 |
" } def " nl() |
| 486 |
" " nl() |
| 487 |
"% coordinate transform to landscape format " nl() |
| 488 |
"90 rotate 0 -563 translate " nl() |
| 489 |
" " nl() |
| 490 |
"% scaling used for pocket version " nl() |
| 491 |
"% 0.6 0.6 scale " nl() |
| 492 |
} |
| 493 |
|
| 494 |
/* |
| 495 |
* Write the rest of the postscript code to the output file, with the |
| 496 |
* blanks filled in with data extracted from the user's LifeLines database. |
| 497 |
*/ |
| 498 |
proc dochart() |
| 499 |
{ |
| 500 |
set(id, 1) |
| 501 |
/* set(person, getel(chart, id))*/ |
| 502 |
set(person, lookup(chart, d(id))) |
| 503 |
|
| 504 |
"/Helvetica-Bold findfont 14 scalefont setfont" nl() |
| 505 |
"30 500 moveto (Ancestry Chart of: " |
| 506 |
name(person) ") show" nl() nl() |
| 507 |
|
| 508 |
"/Helvetica-Oblique findfont 9 scalefont setfont" nl() |
| 509 |
"30 485 moveto (Compiled by: " lookup(compiler, "name") ") show" nl() |
| 510 |
"30 475 moveto (" lookup(compiler, "addr") ") show" nl() |
| 511 |
"30 465 moveto (" lookup(compiler, "phone") ") show" nl() |
| 512 |
"30 455 moveto (" lookup(compiler, "email") ") show" nl() |
| 513 |
|
| 514 |
nl() |
| 515 |
|
| 516 |
"/Helvetica-Oblique findfont 9 scalefont setfont" nl() |
| 517 |
"30 440 moveto (Chart dated: " |
| 518 |
stddate(gettoday()) ") show" nl() nl() |
| 519 |
|
| 520 |
"/Helvetica findfont 14 scalefont setfont" nl() |
| 521 |
"20 270 moveto (Ancestors of:) show" nl() nl() |
| 522 |
|
| 523 |
/* loop through all spouse, outputing names */ |
| 524 |
spouses(person, svar, fvar, num) { |
| 525 |
if (eq(num, 1)) { |
| 526 |
set(savfam, fvar) |
| 527 |
"/Helvetica findfont 12 scalefont setfont" nl() |
| 528 |
"36 156 moveto (spouse: #1) show" nl() |
| 529 |
"20 145 0 bold 9 9 (" |
| 530 |
name(svar) |
| 531 |
") box" nl() |
| 532 |
} |
| 533 |
if (eq(num, 2)) { |
| 534 |
"/Helvetica findfont 12 scalefont setfont" nl() |
| 535 |
"36 55 moveto (other spouses:) show" nl() |
| 536 |
"20 44 0 bold 9 9 (#2: " |
| 537 |
name(svar) |
| 538 |
") box" nl() |
| 539 |
} |
| 540 |
if (eq(num, 3)) { |
| 541 |
"/Helvetica findfont 12 scalefont setfont" nl() |
| 542 |
"20 28 0 bold 9 9 (#3: " |
| 543 |
name(svar) |
| 544 |
") box" nl() |
| 545 |
} |
| 546 |
if (eq(num, 4)) { |
| 547 |
"/Helvetica findfont 12 scalefont setfont" nl() |
| 548 |
"20 12 0 bold 9 9 (#4: " |
| 549 |
name(svar) |
| 550 |
") box" nl() |
| 551 |
} |
| 552 |
if (eq(num, 5)) { |
| 553 |
"/Helvetica findfont 12 scalefont setfont" nl() |
| 554 |
"20 -4 0 bold 9 9 (#5: " |
| 555 |
name(svar) |
| 556 |
") box" nl() |
| 557 |
} |
| 558 |
} |
| 559 |
|
| 560 |
"/Helvetica findfont 10 scalefont setfont" nl() nl() |
| 561 |
|
| 562 |
"% individual" nl() |
| 563 |
"20 257 1 bold 9 9 (" |
| 564 |
name(person) ") box" nl() |
| 565 |
"20 257" nl() |
| 566 |
call dates1(person) nl() |
| 567 |
|
| 568 |
set(id, add(id, 1)) |
| 569 |
set(person, lookup(chart, d(id))) |
| 570 |
"% parents" nl() |
| 571 |
"20 393 2 bold 9 9 (" |
| 572 |
name(person) ") box" nl() |
| 573 |
"20 393" nl() |
| 574 |
call dates1(person) nl() |
| 575 |
|
| 576 |
set(id, add(id, 1)) |
| 577 |
set(person, lookup(chart, d(id))) |
| 578 |
"20 121 3 bold 9 9 (" |
| 579 |
name(person) ") box" nl() |
| 580 |
"20 121" nl() |
| 581 |
call dates2(person) |
| 582 |
"20 393 136 0 tie" nl() nl() |
| 583 |
|
| 584 |
set(id, add(id, 1)) |
| 585 |
set(person, lookup(chart, d(id))) |
| 586 |
"% grandparents" nl() |
| 587 |
"210 461 4 bold 9 9 (" |
| 588 |
name(person) ") box" nl() |
| 589 |
"210 461" nl() |
| 590 |
call dates1(person) nl() |
| 591 |
|
| 592 |
set(id, add(id, 1)) |
| 593 |
set(person, lookup(chart, d(id))) |
| 594 |
"210 325 5 bold 9 9 (" |
| 595 |
name(person) ") box" nl() |
| 596 |
"210 325" nl() |
| 597 |
call dates2(person) nl() |
| 598 |
|
| 599 |
set(id, add(id, 1)) |
| 600 |
set(person, lookup(chart, d(id))) |
| 601 |
"210 189 6" nl() |
| 602 |
"bold 9 9 (" |
| 603 |
name(person) ") box" nl() |
| 604 |
"210 189" nl() |
| 605 |
call dates1(person) nl() |
| 606 |
|
| 607 |
set(id, add(id, 1)) |
| 608 |
set(person, lookup(chart, d(id))) |
| 609 |
"210 189 6" nl() |
| 610 |
"210 53 7 bold 9 9 (" |
| 611 |
name(person) ") box" nl() |
| 612 |
"210 53" nl() |
| 613 |
call dates2(person) |
| 614 |
"210 461 68 1 tie 210 189 68 1 tie" nl() nl() |
| 615 |
|
| 616 |
set(id, add(id, 1)) |
| 617 |
set(person, lookup(chart, d(id))) |
| 618 |
"% great-grandparents" nl() |
| 619 |
"400 495 8 bold 9 9 (" |
| 620 |
name(person) ") box" nl() |
| 621 |
"400 495" nl() |
| 622 |
monthformat(4) |
| 623 |
call dates3(person) nl() |
| 624 |
|
| 625 |
set(id, add(id, 1)) |
| 626 |
set(person, lookup(chart, d(id))) |
| 627 |
"400 427 9 bold 9 9 (" |
| 628 |
name(person) ") box" nl() |
| 629 |
"400 427" nl() |
| 630 |
call dates4(person) nl() |
| 631 |
|
| 632 |
set(id, add(id, 1)) |
| 633 |
set(person, lookup(chart, d(id))) |
| 634 |
"400 359 10 bold 9 9 (" |
| 635 |
name(person) ") box" nl() |
| 636 |
"400 359" nl() |
| 637 |
call dates3(person) nl() |
| 638 |
|
| 639 |
set(id, add(id, 1)) |
| 640 |
set(person, lookup(chart, d(id))) |
| 641 |
"400 291 11 bold 9 9 (" |
| 642 |
name(person) ") box" nl() |
| 643 |
"400 291" nl() |
| 644 |
call dates4(person) nl() |
| 645 |
|
| 646 |
set(id, add(id, 1)) |
| 647 |
set(person, lookup(chart, d(id))) |
| 648 |
"400 223 12 bold 9 9 (" |
| 649 |
name(person) ") box" nl() |
| 650 |
"400 223" nl() |
| 651 |
call dates3(person) nl() |
| 652 |
|
| 653 |
set(id, add(id, 1)) |
| 654 |
set(person, lookup(chart, d(id))) |
| 655 |
"400 155 13 bold 9 9 (" |
| 656 |
name(person) ") box" nl() |
| 657 |
"400 155" nl() |
| 658 |
call dates4(person) nl() |
| 659 |
|
| 660 |
set(id, add(id, 1)) |
| 661 |
set(person, lookup(chart, d(id))) |
| 662 |
"400 87 14 bold 9 9 (" |
| 663 |
name(person) ") box" nl() |
| 664 |
"400 87" nl() |
| 665 |
call dates3(person) nl() |
| 666 |
|
| 667 |
set(id, add(id, 1)) |
| 668 |
set(person, lookup(chart, d(id))) |
| 669 |
"400 19 15 bold 9 9 (" |
| 670 |
name(person) ") box" nl() |
| 671 |
"400 19" nl() |
| 672 |
call dates4(person) |
| 673 |
"400 495 34 1 tie 400 359 34 1 tie" nl() |
| 674 |
"400 223 34 1 tie 400 87 34 1 tie" nl() nl() |
| 675 |
|
| 676 |
set(id, add(id, 1)) |
| 677 |
set(person, lookup(chart, d(id))) |
| 678 |
"% great-great-grandparents" nl() |
| 679 |
"590 512 16 bold 9 9 (" |
| 680 |
name(person) ") box" nl() |
| 681 |
"590 512" nl() |
| 682 |
call dates5(person) nl() |
| 683 |
|
| 684 |
set(id, add(id, 1)) |
| 685 |
set(person, lookup(chart, d(id))) |
| 686 |
"590 478 17 bold 9 9 (" |
| 687 |
name(person) ") box" nl() |
| 688 |
"590 478" nl() |
| 689 |
call dates6(person) nl() |
| 690 |
|
| 691 |
set(id, add(id, 1)) |
| 692 |
set(person, lookup(chart, d(id))) |
| 693 |
"590 444 18 bold 9 9 (" |
| 694 |
name(person) ") box" nl() |
| 695 |
"590 444" nl() |
| 696 |
call dates5(person) nl() |
| 697 |
|
| 698 |
set(id, add(id, 1)) |
| 699 |
set(person, lookup(chart, d(id))) |
| 700 |
"590 410 19 bold 9 9 (" |
| 701 |
name(person) ") box" nl() |
| 702 |
"590 410" nl() |
| 703 |
call dates6(person) nl() |
| 704 |
|
| 705 |
set(id, add(id, 1)) |
| 706 |
set(person, lookup(chart, d(id))) |
| 707 |
"590 376 20 bold 9 9 (" |
| 708 |
name(person) ") box" nl() |
| 709 |
"590 376" nl() |
| 710 |
call dates5(person) nl() |
| 711 |
|
| 712 |
set(id, add(id, 1)) |
| 713 |
set(person, lookup(chart, d(id))) |
| 714 |
"590 342 21 bold 9 9 (" |
| 715 |
name(person) ") box" nl() |
| 716 |
"590 342" nl() |
| 717 |
call dates6(person) nl() |
| 718 |
|
| 719 |
set(id, add(id, 1)) |
| 720 |
set(person, lookup(chart, d(id))) |
| 721 |
"590 308 22 bold 9 9 (" |
| 722 |
name(person) ") box" nl() |
| 723 |
"590 308" nl() |
| 724 |
call dates5(person) nl() |
| 725 |
|
| 726 |
set(id, add(id, 1)) |
| 727 |
set(person, lookup(chart, d(id))) |
| 728 |
"590 274 23 bold 9 9 (" |
| 729 |
name(person) ") box" nl() |
| 730 |
"590 274" nl() |
| 731 |
call dates6(person) nl() |
| 732 |
|
| 733 |
set(id, add(id, 1)) |
| 734 |
set(person, lookup(chart, d(id))) |
| 735 |
"590 240 24 bold 9 9 (" |
| 736 |
name(person) ") box" nl() |
| 737 |
"590 240" nl() |
| 738 |
call dates5(person) nl() |
| 739 |
|
| 740 |
set(id, add(id, 1)) |
| 741 |
set(person, lookup(chart, d(id))) |
| 742 |
"590 206 25 bold 9 9 (" |
| 743 |
name(person) ") box" nl() |
| 744 |
"590 206" nl() |
| 745 |
call dates6(person) nl() |
| 746 |
|
| 747 |
set(id, add(id, 1)) |
| 748 |
set(person, lookup(chart, d(id))) |
| 749 |
"590 172 26 bold 9 9 (" |
| 750 |
name(person) ") box" nl() |
| 751 |
"590 172" nl() |
| 752 |
call dates5(person) nl() |
| 753 |
|
| 754 |
set(id, add(id, 1)) |
| 755 |
set(person, lookup(chart, d(id))) |
| 756 |
"590 138 27 bold 9 9 (" |
| 757 |
name(person) ") box" nl() |
| 758 |
"590 138" nl() |
| 759 |
call dates6(person) nl() |
| 760 |
|
| 761 |
set(id, add(id, 1)) |
| 762 |
set(person, lookup(chart, d(id))) |
| 763 |
"590 104 28 bold 9 9 (" |
| 764 |
name(person) ") box" nl() |
| 765 |
"590 104" nl() |
| 766 |
call dates5(person) nl() |
| 767 |
|
| 768 |
set(id, add(id, 1)) |
| 769 |
set(person, lookup(chart, d(id))) |
| 770 |
"590 70 29 bold 9 9 (" |
| 771 |
name(person) ") box" nl() |
| 772 |
"590 70" nl() |
| 773 |
call dates6(person) nl() |
| 774 |
|
| 775 |
set(id, add(id, 1)) |
| 776 |
set(person, lookup(chart, d(id))) |
| 777 |
"590 36 30 bold 9 9 (" |
| 778 |
name(person) ") box" nl() |
| 779 |
"590 36" nl() |
| 780 |
call dates5(person) nl() |
| 781 |
|
| 782 |
set(id, add(id, 1)) |
| 783 |
set(person, lookup(chart, d(id))) |
| 784 |
"590 2 31 bold 9 9 (" |
| 785 |
name(person) ") box" nl() |
| 786 |
"590 2" nl() |
| 787 |
call dates6(person) nl() |
| 788 |
|
| 789 |
"590 512 17 1 tie 590 444 17 1 tie" nl() |
| 790 |
"590 376 17 1 tie 590 308 17 1 tie" nl() |
| 791 |
"590 240 17 1 tie 590 172 17 1 tie" nl() |
| 792 |
"590 104 17 1 tie 590 36 17 1 tie" nl() nl() |
| 793 |
|
| 794 |
"showpage" nl() nl() |
| 795 |
} |
| 796 |
|
| 797 |
/* Style #1 for dates information... |
| 798 |
*/ |
| 799 |
proc dates1(person) |
| 800 |
{ |
| 801 |
list(addrlist) |
| 802 |
|
| 803 |
"bold 10 9 (" stddate(birth(person)) ")" nl() |
| 804 |
"bold 10 9 (" place(birth(person)) ")" nl() |
| 805 |
|
| 806 |
set(curfam, 0) |
| 807 |
if (eq(id, 1)) { |
| 808 |
set(curfam, savfam) |
| 809 |
} |
| 810 |
else { |
| 811 |
/* if (eq(mod(d(id), 2), 0)) {*/ |
| 812 |
if (eq(mod(id, 2), 0)) { |
| 813 |
/* set(curfam, parents(getel(chart, div(id, 2))))*/ |
| 814 |
set(curfam, parents(lookup(chart, d(div(id, 2))))) |
| 815 |
} |
| 816 |
} |
| 817 |
"bold 10 9 (" stddate(marriage(curfam)) ")" nl() |
| 818 |
"bold 10 9 (" place(marriage(curfam)) ")" nl() |
| 819 |
|
| 820 |
set(addrnode, NULL) |
| 821 |
call residence(person) |
| 822 |
|
| 823 |
if (gt(strlen(place(addrnode)), 25)) { |
| 824 |
extractplaces(addrnode, addrlist, n) |
| 825 |
set(line1, NULL) |
| 826 |
set(line1, dequeue(addrlist)) |
| 827 |
set(line2, NULL) |
| 828 |
while (not(empty(addrlist))) { |
| 829 |
set(line2, concat(line2, dequeue(addrlist))) |
| 830 |
set(line2, concat(line2, " ")) |
| 831 |
} |
| 832 |
"bold 10 9 (" line1 ")" nl() |
| 833 |
"bold 10 9 (" line2 ")" nl() |
| 834 |
} |
| 835 |
else { |
| 836 |
"bold 10 9 (" place(addrnode) ")" nl() |
| 837 |
"bold 10 9 (" ")" nl() |
| 838 |
} |
| 839 |
"bold 10 9 (" stddate(death(person)) ")" nl() |
| 840 |
"bold 10 9 (" place(death(person)) ")" nl() |
| 841 |
"dates1" nl() |
| 842 |
} |
| 843 |
|
| 844 |
/* Style #2 for dates information... |
| 845 |
*/ |
| 846 |
proc dates2(person) |
| 847 |
{ |
| 848 |
"bold 10 9 (" stddate(birth(person)) ")" nl() |
| 849 |
"bold 10 9 (" place(birth(person)) ")" nl() |
| 850 |
"bold 10 9 (" stddate(death(person)) ")" nl() |
| 851 |
"bold 10 9 (" place(death(person)) ")" nl() |
| 852 |
"dates2" nl() |
| 853 |
} |
| 854 |
|
| 855 |
/* Style #3 for dates information... |
| 856 |
*/ |
| 857 |
proc dates3(person) |
| 858 |
{ |
| 859 |
list(addrlist) |
| 860 |
|
| 861 |
"bold 10 7.6 (" short(birth(person)) ")" nl() |
| 862 |
|
| 863 |
set(curfam, 0) |
| 864 |
/* if (eq(mod(d(id), 2), 0)) {*/ |
| 865 |
if (eq(mod(id, 2), 0)) { |
| 866 |
/* set(curfam, parents(getel(chart, div(id, 2))))*/ |
| 867 |
set(curfam, parents(lookup(chart, d(div(id, 2))))) |
| 868 |
} |
| 869 |
"bold 10 7.6 (" short(marriage(curfam)) ")" nl() |
| 870 |
"bold 10 7.6 " |
| 871 |
|
| 872 |
set(addrnode, NULL) |
| 873 |
call residence(person) |
| 874 |
|
| 875 |
if (gt(strlen(place(addrnode)), 25)) { |
| 876 |
extractplaces(addrnode, addrlist, n) |
| 877 |
set(line1, NULL) |
| 878 |
set(line1, dequeue(addrlist)) |
| 879 |
set(line2, NULL) |
| 880 |
while (not(empty(addrlist))) { |
| 881 |
set(line2, concat(line2, dequeue(addrlist))) |
| 882 |
set(line2, concat(line2, " ")) |
| 883 |
} |
| 884 |
" (" line2 ")" nl() |
| 885 |
} |
| 886 |
else { |
| 887 |
" (" place(addrnode) ")" nl() |
| 888 |
} |
| 889 |
|
| 890 |
"bold 10 7.6 (" short(death(person)) ")" nl() |
| 891 |
"dates3" nl() |
| 892 |
} |
| 893 |
|
| 894 |
/* Style #4 for dates information... |
| 895 |
*/ |
| 896 |
proc dates4(person) |
| 897 |
{ |
| 898 |
"bold 10 7.6 (" short(birth(person)) ")" nl() |
| 899 |
"bold 10 7.6 (" short(death(person)) ")" nl() |
| 900 |
"dates4" nl() |
| 901 |
} |
| 902 |
|
| 903 |
/* Style #5 for dates information... |
| 904 |
*/ |
| 905 |
proc dates5(person) |
| 906 |
{ |
| 907 |
list(addrlist) |
| 908 |
|
| 909 |
"bold 10 5 (" short(birth(person)) ")" nl() |
| 910 |
set(curfam, 0) |
| 911 |
/* if (eq(mod(d(id), 2), 0)) {*/ |
| 912 |
if (eq(mod(id, 2), 0)) { |
| 913 |
/* set(curfam, parents(getel(chart, div(id, 2))))*/ |
| 914 |
set(curfam, parents(lookup(chart, d(div(id, 2))))) |
| 915 |
} |
| 916 |
"bold 10 5 (" short(marriage(curfam)) ")" nl() |
| 917 |
|
| 918 |
set(addrnode, NULL) |
| 919 |
call residence(person) |
| 920 |
|
| 921 |
if (gt(strlen(place(addrnode)), 25)) { |
| 922 |
extractplaces(addrnode, addrlist, n) |
| 923 |
set(line1, NULL) |
| 924 |
set(line1, dequeue(addrlist)) |
| 925 |
set(line2, NULL) |
| 926 |
while (not(empty(addrlist))) { |
| 927 |
set(line2, concat(line2, dequeue(addrlist))) |
| 928 |
set(line2, concat(line2, " ")) |
| 929 |
} |
| 930 |
"bold 10 5 (" line2 ")" nl() |
| 931 |
} |
| 932 |
else { |
| 933 |
"bold 10 5 (" place(addrnode) ")" nl() |
| 934 |
} |
| 935 |
"bold 10 5 (" short(death(person)) ")" nl() |
| 936 |
"dates5" nl() |
| 937 |
} |
| 938 |
|
| 939 |
/* Style #6 for dates information... |
| 940 |
*/ |
| 941 |
proc dates6(person) |
| 942 |
{ |
| 943 |
"bold 10 5 (" short(birth(person)) ")" nl() |
| 944 |
"bold 10 5 (" short(death(person)) ")" nl() |
| 945 |
"dates6" nl() |
| 946 |
} |