proc DrawClipped
	filen	clipping.icn
	local	0,001000,a
	local	1,000020,win
	local	2,000000,type
	local	3,000000,pop
	local	4,000000,DrawSegment
	local	5,000000,push
	local	6,000000,ClipLine
	con	0,002000,1,1
	con	1,010000,6,167,151,156,144,157,167
	declend
	line	37
	colm	11
	mark	L1
	mark	L2
	pnull
	var	2
	pnull
	var	0
	int	0
	line	40
	colm	13
	subsc
	line	40
	colm	11
	invoke	1
	str	1
	line	40
	colm	18
	lexeq
	unmark
	pnull
	var	1
	var	3
	var	0
	line	41
	colm	17
	invoke	1
	line	41
	colm	11
	asgn
	goto	L3
lab L2
	pnull
	var	1
	line	43
	colm	14
	keywd	window
	line	43
	colm	11
	asgn
lab L3
	unmark
lab L1
	mark	L4
	var	4
	var	5
	var	6
	var	1
	var	0
	line	45
	colm	31
	invoke	2
	var	1
	line	45
	colm	22
	invoke	2
	invoke	-1
	unmark
lab L4
	mark	L5
	mark	L6
	var	1
	line	46
	colm	4
	pret
lab L6
	pfail
	unmark
lab L5
	pnull
	line	47
	colm	1
	pfail
	end
proc ClipLine
	local	0,001000,win
	local	1,001000,L
	local	2,001000,x
	local	3,001000,y
	local	4,001000,w
	local	5,001000,h
	local	6,000020,i
	local	7,000020,ret
	local	8,000020,tin
	local	9,000020,tout
	local	10,000020,delx
	local	11,000020,dely
	local	12,000020,x0
	local	13,000020,x1
	local	14,000020,xmax
	local	15,000020,y0
	local	16,000020,y1
	local	17,000020,ymax
	local	18,000000,type
	local	19,000000,ClipLine
	local	20,000000,WAttrib
	local	21,000000,real
	local	22,000000,put
	con	0,010000,4,154,151,163,164
	con	1,010000,5,143,154,151,160,170
	con	2,010000,2,144,170
	con	3,010000,5,143,154,151,160,171
	con	4,010000,2,144,171
	con	5,010000,5,143,154,151,160,167
	con	6,010000,5,143,154,151,160,150
	con	7,002000,1,0
	con	8,002000,1,1
	con	9,002000,1,2
	con	10,002000,1,3
	con	11,004000,0.0
	con	12,004000,1.0
	declend
	line	55
	colm	11
	mark	L1
	mark0
	pnull
	var	18
	var	0
	line	58
	colm	12
	invoke	1
	str	0
	line	58
	colm	18
	lexeq
	unmark
	mark	L2
	var	19
	line	59
	colm	23
	keywd	window
	var	0
	var	1
	var	2
	var	3
	var	4
	line	59
	colm	22
	invoke	6
	line	59
	colm	7
	pret
lab L2
	pfail
	unmark
lab L1
	mark	L3
	pnull
	pnull
	var	2
	line	61
	colm	4
	null
	pnull
	var	20
	var	0
	str	1
	line	61
	colm	17
	invoke	2
	var	20
	var	0
	str	2
	line	61
	colm	41
	invoke	2
	line	61
	colm	32
	minus
	line	61
	colm	7
	asgn
	unmark
lab L3
	mark	L4
	pnull
	pnull
	var	3
	line	62
	colm	4
	null
	pnull
	var	20
	var	0
	str	3
	line	62
	colm	17
	invoke	2
	var	20
	var	0
	str	4
	line	62
	colm	41
	invoke	2
	line	62
	colm	32
	minus
	line	62
	colm	7
	asgn
	unmark
lab L4
	mark	L5
	pnull
	pnull
	var	4
	line	63
	colm	4
	null
	var	20
	var	0
	str	5
	line	63
	colm	17
	invoke	2
	line	63
	colm	7
	asgn
	unmark
lab L5
	mark	L6
	pnull
	pnull
	var	5
	line	64
	colm	4
	null
	var	20
	var	0
	str	6
	line	64
	colm	17
	invoke	2
	line	64
	colm	7
	asgn
	unmark
lab L6
	mark	L7
	mark0
	pnull
	var	4
	int	7
	line	65
	colm	9
	numlt
	unmark
	pnull
	var	2
	dup
	pnull
	var	4
	pnull
	var	4
	line	66
	colm	19
	neg
	line	66
	colm	16
	asgn
	line	66
	colm	9
	minus
	asgn
	unmark
lab L7
	mark	L8
	mark0
	pnull
	var	5
	int	7
	line	67
	colm	9
	numlt
	unmark
	pnull
	var	3
	dup
	pnull
	var	5
	pnull
	var	5
	line	68
	colm	19
	neg
	line	68
	colm	16
	asgn
	line	68
	colm	9
	minus
	asgn
	unmark
lab L8
	mark	L9
	pnull
	var	14
	pnull
	var	2
	var	4
	line	69
	colm	14
	plus
	line	69
	colm	9
	asgn
	unmark
lab L9
	mark	L10
	pnull
	var	17
	pnull
	var	3
	var	5
	line	70
	colm	14
	plus
	line	70
	colm	9
	asgn
	unmark
lab L10
	mark	L11
	pnull
	var	7
	pnull
	line	72
	colm	11
	llist	0
	line	72
	colm	8
	asgn
	unmark
lab L11
	mark	L12
	pnull
	var	13
	pnull
	var	1
	int	8
	line	73
	colm	11
	subsc
	line	73
	colm	7
	asgn
	unmark
lab L12
	mark	L13
	pnull
	var	16
	pnull
	var	1
	int	9
	line	74
	colm	11
	subsc
	line	74
	colm	7
	asgn
	unmark
lab L13
	mark	L14
	mark0
	pnull
	var	6
	pnull
	int	10
	pnull
	var	1
	line	76
	colm	20
	size
	int	9
	line	76
	colm	17
	toby
	line	76
	colm	12
	asgn
	pop
	mark0
	mark	L17
	pnull
	var	12
	var	13
	line	77
	colm	10
	asgn
	unmark
lab L17
	mark	L18
	pnull
	var	15
	var	16
	line	78
	colm	10
	asgn
	unmark
lab L18
	mark	L19
	pnull
	var	13
	pnull
	var	1
	var	6
	line	79
	colm	14
	subsc
	line	79
	colm	10
	asgn
	unmark
lab L19
	mark	L20
	pnull
	var	16
	pnull
	var	1
	pnull
	var	6
	int	8
	line	80
	colm	17
	plus
	line	80
	colm	14
	subsc
	line	80
	colm	10
	asgn
	unmark
lab L20
	mark	L21
	pnull
	var	8
	real	11
	line	81
	colm	11
	asgn
	unmark
lab L21
	mark	L22
	pnull
	var	9
	real	12
	line	82
	colm	12
	asgn
	unmark
lab L22
	mark	L23
	pnull
	var	10
	var	21
	pnull
	var	13
	var	12
	line	84
	colm	23
	minus
	line	84
	colm	19
	invoke	1
	line	84
	colm	12
	asgn
	unmark
lab L23
	mark	L24
	mark	L25
	pnull
	var	10
	real	11
	line	85
	colm	15
	numlt
	unmark
	mark	L27
	pnull
	var	8
	dup
	pnull
	pnull
	var	14
	var	12
	line	86
	colm	24
	minus
	var	10
	line	86
	colm	30
	div
	line	86
	colm	14
	numlt
	asgn
	unmark
lab L27
	pnull
	var	9
	dup
	pnull
	pnull
	var	2
	var	12
	line	87
	colm	22
	minus
	var	10
	line	87
	colm	28
	div
	line	87
	colm	15
	numgt
	asgn
	goto	L26
lab L25
	mark	L28
	pnull
	var	10
	real	11
	line	89
	colm	20
	numgt
	unmark
	mark	L30
	pnull
	var	8
	dup
	pnull
	pnull
	var	2
	var	12
	line	90
	colm	21
	minus
	var	10
	line	90
	colm	27
	div
	line	90
	colm	14
	numlt
	asgn
	unmark
lab L30
	pnull
	var	9
	dup
	pnull
	pnull
	var	14
	var	12
	line	91
	colm	25
	minus
	var	10
	line	91
	colm	31
	div
	line	91
	colm	15
	numgt
	asgn
	goto	L29
lab L28
	mark	L31
	pnull
	pnull
	var	2
	var	12
	line	94
	colm	12
	numle
	var	14
	line	94
	colm	18
	numle
	esusp
	goto	L32
lab L31
	unmark
	unmark
	goto	L15
lab L32
lab L29
lab L26
	unmark
lab L24
	mark	L33
	mark0
	pnull
	var	9
	var	8
	line	95
	colm	15
	numlt
	unmark
	unmark
	unmark
	goto	L15
	unmark
lab L33
	mark	L34
	pnull
	var	11
	var	21
	pnull
	var	16
	var	15
	line	97
	colm	23
	minus
	line	97
	colm	19
	invoke	1
	line	97
	colm	12
	asgn
	unmark
lab L34
	mark	L35
	mark	L36
	pnull
	var	11
	real	11
	line	98
	colm	15
	numlt
	unmark
	mark	L38
	pnull
	var	8
	dup
	pnull
	pnull
	var	17
	var	15
	line	99
	colm	24
	minus
	var	11
	line	99
	colm	30
	div
	line	99
	colm	14
	numlt
	asgn
	unmark
lab L38
	pnull
	var	9
	dup
	pnull
	pnull
	var	3
	var	15
	line	100
	colm	22
	minus
	var	11
	line	100
	colm	28
	div
	line	100
	colm	15
	numgt
	asgn
	goto	L37
lab L36
	mark	L39
	pnull
	var	11
	real	11
	line	102
	colm	20
	numgt
	unmark
	mark	L41
	pnull
	var	8
	dup
	pnull
	pnull
	var	3
	var	15
	line	103
	colm	21
	minus
	var	11
	line	103
	colm	27
	div
	line	103
	colm	14
	numlt
	asgn
	unmark
lab L41
	pnull
	var	9
	dup
	pnull
	pnull
	var	17
	var	15
	line	104
	colm	25
	minus
	var	11
	line	104
	colm	31
	div
	line	104
	colm	15
	numgt
	asgn
	goto	L40
lab L39
	mark	L42
	pnull
	pnull
	var	3
	var	15
	line	107
	colm	12
	numle
	var	17
	line	107
	colm	18
	numle
	esusp
	goto	L43
lab L42
	unmark
	unmark
	goto	L15
lab L43
lab L40
lab L37
	unmark
lab L35
	mark	L44
	mark0
	pnull
	var	9
	var	8
	line	108
	colm	15
	numlt
	unmark
	unmark
	unmark
	goto	L15
	unmark
lab L44
	var	22
	var	7
	pnull
	var	12
	pnull
	var	8
	var	10
	line	110
	colm	24
	mult
	line	110
	colm	19
	plus
	pnull
	var	15
	pnull
	var	8
	var	11
	line	110
	colm	39
	mult
	line	110
	colm	34
	plus
	pnull
	var	12
	pnull
	var	9
	var	10
	line	110
	colm	55
	mult
	line	110
	colm	49
	plus
	pnull
	var	15
	pnull
	var	9
	var	11
	line	110
	colm	71
	mult
	line	110
	colm	65
	plus
	line	110
	colm	10
	invoke	5
	unmark
lab L15
	efail
lab L16
	unmark
lab L14
	mark	L45
	mark	L46
	pnull
	pnull
	var	7
	line	113
	colm	7
	size
	int	7
	line	113
	colm	12
	numgt
	unmark
	mark	L48
	var	7
	line	114
	colm	7
	pret
lab L48
	pfail
	goto	L47
lab L46
	line	116
	colm	7
	pfail
lab L47
	unmark
lab L45
	pnull
	line	117
	colm	1
	pfail
	end
proc Coalesce
	local	0,001000,L
	local	1,000020,i
	local	2,000020,all
	local	3,000020,seg
	local	4,000020,x1
	local	5,000020,y1
	local	6,000020,x2
	local	7,000020,y2
	local	8,000000,put
	con	0,002000,1,1
	con	1,002000,1,4
	con	2,002000,1,2
	con	3,002000,1,3
	declend
	line	122
	colm	11
	mark	L1
	pnull
	var	2
	pnull
	line	125
	colm	11
	llist	0
	line	125
	colm	8
	asgn
	unmark
lab L1
	mark	L2
	mark0
	pnull
	var	1
	pnull
	int	0
	pnull
	var	0
	line	126
	colm	20
	size
	int	1
	line	126
	colm	17
	toby
	line	126
	colm	12
	asgn
	pop
	mark0
	mark	L5
	pnull
	var	4
	pnull
	var	0
	var	1
	line	127
	colm	14
	subsc
	line	127
	colm	10
	asgn
	unmark
lab L5
	mark	L6
	pnull
	var	5
	pnull
	var	0
	pnull
	var	1
	int	0
	line	128
	colm	17
	plus
	line	128
	colm	14
	subsc
	line	128
	colm	10
	asgn
	unmark
lab L6
	mark	L7
	mark0
	mark	L8
	pnull
	var	4
	var	6
	line	129
	colm	13
	neqv
	esusp
	goto	L9
lab L8
	pnull
	var	5
	var	7
	line	129
	colm	26
	neqv
lab L9
	unmark
	var	8
	var	2
	pnull
	var	3
	pnull
	var	4
	var	5
	line	130
	colm	26
	llist	2
	line	130
	colm	23
	asgn
	line	130
	colm	13
	invoke	2
	unmark
lab L7
	var	8
	var	3
	pnull
	var	6
	pnull
	var	0
	pnull
	var	1
	int	2
	line	131
	colm	26
	plus
	line	131
	colm	23
	subsc
	line	131
	colm	19
	asgn
	pnull
	var	7
	pnull
	var	0
	pnull
	var	1
	int	3
	line	131
	colm	42
	plus
	line	131
	colm	39
	subsc
	line	131
	colm	35
	asgn
	line	131
	colm	10
	invoke	3
	unmark
lab L3
	efail
lab L4
	unmark
lab L2
	mark	L10
	mark	L11
	var	2
	line	134
	colm	4
	pret
lab L11
	pfail
	unmark
lab L10
	pnull
	line	135
	colm	1
	pfail
	end
