s.main.c_lflag |= ICANON; /* Enable erase/kill and eof processing */
s.main.c_cc[VEOF] = 04; /* insure that EOF is Control-D */
- s.main.c_cc[VERASE] = 0377; /* disable erase processing */
- s.main.c_cc[VKILL] = 0377; /* disable kill processing */
+ s.main.c_cc[VERASE] = CDISABLE; /* disable erase processing */
+ s.main.c_cc[VKILL] = CDISABLE; /* disable kill processing */
#ifdef HPUX
s.main.c_cflag = (s.main.c_cflag & ~CBAUD) | B9600; /* baud rate sanity */
tty.main.c_cc[VSTOP] = CDISABLE;
#endif /* VSTOP */
#endif /* mips or HAVE_TCATTR */
+#ifdef SET_LINE_DISCIPLINE
+ /* Need to explicitely request TERMIODISC line discipline or
+ Ultrix's termios does not work correctly. */
+ tty.main.c_line = SET_LINE_DISCIPLINE;
+#endif
#ifdef AIX
#ifndef IBMR2AIX
- /* AIX enhanced edit loses NULs, so disable it */
+ /* AIX enhanced edit loses NULs, so disable it. */
tty.main.c_line = 0;
tty.main.c_iflag &= ~ASCEDIT;
#else
if (!flow_control) tcflow (input_fd, TCOON);
#endif
-#ifdef AIX
+#ifdef AIXHFT
hft_init ();
#ifdef IBMR2AIX
{
write (1, "\033[20l", 5);
}
#endif
-#endif
+#endif /* AIXHFT */
#ifdef VMS
/* Appears to do nothing when in PASTHRU mode.
clear_end_of_line (FRAME_WIDTH (selected_frame));
/* clear_end_of_line may move the cursor */
cursor_to (FRAME_HEIGHT (selected_frame) - 1, 0);
-#ifdef IBMR2AIX
+#if defined (IBMR2AIX) && defined (AIXHFT)
{
/* HFT devices normally use ^J as a LF/CR. We forced it to
do the LF only. Now, we need to reset it. */
dos_ttcooked ();
#endif
-#ifdef AIX
+#ifdef SET_LINE_DISCIPLINE
+ /* Ultrix's termios *ignores* any line discipline except TERMIODISC.
+ A different old line discipline is therefore not restored, yet.
+ Restore the old line discipline by hand. */
+ ioctl (0, TIOCSETD, &old_tty.main.c_line);
+#endif
+
+#ifdef AIXHFT
hft_reset ();
#endif
}
#endif /* VMS */
\f
-#ifdef AIX
+#ifdef AIXHFT
/* Called from init_sys_modes. */
hft_init ()
hftctl (0, HFSKBD, &buf);
}
-#endif /* AIX */
+#endif /* AIXHFT */
#ifdef USE_DL_STUBS