File: 8gen1.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 (74 lines) | stat: -rw-r--r-- 1,643 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
/*
 * @progname       8gen1.ll
 * @version        1.0
 * @author         Wetmore, Manis
 * @category       
 * @output         Text, 132 cols
 * @description    
 *
 *   Produce an 8 generation descendant report for the person selected.
 *   Output is an ASCII file, and will probably need to be printed
 *   using 132 column format.
 *
 *   8gen1
 *
 *   Code by Tom Wetmore, ttw@cbnewsl.att.com
 *   With modifications by:  Cliff Manis
 *
 *   This report works only with the LifeLines Genealogy program
 *
 *   version one of this report was written by Tom Wetmore, in 1990,
 *
 *   Produce an 8 generation descendant report for the person selected.
 *
 *   Output is an ASCII file, and will probably need to be printed
 *   using 132 column format.
 *
 *   An example of the output, is not included because it would add
 *   20k to this report.
 */

proc main ()
{
	getindi(indi)
	set (nl, nl())
	pagemode(260,132)
	call pedout(indi,1,8,1,256)
	pageout()
	print(nl())
}

proc pedout (indi, gen, max, top, bot)
{
	if (le(gen,max)) {
		set(gen,add(1,gen))
		set(fath,father(indi))
		set(moth,mother(indi))
		set(height,add(1,sub(bot,top)))
		set(offset,div(sub(height,1),2))
		call block(indi,add(top,offset),mul(10,sub(gen,2)))
		set(half,div(height,2))
		call pedout(fath,gen,max,top,sub(add(top,half),1))
		call pedout(moth,gen,max,add(top,half),bot)
	}
}

proc block (indi, row, col)
{
	print(".")
	set(row,add(3,row))
	set(col,add(3,col))
	set(e,birth(indi))
	pos(row,col)
	if (indi) { name(indi) 
	", "
	if (and(e,date(e))) { date(e) }
	", "
	if (and(e,place(e))) { place(e) }
	}

	else      { "   |--------" }
}

/* End of Report */