Move event-loop.[ch] to gdbsupport/
[deliverable/binutils-gdb.git] / gdb / tui / tui-interp.c
index 14215b83dea09fd86639d1da26e2fda3f625cf12..10118af27411035593725e9caf89fd75dd22eff1 100644 (file)
@@ -1,6 +1,6 @@
 /* TUI Interpreter definitions for GDB, the GNU debugger.
 
-   Copyright (C) 2003-2019 Free Software Foundation, Inc.
+   Copyright (C) 2003-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "interps.h"
 #include "top.h"
 #include "event-top.h"
-#include "event-loop.h"
+#include "gdbsupport/event-loop.h"
 #include "ui-out.h"
 #include "cli-out.h"
 #include "tui/tui-data.h"
-#include "readline/readline.h"
 #include "tui/tui-win.h"
 #include "tui/tui.h"
 #include "tui/tui-io.h"
 #include "observable.h"
 #include "gdbthread.h"
 #include "inferior.h"
+#include "main.h"
 
-/* Set to 1 when the TUI mode must be activated when we first start
+/* Set to true when the TUI mode must be activated when we first start
    gdb.  */
-static int tui_start_enabled = 0;
+static bool tui_start_enabled = false;
 
 class tui_interp final : public cli_interp_base
 {
@@ -241,11 +241,9 @@ tui_interp::init (bool top_level)
   /* Install exit handler to leave the screen in a good shape.  */
   atexit (tui_exit);
 
-  tui_initialize_static_data ();
-
   tui_initialize_io ();
   tui_initialize_win ();
-  if (ui_file_isatty (gdb_stdout))
+  if (gdb_stdout->isatty ())
     tui_initialize_readline ();
 }
 
@@ -308,13 +306,14 @@ tui_interp_factory (const char *name)
   return new tui_interp (name);
 }
 
+void _initialize_tui_interp ();
 void
-_initialize_tui_interp (void)
+_initialize_tui_interp ()
 {
   interp_factory_register (INTERP_TUI, tui_interp_factory);
 
   if (interpreter_p && strcmp (interpreter_p, INTERP_TUI) == 0)
-    tui_start_enabled = 1;
+    tui_start_enabled = true;
 
   if (interpreter_p && strcmp (interpreter_p, INTERP_CONSOLE) == 0)
     {
This page took 0.025161 seconds and 4 git commands to generate.