/* ttyinit.c 4.1 83/03/09 */
struct tchars _otch
, _ntch
;
* Routines for dealing with the unix tty modes
if (strcmp(getenv("TERM"), "hp2648") == 0)
ioctl(fileno(stdin
), TIOCGETP
, &_ttyb
);
ioctl(fileno(stdin
), TIOCGETC
, &_otch
);
_ntch
.t_quitc
= _ntch
.t_startc
= _ntch
.t_stopc
= -1;
_ttyb
.sg_flags
|= CBREAK
;
_ttyb
.sg_flags
&= ~(ECHO
|CRMOD
);
ioctl(fileno(stdin
), TIOCSETN
, &_ttyb
);
ioctl(fileno(stdin
), TIOCSETC
, &_ntch
);
_cursoron
= 1; /* to force it off */
ioctl(fileno(stdin
), TIOCSETN
, &_ttyb
);
ioctl(fileno(stdin
), TIOCSETC
, &_otch
);