1 /* exp_tty_comm.c - tty support routines common to both Expect program
2    and library */
3 
4 #include "expect_cf.h"
5 #include <stdio.h>
6 
7 #include "tcl.h"
8 #include "exp_tty_in.h"
9 #include "exp_rename.h"
10 #include "expect_comm.h"
11 #include "exp_command.h"
12 #include "exp_log.h"
13 
14 #ifndef TRUE
15 #define FALSE 0
16 #define TRUE 1
17 #endif
18 
19 int exp_disconnected = FALSE;		/* not disc. from controlling tty */
20 
21 /*static*/ exp_tty exp_tty_current, exp_tty_cooked;
22 #define tty_current exp_tty_current
23 #define tty_cooked exp_tty_cooked
24 
25 void
exp_init_tty()26 exp_init_tty()
27 {
28 	extern exp_tty exp_tty_original;
29 
30 	/* save original user tty-setting in 'cooked', just in case user */
31 	/* asks for it without earlier telling us what cooked means to them */
32 	tty_cooked = exp_tty_original;
33 
34 	/* save our current idea of the terminal settings */
35 	tty_current = exp_tty_original;
36 }
37 
38