version 1.6, 2003/06/03 02:56:18 |
version 1.7, 2014/07/19 23:50:38 |
|
|
|
|
int termdata; /* Debugging flag */ |
int termdata; /* Debugging flag */ |
|
|
#ifdef USE_TERMIO |
|
# ifndef VDISCARD |
# ifndef VDISCARD |
cc_t termFlushChar; |
cc_t termFlushChar; |
# endif |
# endif |
|
|
# ifndef VSTATUS |
# ifndef VSTATUS |
cc_t termAytChar; |
cc_t termAytChar; |
# endif |
# endif |
#else |
|
cc_t termForw2Char; |
|
cc_t termAytChar; |
|
#endif |
|
|
|
/* |
/* |
* initialize the terminal data structures. |
* initialize the terminal data structures. |
|
|
extern int kludgelinemode; |
extern int kludgelinemode; |
#endif |
#endif |
|
|
if (In3270) |
|
return(MODE_FLOW); |
|
|
|
if (my_want_state_is_dont(TELOPT_ECHO)) |
if (my_want_state_is_dont(TELOPT_ECHO)) |
mode |= MODE_ECHO; |
mode |= MODE_ECHO; |
|
|
|
|
int force; |
int force; |
{ |
{ |
int newmode; |
int newmode; |
#ifdef ENCRYPTION |
|
static int enc_passwd = 0; |
|
#endif |
|
|
|
newmode = getconnmode()|(force?MODE_FORCE:0); |
newmode = getconnmode()|(force?MODE_FORCE:0); |
|
|
TerminalNewMode(newmode); |
TerminalNewMode(newmode); |
|
|
#ifdef ENCRYPTION |
|
if ((newmode & (MODE_ECHO|MODE_EDIT)) == MODE_EDIT) { |
|
if (my_want_state_is_will(TELOPT_ENCRYPT) |
|
&& (enc_passwd == 0) && !encrypt_output) { |
|
encrypt_request_start(0, 0); |
|
enc_passwd = 1; |
|
} |
|
} else { |
|
if (enc_passwd) { |
|
encrypt_request_end(); |
|
enc_passwd = 0; |
|
} |
|
} |
|
#endif |
|
|
|
} |
} |
|
|
|
|