diff options
author | Anas Nashif <anas.nashif@intel.com> | 2012-11-04 17:21:04 -0800 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2012-11-04 17:21:04 -0800 |
commit | e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2 (patch) | |
tree | ce4c73521220fbb751c2be6a42e85ff6a6cbff97 /exp_tty_comm.c | |
download | expect-e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2.tar.gz expect-e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2.tar.bz2 expect-e0b431a48cc3ac5d3ec32f06eddd9708ad655fa2.zip |
Imported Upstream version 5.45upstream/5.45
Diffstat (limited to 'exp_tty_comm.c')
-rw-r--r-- | exp_tty_comm.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/exp_tty_comm.c b/exp_tty_comm.c new file mode 100644 index 0000000..8b741a3 --- /dev/null +++ b/exp_tty_comm.c @@ -0,0 +1,37 @@ +/* exp_tty_comm.c - tty support routines common to both Expect program + and library */ + +#include "expect_cf.h" +#include <stdio.h> + +#include "tcl.h" +#include "exp_tty_in.h" +#include "exp_rename.h" +#include "expect_comm.h" +#include "exp_command.h" +#include "exp_log.h" + +#ifndef TRUE +#define FALSE 0 +#define TRUE 1 +#endif + +int exp_disconnected = FALSE; /* not disc. from controlling tty */ + +/*static*/ exp_tty exp_tty_current, exp_tty_cooked; +#define tty_current exp_tty_current +#define tty_cooked exp_tty_cooked + +void +exp_init_tty() +{ + extern exp_tty exp_tty_original; + + /* save original user tty-setting in 'cooked', just in case user */ + /* asks for it without earlier telling us what cooked means to them */ + tty_cooked = exp_tty_original; + + /* save our current idea of the terminal settings */ + tty_current = exp_tty_original; +} + |