aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-06-23 11:09:28 -0600
committerTom Tromey <tromey@adacore.com>2022-07-18 08:49:55 -0600
commitefd3baf0dcb38d7ecc2c8b4d1553254d3c022b7a (patch)
tree32c375e1e893117e20299cee54d30c1cb91e7679 /gdb/top.h
parent8f7f9b3a9142eeea50054b83e9bce12056bae6c9 (diff)
downloadbinutils-efd3baf0dcb38d7ecc2c8b4d1553254d3c022b7a.zip
binutils-efd3baf0dcb38d7ecc2c8b4d1553254d3c022b7a.tar.gz
binutils-efd3baf0dcb38d7ecc2c8b4d1553254d3c022b7a.tar.bz2
Replace input_interactive_p with a method
This replaces the global input_interactive_p function with a new method ui::input_interactive_p.
Diffstat (limited to 'gdb/top.h')
-rw-r--r--gdb/top.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/top.h b/gdb/top.h
index 18c49cc..5c1db84 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -124,7 +124,7 @@ struct ui
/* Whether ISATTY returns true on input_fd. Cached here because
quit_force needs to know this _after_ input_fd might be
closed. */
- int input_interactive_p;
+ bool m_input_interactive_p;
/* See enum prompt_state's description. */
enum prompt_state prompt_state;
@@ -154,6 +154,9 @@ struct ui
/* Unregister the UI's input file descriptor from the event loop. */
void unregister_file_handler ();
+
+ /* Return true if this UI's input fd is a tty. */
+ bool input_interactive_p () const;
};
/* The main UI. This is the UI that is bound to stdin/stdout/stderr.