diff options
Diffstat (limited to 'rltty.c')
-rw-r--r-- | rltty.c | 38 |
1 files changed, 20 insertions, 18 deletions
@@ -1,7 +1,7 @@ /* rltty.c -- functions to prepare and restore the terminal for readline's use. */ -/* Copyright (C) 1992-2017 Free Software Foundation, Inc. +/* Copyright (C) 1992-2021 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. @@ -52,7 +52,7 @@ extern int errno; rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal; rl_voidfunc_t *rl_deprep_term_function = rl_deprep_terminal; -static void set_winsize PARAMS((int)); +static void set_winsize (int); /* **************************************************************** */ /* */ @@ -119,15 +119,15 @@ struct bsdtty { static TIOTYPE otio; -static void save_tty_chars PARAMS((TIOTYPE *)); -static int _get_tty_settings PARAMS((int, TIOTYPE *)); -static int get_tty_settings PARAMS((int, TIOTYPE *)); -static int _set_tty_settings PARAMS((int, TIOTYPE *)); -static int set_tty_settings PARAMS((int, TIOTYPE *)); +static void save_tty_chars (TIOTYPE *); +static int _get_tty_settings (int, TIOTYPE *); +static int get_tty_settings (int, TIOTYPE *); +static int _set_tty_settings (int, TIOTYPE *); +static int set_tty_settings (int, TIOTYPE *); -static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); +static void prepare_terminal_settings (int, TIOTYPE, TIOTYPE *); -static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t *)); +static void set_special_char (Keymap, TIOTYPE *, int, rl_command_func_t *); static void save_tty_chars (TIOTYPE *tiop) @@ -332,16 +332,16 @@ prepare_terminal_settings (int meta_flag, TIOTYPE oldtio, TIOTYPE *tiop) static TIOTYPE otio; -static void save_tty_chars PARAMS((TIOTYPE *)); -static int _get_tty_settings PARAMS((int, TIOTYPE *)); -static int get_tty_settings PARAMS((int, TIOTYPE *)); -static int _set_tty_settings PARAMS((int, TIOTYPE *)); -static int set_tty_settings PARAMS((int, TIOTYPE *)); +static void save_tty_chars (TIOTYPE *); +static int _get_tty_settings (int, TIOTYPE *); +static int get_tty_settings (int, TIOTYPE *); +static int _set_tty_settings (int, TIOTYPE *); +static int set_tty_settings (int, TIOTYPE *); -static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *)); +static void prepare_terminal_settings (int, TIOTYPE, TIOTYPE *); -static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t *)); -static void _rl_bind_tty_special_chars PARAMS((Keymap, TIOTYPE)); +static void set_special_char (Keymap, TIOTYPE *, int, rl_command_func_t *); +static void _rl_bind_tty_special_chars (Keymap, TIOTYPE); #if defined (FLUSHO) # define OUTPUT_BEING_FLUSHED(tp) (tp->c_lflag & FLUSHO) @@ -692,7 +692,9 @@ rl_deprep_terminal (void) if (terminal_prepped & TPX_BRACKPASTE) { fprintf (rl_outstream, BRACK_PASTE_FINI); - if (_rl_eof_found) + if (_rl_eof_found && (RL_ISSTATE (RL_STATE_TIMEOUT) == 0)) + fprintf (rl_outstream, "\n"); + else if (_rl_echoing_p == 0) fprintf (rl_outstream, "\n"); } |