aboutsummaryrefslogtreecommitdiff
path: root/pkg/utilities/nttools/tedit/display/screen/kbegin.x
blob: 0be12ab686dcd3dc3d0bb21c6c95fd4a5205bbb0 (plain) (blame)
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
include	<fset.h>
include	"../curses.h"

# K_BEGIN -- Initialize keyboard
#
# B.Simon	23-Jan-89	Original

procedure k_begin (cmdlist)

char	cmdlist[ARB]	# i: List of editing commands
#--
include	"screen.com"

int	klen
int	strlen()

extern	k_error

begin
	# NOTE: ps_begin must be called before calling this procedure

	# Put terminal in raw mode

	call fseti (ttyin, F_RAW, YES)

	# Set up error exit routine

	call onerror (k_error)

	# Set up function key table and help screen

	call k_compile (cmdlist)

	# Send initialize keypad sequence to terminal

	klen = strlen (ks)
	if (klen > 0)
	    call ttywrite (ttyout, term, ks, klen, 1)
	
end