X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Ftui%2Ftui.c;h=30bf54887941585adf806192b5eb4c9fd5100a9c;hb=43df9b2fccc347e95f882519332592a826d72d11;hp=db34e0c0441cd88a5f9cbb8b0473a92e81f1b84c;hpb=2d83e710a14c62cb6a9501c84fc46062f817428d;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c index db34e0c044..30bf548879 100644 --- a/gdb/tui/tui.c +++ b/gdb/tui/tui.c @@ -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 defines CTRL. */ #ifndef CTRL