PR tui/16138, PR tui/17519, and misc failures to initialize the terminal
[binutils-gdb.git] / gdb / tui / tui-interp.c
index 24cb5a3941448821a0207d0f3bb9b1c7d17244a1..b377db25a2ebc5f91c68cb6dd3a0f624f166fd25 100644 (file)
@@ -51,9 +51,6 @@ tui_exit (void)
   tui_disable ();
 }
 
-/* True if TUI is the top-level interpreter.  */
-static int tui_is_toplevel = 0;
-
 /* Observers for several run control events.  If the interpreter is
    quiet (i.e., another interpreter is being run with
    interpreter-exec), print nothing.  */
@@ -126,8 +123,6 @@ tui_on_command_error (void)
 static void *
 tui_init (struct interp *self, int top_level)
 {
-  tui_is_toplevel = top_level;
-
   /* Install exit handler to leave the screen in a good shape.  */
   atexit (tui_exit);
 
@@ -150,18 +145,6 @@ tui_init (struct interp *self, int top_level)
   return NULL;
 }
 
-/* True if enabling the TUI is allowed.  Example, if the top level
-   interpreter is MI, enabling curses will certainly lose.  */
-
-int
-tui_allowed_p (void)
-{
-  /* Only if TUI is the top level interpreter.  Also don't try to
-     setup curses (and print funny control characters) if we're not
-     outputting to a terminal.  */
-  return tui_is_toplevel && ui_file_isatty (gdb_stdout);
-}
-
 static int
 tui_resume (void *data)
 {