version	U12.1.00
uid	getchlib.u1-1786032983-0
record	termio_struct,4
	0,vintr
	1,vquit
	2,verase
	3,vkill
impl	error
link	itlib.u
global	9
	0,000001,c_cc,0
	1,000001,current_mode,0
	2,000011,termio_struct,4
	3,000005,getse,1
	4,000005,setup_tty,0
	5,000005,reset_tty,0
	6,000005,getch,0
	7,000005,getche,0
	8,000005,change_tty_mode,1

proc getse
	local	0,001000,s
	local	1,000020,chr
	local	2,000040,BS
	local	3,000000,getval
	local	4,000000,reset_tty
	local	5,000000,stop
	local	6,000000,getch
	local	7,000000,c_cc
	local	8,000000,writes
	con	0,010000,2,142,143
	con	1,010000,1,010
	con	2,010000,2,142,163
	con	3,010000,30,131,157,165,162,040,164,145,162,155,151,156,141,154,040,143,141,156,047,164,040,142,141,143,153,163,160,141,143,145,041
	con	4,010000,0
	con	5,010000,1,015
	con	6,010000,1,012
	con	7,002000,1,1
	declend
	filen	getchlib.icn
	line	200
	colm	11
	synt	any
lab L1
	init	L3
	mark	L2
	mark	L4
	pnull
	var	2
	mark	L5
	var	3
	str	0
	line	219
	colm	21
	synt	any
	invoke	1
	line	219
	colm	28
	synt	any
	esusp
	goto	L6
lab L5
	str	1
lab L6
	line	219
	colm	12
	synt	any
	asgn
	unmark
lab L4
	line	220
	colm	9
	synt	if
	mark0
	mark	L7
	var	3
	str	2
	line	220
	colm	22
	synt	any
	invoke	1
	unmark
	efail
lab L7
	pnull
	unmark
	mark	L8
	var	4
	line	221
	colm	22
	synt	any
	invoke	0
	unmark
lab L8
	var	5
	str	3
	line	222
	colm	17
	synt	any
	invoke	1
	line	220
	colm	9
	synt	endif
	unmark
lab L2
	einit	L1
lab L3
	mark	L9
	pnull
	pnull
	var	0
	line	226
	colm	5
	synt	any
	null
	str	4
	line	226
	colm	8
	synt	any
	asgn
	unmark
lab L9
	mark	L10
lab L11
	line	227
	colm	5
	synt	repeat
	mark	L11
	line	228
	colm	9
	synt	case
	mark0
	pnull
	var	1
	mark	L15
	var	6
	line	228
	colm	26
	synt	any
	invoke	0
	line	228
	colm	29
	synt	any
	esusp
	goto	L16
lab L15
	line	228
	colm	31
	synt	any
	pfail
lab L16
	line	228
	colm	18
	synt	any
	asgn
	eret
	mark	L17
	ccase
	mark	L18
	str	5
	line	229
	colm	17
	synt	any
	esusp
	goto	L19
lab L18
	str	6
lab L19
	line	229
	colm	26
	synt	any
	eqv
	unmark
	pop
	mark	L20
	var	0
	line	229
	colm	28
	synt	any
	pret
lab L20
	synt	any
	pfail
	goto	L14
lab L17
	mark	L21
	ccase
	pnull
	var	7
	line	230
	colm	17
	synt	any
	field	vkill
	line	230
	colm	26
	synt	any
	eqv
	unmark
	pop
	mark	L22
	line	231
	colm	17
	synt	if
	mark0
	pnull
	pnull
	var	0
	line	231
	colm	20
	synt	any
	size
	int	7
	line	231
	colm	23
	synt	any
	numlt
	unmark
	unmark
	goto	L12
	line	231
	colm	17
	synt	endif
	unmark
lab L22
	mark	L23
	line	232
	colm	17
	synt	every
	mark0
	pnull
	int	7
	pnull
	var	0
	line	232
	colm	28
	synt	any
	size
	push1
	line	232
	colm	25
	synt	any
	toby
	pop
	mark0
	var	8
	var	2
	line	232
	colm	40
	synt	any
	invoke	1
	unmark
lab L24
	efail
lab L25
	line	232
	colm	17
	synt	endevery
	unmark
lab L23
	pnull
	var	0
	str	4
	line	233
	colm	19
	synt	any
	asgn
	goto	L14
lab L21
	mark	L26
	ccase
	pnull
	var	7
	line	235
	colm	17
	synt	any
	field	verase
	line	235
	colm	27
	synt	any
	eqv
	unmark
	pop
	mark	L27
	var	8
	var	2
	line	237
	colm	23
	synt	any
	invoke	1
	pop
	pnull
	var	0
	pnull
	var	0
	int	7
	pnull
	int	7
	line	237
	colm	39
	synt	any
	neg
	line	237
	colm	38
	synt	any
	synt	any
	sect
	line	237
	colm	32
	synt	any
	asgn
	unmark
lab L27
	line	238
	colm	17
	synt	if
	mark0
	pnull
	pnull
	var	0
	line	238
	colm	20
	synt	any
	size
	int	7
	line	238
	colm	23
	synt	any
	numlt
	unmark
	line	238
	colm	32
	synt	any
	pfail
	line	238
	colm	17
	synt	endif
	goto	L14
lab L26
	pop
	var	8
	var	1
	line	240
	colm	28
	synt	any
	invoke	1
	pop
	pnull
	var	0
	dup
	var	1
	line	240
	colm	38
	synt	any
	cat
	asgn
lab L14
	line	228
	colm	9
	synt	endcase
lab L12
	unmark
	goto	L11
lab L13
	line	227
	colm	5
	synt	endrepeat
	unmark
lab L10
	pnull
	line	244
	colm	1
	synt	any
	pfail
	end
proc setup_tty
	local	0,000000,change_tty_mode
	con	0,010000,5,163,145,164,165,160
	declend
	line	248
	colm	11
	synt	any
	mark	L1
	var	0
	str	0
	line	249
	colm	20
	synt	any
	invoke	1
	unmark
lab L1
	mark	L2
	mark	L3
	pnull
	line	250
	colm	5
	synt	any
	pret
lab L3
	synt	any
	pfail
	unmark
lab L2
	pnull
	line	251
	colm	1
	synt	any
	pfail
	end
proc reset_tty
	local	0,000000,current_mode
	local	1,000000,change_tty_mode
	con	0,010000,5,162,145,163,145,164
	declend
	line	255
	colm	11
	synt	any
	mark	L1
	pnull
	var	0
	line	258
	colm	21
	synt	any
	keywd	null
	line	258
	colm	18
	synt	any
	asgn
	unmark
lab L1
	mark	L2
	var	1
	str	0
	line	259
	colm	20
	synt	any
	invoke	1
	unmark
lab L2
	mark	L3
	mark	L4
	pnull
	line	260
	colm	5
	synt	any
	pret
lab L4
	synt	any
	pfail
	unmark
lab L3
	pnull
	line	262
	colm	1
	synt	any
	pfail
	end
proc getch
	local	0,000020,chr
	local	1,000000,current_mode
	local	2,000000,setup_tty
	local	3,000000,reads
	local	4,000000,c_cc
	local	5,000000,reset_tty
	local	6,000000,stop
	con	0,002000,1,1
	declend
	line	266
	colm	11
	synt	any
	mark	L1
	line	272
	colm	5
	synt	if
	mark0
	pnull
	pnull
	var	1
	line	272
	colm	8
	synt	any
	null
	int	0
	line	272
	colm	22
	synt	any
	asgn
	unmark
	var	2
	line	273
	colm	18
	synt	any
	invoke	0
	line	272
	colm	5
	synt	endif
	unmark
lab L1
	mark	L2
	pnull
	var	0
	var	3
	line	275
	colm	18
	synt	any
	keywd	input
	line	275
	colm	17
	synt	any
	invoke	1
	line	275
	colm	9
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	276
	colm	5
	synt	case
	mark0
	var	0
	eret
	mark	L5
	ccase
	pnull
	var	4
	line	277
	colm	13
	synt	any
	field	vintr
	line	277
	colm	20
	synt	any
	eqv
	unmark
	pop
	var	5
	line	277
	colm	31
	synt	any
	invoke	0
	pop
	var	6
	line	277
	colm	40
	synt	any
	invoke	0
	goto	L4
lab L5
	mark	L6
	ccase
	pnull
	var	4
	line	278
	colm	13
	synt	any
	field	vquit
	line	278
	colm	21
	synt	any
	eqv
	unmark
	pop
	var	5
	line	278
	colm	32
	synt	any
	invoke	0
	pop
	var	6
	line	278
	colm	41
	synt	any
	invoke	0
	goto	L4
lab L6
	pop
	mark	L7
	var	0
	line	279
	colm	19
	synt	any
	pret
lab L7
	synt	any
	pfail
lab L4
	line	276
	colm	5
	synt	endcase
	unmark
lab L3
	pnull
	line	282
	colm	1
	synt	any
	pfail
	end
proc getche
	local	0,000020,chr
	local	1,000000,current_mode
	local	2,000000,setup_tty
	local	3,000000,reads
	local	4,000000,c_cc
	local	5,000000,reset_tty
	local	6,000000,stop
	local	7,000000,writes
	con	0,002000,1,1
	declend
	line	286
	colm	11
	synt	any
	mark	L1
	line	292
	colm	5
	synt	if
	mark0
	pnull
	pnull
	var	1
	line	292
	colm	8
	synt	any
	null
	int	0
	line	292
	colm	22
	synt	any
	asgn
	unmark
	var	2
	line	293
	colm	18
	synt	any
	invoke	0
	line	292
	colm	5
	synt	endif
	unmark
lab L1
	mark	L2
	pnull
	var	0
	var	3
	line	295
	colm	18
	synt	any
	keywd	input
	line	295
	colm	17
	synt	any
	invoke	1
	line	295
	colm	9
	synt	any
	asgn
	unmark
lab L2
	mark	L3
	line	296
	colm	5
	synt	case
	mark0
	var	0
	eret
	mark	L5
	ccase
	pnull
	var	4
	line	297
	colm	13
	synt	any
	field	vintr
	line	297
	colm	21
	synt	any
	eqv
	unmark
	pop
	var	5
	line	297
	colm	32
	synt	any
	invoke	0
	pop
	var	6
	line	297
	colm	41
	synt	any
	invoke	0
	goto	L4
lab L5
	mark	L6
	ccase
	pnull
	var	4
	line	298
	colm	13
	synt	any
	field	vquit
	line	298
	colm	21
	synt	any
	eqv
	unmark
	pop
	var	5
	line	298
	colm	32
	synt	any
	invoke	0
	pop
	var	6
	line	298
	colm	41
	synt	any
	invoke	0
	goto	L4
lab L6
	pop
	var	7
	var	0
	line	299
	colm	25
	synt	any
	invoke	1
	pop
	mark	L7
	var	0
	line	299
	colm	33
	synt	any
	pret
lab L7
	synt	any
	pfail
lab L4
	line	296
	colm	5
	synt	endcase
	unmark
lab L3
	pnull
	line	302
	colm	1
	synt	any
	pfail
	end
proc change_tty_mode
	local	0,001000,switch
	local	1,000020,get_term_params
	local	2,000020,i
	local	3,000040,reset_string
	local	4,000000,getval
	local	5,000000,find
	local	6,000000,map
	local	7,000000,stop
	local	8,000000,open
	local	9,000000,close
	local	10,000000,tab
	local	11,000000,c_cc
	local	12,000000,termio_struct
	local	13,000000,char
	local	14,000000,integer
	local	15,000000,move
	local	16,000000,system
	con	0,010000,2,154,151
	con	1,010000,4,165,156,151,170
	con	2,010000,53,143,150,141,156,147,145,137,164,164,171,137,155,157,144,145,072,040,040,124,150,145,163,145,040,162,157,165,164,151,156,145,163,040,155,165,163,164,040,162,165,156,040,165,156,144,145,162,040,125,116,111,130,056
	con	3,010000,17,057,142,151,156,057,163,164,164,171,040,055,147,040,062,076,046,061
	con	4,010000,2,160,162
	con	5,002000,1,1
	con	6,002000,1,4
	con	7,010000,1,072
	con	8,010000,1,003
	con	9,010000,1,034
	con	10,010000,1,010
	con	11,010000,1,025
	con	12,002000,1,3
	con	13,010000,3,061,066,162
	con	14,002000,1,0
	con	15,010000,5,163,145,164,165,160
	con	16,010000,19,057,142,151,156,057,163,164,164,171,040,055,145,143,150,157,040,162,141,167
	con	17,010000,10,057,142,151,156,057,163,164,164,171,040
	declend
	line	306
	colm	11
	synt	any
lab L1
	init	L3
	mark	L2
	mark	L4
	var	4
	str	0
	line	312
	colm	15
	synt	any
	invoke	1
	unmark
lab L4
	mark	L5
	mark	L6
	var	5
	str	1
	var	6
	line	313
	colm	25
	synt	any
	keywd	features
	line	313
	colm	24
	synt	any
	invoke	1
	line	313
	colm	13
	synt	any
	invoke	2
	line	313
	colm	37
	synt	any
	esusp
	goto	L7
lab L6
	var	7
	str	2
	line	314
	colm	17
	synt	any
	invoke	1
lab L7
	unmark
lab L5
	mark	L8
	pnull
	var	1
	var	8
	str	3
	str	4
	line	315
	colm	32
	synt	any
	invoke	2
	line	315
	colm	25
	synt	any
	asgn
	unmark
lab L8
	mark	L9
	pnull
	var	3
	pnull
	var	1
	line	316
	colm	25
	synt	any
	bang
	line	316
	colm	22
	synt	any
	asgn
	unmark
lab L9
	mark	L10
	var	9
	var	1
	line	317
	colm	14
	synt	any
	invoke	1
	unmark
lab L10
	var	3
	line	318
	colm	22
	synt	any
	bscan
	mark	L11
	line	322
	colm	13
	synt	every
	mark0
	pnull
	int	5
	int	6
	push1
	line	322
	colm	21
	synt	any
	toby
	pop
	mark0
	var	10
	pnull
	var	5
	str	7
	line	322
	colm	37
	synt	any
	invoke	1
	int	5
	line	322
	colm	42
	synt	any
	plus
	line	322
	colm	32
	synt	any
	invoke	1
	unmark
lab L12
	efail
lab L13
	line	322
	colm	13
	synt	endevery
	unmark
lab L11
	mark	L14
	pnull
	var	11
	var	12
	str	8
	str	9
	str	10
	str	11
	line	323
	colm	34
	synt	any
	invoke	4
	line	323
	colm	18
	synt	any
	asgn
	unmark
lab L14
	mark	L15
	line	324
	colm	13
	synt	every
	mark0
	pnull
	var	2
	pnull
	int	5
	int	12
	push1
	line	324
	colm	26
	synt	any
	toby
	line	324
	colm	21
	synt	any
	asgn
	pop
	mark0
	mark	L18
	pnull
	pnull
	var	11
	var	2
	line	325
	colm	21
	synt	any
	subsc
	var	13
	var	14
	pnull
	str	13
	var	10
	var	5
	str	7
	line	325
	colm	56
	synt	any
	invoke	1
	line	325
	colm	51
	synt	any
	invoke	1
	line	325
	colm	46
	synt	any
	cat
	line	325
	colm	40
	synt	any
	invoke	1
	line	325
	colm	32
	synt	any
	invoke	1
	line	325
	colm	25
	synt	any
	asgn
	unmark
lab L18
	var	15
	int	5
	line	326
	colm	21
	synt	any
	invoke	1
	unmark
lab L16
	efail
lab L17
	line	324
	colm	13
	synt	endevery
	unmark
lab L15
	pnull
	pnull
	var	11
	pnull
	var	2
	int	5
	line	328
	colm	19
	synt	any
	plus
	line	328
	colm	17
	synt	any
	subsc
	var	13
	var	14
	pnull
	str	13
	var	10
	int	14
	line	328
	colm	49
	synt	any
	invoke	1
	line	328
	colm	44
	synt	any
	cat
	line	328
	colm	38
	synt	any
	invoke	1
	line	328
	colm	30
	synt	any
	invoke	1
	line	328
	colm	23
	synt	any
	asgn
	line	318
	colm	22
	synt	any
	escan
	unmark
lab L2
	einit	L1
lab L3
	mark	L19
	line	332
	colm	5
	synt	ifelse
	mark	L20
	pnull
	var	0
	str	15
	line	332
	colm	15
	synt	any
	lexeq
	unmark
	var	16
	str	16
	line	333
	colm	16
	synt	any
	invoke	1
	goto	L21
lab L20
	var	16
	pnull
	str	17
	var	3
	line	334
	colm	29
	synt	any
	cat
	line	334
	colm	16
	synt	any
	invoke	1
lab L21
	line	332
	colm	5
	synt	endifelse
	unmark
lab L19
	mark	L22
	mark	L23
	pnull
	line	336
	colm	5
	synt	any
	pret
lab L23
	synt	any
	pfail
	unmark
lab L22
	pnull
	line	338
	colm	1
	synt	any
	pfail
	end
