-#else
- struct sgttyb sgtty;
- static struct tchars tchars;/* INT, QUIT, XON, XOFF, EOF, BRK */
-
- if (on) {
- (void) ioctl(SHIN, TIOCGETC, (ioctl_t) & tchars);
- tchars.t_brkc = ESC;
- (void) ioctl(SHIN, TIOCSETC, (ioctl_t) & tchars);
- /*
- * This must be done after every command: if the tty gets into raw or
- * cbreak mode the user can't even type 'reset'.
- */
- (void) ioctl(SHIN, TIOCGETP, (ioctl_t) & sgtty);
- if (sgtty.sg_flags & (RAW | CBREAK)) {
- sgtty.sg_flags &= ~(RAW | CBREAK);
- (void) ioctl(SHIN, TIOCSETP, (ioctl_t) & sgtty);
- }
- }
- else {
- tchars.t_brkc = -1;
- (void) ioctl(SHIN, TIOCSETC, (ioctl_t) & tchars);
- }
-#endif