static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *));
-static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t));
+static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t *));
static void
save_tty_chars (tiop)
static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *));
-static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t));
+static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t *));
static void _rl_bind_tty_special_chars PARAMS((Keymap, TIOTYPE));
#if defined (FLUSHO)
TIOTYPE oldtio, *tiop;
{
_rl_echoing_p = (oldtio.c_lflag & ECHO);
+#if defined (ECHOCTL)
_rl_echoctl = (oldtio.c_lflag & ECHOCTL);
+#endif
tiop->c_lflag &= ~(ICANON | ECHO);
#if defined (USE_XON_XOFF)
#if defined (IXANY)
- tiop->c_iflag &= ~(IXON | IXOFF | IXANY);
+ tiop->c_iflag &= ~(IXON | IXANY);
#else
/* `strict' Posix systems do not define IXANY. */
- tiop->c_iflag &= ~(IXON | IXOFF);
+ tiop->c_iflag &= ~IXON;
#endif /* IXANY */
#endif /* USE_XON_XOFF */
/* Try to keep this function from being INTerrupted. */
_rl_block_sigint ();
- tty = fileno (rl_instream);
+ tty = rl_instream ? fileno (rl_instream) : fileno (stdin);
if (get_tty_settings (tty, &tio) < 0)
{
/* Try to keep this function from being interrupted. */
_rl_block_sigint ();
- tty = fileno (rl_instream);
+ tty = rl_instream ? fileno (rl_instream) : fileno (stdin);
if (_rl_enable_keypad)
_rl_control_keypad (0);