Remove strcat_to_buf
[deliverable/binutils-gdb.git] / gdb / tui / tui.c
index e0eb12fb8336f9efda48632da376c39b70b11570..30bf54887941585adf806192b5eb4c9fd5100a9c 100644 (file)
@@ -329,13 +329,17 @@ tui_initialize_readline (void)
   int i;
   Keymap tui_ctlx_keymap;
 
-  rl_initialize ();
-
   rl_add_defun ("tui-switch-mode", tui_rl_switch_mode, -1);
   rl_add_defun ("gdb-command", tui_rl_command_key, -1);
   rl_add_defun ("next-keymap", tui_rl_next_keymap, -1);
 
   tui_keymap = rl_make_bare_keymap ();
+
+  /* The named keymap feature was added in Readline 8.0.  */
+#if RL_READLINE_VERSION >= 0x800
+  rl_set_keymap_name ("SingleKey", tui_keymap);
+#endif
+
   tui_ctlx_keymap = rl_make_bare_keymap ();
   tui_readline_standard_keymap = rl_get_keymap ();
 
@@ -467,7 +471,6 @@ tui_enable (void)
       nodelay(w, FALSE);
       nl();
       keypad (w, TRUE);
-      rl_initialize ();
       tui_set_term_height_to (LINES);
       tui_set_term_width_to (COLS);
       def_prog_mode ();
@@ -501,7 +504,7 @@ tui_enable (void)
      window.  */
   if (tui_win_resized ())
     {
-      tui_set_win_resized_to (FALSE);
+      tui_set_win_resized_to (false);
       tui_resize_all ();
     }
 
@@ -567,19 +570,6 @@ tui_disable_command (const char *args, int from_tty)
   tui_disable ();
 }
 
-void
-strcat_to_buf (char *buf, int buflen, 
-              const char *item_to_add)
-{
-  if (item_to_add != NULL && buf != NULL)
-    {
-      if ((strlen (buf) + strlen (item_to_add)) <= buflen)
-       strcat (buf, item_to_add);
-      else
-       strncat (buf, item_to_add, (buflen - strlen (buf)));
-    }
-}
-
 #if 0
 /* Solaris <sys/termios.h> defines CTRL.  */
 #ifndef CTRL
@@ -661,7 +651,7 @@ tui_is_window_visible (enum tui_win_type type)
   if (tui_win_list[type] == 0)
     return false;
   
-  return tui_win_list[type]->is_visible;
+  return tui_win_list[type]->is_visible ();
 }
 
 int
This page took 0.024243 seconds and 4 git commands to generate.