Replace input_interactive_p with a method

This replaces the global input_interactive_p function with a new
method ui::input_interactive_p.
This commit is contained in:
Tom Tromey
2022-06-23 11:09:28 -06:00
parent 8f7f9b3a91
commit efd3baf0dc
6 changed files with 18 additions and 17 deletions

View File

@@ -1176,7 +1176,7 @@ counted_command_line
read_command_lines (const char *prompt_arg, int from_tty, int parse_commands,
gdb::function_view<void (const char *)> validator)
{
if (from_tty && input_interactive_p (current_ui))
if (from_tty && current_ui->input_interactive_p ())
{
if (deprecated_readline_begin_hook)
{
@@ -1203,7 +1203,7 @@ read_command_lines (const char *prompt_arg, int from_tty, int parse_commands,
validator);
}
if (from_tty && input_interactive_p (current_ui)
if (from_tty && current_ui->input_interactive_p ()
&& deprecated_readline_end_hook)
{
(*deprecated_readline_end_hook) ();