version 1.26, 2014/07/20 12:08:55 |
version 1.27, 2014/07/22 07:30:24 |
|
|
|
|
struct termios old_tc = { 0 }; |
struct termios old_tc = { 0 }; |
|
|
void |
void |
init_sys() |
init_sys(void) |
{ |
{ |
tout = fileno(stdout); |
tout = fileno(stdout); |
tin = fileno(stdin); |
tin = fileno(stdin); |
|
|
* 1 Do add this character |
* 1 Do add this character |
*/ |
*/ |
|
|
int |
int |
TerminalSpecialChars(c) |
TerminalSpecialChars(int c) |
int c; |
|
{ |
{ |
if (c == termIntChar) { |
if (c == termIntChar) { |
intp(); |
intp(); |
|
|
return 1; |
return 1; |
} |
} |
|
|
void |
void |
TerminalSaveState() |
TerminalSaveState(void) |
{ |
{ |
tcgetattr(0, &old_tc); |
tcgetattr(0, &old_tc); |
|
|
|
|
#endif |
#endif |
} |
} |
|
|
cc_t * |
cc_t * |
tcval(func) |
tcval(int func) |
int func; |
|
{ |
{ |
switch(func) { |
switch(func) { |
case SLC_IP: return(&termIntChar); |
case SLC_IP: return(&termIntChar); |
|
|
} |
} |
} |
} |
|
|
void |
void |
TerminalDefaultChars() |
TerminalDefaultChars(void) |
{ |
{ |
memcpy(new_tc.c_cc, old_tc.c_cc, sizeof(old_tc.c_cc)); |
memcpy(new_tc.c_cc, old_tc.c_cc, sizeof(old_tc.c_cc)); |
# ifndef VDISCARD |
# ifndef VDISCARD |
|
|
static void ayt(); |
static void ayt(); |
#endif |
#endif |
|
|
void |
void |
TerminalNewMode(f) |
TerminalNewMode(int f) |
int f; |
|
{ |
{ |
static int prevmode = 0; |
static int prevmode = 0; |
struct termios tmp_tc; |
struct termios tmp_tc; |
|
|
}; |
}; |
#endif /* DECODE_BAUD */ |
#endif /* DECODE_BAUD */ |
|
|
void |
void |
TerminalSpeeds(ispeed, ospeed) |
TerminalSpeeds(long *ispeed, long *ospeed) |
long *ispeed; |
|
long *ospeed; |
|
{ |
{ |
#ifdef DECODE_BAUD |
#ifdef DECODE_BAUD |
struct termspeeds *tp; |
struct termspeeds *tp; |
|
|
#endif /* DECODE_BAUD */ |
#endif /* DECODE_BAUD */ |
} |
} |
|
|
int |
int |
TerminalWindowSize(rows, cols) |
TerminalWindowSize(long *rows, long *cols) |
long *rows, *cols; |
|
{ |
{ |
#ifdef TIOCGWINSZ |
#ifdef TIOCGWINSZ |
struct winsize ws; |
struct winsize ws; |
|
|
* Various signal handling routines. |
* Various signal handling routines. |
*/ |
*/ |
|
|
void |
void |
deadpeer(sig) |
deadpeer(int sig) |
int sig; |
|
{ |
{ |
setcommandmode(); |
setcommandmode(); |
longjmp(peerdied, -1); |
longjmp(peerdied, -1); |
} |
} |
|
|
void |
void |
intr(sig) |
intr(int sig) |
int sig; |
|
{ |
{ |
if (localchars) { |
if (localchars) { |
intp(); |
intp(); |
|
|
longjmp(toplevel, -1); |
longjmp(toplevel, -1); |
} |
} |
|
|
void |
void |
intr2(sig) |
intr2(int sig) |
int sig; |
|
{ |
{ |
if (localchars) { |
if (localchars) { |
#ifdef KLUDGELINEMODE |
#ifdef KLUDGELINEMODE |
|
|
} |
} |
} |
} |
|
|
void |
void |
susp(sig) |
susp(int sig) |
int sig; |
|
{ |
{ |
if ((rlogin != _POSIX_VDISABLE) && rlogin_susp()) |
if ((rlogin != _POSIX_VDISABLE) && rlogin_susp()) |
return; |
return; |
|
|
} |
} |
|
|
#ifdef SIGWINCH |
#ifdef SIGWINCH |
void |
void |
sendwin(sig) |
sendwin(int sig) |
int sig; |
|
{ |
{ |
if (connected) { |
if (connected) { |
sendnaws(); |
sendnaws(); |
|
|
#endif |
#endif |
|
|
#ifdef SIGINFO |
#ifdef SIGINFO |
void |
void |
ayt(sig) |
ayt(int sig) |
int sig; |
|
{ |
{ |
if (connected) |
if (connected) |
sendayt(); |
sendayt(); |
|
|
#endif |
#endif |
|
|
|
|
void |
void |
sys_telnet_init() |
sys_telnet_init(void) |
{ |
{ |
int one = 1; |
int one = 1; |
|
|
|
|
* The return value is 1 if something happened, 0 if not. |
* The return value is 1 if something happened, 0 if not. |
*/ |
*/ |
|
|
int |
int |
process_rings(netin, netout, netex, ttyin, ttyout, dopoll) |
process_rings(int netin, int netout, int netex, int ttyin, int ttyout, |
int dopoll; /* If 0, then block until something to do */ |
int dopoll) /* If 0, then block until something to do */ |
{ |
{ |
int c; |
int c; |
/* One wants to be a bit careful about setting returnValue |
/* One wants to be a bit careful about setting returnValue |