* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
static char sccsid
[] = "@(#)ttyinit.c 5.1 (Berkeley) %G%";
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
);