version	U12.1.00
uid	cells.u1-1786033002-0
record	Cell,3
	0,n
	1,m
	2,color
record	Panel,7
	0,window
	1,n
	2,m
	3,size
	4,fg
	5,bg
	6,pg
impl	error
link	wopen.u
global	9
	0,000011,Cell,3
	1,000011,Panel,7
	2,000005,makepanel,6
	3,000005,clearpanel,1
	4,000005,matrixpanel,5
	5,000005,colorcell,4
	6,000005,colorcells,2
	7,000005,tiercells,2
	8,000005,cell,3

proc makepanel
	local	0,001000,n
	local	1,001000,m
	local	2,001000,cellsize
	local	3,001000,fg
	local	4,001000,bg
	local	5,001000,pg
	local	6,000020,window
	local	7,000020,x
	local	8,000020,y
	local	9,000020,width
	local	10,000020,height
	local	11,000020,panel
	local	12,000000,WOpen
	local	13,000000,Panel
	local	14,000000,clearpanel
	con	0,010000,5,142,154,141,143,153
	con	1,010000,5,167,150,151,164,145
	con	2,002000,2,10
	con	3,002000,1,1
	con	4,010000,6,167,151,144,164,150,075
	con	5,010000,7,150,145,151,147,150,164,075
	con	6,010000,3,146,147,075
	con	7,010000,3,142,147,075
	con	8,010000,13,143,141,156,166,141,163,075,150,151,144,144,145,156
	declend
	filen	cells.icn
	line	65
	colm	11
	synt	any
	mark	L1
	pnull
	pnull
	var	3
	line	68
	colm	4
	synt	any
	null
	str	0
	line	68
	colm	8
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	pnull
	var	4
	line	69
	colm	4
	synt	any
	null
	str	1
	line	69
	colm	8
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	pnull
	pnull
	var	2
	line	71
	colm	4
	synt	any
	null
	int	2
	line	71
	colm	14
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	9
	pnull
	pnull
	var	0
	var	2
	line	73
	colm	16
	synt	any
	mult
	int	3
	line	73
	colm	27
	synt	any
	plus
	line	73
	colm	10
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	var	10
	pnull
	pnull
	var	1
	var	2
	line	74
	colm	17
	synt	any
	mult
	int	3
	line	74
	colm	28
	synt	any
	plus
	line	74
	colm	11
	synt	any
	asgn
	unmark
lab L5
	mark	L6
	pnull
	var	6
	mark	L7
	var	12
	pnull
	str	4
	var	9
	line	76
	colm	29
	synt	any
	cat
	pnull
	str	5
	var	10
	line	76
	colm	49
	synt	any
	cat
	pnull
	str	6
	var	3
	line	77
	colm	13
	synt	any
	cat
	pnull
	str	7
	var	4
	line	77
	colm	26
	synt	any
	cat
	str	8
	line	76
	colm	19
	synt	any
	invoke	5
	line	77
	colm	50
	synt	any
	esusp
	goto	L8
lab L7
	line	77
	colm	52
	synt	any
	pfail
lab L8
	line	76
	colm	11
	synt	any
	asgn
	unmark
lab L6
	mark	L9
	pnull
	var	11
	var	13
	var	6
	var	0
	var	1
	var	2
	var	3
	var	4
	var	5
	line	79
	colm	18
	synt	any
	invoke	7
	line	79
	colm	10
	synt	any
	asgn
	unmark
lab L9
	mark	L10
	var	14
	var	11
	line	81
	colm	14
	synt	any
	invoke	1
	unmark
lab L10
	mark	L11
	mark	L12
	var	11
	line	83
	colm	4
	synt	any
	pret
lab L12
	synt	any
	pfail
	unmark
lab L11
	pnull
	line	85
	colm	1
	synt	any
	pfail
	end
proc clearpanel
	local	0,001000,panel
	local	1,000020,width
	local	2,000020,height
	local	3,000020,x
	local	4,000020,y
	local	5,000000,WAttrib
	local	6,000000,Pattern
	local	7,000000,Bg
	local	8,000000,Fg
	local	9,000000,DrawLine
	con	0,010000,18,146,151,154,154,163,164,171,154,145,075,164,145,170,164,165,162,145,144
	con	1,010000,8,143,150,145,143,153,145,162,163
	con	2,010000,14,166,145,162,171,040,144,141,162,153,040,147,162,141,171
	con	3,010000,5,167,151,144,164,150
	con	4,010000,6,150,145,151,147,150,164
	con	5,002000,1,0
	con	6,010000,15,146,151,154,154,163,164,171,154,145,075,163,157,154,151,144
	declend
	line	87
	colm	11
	synt	any
	mark	L1
	line	90
	colm	4
	synt	ifelse
	mark	L2
	pnull
	pnull
	var	0
	line	90
	colm	13
	synt	any
	field	pg
	line	90
	colm	7
	synt	any
	nonnull
	unmark
	mark	L4
	var	5
	pnull
	var	0
	line	91
	colm	20
	synt	any
	field	window
	str	0
	line	91
	colm	14
	synt	any
	invoke	2
	unmark
lab L4
	mark	L5
	var	6
	pnull
	var	0
	line	92
	colm	20
	synt	any
	field	window
	str	1
	line	92
	colm	14
	synt	any
	invoke	2
	unmark
lab L5
	var	7
	pnull
	var	0
	line	93
	colm	15
	synt	any
	field	window
	str	2
	line	93
	colm	9
	synt	any
	invoke	2
	goto	L3
lab L2
	var	8
	pnull
	var	0
	line	95
	colm	17
	synt	any
	field	window
	pnull
	var	0
	line	95
	colm	31
	synt	any
	field	fg
	line	95
	colm	11
	synt	any
	invoke	2
lab L3
	line	90
	colm	4
	synt	endifelse
	unmark
lab L1
	mark	L6
	pnull
	var	1
	var	5
	pnull
	var	0
	line	97
	colm	26
	synt	any
	field	window
	str	3
	line	97
	colm	20
	synt	any
	invoke	2
	line	97
	colm	10
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	2
	var	5
	pnull
	var	0
	line	98
	colm	27
	synt	any
	field	window
	str	4
	line	98
	colm	21
	synt	any
	invoke	2
	line	98
	colm	11
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	line	100
	colm	4
	synt	every
	mark0
	pnull
	var	3
	pnull
	int	5
	var	1
	pnull
	var	0
	line	100
	colm	34
	synt	any
	field	size
	line	100
	colm	17
	synt	any
	toby
	line	100
	colm	12
	synt	any
	asgn
	pop
	mark0
	var	9
	pnull
	var	0
	line	101
	colm	21
	synt	any
	field	window
	var	3
	int	5
	var	3
	var	2
	line	101
	colm	15
	synt	any
	invoke	5
	unmark
lab L9
	efail
lab L10
	line	100
	colm	4
	synt	endevery
	unmark
lab L8
	mark	L11
	line	103
	colm	4
	synt	every
	mark0
	pnull
	var	4
	pnull
	int	5
	var	2
	pnull
	var	0
	line	103
	colm	35
	synt	any
	field	size
	line	103
	colm	17
	synt	any
	toby
	line	103
	colm	12
	synt	any
	asgn
	pop
	mark0
	var	9
	pnull
	var	0
	line	104
	colm	21
	synt	any
	field	window
	int	5
	var	4
	var	1
	var	4
	line	104
	colm	15
	synt	any
	invoke	5
	unmark
lab L12
	efail
lab L13
	line	103
	colm	4
	synt	endevery
	unmark
lab L11
	mark	L14
	var	5
	pnull
	var	0
	line	106
	colm	17
	synt	any
	field	window
	str	6
	line	106
	colm	11
	synt	any
	invoke	2
	unmark
lab L14
	mark	L15
	mark	L16
	var	0
	line	108
	colm	4
	synt	any
	pret
lab L16
	synt	any
	pfail
	unmark
lab L15
	pnull
	line	110
	colm	1
	synt	any
	pfail
	end
proc matrixpanel
	local	0,001000,matrix
	local	1,001000,cellsize
	local	2,001000,fg
	local	3,001000,bg
	local	4,001000,pg
	local	5,000000,makepanel
	con	0,002000,1,1
	declend
	line	112
	colm	11
	synt	any
	mark	L1
	mark	L2
	var	5
	pnull
	pnull
	var	0
	int	0
	line	114
	colm	28
	synt	any
	subsc
	line	114
	colm	21
	synt	any
	size
	pnull
	var	0
	line	114
	colm	33
	synt	any
	size
	var	1
	var	2
	var	3
	line	114
	colm	20
	synt	any
	invoke	5
	line	114
	colm	4
	synt	any
	pret
lab L2
	synt	any
	pfail
	unmark
lab L1
	pnull
	line	116
	colm	1
	synt	any
	pfail
	end
proc colorcell
	local	0,001000,panel
	local	1,001000,n
	local	2,001000,m
	local	3,001000,color
	local	4,000020,cellsize
	local	5,000000,integer
	local	6,000000,stop
	local	7,000000,image
	local	8,000000,Fg
	local	9,000000,FillRectangle
	con	0,010000,36,116,157,156,055,151,156,164,145,147,145,162,040,166,141,154,165,145,040,164,157,040,143,157,154,157,162,143,145,154,154,050,051,056,040,156,075
	con	1,010000,3,040,155,075
	con	2,002000,1,1
	declend
	line	118
	colm	11
	synt	any
	mark	L1
	line	121
	colm	4
	synt	if
	mark0
	mark	L2
	var	5
	var	1
	line	121
	colm	18
	synt	any
	invoke	1
	pop
	var	5
	var	2
	line	121
	colm	31
	synt	any
	invoke	1
	unmark
	efail
lab L2
	pnull
	unmark
	var	6
	str	0
	var	7
	var	1
	line	122
	colm	57
	synt	any
	invoke	1
	str	1
	var	7
	var	2
	line	122
	colm	74
	synt	any
	invoke	1
	line	122
	colm	11
	synt	any
	invoke	4
	line	121
	colm	4
	synt	endif
	unmark
lab L1
	mark	L3
	pnull
	var	4
	pnull
	var	0
	line	124
	colm	21
	synt	any
	field	size
	line	124
	colm	13
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	var	8
	pnull
	var	0
	line	126
	colm	12
	synt	any
	field	window
	var	3
	line	126
	colm	6
	synt	any
	invoke	2
	unmark
lab L4
	mark	L5
	var	9
	pnull
	var	0
	line	128
	colm	23
	synt	any
	field	window
	pnull
	pnull
	pnull
	var	1
	int	2
	line	128
	colm	35
	synt	any
	minus
	var	4
	line	128
	colm	40
	synt	any
	mult
	int	2
	line	128
	colm	51
	synt	any
	plus
	pnull
	pnull
	pnull
	var	2
	int	2
	line	128
	colm	59
	synt	any
	minus
	var	4
	line	128
	colm	64
	synt	any
	mult
	int	2
	line	128
	colm	75
	synt	any
	plus
	pnull
	var	4
	int	2
	line	129
	colm	17
	synt	any
	minus
	pnull
	var	4
	int	2
	line	129
	colm	31
	synt	any
	minus
	line	128
	colm	17
	synt	any
	invoke	5
	unmark
lab L5
	mark	L6
	mark	L7
	var	0
	line	131
	colm	4
	synt	any
	pret
lab L7
	synt	any
	pfail
	unmark
lab L6
	pnull
	line	133
	colm	1
	synt	any
	pfail
	end
proc colorcells
	local	0,001000,panel
	local	1,001000,matrix
	local	2,000020,i
	local	3,000020,j
	local	4,000020,n
	local	5,000020,m
	local	6,000020,cellsize
	local	7,000000,Fg
	local	8,000000,stop
	local	9,000000,FillRectangle
	con	0,002000,1,1
	con	1,010000,1,061
	con	2,010000,5,167,150,151,164,145
	con	3,010000,1,060
	con	4,010000,5,142,154,141,143,153
	con	5,010000,40,106,147,050,051,040,146,141,151,154,145,144,040,151,156,040,143,157,154,157,162,143,145,154,154,163,050,051,040,167,151,164,150,040,155,141,164,162,151,170,133
	con	6,010000,1,054
	con	7,010000,2,135,075
	con	8,010000,1,056
	declend
	line	135
	colm	11
	synt	any
	mark	L1
	pnull
	var	6
	pnull
	var	0
	line	138
	colm	21
	synt	any
	field	size
	line	138
	colm	13
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	5
	pnull
	var	1
	line	140
	colm	9
	synt	any
	size
	line	140
	colm	6
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	pnull
	var	4
	pnull
	pnull
	var	1
	int	0
	line	141
	colm	16
	synt	any
	subsc
	line	141
	colm	9
	synt	any
	size
	line	141
	colm	6
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	line	143
	colm	4
	synt	every
	mark0
	pnull
	var	2
	pnull
	int	0
	var	5
	push1
	line	143
	colm	17
	synt	any
	toby
	line	143
	colm	12
	synt	any
	asgn
	pop
	mark0
	line	144
	colm	7
	synt	every
	mark0
	pnull
	var	3
	pnull
	int	0
	var	4
	push1
	line	144
	colm	20
	synt	any
	toby
	line	144
	colm	15
	synt	any
	asgn
	pop
	mark0
	mark	L9
	line	146
	colm	10
	synt	ifelse
	mark	L10
	pnull
	pnull
	pnull
	var	1
	var	2
	line	146
	colm	19
	synt	any
	subsc
	var	3
	synt	any
	subsc
	str	1
	line	146
	colm	26
	synt	any
	eqv
	unmark
	pnull
	pnull
	pnull
	var	1
	var	2
	line	146
	colm	45
	synt	any
	subsc
	var	3
	synt	any
	subsc
	str	2
	line	146
	colm	52
	synt	any
	asgn
	goto	L11
lab L10
	line	147
	colm	15
	synt	if
	mark0
	pnull
	pnull
	pnull
	var	1
	var	2
	line	147
	colm	24
	synt	any
	subsc
	var	3
	synt	any
	subsc
	str	3
	line	147
	colm	31
	synt	any
	eqv
	unmark
	pnull
	pnull
	pnull
	var	1
	var	2
	line	147
	colm	50
	synt	any
	subsc
	var	3
	synt	any
	subsc
	str	4
	line	147
	colm	57
	synt	any
	asgn
	line	147
	colm	15
	synt	endif
lab L11
	line	146
	colm	10
	synt	endifelse
	unmark
lab L9
	mark	L12
	var	7
	pnull
	var	0
	line	148
	colm	18
	synt	any
	field	window
	pnull
	pnull
	var	1
	var	2
	line	148
	colm	33
	synt	any
	subsc
	var	3
	synt	any
	subsc
	line	148
	colm	12
	synt	any
	invoke	2
	unmark
lab L12
	mark	L13
	var	8
	pnull
	pnull
	pnull
	pnull
	pnull
	pnull
	str	5
	var	2
	line	149
	colm	61
	synt	any
	cat
	str	6
	line	150
	colm	17
	synt	any
	cat
	var	3
	line	150
	colm	24
	synt	any
	cat
	str	7
	line	150
	colm	29
	synt	any
	cat
	pnull
	pnull
	var	1
	var	2
	line	150
	colm	46
	synt	any
	subsc
	var	3
	synt	any
	subsc
	line	150
	colm	37
	synt	any
	cat
	str	8
	line	150
	colm	53
	synt	any
	cat
	line	149
	colm	17
	synt	any
	invoke	1
	unmark
lab L13
	var	9
	pnull
	var	0
	line	151
	colm	29
	synt	any
	field	window
	pnull
	pnull
	pnull
	var	3
	int	0
	line	151
	colm	41
	synt	any
	minus
	var	6
	line	151
	colm	46
	synt	any
	mult
	int	0
	line	151
	colm	57
	synt	any
	plus
	pnull
	pnull
	pnull
	var	2
	int	0
	line	151
	colm	65
	synt	any
	minus
	var	6
	line	151
	colm	70
	synt	any
	mult
	int	0
	line	151
	colm	81
	synt	any
	plus
	pnull
	var	6
	int	0
	line	152
	colm	22
	synt	any
	minus
	pnull
	var	6
	int	0
	line	152
	colm	36
	synt	any
	minus
	line	151
	colm	23
	synt	any
	invoke	5
	unmark
lab L7
	efail
lab L8
	line	144
	colm	7
	synt	endevery
	unmark
lab L5
	efail
lab L6
	line	143
	colm	4
	synt	endevery
	unmark
lab L4
	mark	L14
	mark	L15
	var	0
	line	156
	colm	4
	synt	any
	pret
lab L15
	synt	any
	pfail
	unmark
lab L14
	pnull
	line	158
	colm	1
	synt	any
	pfail
	end
proc tiercells
	local	0,001000,panel
	local	1,001000,tier
	local	2,000020,i
	local	3,000020,j
	local	4,000020,n
	local	5,000020,m
	local	6,000020,cellsize
	local	7,000020,matrix
	local	8,000000,Fg
	local	9,000000,FillRectangle
	con	0,002000,1,1
	con	1,010000,1,061
	con	2,010000,5,167,150,151,164,145
	con	3,010000,5,142,154,141,143,153
	declend
	line	160
	colm	11
	synt	any
	mark	L1
	pnull
	var	6
	pnull
	var	0
	line	163
	colm	21
	synt	any
	field	size
	line	163
	colm	13
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	5
	pnull
	var	1
	line	165
	colm	13
	synt	any
	field	shafts
	line	165
	colm	6
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	pnull
	var	4
	pnull
	var	1
	line	166
	colm	13
	synt	any
	field	treadles
	line	166
	colm	6
	synt	any
	asgn
	unmark
lab L3
	mark	L4
	pnull
	var	7
	pnull
	var	1
	line	167
	colm	18
	synt	any
	field	matrix
	line	167
	colm	11
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	line	169
	colm	4
	synt	every
	mark0
	pnull
	var	2
	pnull
	int	0
	var	5
	push1
	line	169
	colm	17
	synt	any
	toby
	line	169
	colm	12
	synt	any
	asgn
	pop
	mark0
	line	170
	colm	7
	synt	every
	mark0
	pnull
	var	3
	pnull
	int	0
	var	4
	push1
	line	170
	colm	20
	synt	any
	toby
	line	170
	colm	15
	synt	any
	asgn
	pop
	mark0
	mark	L10
	line	171
	colm	10
	synt	ifelse
	mark	L11
	pnull
	pnull
	pnull
	var	7
	var	2
	line	171
	colm	19
	synt	any
	subsc
	var	3
	synt	any
	subsc
	str	1
	line	171
	colm	26
	synt	any
	eqv
	unmark
	var	8
	pnull
	var	0
	line	171
	colm	47
	synt	any
	field	window
	str	2
	line	171
	colm	41
	synt	any
	invoke	2
	goto	L12
lab L11
	var	8
	pnull
	var	0
	line	172
	colm	23
	synt	any
	field	window
	str	3
	line	172
	colm	17
	synt	any
	invoke	2
lab L12
	line	171
	colm	10
	synt	endifelse
	unmark
lab L10
	var	9
	pnull
	var	0
	line	173
	colm	29
	synt	any
	field	window
	pnull
	pnull
	pnull
	var	3
	int	0
	line	173
	colm	41
	synt	any
	minus
	var	6
	line	173
	colm	46
	synt	any
	mult
	int	0
	line	173
	colm	57
	synt	any
	plus
	pnull
	pnull
	pnull
	var	2
	int	0
	line	173
	colm	65
	synt	any
	minus
	var	6
	line	173
	colm	70
	synt	any
	mult
	int	0
	line	173
	colm	81
	synt	any
	plus
	pnull
	var	6
	int	0
	line	174
	colm	22
	synt	any
	minus
	pnull
	var	6
	int	0
	line	174
	colm	36
	synt	any
	minus
	line	173
	colm	23
	synt	any
	invoke	5
	unmark
lab L8
	efail
lab L9
	line	170
	colm	7
	synt	endevery
	unmark
lab L6
	efail
lab L7
	line	169
	colm	4
	synt	endevery
	unmark
lab L5
	mark	L13
	mark	L14
	var	0
	line	178
	colm	4
	synt	any
	pret
lab L14
	synt	any
	pfail
	unmark
lab L13
	pnull
	line	180
	colm	1
	synt	any
	pfail
	end
proc cell
	local	0,001000,panel
	local	1,001000,x
	local	2,001000,y
	local	3,000020,n
	local	4,000020,m
	local	5,000000,Cell
	local	6,000000,Pixel
	con	0,002000,1,1
	declend
	line	182
	colm	11
	synt	any
	mark	L1
	pnull
	var	3
	pnull
	pnull
	var	1
	pnull
	var	0
	line	185
	colm	18
	synt	any
	field	size
	line	185
	colm	11
	synt	any
	div
	int	0
	line	185
	colm	24
	synt	any
	plus
	line	185
	colm	6
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	pnull
	var	4
	pnull
	pnull
	var	2
	pnull
	var	0
	line	186
	colm	18
	synt	any
	field	size
	line	186
	colm	11
	synt	any
	div
	int	0
	line	186
	colm	24
	synt	any
	plus
	line	186
	colm	6
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	188
	colm	4
	synt	if
	mark0
	mark	L4
	pnull
	var	3
	pnull
	var	0
	line	188
	colm	17
	synt	any
	field	n
	line	188
	colm	10
	synt	any
	numgt
	line	188
	colm	21
	synt	any
	esusp
	goto	L5
lab L4
	pnull
	var	4
	pnull
	var	0
	line	188
	colm	33
	synt	any
	field	m
	line	188
	colm	26
	synt	any
	numgt
lab L5
	unmark
	line	188
	colm	42
	synt	any
	pfail
	line	188
	colm	4
	synt	endif
	unmark
lab L3
	mark	L6
	mark	L7
	var	5
	var	3
	var	4
	var	6
	pnull
	var	0
	line	190
	colm	33
	synt	any
	field	window
	var	1
	var	2
	line	190
	colm	27
	synt	any
	invoke	3
	line	190
	colm	15
	synt	any
	invoke	3
	line	190
	colm	4
	synt	any
	pret
lab L7
	synt	any
	pfail
	unmark
lab L6
	pnull
	line	192
	colm	1
	synt	any
	pfail
	end
