sel_t *sp; /* my select fcb address */
struct termios t; /* any termios associated with this cnum */
char echo; /* echo characters back to this cnum */
sel_t *sp; /* my select fcb address */
struct termios t; /* any termios associated with this cnum */
char echo; /* echo characters back to this cnum */
signal(SIGINT, terminate);
signal(SIGQUIT, terminate);
signal(SIGTERM, terminate);
signal(SIGINT, terminate);
signal(SIGQUIT, terminate);
signal(SIGTERM, terminate);
/* connect up stdin, stdout and message system */
in = fcb_new(0, TEXT);
in->sp = sel_open(0, in, "STDIN", fcb_handler, TEXT, SEL_INPUT);
if (tcgetattr(0, &in->t) < 0) {
/* connect up stdin, stdout and message system */
in = fcb_new(0, TEXT);
in->sp = sel_open(0, in, "STDIN", fcb_handler, TEXT, SEL_INPUT);
if (tcgetattr(0, &in->t) < 0) {
} else {
struct termios t = in->t;
t.c_lflag &= ~(ECHO|ECHONL|ICANON);
if (tcsetattr(0, TCSANOW, &t) < 0)
die("tcsetattr (%d)", errno);
in->echo = echo;
} else {
struct termios t = in->t;
t.c_lflag &= ~(ECHO|ECHONL|ICANON);
if (tcsetattr(0, TCSANOW, &t) < 0)
die("tcsetattr (%d)", errno);
in->echo = echo;