summaryrefslogtreecommitdiff
path: root/gnu/lib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-03-18 17:32:04 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-03-18 17:32:04 +0000
commitb592f4f37d26789ced18c8a791a3eb2dd1549300 (patch)
treed0d0902ab1b11ab14e715926a98591544a58ad61 /gnu/lib
parent3fc4bdf5cf091672e83df1ecf75a63ea8fa282d2 (diff)
GNU readline-4.1
Diffstat (limited to 'gnu/lib')
-rw-r--r--gnu/lib/libreadline/emacs_keymap.c1278
-rw-r--r--gnu/lib/libreadline/funmap.c35
-rw-r--r--gnu/lib/libreadline/history.c51
-rw-r--r--gnu/lib/libreadline/history.h78
-rw-r--r--gnu/lib/libreadline/histsearch.c16
-rw-r--r--gnu/lib/libreadline/macro.c54
-rw-r--r--gnu/lib/libreadline/signals.c16
-rw-r--r--gnu/lib/libreadline/vi_mode.c366
8 files changed, 896 insertions, 998 deletions
diff --git a/gnu/lib/libreadline/emacs_keymap.c b/gnu/lib/libreadline/emacs_keymap.c
index ca9d1343b65..daba213ba07 100644
--- a/gnu/lib/libreadline/emacs_keymap.c
+++ b/gnu/lib/libreadline/emacs_keymap.c
@@ -33,185 +33,185 @@
KEYMAP_ENTRY_ARRAY emacs_standard_keymap = {
/* Control keys. */
- { ISFUNC, rl_set_mark }, /* Control-@ */
- { ISFUNC, rl_beg_of_line }, /* Control-a */
- { ISFUNC, rl_backward_char }, /* Control-b */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */
- { ISFUNC, rl_delete }, /* Control-d */
- { ISFUNC, rl_end_of_line }, /* Control-e */
- { ISFUNC, rl_forward_char }, /* Control-f */
- { ISFUNC, rl_abort }, /* Control-g */
- { ISFUNC, rl_rubout }, /* Control-h */
- { ISFUNC, rl_complete }, /* Control-i */
- { ISFUNC, rl_newline }, /* Control-j */
- { ISFUNC, rl_kill_line }, /* Control-k */
- { ISFUNC, rl_clear_screen }, /* Control-l */
- { ISFUNC, rl_newline }, /* Control-m */
- { ISFUNC, rl_get_next_history }, /* Control-n */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */
- { ISFUNC, rl_get_previous_history }, /* Control-p */
- { ISFUNC, rl_quoted_insert }, /* Control-q */
- { ISFUNC, rl_reverse_search_history }, /* Control-r */
- { ISFUNC, rl_forward_search_history }, /* Control-s */
- { ISFUNC, rl_transpose_chars }, /* Control-t */
- { ISFUNC, rl_unix_line_discard }, /* Control-u */
- { ISFUNC, rl_quoted_insert }, /* Control-v */
- { ISFUNC, rl_unix_word_rubout }, /* Control-w */
- { ISKMAP, (rl_command_func_t *)emacs_ctlx_keymap }, /* Control-x */
- { ISFUNC, rl_yank }, /* Control-y */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */
- { ISKMAP, (rl_command_func_t *)emacs_meta_keymap }, /* Control-[ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */
- { ISFUNC, rl_char_search }, /* Control-] */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */
- { ISFUNC, rl_undo_command }, /* Control-_ */
+ { ISFUNC, rl_set_mark }, /* Control-@ */
+ { ISFUNC, rl_beg_of_line }, /* Control-a */
+ { ISFUNC, rl_backward }, /* Control-b */
+ { ISFUNC, (Function *)0x0 }, /* Control-c */
+ { ISFUNC, rl_delete }, /* Control-d */
+ { ISFUNC, rl_end_of_line }, /* Control-e */
+ { ISFUNC, rl_forward }, /* Control-f */
+ { ISFUNC, rl_abort }, /* Control-g */
+ { ISFUNC, rl_rubout }, /* Control-h */
+ { ISFUNC, rl_complete }, /* Control-i */
+ { ISFUNC, rl_newline }, /* Control-j */
+ { ISFUNC, rl_kill_line }, /* Control-k */
+ { ISFUNC, rl_clear_screen }, /* Control-l */
+ { ISFUNC, rl_newline }, /* Control-m */
+ { ISFUNC, rl_get_next_history }, /* Control-n */
+ { ISFUNC, (Function *)0x0 }, /* Control-o */
+ { ISFUNC, rl_get_previous_history }, /* Control-p */
+ { ISFUNC, rl_quoted_insert }, /* Control-q */
+ { ISFUNC, rl_reverse_search_history }, /* Control-r */
+ { ISFUNC, rl_forward_search_history }, /* Control-s */
+ { ISFUNC, rl_transpose_chars }, /* Control-t */
+ { ISFUNC, rl_unix_line_discard }, /* Control-u */
+ { ISFUNC, rl_quoted_insert }, /* Control-v */
+ { ISFUNC, rl_unix_word_rubout }, /* Control-w */
+ { ISKMAP, (Function *)emacs_ctlx_keymap }, /* Control-x */
+ { ISFUNC, rl_yank }, /* Control-y */
+ { ISFUNC, (Function *)0x0 }, /* Control-z */
+ { ISKMAP, (Function *)emacs_meta_keymap }, /* Control-[ */
+ { ISFUNC, (Function *)0x0 }, /* Control-\ */
+ { ISFUNC, rl_char_search }, /* Control-] */
+ { ISFUNC, (Function *)0x0 }, /* Control-^ */
+ { ISFUNC, rl_undo_command }, /* Control-_ */
/* The start of printing characters. */
- { ISFUNC, rl_insert }, /* SPACE */
- { ISFUNC, rl_insert }, /* ! */
- { ISFUNC, rl_insert }, /* " */
- { ISFUNC, rl_insert }, /* # */
- { ISFUNC, rl_insert }, /* $ */
- { ISFUNC, rl_insert }, /* % */
- { ISFUNC, rl_insert }, /* & */
- { ISFUNC, rl_insert }, /* ' */
- { ISFUNC, rl_insert }, /* ( */
- { ISFUNC, rl_insert }, /* ) */
- { ISFUNC, rl_insert }, /* * */
- { ISFUNC, rl_insert }, /* + */
- { ISFUNC, rl_insert }, /* , */
- { ISFUNC, rl_insert }, /* - */
- { ISFUNC, rl_insert }, /* . */
- { ISFUNC, rl_insert }, /* / */
-
- /* Regular digits. */
- { ISFUNC, rl_insert }, /* 0 */
- { ISFUNC, rl_insert }, /* 1 */
- { ISFUNC, rl_insert }, /* 2 */
- { ISFUNC, rl_insert }, /* 3 */
- { ISFUNC, rl_insert }, /* 4 */
- { ISFUNC, rl_insert }, /* 5 */
- { ISFUNC, rl_insert }, /* 6 */
- { ISFUNC, rl_insert }, /* 7 */
- { ISFUNC, rl_insert }, /* 8 */
- { ISFUNC, rl_insert }, /* 9 */
+ { ISFUNC, rl_insert }, /* SPACE */
+ { ISFUNC, rl_insert }, /* ! */
+ { ISFUNC, rl_insert }, /* " */
+ { ISFUNC, rl_insert }, /* # */
+ { ISFUNC, rl_insert }, /* $ */
+ { ISFUNC, rl_insert }, /* % */
+ { ISFUNC, rl_insert }, /* & */
+ { ISFUNC, rl_insert }, /* ' */
+ { ISFUNC, rl_insert }, /* ( */
+ { ISFUNC, rl_insert }, /* ) */
+ { ISFUNC, rl_insert }, /* * */
+ { ISFUNC, rl_insert }, /* + */
+ { ISFUNC, rl_insert }, /* , */
+ { ISFUNC, rl_insert }, /* - */
+ { ISFUNC, rl_insert }, /* . */
+ { ISFUNC, rl_insert }, /* / */
+
+ /* Regular digits. */
+ { ISFUNC, rl_insert }, /* 0 */
+ { ISFUNC, rl_insert }, /* 1 */
+ { ISFUNC, rl_insert }, /* 2 */
+ { ISFUNC, rl_insert }, /* 3 */
+ { ISFUNC, rl_insert }, /* 4 */
+ { ISFUNC, rl_insert }, /* 5 */
+ { ISFUNC, rl_insert }, /* 6 */
+ { ISFUNC, rl_insert }, /* 7 */
+ { ISFUNC, rl_insert }, /* 8 */
+ { ISFUNC, rl_insert }, /* 9 */
/* A little more punctuation. */
- { ISFUNC, rl_insert }, /* : */
- { ISFUNC, rl_insert }, /* ; */
- { ISFUNC, rl_insert }, /* < */
- { ISFUNC, rl_insert }, /* = */
- { ISFUNC, rl_insert }, /* > */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* @ */
+ { ISFUNC, rl_insert }, /* : */
+ { ISFUNC, rl_insert }, /* ; */
+ { ISFUNC, rl_insert }, /* < */
+ { ISFUNC, rl_insert }, /* = */
+ { ISFUNC, rl_insert }, /* > */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* @ */
/* Uppercase alphabet. */
- { ISFUNC, rl_insert }, /* A */
- { ISFUNC, rl_insert }, /* B */
- { ISFUNC, rl_insert }, /* C */
- { ISFUNC, rl_insert }, /* D */
- { ISFUNC, rl_insert }, /* E */
- { ISFUNC, rl_insert }, /* F */
- { ISFUNC, rl_insert }, /* G */
- { ISFUNC, rl_insert }, /* H */
- { ISFUNC, rl_insert }, /* I */
- { ISFUNC, rl_insert }, /* J */
- { ISFUNC, rl_insert }, /* K */
- { ISFUNC, rl_insert }, /* L */
- { ISFUNC, rl_insert }, /* M */
- { ISFUNC, rl_insert }, /* N */
- { ISFUNC, rl_insert }, /* O */
- { ISFUNC, rl_insert }, /* P */
- { ISFUNC, rl_insert }, /* Q */
- { ISFUNC, rl_insert }, /* R */
- { ISFUNC, rl_insert }, /* S */
- { ISFUNC, rl_insert }, /* T */
- { ISFUNC, rl_insert }, /* U */
- { ISFUNC, rl_insert }, /* V */
- { ISFUNC, rl_insert }, /* W */
- { ISFUNC, rl_insert }, /* X */
- { ISFUNC, rl_insert }, /* Y */
- { ISFUNC, rl_insert }, /* Z */
+ { ISFUNC, rl_insert }, /* A */
+ { ISFUNC, rl_insert }, /* B */
+ { ISFUNC, rl_insert }, /* C */
+ { ISFUNC, rl_insert }, /* D */
+ { ISFUNC, rl_insert }, /* E */
+ { ISFUNC, rl_insert }, /* F */
+ { ISFUNC, rl_insert }, /* G */
+ { ISFUNC, rl_insert }, /* H */
+ { ISFUNC, rl_insert }, /* I */
+ { ISFUNC, rl_insert }, /* J */
+ { ISFUNC, rl_insert }, /* K */
+ { ISFUNC, rl_insert }, /* L */
+ { ISFUNC, rl_insert }, /* M */
+ { ISFUNC, rl_insert }, /* N */
+ { ISFUNC, rl_insert }, /* O */
+ { ISFUNC, rl_insert }, /* P */
+ { ISFUNC, rl_insert }, /* Q */
+ { ISFUNC, rl_insert }, /* R */
+ { ISFUNC, rl_insert }, /* S */
+ { ISFUNC, rl_insert }, /* T */
+ { ISFUNC, rl_insert }, /* U */
+ { ISFUNC, rl_insert }, /* V */
+ { ISFUNC, rl_insert }, /* W */
+ { ISFUNC, rl_insert }, /* X */
+ { ISFUNC, rl_insert }, /* Y */
+ { ISFUNC, rl_insert }, /* Z */
/* Some more punctuation. */
- { ISFUNC, rl_insert }, /* [ */
- { ISFUNC, rl_insert }, /* \ */
- { ISFUNC, rl_insert }, /* ] */
- { ISFUNC, rl_insert }, /* ^ */
- { ISFUNC, rl_insert }, /* _ */
- { ISFUNC, rl_insert }, /* ` */
+ { ISFUNC, rl_insert }, /* [ */
+ { ISFUNC, rl_insert }, /* \ */
+ { ISFUNC, rl_insert }, /* ] */
+ { ISFUNC, rl_insert }, /* ^ */
+ { ISFUNC, rl_insert }, /* _ */
+ { ISFUNC, rl_insert }, /* ` */
/* Lowercase alphabet. */
- { ISFUNC, rl_insert }, /* a */
- { ISFUNC, rl_insert }, /* b */
- { ISFUNC, rl_insert }, /* c */
- { ISFUNC, rl_insert }, /* d */
- { ISFUNC, rl_insert }, /* e */
- { ISFUNC, rl_insert }, /* f */
- { ISFUNC, rl_insert }, /* g */
- { ISFUNC, rl_insert }, /* h */
- { ISFUNC, rl_insert }, /* i */
- { ISFUNC, rl_insert }, /* j */
- { ISFUNC, rl_insert }, /* k */
- { ISFUNC, rl_insert }, /* l */
- { ISFUNC, rl_insert }, /* m */
- { ISFUNC, rl_insert }, /* n */
- { ISFUNC, rl_insert }, /* o */
- { ISFUNC, rl_insert }, /* p */
- { ISFUNC, rl_insert }, /* q */
- { ISFUNC, rl_insert }, /* r */
- { ISFUNC, rl_insert }, /* s */
- { ISFUNC, rl_insert }, /* t */
- { ISFUNC, rl_insert }, /* u */
- { ISFUNC, rl_insert }, /* v */
- { ISFUNC, rl_insert }, /* w */
- { ISFUNC, rl_insert }, /* x */
- { ISFUNC, rl_insert }, /* y */
- { ISFUNC, rl_insert }, /* z */
+ { ISFUNC, rl_insert }, /* a */
+ { ISFUNC, rl_insert }, /* b */
+ { ISFUNC, rl_insert }, /* c */
+ { ISFUNC, rl_insert }, /* d */
+ { ISFUNC, rl_insert }, /* e */
+ { ISFUNC, rl_insert }, /* f */
+ { ISFUNC, rl_insert }, /* g */
+ { ISFUNC, rl_insert }, /* h */
+ { ISFUNC, rl_insert }, /* i */
+ { ISFUNC, rl_insert }, /* j */
+ { ISFUNC, rl_insert }, /* k */
+ { ISFUNC, rl_insert }, /* l */
+ { ISFUNC, rl_insert }, /* m */
+ { ISFUNC, rl_insert }, /* n */
+ { ISFUNC, rl_insert }, /* o */
+ { ISFUNC, rl_insert }, /* p */
+ { ISFUNC, rl_insert }, /* q */
+ { ISFUNC, rl_insert }, /* r */
+ { ISFUNC, rl_insert }, /* s */
+ { ISFUNC, rl_insert }, /* t */
+ { ISFUNC, rl_insert }, /* u */
+ { ISFUNC, rl_insert }, /* v */
+ { ISFUNC, rl_insert }, /* w */
+ { ISFUNC, rl_insert }, /* x */
+ { ISFUNC, rl_insert }, /* y */
+ { ISFUNC, rl_insert }, /* z */
/* Final punctuation. */
- { ISFUNC, rl_insert }, /* { */
- { ISFUNC, rl_insert }, /* | */
- { ISFUNC, rl_insert }, /* } */
- { ISFUNC, rl_insert }, /* ~ */
- { ISFUNC, rl_rubout }, /* RUBOUT */
+ { ISFUNC, rl_insert }, /* { */
+ { ISFUNC, rl_insert }, /* | */
+ { ISFUNC, rl_insert }, /* } */
+ { ISFUNC, rl_insert }, /* ~ */
+ { ISFUNC, rl_rubout }, /* RUBOUT */
#if KEYMAP_SIZE > 128
/* Pure 8-bit characters (128 - 159).
These might be used in some
character sets. */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
- { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
/* ISO Latin-1 characters (160 - 255) */
{ ISFUNC, rl_insert }, /* No-break space */
@@ -316,78 +316,78 @@ KEYMAP_ENTRY_ARRAY emacs_standard_keymap = {
KEYMAP_ENTRY_ARRAY emacs_meta_keymap = {
/* Meta keys. Just like above, but the high bit is set. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-@ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-a */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-b */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-c */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-d */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-e */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-f */
- { ISFUNC, rl_abort }, /* Meta-Control-g */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-@ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-a */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-b */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-c */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-d */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-e */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-f */
+ { ISFUNC, rl_abort }, /* Meta-Control-g */
{ ISFUNC, rl_backward_kill_word }, /* Meta-Control-h */
- { ISFUNC, rl_tab_insert }, /* Meta-Control-i */
- { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-j */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-k */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-l */
- { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-m */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-n */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-o */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-p */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-q */
- { ISFUNC, rl_revert_line }, /* Meta-Control-r */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-s */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-t */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-u */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-v */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-w */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-x */
- { ISFUNC, rl_yank_nth_arg }, /* Meta-Control-y */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-z */
-
- { ISFUNC, rl_complete }, /* Meta-Control-[ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-\ */
+ { ISFUNC, rl_tab_insert }, /* Meta-Control-i */
+ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-j */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-k */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-l */
+ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-m */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-n */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-o */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-p */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-q */
+ { ISFUNC, rl_revert_line }, /* Meta-Control-r */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-s */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-t */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-u */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-v */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-w */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-x */
+ { ISFUNC, rl_yank_nth_arg }, /* Meta-Control-y */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-z */
+
+ { ISFUNC, rl_complete }, /* Meta-Control-[ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-\ */
{ ISFUNC, rl_backward_char_search }, /* Meta-Control-] */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-^ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-_ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-^ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-Control-_ */
/* The start of printing characters. */
- { ISFUNC, rl_set_mark }, /* Meta-SPACE */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-! */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-" */
- { ISFUNC, rl_insert_comment }, /* Meta-# */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-$ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-% */
- { ISFUNC, rl_tilde_expand }, /* Meta-& */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-' */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-( */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-) */
+ { ISFUNC, rl_set_mark }, /* Meta-SPACE */
+ { ISFUNC, (Function *)0x0 }, /* Meta-! */
+ { ISFUNC, (Function *)0x0 }, /* Meta-" */
+ { ISFUNC, rl_insert_comment },/* Meta-# */
+ { ISFUNC, (Function *)0x0 }, /* Meta-$ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-% */
+ { ISFUNC, rl_tilde_expand }, /* Meta-& */
+ { ISFUNC, (Function *)0x0 }, /* Meta-' */
+ { ISFUNC, (Function *)0x0 }, /* Meta-( */
+ { ISFUNC, (Function *)0x0 }, /* Meta-) */
{ ISFUNC, rl_insert_completions }, /* Meta-* */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-+ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-, */
- { ISFUNC, rl_digit_argument }, /* Meta-- */
- { ISFUNC, rl_yank_last_arg}, /* Meta-. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-/ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-+ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-, */
+ { ISFUNC, rl_digit_argument }, /* Meta-- */
+ { ISFUNC, rl_yank_last_arg}, /* Meta-. */
+ { ISFUNC, (Function *)0x0 }, /* Meta-/ */
/* Regular digits. */
- { ISFUNC, rl_digit_argument }, /* Meta-0 */
- { ISFUNC, rl_digit_argument }, /* Meta-1 */
- { ISFUNC, rl_digit_argument }, /* Meta-2 */
- { ISFUNC, rl_digit_argument }, /* Meta-3 */
- { ISFUNC, rl_digit_argument }, /* Meta-4 */
- { ISFUNC, rl_digit_argument }, /* Meta-5 */
- { ISFUNC, rl_digit_argument }, /* Meta-6 */
- { ISFUNC, rl_digit_argument }, /* Meta-7 */
- { ISFUNC, rl_digit_argument }, /* Meta-8 */
- { ISFUNC, rl_digit_argument }, /* Meta-9 */
+ { ISFUNC, rl_digit_argument }, /* Meta-0 */
+ { ISFUNC, rl_digit_argument }, /* Meta-1 */
+ { ISFUNC, rl_digit_argument }, /* Meta-2 */
+ { ISFUNC, rl_digit_argument }, /* Meta-3 */
+ { ISFUNC, rl_digit_argument }, /* Meta-4 */
+ { ISFUNC, rl_digit_argument }, /* Meta-5 */
+ { ISFUNC, rl_digit_argument }, /* Meta-6 */
+ { ISFUNC, rl_digit_argument }, /* Meta-7 */
+ { ISFUNC, rl_digit_argument }, /* Meta-8 */
+ { ISFUNC, rl_digit_argument }, /* Meta-9 */
/* A little more punctuation. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-: */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-; */
+ { ISFUNC, (Function *)0x0 }, /* Meta-: */
+ { ISFUNC, (Function *)0x0 }, /* Meta-; */
{ ISFUNC, rl_beginning_of_history }, /* Meta-< */
{ ISFUNC, rl_possible_completions }, /* Meta-= */
{ ISFUNC, rl_end_of_history }, /* Meta-> */
{ ISFUNC, rl_possible_completions }, /* Meta-? */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-@ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-@ */
/* Uppercase alphabet. */
{ ISFUNC, rl_do_lowercase_version }, /* Meta-A */
@@ -418,456 +418,456 @@ KEYMAP_ENTRY_ARRAY emacs_meta_keymap = {
{ ISFUNC, rl_do_lowercase_version }, /* Meta-Z */
/* Some more punctuation. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-[ */ /* was rl_arrow_keys */
+ { ISFUNC, (Function *)0x0 }, /* Meta-[ */ /* was rl_arrow_keys */
{ ISFUNC, rl_delete_horizontal_space }, /* Meta-\ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-] */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-^ */
- { ISFUNC, rl_yank_last_arg }, /* Meta-_ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-` */
+ { ISFUNC, (Function *)0x0 }, /* Meta-] */
+ { ISFUNC, (Function *)0x0 }, /* Meta-^ */
+ { ISFUNC, rl_yank_last_arg }, /* Meta-_ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-` */
/* Lowercase alphabet. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-a */
- { ISFUNC, rl_backward_word }, /* Meta-b */
- { ISFUNC, rl_capitalize_word }, /* Meta-c */
- { ISFUNC, rl_kill_word }, /* Meta-d */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-e */
- { ISFUNC, rl_forward_word }, /* Meta-f */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-g */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-h */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-i */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-j */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-k */
- { ISFUNC, rl_downcase_word }, /* Meta-l */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-m */
+ { ISFUNC, (Function *)0x0 }, /* Meta-a */
+ { ISFUNC, rl_backward_word }, /* Meta-b */
+ { ISFUNC, rl_capitalize_word }, /* Meta-c */
+ { ISFUNC, rl_kill_word }, /* Meta-d */
+ { ISFUNC, (Function *)0x0 }, /* Meta-e */
+ { ISFUNC, rl_forward_word }, /* Meta-f */
+ { ISFUNC, (Function *)0x0 }, /* Meta-g */
+ { ISFUNC, (Function *)0x0 }, /* Meta-h */
+ { ISFUNC, (Function *)0x0 }, /* Meta-i */
+ { ISFUNC, (Function *)0x0 }, /* Meta-j */
+ { ISFUNC, (Function *)0x0 }, /* Meta-k */
+ { ISFUNC, rl_downcase_word }, /* Meta-l */
+ { ISFUNC, (Function *)0x0 }, /* Meta-m */
{ ISFUNC, rl_noninc_forward_search }, /* Meta-n */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-o */ /* was rl_arrow_keys */
+ { ISFUNC, (Function *)0x0 }, /* Meta-o */ /* was rl_arrow_keys */
{ ISFUNC, rl_noninc_reverse_search }, /* Meta-p */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-q */
- { ISFUNC, rl_revert_line }, /* Meta-r */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-s */
- { ISFUNC, rl_transpose_words }, /* Meta-t */
- { ISFUNC, rl_upcase_word }, /* Meta-u */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-v */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-w */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-x */
- { ISFUNC, rl_yank_pop }, /* Meta-y */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-z */
+ { ISFUNC, (Function *)0x0 }, /* Meta-q */
+ { ISFUNC, rl_revert_line }, /* Meta-r */
+ { ISFUNC, (Function *)0x0 }, /* Meta-s */
+ { ISFUNC, rl_transpose_words }, /* Meta-t */
+ { ISFUNC, rl_upcase_word }, /* Meta-u */
+ { ISFUNC, (Function *)0x0 }, /* Meta-v */
+ { ISFUNC, (Function *)0x0 }, /* Meta-w */
+ { ISFUNC, (Function *)0x0 }, /* Meta-x */
+ { ISFUNC, rl_yank_pop }, /* Meta-y */
+ { ISFUNC, (Function *)0x0 }, /* Meta-z */
/* Final punctuation. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-{ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-| */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-} */
- { ISFUNC, rl_tilde_expand }, /* Meta-~ */
- { ISFUNC, rl_backward_kill_word }, /* Meta-rubout */
+ { ISFUNC, (Function *)0x0 }, /* Meta-{ */
+ { ISFUNC, (Function *)0x0 }, /* Meta-| */
+ { ISFUNC, (Function *)0x0 }, /* Meta-} */
+ { ISFUNC, rl_tilde_expand }, /* Meta-~ */
+ { ISFUNC, rl_backward_kill_word }, /* Meta-rubout */
#if KEYMAP_SIZE > 128
/* Undefined keys. */
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 }
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 }
#endif /* KEYMAP_SIZE > 128 */
};
KEYMAP_ENTRY_ARRAY emacs_ctlx_keymap = {
/* Control keys. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-d */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-e */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */
- { ISFUNC, rl_abort }, /* Control-g */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-h */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-j */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-k */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-l */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-m */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-n */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-p */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-q */
- { ISFUNC, rl_re_read_init_file }, /* Control-r */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-s */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-t */
- { ISFUNC, rl_undo_command }, /* Control-u */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-v */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-w */
- { ISFUNC, rl_exchange_point_and_mark }, /* Control-x */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-y */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-[ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-_ */
+ { ISFUNC, (Function *)0x0 }, /* Control-@ */
+ { ISFUNC, (Function *)0x0 }, /* Control-a */
+ { ISFUNC, (Function *)0x0 }, /* Control-b */
+ { ISFUNC, (Function *)0x0 }, /* Control-c */
+ { ISFUNC, (Function *)0x0 }, /* Control-d */
+ { ISFUNC, (Function *)0x0 }, /* Control-e */
+ { ISFUNC, (Function *)0x0 }, /* Control-f */
+ { ISFUNC, rl_abort }, /* Control-g */
+ { ISFUNC, (Function *)0x0 }, /* Control-h */
+ { ISFUNC, (Function *)0x0 }, /* Control-i */
+ { ISFUNC, (Function *)0x0 }, /* Control-j */
+ { ISFUNC, (Function *)0x0 }, /* Control-k */
+ { ISFUNC, (Function *)0x0 }, /* Control-l */
+ { ISFUNC, (Function *)0x0 }, /* Control-m */
+ { ISFUNC, (Function *)0x0 }, /* Control-n */
+ { ISFUNC, (Function *)0x0 }, /* Control-o */
+ { ISFUNC, (Function *)0x0 }, /* Control-p */
+ { ISFUNC, (Function *)0x0 }, /* Control-q */
+ { ISFUNC, rl_re_read_init_file }, /* Control-r */
+ { ISFUNC, (Function *)0x0 }, /* Control-s */
+ { ISFUNC, (Function *)0x0 }, /* Control-t */
+ { ISFUNC, rl_undo_command }, /* Control-u */
+ { ISFUNC, (Function *)0x0 }, /* Control-v */
+ { ISFUNC, (Function *)0x0 }, /* Control-w */
+ { ISFUNC, rl_exchange_point_and_mark },/* Control-x */
+ { ISFUNC, (Function *)0x0 }, /* Control-y */
+ { ISFUNC, (Function *)0x0 }, /* Control-z */
+ { ISFUNC, (Function *)0x0 }, /* Control-[ */
+ { ISFUNC, (Function *)0x0 }, /* Control-\ */
+ { ISFUNC, (Function *)0x0 }, /* Control-] */
+ { ISFUNC, (Function *)0x0 }, /* Control-^ */
+ { ISFUNC, (Function *)0x0 }, /* Control-_ */
/* The start of printing characters. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* SPACE */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* " */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* # */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* $ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* % */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* & */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */
- { ISFUNC, rl_start_kbd_macro }, /* ( */
- { ISFUNC, rl_end_kbd_macro }, /* ) */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* * */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* + */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* , */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* - */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* . */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* / */
+ { ISFUNC, (Function *)0x0 }, /* SPACE */
+ { ISFUNC, (Function *)0x0 }, /* ! */
+ { ISFUNC, (Function *)0x0 }, /* " */
+ { ISFUNC, (Function *)0x0 }, /* # */
+ { ISFUNC, (Function *)0x0 }, /* $ */
+ { ISFUNC, (Function *)0x0 }, /* % */
+ { ISFUNC, (Function *)0x0 }, /* & */
+ { ISFUNC, (Function *)0x0 }, /* ' */
+ { ISFUNC, rl_start_kbd_macro }, /* ( */
+ { ISFUNC, rl_end_kbd_macro }, /* ) */
+ { ISFUNC, (Function *)0x0 }, /* * */
+ { ISFUNC, (Function *)0x0 }, /* + */
+ { ISFUNC, (Function *)0x0 }, /* , */
+ { ISFUNC, (Function *)0x0 }, /* - */
+ { ISFUNC, (Function *)0x0 }, /* . */
+ { ISFUNC, (Function *)0x0 }, /* / */
/* Regular digits. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 0 */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 1 */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 2 */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 3 */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 4 */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 5 */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 6 */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 7 */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 8 */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* 9 */
+ { ISFUNC, (Function *)0x0 }, /* 0 */
+ { ISFUNC, (Function *)0x0 }, /* 1 */
+ { ISFUNC, (Function *)0x0 }, /* 2 */
+ { ISFUNC, (Function *)0x0 }, /* 3 */
+ { ISFUNC, (Function *)0x0 }, /* 4 */
+ { ISFUNC, (Function *)0x0 }, /* 5 */
+ { ISFUNC, (Function *)0x0 }, /* 6 */
+ { ISFUNC, (Function *)0x0 }, /* 7 */
+ { ISFUNC, (Function *)0x0 }, /* 8 */
+ { ISFUNC, (Function *)0x0 }, /* 9 */
/* A little more punctuation. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* : */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* ; */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* < */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* = */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* > */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* ? */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */
+ { ISFUNC, (Function *)0x0 }, /* : */
+ { ISFUNC, (Function *)0x0 }, /* ; */
+ { ISFUNC, (Function *)0x0 }, /* < */
+ { ISFUNC, (Function *)0x0 }, /* = */
+ { ISFUNC, (Function *)0x0 }, /* > */
+ { ISFUNC, (Function *)0x0 }, /* ? */
+ { ISFUNC, (Function *)0x0 }, /* @ */
/* Uppercase alphabet. */
- { ISFUNC, rl_do_lowercase_version }, /* A */
- { ISFUNC, rl_do_lowercase_version }, /* B */
- { ISFUNC, rl_do_lowercase_version }, /* C */
- { ISFUNC, rl_do_lowercase_version }, /* D */
- { ISFUNC, rl_do_lowercase_version }, /* E */
- { ISFUNC, rl_do_lowercase_version }, /* F */
- { ISFUNC, rl_do_lowercase_version }, /* G */
- { ISFUNC, rl_do_lowercase_version }, /* H */
- { ISFUNC, rl_do_lowercase_version }, /* I */
- { ISFUNC, rl_do_lowercase_version }, /* J */
- { ISFUNC, rl_do_lowercase_version }, /* K */
- { ISFUNC, rl_do_lowercase_version }, /* L */
- { ISFUNC, rl_do_lowercase_version }, /* M */
- { ISFUNC, rl_do_lowercase_version }, /* N */
- { ISFUNC, rl_do_lowercase_version }, /* O */
- { ISFUNC, rl_do_lowercase_version }, /* P */
- { ISFUNC, rl_do_lowercase_version }, /* Q */
- { ISFUNC, rl_do_lowercase_version }, /* R */
- { ISFUNC, rl_do_lowercase_version }, /* S */
- { ISFUNC, rl_do_lowercase_version }, /* T */
- { ISFUNC, rl_do_lowercase_version }, /* U */
- { ISFUNC, rl_do_lowercase_version }, /* V */
- { ISFUNC, rl_do_lowercase_version }, /* W */
- { ISFUNC, rl_do_lowercase_version }, /* X */
- { ISFUNC, rl_do_lowercase_version }, /* Y */
- { ISFUNC, rl_do_lowercase_version }, /* Z */
+ { ISFUNC, rl_do_lowercase_version }, /* A */
+ { ISFUNC, rl_do_lowercase_version }, /* B */
+ { ISFUNC, rl_do_lowercase_version }, /* C */
+ { ISFUNC, rl_do_lowercase_version }, /* D */
+ { ISFUNC, rl_do_lowercase_version }, /* E */
+ { ISFUNC, rl_do_lowercase_version }, /* F */
+ { ISFUNC, rl_do_lowercase_version }, /* G */
+ { ISFUNC, rl_do_lowercase_version }, /* H */
+ { ISFUNC, rl_do_lowercase_version }, /* I */
+ { ISFUNC, rl_do_lowercase_version }, /* J */
+ { ISFUNC, rl_do_lowercase_version }, /* K */
+ { ISFUNC, rl_do_lowercase_version }, /* L */
+ { ISFUNC, rl_do_lowercase_version }, /* M */
+ { ISFUNC, rl_do_lowercase_version }, /* N */
+ { ISFUNC, rl_do_lowercase_version }, /* O */
+ { ISFUNC, rl_do_lowercase_version }, /* P */
+ { ISFUNC, rl_do_lowercase_version }, /* Q */
+ { ISFUNC, rl_do_lowercase_version }, /* R */
+ { ISFUNC, rl_do_lowercase_version }, /* S */
+ { ISFUNC, rl_do_lowercase_version }, /* T */
+ { ISFUNC, rl_do_lowercase_version }, /* U */
+ { ISFUNC, rl_do_lowercase_version }, /* V */
+ { ISFUNC, rl_do_lowercase_version }, /* W */
+ { ISFUNC, rl_do_lowercase_version }, /* X */
+ { ISFUNC, rl_do_lowercase_version }, /* Y */
+ { ISFUNC, rl_do_lowercase_version }, /* Z */
/* Some more punctuation. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* [ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* \ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* ^ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* _ */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* ` */
+ { ISFUNC, (Function *)0x0 }, /* [ */
+ { ISFUNC, (Function *)0x0 }, /* \ */
+ { ISFUNC, (Function *)0x0 }, /* ] */
+ { ISFUNC, (Function *)0x0 }, /* ^ */
+ { ISFUNC, (Function *)0x0 }, /* _ */
+ { ISFUNC, (Function *)0x0 }, /* ` */
/* Lowercase alphabet. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* a */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* b */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* c */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* d */
- { ISFUNC, rl_call_last_kbd_macro }, /* e */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* f */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* g */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* h */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* i */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* j */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* k */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* l */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* m */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* n */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* o */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* p */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* q */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* r */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* s */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* t */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* u */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* v */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* w */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* x */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* y */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* z */
+ { ISFUNC, (Function *)0x0 }, /* a */
+ { ISFUNC, (Function *)0x0 }, /* b */
+ { ISFUNC, (Function *)0x0 }, /* c */
+ { ISFUNC, (Function *)0x0 }, /* d */
+ { ISFUNC, rl_call_last_kbd_macro }, /* e */
+ { ISFUNC, (Function *)0x0 }, /* f */
+ { ISFUNC, (Function *)0x0 }, /* g */
+ { ISFUNC, (Function *)0x0 }, /* h */
+ { ISFUNC, (Function *)0x0 }, /* i */
+ { ISFUNC, (Function *)0x0 }, /* j */
+ { ISFUNC, (Function *)0x0 }, /* k */
+ { ISFUNC, (Function *)0x0 }, /* l */
+ { ISFUNC, (Function *)0x0 }, /* m */
+ { ISFUNC, (Function *)0x0 }, /* n */
+ { ISFUNC, (Function *)0x0 }, /* o */
+ { ISFUNC, (Function *)0x0 }, /* p */
+ { ISFUNC, (Function *)0x0 }, /* q */
+ { ISFUNC, (Function *)0x0 }, /* r */
+ { ISFUNC, (Function *)0x0 }, /* s */
+ { ISFUNC, (Function *)0x0 }, /* t */
+ { ISFUNC, (Function *)0x0 }, /* u */
+ { ISFUNC, (Function *)0x0 }, /* v */
+ { ISFUNC, (Function *)0x0 }, /* w */
+ { ISFUNC, (Function *)0x0 }, /* x */
+ { ISFUNC, (Function *)0x0 }, /* y */
+ { ISFUNC, (Function *)0x0 }, /* z */
/* Final punctuation. */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* { */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* | */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* } */
- { ISFUNC, (rl_command_func_t *)0x0 }, /* ~ */
- { ISFUNC, rl_backward_kill_line }, /* RUBOUT */
+ { ISFUNC, (Function *)0x0 }, /* { */
+ { ISFUNC, (Function *)0x0 }, /* | */
+ { ISFUNC, (Function *)0x0 }, /* } */
+ { ISFUNC, (Function *)0x0 }, /* ~ */
+ { ISFUNC, rl_backward_kill_line }, /* RUBOUT */
#if KEYMAP_SIZE > 128
/* Undefined keys. */
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 },
- { ISFUNC, (rl_command_func_t *)0x0 }
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 },
+ { ISFUNC, (Function *)0x0 }
#endif /* KEYMAP_SIZE > 128 */
};
diff --git a/gnu/lib/libreadline/funmap.c b/gnu/lib/libreadline/funmap.c
index fe9a1da43d7..1f7ba87129d 100644
--- a/gnu/lib/libreadline/funmap.c
+++ b/gnu/lib/libreadline/funmap.c
@@ -46,7 +46,7 @@ typedef int QSFUNC (const void *, const void *);
typedef int QSFUNC ();
#endif
-extern int _rl_qsort_string_compare PARAMS((char **, char **));
+extern int _rl_qsort_string_compare ();
FUNMAP **funmap;
static int funmap_size;
@@ -60,8 +60,7 @@ static FUNMAP default_funmap[] = {
{ "abort", rl_abort },
{ "accept-line", rl_newline },
{ "arrow-key-prefix", rl_arrow_keys },
- { "backward-byte", rl_backward_byte },
- { "backward-char", rl_backward_char },
+ { "backward-char", rl_backward },
{ "backward-delete-char", rl_rubout },
{ "backward-kill-line", rl_backward_kill_line },
{ "backward-kill-word", rl_backward_kill_word },
@@ -92,8 +91,7 @@ static FUNMAP default_funmap[] = {
{ "end-of-line", rl_end_of_line },
{ "exchange-point-and-mark", rl_exchange_point_and_mark },
{ "forward-backward-delete-char", rl_rubout_or_delete },
- { "forward-byte", rl_forward_byte },
- { "forward-char", rl_forward_char },
+ { "forward-char", rl_forward },
{ "forward-search-history", rl_forward_search_history },
{ "forward-word", rl_forward_word },
{ "history-search-backward", rl_history_search_backward },
@@ -110,8 +108,7 @@ static FUNMAP default_funmap[] = {
{ "non-incremental-reverse-search-history", rl_noninc_reverse_search },
{ "non-incremental-forward-search-history-again", rl_noninc_forward_search_again },
{ "non-incremental-reverse-search-history-again", rl_noninc_reverse_search_again },
- { "overwrite-mode", rl_overwrite_mode },
-#ifdef __CYGWIN__
+#ifdef __CYGWIN32__
{ "paste-from-clipboard", rl_paste_from_clipboard },
#endif
{ "possible-completions", rl_possible_completions },
@@ -145,6 +142,7 @@ static FUNMAP default_funmap[] = {
{ "vi-arg-digit", rl_vi_arg_digit },
{ "vi-back-to-indent", rl_vi_back_to_indent },
{ "vi-bWord", rl_vi_bWord },
+ { "vi-bracktype", rl_vi_bracktype },
{ "vi-bword", rl_vi_bword },
{ "vi-change-case", rl_vi_change_case },
{ "vi-change-char", rl_vi_change_char },
@@ -184,13 +182,13 @@ static FUNMAP default_funmap[] = {
{ "vi-yank-to", rl_vi_yank_to },
#endif /* VI_MODE */
- {(char *)NULL, (rl_command_func_t *)NULL }
+ {(char *)NULL, (Function *)NULL }
};
int
rl_add_funmap_entry (name, function)
- const char *name;
- rl_command_func_t *function;
+ char *name;
+ Function *function;
{
if (funmap_entry + 2 >= funmap_size)
{
@@ -227,21 +225,21 @@ rl_initialize_funmap ()
/* Produce a NULL terminated array of known function names. The array
is sorted. The array itself is allocated, but not the strings inside.
You should free () the array when you done, but not the pointrs. */
-const char **
+char **
rl_funmap_names ()
{
- const char **result;
+ char **result;
int result_size, result_index;
/* Make sure that the function map has been initialized. */
rl_initialize_funmap ();
- for (result_index = result_size = 0, result = (const char **)NULL; funmap[result_index]; result_index++)
+ for (result_index = result_size = 0, result = (char **)NULL; funmap[result_index]; result_index++)
{
if (result_index + 2 > result_size)
{
result_size += 20;
- result = (const char **)xrealloc (result, result_size * sizeof (char *));
+ result = (char **)xrealloc (result, result_size * sizeof (char *));
}
result[result_index] = funmap[result_index]->name;
@@ -251,3 +249,12 @@ rl_funmap_names ()
qsort (result, result_index, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare);
return (result);
}
+
+/* Things that mean `Control'. */
+char *possible_control_prefixes[] = {
+ "Control-", "C-", "CTRL-", (char *)NULL
+};
+
+char *possible_meta_prefixes[] = {
+ "Meta", "M-", (char *)NULL
+};
diff --git a/gnu/lib/libreadline/history.c b/gnu/lib/libreadline/history.c
index 4242f33efe1..400f18bc602 100644
--- a/gnu/lib/libreadline/history.c
+++ b/gnu/lib/libreadline/history.c
@@ -44,6 +44,12 @@
# include <unistd.h>
#endif
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
#include "history.h"
#include "histlib.h"
@@ -65,13 +71,9 @@ static HIST_ENTRY **the_history = (HIST_ENTRY **)NULL;
history that we save. */
static int history_stifled;
-/* The current number of slots allocated to the input_history. */
-static int history_size;
-
/* If HISTORY_STIFLED is non-zero, then this is the maximum number of
entries to remember. */
-int history_max_entries;
-int max_input_history; /* backwards compatibility */
+int max_input_history;
/* The current location of the interactive history pointer. Just makes
life easier for outside callers. */
@@ -80,6 +82,9 @@ int history_offset;
/* The number of strings currently stored in the history list. */
int history_length;
+/* The current number of slots allocated to the input_history. */
+static int history_size;
+
/* The logical `base' of the history array. It defaults to 1. */
int history_base = 1;
@@ -129,7 +134,9 @@ history_total_bytes ()
{
register int i, result;
- for (i = result = 0; the_history && the_history[i]; i++)
+ result = 0;
+
+ for (i = 0; the_history && the_history[i]; i++)
result += strlen (the_history[i]->line);
return (result);
@@ -210,16 +217,16 @@ history_get (offset)
is set to NULL. */
void
add_history (string)
- const char *string;
+ char *string;
{
HIST_ENTRY *temp;
- if (history_stifled && (history_length == history_max_entries))
+ if (history_stifled && (history_length == max_input_history))
{
register int i;
/* If the history is stifled, and history_length is zero,
- and it equals history_max_entries, we don't save items. */
+ and it equals max_input_history, we don't save items. */
if (history_length == 0)
return;
@@ -270,15 +277,15 @@ add_history (string)
HIST_ENTRY *
replace_history_entry (which, line, data)
int which;
- const char *line;
+ char *line;
histdata_t data;
{
- HIST_ENTRY *temp, *old_value;
+ HIST_ENTRY *temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
+ HIST_ENTRY *old_value;
if (which >= history_length)
return ((HIST_ENTRY *)NULL);
- temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
old_value = the_history[which];
temp->line = savestring (line);
@@ -296,12 +303,12 @@ remove_history (which)
int which;
{
HIST_ENTRY *return_value;
- register int i;
if (which >= history_length || !history_length)
return_value = (HIST_ENTRY *)NULL;
else
{
+ register int i;
return_value = the_history[which];
for (i = which; i < history_length; i++)
@@ -318,13 +325,13 @@ void
stifle_history (max)
int max;
{
- register int i, j;
-
if (max < 0)
max = 0;
if (history_length > max)
{
+ register int i, j;
+
/* This loses because we cannot free the data. */
for (i = 0, j = history_length - max; i < j; i++)
{
@@ -340,22 +347,22 @@ stifle_history (max)
}
history_stifled = 1;
- max_input_history = history_max_entries = max;
+ max_input_history = max;
}
-/* Stop stifling the history. This returns the previous maximum
- number of history entries. The value is positive if the history
- was stifled, negative if it wasn't. */
+/* Stop stifling the history. This returns the previous amount the
+ history was stifled by. The value is positive if the history was
+ stifled, negative if it wasn't. */
int
unstifle_history ()
{
if (history_stifled)
{
history_stifled = 0;
- return (history_max_entries);
+ return (-max_input_history);
}
- else
- return (-history_max_entries);
+
+ return (max_input_history);
}
int
diff --git a/gnu/lib/libreadline/history.h b/gnu/lib/libreadline/history.h
index 58b5de4655f..5210deb39a4 100644
--- a/gnu/lib/libreadline/history.h
+++ b/gnu/lib/libreadline/history.h
@@ -28,10 +28,16 @@ extern "C" {
#if defined READLINE_LIBRARY
# include "rlstdc.h"
-# include "rltypedefs.h"
#else
# include <readline/rlstdc.h>
-# include <readline/rltypedefs.h>
+#endif
+
+#if !defined (_FUNCTION_DEF)
+# define _FUNCTION_DEF
+typedef int Function ();
+typedef void VFunction ();
+typedef char *CPFunction ();
+typedef char **CPPFunction ();
#endif
#ifdef __STDC__
@@ -62,81 +68,81 @@ typedef struct _hist_state {
/* Begin a session in which the history functions might be used. This
just initializes the interactive variables. */
-extern void using_history PARAMS((void));
+extern void using_history __P((void));
/* Return the current HISTORY_STATE of the history. */
-extern HISTORY_STATE *history_get_history_state PARAMS((void));
+extern HISTORY_STATE *history_get_history_state __P((void));
/* Set the state of the current history array to STATE. */
-extern void history_set_history_state PARAMS((HISTORY_STATE *));
+extern void history_set_history_state __P((HISTORY_STATE *));
/* Manage the history list. */
/* Place STRING at the end of the history list.
The associated data field (if any) is set to NULL. */
-extern void add_history PARAMS((const char *));
+extern void add_history __P((char *));
/* A reasonably useless function, only here for completeness. WHICH
is the magic number that tells us which element to delete. The
elements are numbered from 0. */
-extern HIST_ENTRY *remove_history PARAMS((int));
+extern HIST_ENTRY *remove_history __P((int));
/* Make the history entry at WHICH have LINE and DATA. This returns
the old entry so you can dispose of the data. In the case of an
invalid WHICH, a NULL pointer is returned. */
-extern HIST_ENTRY *replace_history_entry PARAMS((int, const char *, histdata_t));
+extern HIST_ENTRY *replace_history_entry __P((int, char *, histdata_t));
/* Clear the history list and start over. */
-extern void clear_history PARAMS((void));
+extern void clear_history __P((void));
/* Stifle the history list, remembering only MAX number of entries. */
-extern void stifle_history PARAMS((int));
+extern void stifle_history __P((int));
/* Stop stifling the history. This returns the previous amount the
history was stifled by. The value is positive if the history was
stifled, negative if it wasn't. */
-extern int unstifle_history PARAMS((void));
+extern int unstifle_history __P((void));
/* Return 1 if the history is stifled, 0 if it is not. */
-extern int history_is_stifled PARAMS((void));
+extern int history_is_stifled __P((void));
/* Information about the history list. */
/* Return a NULL terminated array of HIST_ENTRY which is the current input
history. Element 0 of this list is the beginning of time. If there
is no history, return NULL. */
-extern HIST_ENTRY **history_list PARAMS((void));
+extern HIST_ENTRY **history_list __P((void));
/* Returns the number which says what history element we are now
looking at. */
-extern int where_history PARAMS((void));
+extern int where_history __P((void));
/* Return the history entry at the current position, as determined by
history_offset. If there is no entry there, return a NULL pointer. */
-extern HIST_ENTRY *current_history PARAMS((void));
+extern HIST_ENTRY *current_history __P((void));
/* Return the history entry which is logically at OFFSET in the history
array. OFFSET is relative to history_base. */
-extern HIST_ENTRY *history_get PARAMS((int));
+extern HIST_ENTRY *history_get __P((int));
/* Return the number of bytes that the primary history entries are using.
This just adds up the lengths of the_history->lines. */
-extern int history_total_bytes PARAMS((void));
+extern int history_total_bytes __P((void));
/* Moving around the history list. */
/* Set the position in the history list to POS. */
-extern int history_set_pos PARAMS((int));
+extern int history_set_pos __P((int));
/* Back up history_offset to the previous history entry, and return
a pointer to that entry. If there is no previous entry, return
a NULL pointer. */
-extern HIST_ENTRY *previous_history PARAMS((void));
+extern HIST_ENTRY *previous_history __P((void));
/* Move history_offset forward to the next item in the input_history,
and return the a pointer to that entry. If there is no next entry,
return a NULL pointer. */
-extern HIST_ENTRY *next_history PARAMS((void));
+extern HIST_ENTRY *next_history __P((void));
/* Searching the history list. */
@@ -146,45 +152,45 @@ extern HIST_ENTRY *next_history PARAMS((void));
current_history () is the history entry, and the value of this function
is the offset in the line of that history entry that the string was
found in. Otherwise, nothing is changed, and a -1 is returned. */
-extern int history_search PARAMS((const char *, int));
+extern int history_search __P((char *, int));
/* Search the history for STRING, starting at history_offset.
The search is anchored: matching lines must begin with string.
DIRECTION is as in history_search(). */
-extern int history_search_prefix PARAMS((const char *, int));
+extern int history_search_prefix __P((char *, int));
/* Search for STRING in the history list, starting at POS, an
absolute index into the list. DIR, if negative, says to search
backwards from POS, else forwards.
Returns the absolute index of the history element where STRING
was found, or -1 otherwise. */
-extern int history_search_pos PARAMS((const char *, int, int));
+extern int history_search_pos __P((char *, int, int));
/* Managing the history file. */
/* Add the contents of FILENAME to the history list, a line at a time.
If FILENAME is NULL, then read from ~/.history. Returns 0 if
successful, or errno if not. */
-extern int read_history PARAMS((const char *));
+extern int read_history __P((char *));
/* Read a range of lines from FILENAME, adding them to the history list.
Start reading at the FROM'th line and end at the TO'th. If FROM
is zero, start at the beginning. If TO is less than FROM, read
until the end of the file. If FILENAME is NULL, then read from
~/.history. Returns 0 if successful, or errno if not. */
-extern int read_history_range PARAMS((const char *, int, int));
+extern int read_history_range __P((char *, int, int));
/* Write the current history to FILENAME. If FILENAME is NULL,
then write the history list to ~/.history. Values returned
are as in read_history (). */
-extern int write_history PARAMS((const char *));
+extern int write_history __P((char *));
/* Append NELEMENT entries to FILENAME. The entries appended are from
the end of the list minus NELEMENTs up to the end of the list. */
-extern int append_history PARAMS((int, const char *));
+extern int append_history __P((int, char *));
/* Truncate the history file, leaving only the last NLINES lines. */
-extern int history_truncate_file PARAMS((const char *, int));
+extern int history_truncate_file __P((char *, int));
/* History expansion. */
@@ -200,12 +206,12 @@ extern int history_truncate_file PARAMS((const char *, int));
If an error ocurred in expansion, then OUTPUT contains a descriptive
error message. */
-extern int history_expand PARAMS((char *, char **));
+extern int history_expand __P((char *, char **));
/* Extract a string segment consisting of the FIRST through LAST
arguments present in STRING. Arguments are broken up as in
the shell. */
-extern char *history_arg_extract PARAMS((int, int, const char *));
+extern char *history_arg_extract __P((int, int, char *));
/* Return the text of the history event beginning at the current
offset into STRING. Pass STRING with *INDEX equal to the
@@ -213,31 +219,27 @@ extern char *history_arg_extract PARAMS((int, int, const char *));
DELIMITING_QUOTE is a character that is allowed to end the string
specification for what to search for in addition to the normal
characters `:', ` ', `\t', `\n', and sometimes `?'. */
-extern char *get_history_event PARAMS((const char *, int *, int));
+extern char *get_history_event __P((char *, int *, int));
/* Return an array of tokens, much as the shell might. The tokens are
parsed out of STRING. */
-extern char **history_tokenize PARAMS((const char *));
+extern char **history_tokenize __P((char *));
/* Exported history variables. */
extern int history_base;
extern int history_length;
-extern int history_max_entries;
+extern int max_input_history;
extern char history_expansion_char;
extern char history_subst_char;
-extern char *history_word_delimiters;
extern char history_comment_char;
extern char *history_no_expand_chars;
extern char *history_search_delimiter_chars;
extern int history_quotes_inhibit_expansion;
-/* Backwards compatibility */
-extern int max_input_history;
-
/* If set, this function is called to decide whether or not a particular
history expansion should be treated as a special case for the calling
application and not expanded. */
-extern rl_linebuf_func_t *history_inhibit_expansion_function;
+extern Function *history_inhibit_expansion_function;
#ifdef __cplusplus
}
diff --git a/gnu/lib/libreadline/histsearch.c b/gnu/lib/libreadline/histsearch.c
index d94fd6cd9c6..8d153b63edd 100644
--- a/gnu/lib/libreadline/histsearch.c
+++ b/gnu/lib/libreadline/histsearch.c
@@ -32,13 +32,17 @@
#else
# include "ansi_stdlib.h"
#endif /* HAVE_STDLIB_H */
-
#if defined (HAVE_UNISTD_H)
# ifdef _MINIX
# include <sys/types.h>
# endif
# include <unistd.h>
#endif
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
#include "history.h"
#include "histlib.h"
@@ -47,8 +51,6 @@
string. */
char *history_search_delimiter_chars = (char *)NULL;
-static int history_search_internal PARAMS((const char *, int, int));
-
/* Search the history for STRING, starting at history_offset.
If DIRECTION < 0, then the search is through previous entries, else
through subsequent. If ANCHORED is non-zero, the string must
@@ -61,7 +63,7 @@ static int history_search_internal PARAMS((const char *, int, int));
static int
history_search_internal (string, direction, anchored)
- const char *string;
+ char *string;
int direction, anchored;
{
register int i, reverse;
@@ -157,7 +159,7 @@ history_search_internal (string, direction, anchored)
/* Do a non-anchored search for STRING through the history in DIRECTION. */
int
history_search (string, direction)
- const char *string;
+ char *string;
int direction;
{
return (history_search_internal (string, direction, NON_ANCHORED_SEARCH));
@@ -166,7 +168,7 @@ history_search (string, direction)
/* Do an anchored search for string through the history in DIRECTION. */
int
history_search_prefix (string, direction)
- const char *string;
+ char *string;
int direction;
{
return (history_search_internal (string, direction, ANCHORED_SEARCH));
@@ -177,7 +179,7 @@ history_search_prefix (string, direction)
which point to begin searching. */
int
history_search_pos (string, dir, pos)
- const char *string;
+ char *string;
int dir, pos;
{
int ret, old;
diff --git a/gnu/lib/libreadline/macro.c b/gnu/lib/libreadline/macro.c
index b73c3af9aa4..5a44852f46c 100644
--- a/gnu/lib/libreadline/macro.c
+++ b/gnu/lib/libreadline/macro.c
@@ -49,15 +49,20 @@
#include "rlprivate.h"
#include "xmalloc.h"
+#define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0)
+
/* **************************************************************** */
/* */
/* Hacking Keyboard Macros */
/* */
/* **************************************************************** */
+/* Non-zero means to save keys that we dispatch on in a kbd macro. */
+int _rl_defining_kbd_macro = 0;
+
/* The currently executing macro string. If this is non-zero,
then it is a malloc ()'ed string where input is coming from. */
-char *rl_executing_macro = (char *)NULL;
+char *_rl_executing_macro = (char *)NULL;
/* The offset in the above string to the next character to be read. */
static int executing_macro_index;
@@ -90,9 +95,8 @@ _rl_with_macro_input (string)
char *string;
{
_rl_push_executing_macro ();
- rl_executing_macro = string;
+ _rl_executing_macro = string;
executing_macro_index = 0;
- RL_SETSTATE(RL_STATE_MACROINPUT);
}
/* Return the next character available from a macro, or 0 if
@@ -100,16 +104,16 @@ _rl_with_macro_input (string)
int
_rl_next_macro_key ()
{
- if (rl_executing_macro == 0)
+ if (_rl_executing_macro == 0)
return (0);
- if (rl_executing_macro[executing_macro_index] == 0)
+ if (_rl_executing_macro[executing_macro_index] == 0)
{
_rl_pop_executing_macro ();
return (_rl_next_macro_key ());
}
- return (rl_executing_macro[executing_macro_index++]);
+ return (_rl_executing_macro[executing_macro_index++]);
}
/* Save the currently executing macro on a stack of saved macros. */
@@ -121,7 +125,7 @@ _rl_push_executing_macro ()
saver = (struct saved_macro *)xmalloc (sizeof (struct saved_macro));
saver->next = macro_list;
saver->sindex = executing_macro_index;
- saver->string = rl_executing_macro;
+ saver->string = _rl_executing_macro;
macro_list = saver;
}
@@ -133,21 +137,20 @@ _rl_pop_executing_macro ()
{
struct saved_macro *macro;
- FREE (rl_executing_macro);
- rl_executing_macro = (char *)NULL;
+ if (_rl_executing_macro)
+ free (_rl_executing_macro);
+
+ _rl_executing_macro = (char *)NULL;
executing_macro_index = 0;
if (macro_list)
{
macro = macro_list;
- rl_executing_macro = macro_list->string;
+ _rl_executing_macro = macro_list->string;
executing_macro_index = macro_list->sindex;
macro_list = macro_list->next;
free (macro);
}
-
- if (rl_executing_macro == 0)
- RL_UNSETSTATE(RL_STATE_MACROINPUT);
}
/* Add a character to the macro being built. */
@@ -158,9 +161,9 @@ _rl_add_macro_char (c)
if (current_macro_index + 1 >= current_macro_size)
{
if (current_macro == 0)
- current_macro = (char *)xmalloc (current_macro_size = 25);
+ current_macro = xmalloc (current_macro_size = 25);
else
- current_macro = (char *)xrealloc (current_macro, current_macro_size += 25);
+ current_macro = xrealloc (current_macro, current_macro_size += 25);
}
current_macro[current_macro_index++] = c;
@@ -177,11 +180,14 @@ _rl_kill_kbd_macro ()
}
current_macro_size = current_macro_index = 0;
- FREE (rl_executing_macro);
- rl_executing_macro = (char *) NULL;
+ if (_rl_executing_macro)
+ {
+ free (_rl_executing_macro);
+ _rl_executing_macro = (char *) NULL;
+ }
executing_macro_index = 0;
- RL_UNSETSTATE(RL_STATE_MACRODEF);
+ _rl_defining_kbd_macro = 0;
}
/* Begin defining a keyboard macro.
@@ -194,7 +200,7 @@ int
rl_start_kbd_macro (ignore1, ignore2)
int ignore1, ignore2;
{
- if (RL_ISSTATE (RL_STATE_MACRODEF))
+ if (_rl_defining_kbd_macro)
{
_rl_abort_internal ();
return -1;
@@ -208,7 +214,7 @@ rl_start_kbd_macro (ignore1, ignore2)
else
current_macro_index = 0;
- RL_SETSTATE(RL_STATE_MACRODEF);
+ _rl_defining_kbd_macro = 1;
return 0;
}
@@ -219,7 +225,7 @@ int
rl_end_kbd_macro (count, ignore)
int count, ignore;
{
- if (RL_ISSTATE (RL_STATE_MACRODEF) == 0)
+ if (_rl_defining_kbd_macro == 0)
{
_rl_abort_internal ();
return -1;
@@ -228,7 +234,7 @@ rl_end_kbd_macro (count, ignore)
current_macro_index -= rl_key_sequence_length - 1;
current_macro[current_macro_index] = '\0';
- RL_UNSETSTATE(RL_STATE_MACRODEF);
+ _rl_defining_kbd_macro = 0;
return (rl_call_last_kbd_macro (--count, 0));
}
@@ -242,9 +248,9 @@ rl_call_last_kbd_macro (count, ignore)
if (current_macro == 0)
_rl_abort_internal ();
- if (RL_ISSTATE (RL_STATE_MACRODEF))
+ if (_rl_defining_kbd_macro)
{
- rl_ding (); /* no recursive macros */
+ ding (); /* no recursive macros */
current_macro[--current_macro_index] = '\0'; /* erase this char */
return 0;
}
diff --git a/gnu/lib/libreadline/signals.c b/gnu/lib/libreadline/signals.c
index 0a1468b6b2a..861019d3363 100644
--- a/gnu/lib/libreadline/signals.c
+++ b/gnu/lib/libreadline/signals.c
@@ -61,7 +61,7 @@
# define SIGHANDLER_RETURN return (0)
#endif
-/* This typedef is equivalent to the one for Function; it allows us
+/* This typedef is equivalant to the one for Function; it allows us
to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */
typedef RETSIGTYPE SigHandler ();
@@ -73,8 +73,7 @@ typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt
# define sigemptyset(m)
#endif /* !HAVE_POSIX_SIGNALS */
-static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *));
-static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *));
+static SigHandler *rl_set_sighandler __P((int, SigHandler *, sighandler_cxt *));
/* Exported variables for use by applications. */
@@ -120,8 +119,6 @@ rl_signal_handler (sig)
# endif /* !HAVE_BSD_SIGNALS */
#endif /* !HAVE_POSIX_SIGNALS */
- RL_SETSTATE(RL_STATE_SIGHANDLER);
-
#if !defined (HAVE_BSD_SIGNALS) && !defined (HAVE_POSIX_SIGNALS)
/* Since the signal will not be blocked while we are in the signal
handler, ignore it until rl_clear_signals resets the catcher. */
@@ -172,7 +169,6 @@ rl_signal_handler (sig)
rl_reset_after_signal ();
}
- RL_UNSETSTATE(RL_STATE_SIGHANDLER);
SIGHANDLER_RETURN;
}
@@ -193,7 +189,6 @@ rl_sigwinch_handler (sig)
rl_set_sighandler (SIGWINCH, rl_sigwinch_handler, &dummy_winch);
#endif
- RL_SETSTATE(RL_STATE_SIGHANDLER);
rl_resize_terminal ();
/* If another sigwinch handler has been installed, call it. */
@@ -201,7 +196,6 @@ rl_sigwinch_handler (sig)
if (oh && oh != (SigHandler *)SIG_IGN && oh != (SigHandler *)SIG_DFL)
(*oh) (sig);
- RL_UNSETSTATE(RL_STATE_SIGHANDLER);
SIGHANDLER_RETURN;
}
#endif /* SIGWINCH */
@@ -233,7 +227,7 @@ rl_set_sighandler (sig, handler, ohandler)
struct sigaction act;
act.sa_handler = handler;
- act.sa_flags = 0; /* XXX - should we set SA_RESTART for SIGWINCH? */
+ act.sa_flags = 0;
sigemptyset (&act.sa_mask);
sigemptyset (&ohandler->sa_mask);
sigaction (sig, &act, &old_handler);
@@ -364,7 +358,7 @@ rl_cleanup_after_signal ()
_rl_clean_up_for_exit ();
(*rl_deprep_term_function) ();
rl_clear_signals ();
- rl_clear_pending_input ();
+ rl_pending_input = 0;
}
/* Reset the terminal and readline state after a signal handler returns. */
@@ -384,7 +378,7 @@ rl_free_line_state ()
{
register HIST_ENTRY *entry;
- rl_free_undo_list ();
+ free_undo_list ();
entry = current_history ();
if (entry)
diff --git a/gnu/lib/libreadline/vi_mode.c b/gnu/lib/libreadline/vi_mode.c
index 89303644c59..be7f9496434 100644
--- a/gnu/lib/libreadline/vi_mode.c
+++ b/gnu/lib/libreadline/vi_mode.c
@@ -51,23 +51,37 @@
/* Some standard library routines. */
#include "rldefs.h"
-#include "rlmbutil.h"
-
#include "readline.h"
#include "history.h"
#include "rlprivate.h"
#include "xmalloc.h"
+#ifndef _rl_digit_p
+#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9')
+#endif
+
+#ifndef _rl_digit_value
+#define _rl_digit_value(c) ((c) - '0')
+#endif
+
#ifndef member
#define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0)
#endif
+#ifndef isident
+#define isident(c) ((_rl_pure_alphabetic (c) || _rl_digit_p (c) || c == '_'))
+#endif
+
+#ifndef exchange
+#define exchange(x, y) do {int temp = x; x = y; y = temp;} while (0)
+#endif
+
/* Non-zero means enter insertion mode. */
static int _rl_vi_doing_insert;
/* Command keys which do movement for xxx_to commands. */
-static const char *vi_motion = " hl^$0ftFT;,%wbeWBE|";
+static char *vi_motion = " hl^$0ftFt;,%wbeWBE|";
/* Keymap used for vi replace characters. Created dynamically since
rarely used. */
@@ -87,11 +101,7 @@ static int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */
static int _rl_vi_last_repeat = 1;
static int _rl_vi_last_arg_sign = 1;
static int _rl_vi_last_motion;
-#if defined (HANDLE_MULTIBYTE)
-static char _rl_vi_last_search_mbchar[MB_LEN_MAX];
-#else
static int _rl_vi_last_search_char;
-#endif
static int _rl_vi_last_replacement;
static int _rl_vi_last_key_before_insert;
@@ -99,14 +109,12 @@ static int _rl_vi_last_key_before_insert;
static int vi_redoing;
/* Text modification commands. These are the `redoable' commands. */
-static const char *vi_textmod = "_*\\AaIiCcDdPpYyRrSsXx~";
+static char *vi_textmod = "_*\\AaIiCcDdPpYyRrSsXx~";
/* Arrays for the saved marks. */
-static int vi_mark_chars['z' - 'a' + 1];
+static int vi_mark_chars[27];
-static void _rl_vi_stuff_insert PARAMS((int));
-static void _rl_vi_save_insert PARAMS((UNDO_LIST *));
-static int rl_digit_loop1 PARAMS((void));
+static int rl_digit_loop1 __P((void));
void
_rl_vi_initialize_line ()
@@ -160,15 +168,12 @@ int
rl_vi_redo (count, c)
int count, c;
{
- int r;
-
if (!rl_explicit_arg)
{
rl_numeric_arg = _rl_vi_last_repeat;
rl_arg_sign = _rl_vi_last_arg_sign;
}
- r = 0;
vi_redoing = 1;
/* If we're redoing an insert with `i', stuff in the inserted text
and do not go into insertion mode. */
@@ -180,10 +185,10 @@ rl_vi_redo (count, c)
rl_point--;
}
else
- r = _rl_dispatch (_rl_vi_last_command, _rl_keymap);
+ _rl_dispatch (_rl_vi_last_command, _rl_keymap);
vi_redoing = 0;
- return (r);
+ return (0);
}
/* A placeholder for further expansion. */
@@ -269,7 +274,7 @@ rl_vi_search (count, key)
break;
default:
- rl_ding ();
+ ding ();
break;
}
return (0);
@@ -325,7 +330,7 @@ rl_vi_prev_word (count, key)
if (rl_point == 0)
{
- rl_ding ();
+ ding ();
return (0);
}
@@ -347,7 +352,7 @@ rl_vi_next_word (count, key)
if (rl_point >= (rl_end - 1))
{
- rl_ding ();
+ ding ();
return (0);
}
@@ -365,7 +370,7 @@ rl_vi_end_word (count, key)
{
if (count < 0)
{
- rl_ding ();
+ ding ();
return -1;
}
@@ -455,14 +460,14 @@ rl_vi_fword (count, ignore)
while (count-- && rl_point < (rl_end - 1))
{
/* Move to white space (really non-identifer). */
- if (_rl_isident (rl_line_buffer[rl_point]))
+ if (isident (rl_line_buffer[rl_point]))
{
- while (_rl_isident (rl_line_buffer[rl_point]) && rl_point < rl_end)
+ while (isident (rl_line_buffer[rl_point]) && rl_point < rl_end)
rl_point++;
}
else /* if (!whitespace (rl_line_buffer[rl_point])) */
{
- while (!_rl_isident (rl_line_buffer[rl_point]) &&
+ while (!isident (rl_line_buffer[rl_point]) &&
!whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end)
rl_point++;
}
@@ -492,9 +497,9 @@ rl_vi_bword (count, ignore)
back so we don't get messed up by the rl_point++ down there in
the while loop. Without this code, words like `l;' screw up the
function. */
- last_is_ident = _rl_isident (rl_line_buffer[rl_point - 1]);
- if ((_rl_isident (rl_line_buffer[rl_point]) && !last_is_ident) ||
- (!_rl_isident (rl_line_buffer[rl_point]) && last_is_ident))
+ last_is_ident = isident (rl_line_buffer[rl_point - 1]);
+ if ((isident (rl_line_buffer[rl_point]) && !last_is_ident) ||
+ (!isident (rl_line_buffer[rl_point]) && last_is_ident))
rl_point--;
while (rl_point > 0 && whitespace (rl_line_buffer[rl_point]))
@@ -502,10 +507,10 @@ rl_vi_bword (count, ignore)
if (rl_point > 0)
{
- if (_rl_isident (rl_line_buffer[rl_point]))
- while (--rl_point >= 0 && _rl_isident (rl_line_buffer[rl_point]));
+ if (isident (rl_line_buffer[rl_point]))
+ while (--rl_point >= 0 && isident (rl_line_buffer[rl_point]));
else
- while (--rl_point >= 0 && !_rl_isident (rl_line_buffer[rl_point]) &&
+ while (--rl_point >= 0 && !isident (rl_line_buffer[rl_point]) &&
!whitespace (rl_line_buffer[rl_point]));
rl_point++;
}
@@ -527,10 +532,10 @@ rl_vi_eword (count, ignore)
if (rl_point < rl_end)
{
- if (_rl_isident (rl_line_buffer[rl_point]))
- while (++rl_point < rl_end && _rl_isident (rl_line_buffer[rl_point]));
+ if (isident (rl_line_buffer[rl_point]))
+ while (++rl_point < rl_end && isident (rl_line_buffer[rl_point]));
else
- while (++rl_point < rl_end && !_rl_isident (rl_line_buffer[rl_point])
+ while (++rl_point < rl_end && !isident (rl_line_buffer[rl_point])
&& !whitespace (rl_line_buffer[rl_point]));
}
rl_point--;
@@ -552,17 +557,7 @@ rl_vi_append_mode (count, key)
int count, key;
{
if (rl_point < rl_end)
- {
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
- rl_point++;
- else
- {
- int point = rl_point;
- rl_forward_char (1, key);
- if (point == rl_point)
- rl_point = rl_end;
- }
- }
+ rl_point++;
rl_vi_insertion_mode (1, key);
return (0);
}
@@ -616,7 +611,7 @@ _rl_vi_save_insert (up)
if (len >= vi_insert_buffer_size)
{
vi_insert_buffer_size += (len + 32) - (len % 32);
- vi_insert_buffer = (char *)xrealloc (vi_insert_buffer, vi_insert_buffer_size);
+ vi_insert_buffer = xrealloc (vi_insert_buffer, vi_insert_buffer_size);
}
strncpy (vi_insert_buffer, rl_line_buffer + start, len - 1);
vi_insert_buffer[len-1] = '\0';
@@ -627,7 +622,6 @@ _rl_vi_done_inserting ()
{
if (_rl_vi_doing_insert)
{
- /* The `C', `s', and `S' commands set this. */
rl_end_undo_group ();
/* Now, the text between rl_undo_list->next->start and
rl_undo_list->next->end is what was inserted while in insert
@@ -656,7 +650,7 @@ rl_vi_movement_mode (count, key)
int count, key;
{
if (rl_point > 0)
- rl_backward_char (1, key);
+ rl_backward (1, key);
_rl_keymap = vi_movement_keymap;
_rl_vi_done_inserting ();
@@ -673,54 +667,6 @@ rl_vi_arg_digit (count, c)
return (rl_digit_argument (count, c));
}
-/* Change the case of the next COUNT characters. */
-#if defined (HANDLE_MULTIBYTE)
-static int
-_rl_vi_change_mbchar_case (count)
- int count;
-{
- wchar_t wc;
- char mb[MB_LEN_MAX+1];
- int mblen;
- mbstate_t ps;
-
- memset (&ps, 0, sizeof (mbstate_t));
- if (_rl_adjust_point (rl_line_buffer, rl_point, &ps) > 0)
- count--;
- while (count-- && rl_point < rl_end)
- {
- mbrtowc (&wc, rl_line_buffer + rl_point, rl_end - rl_point, &ps);
- if (iswupper (wc))
- wc = towlower (wc);
- else if (iswlower (wc))
- wc = towupper (wc);
- else
- {
- /* Just skip over chars neither upper nor lower case */
- rl_forward_char (1, 0);
- continue;
- }
-
- /* Vi is kind of strange here. */
- if (wc)
- {
- mblen = wctomb (mb, wc);
- if (mblen >= 0)
- mb[mblen] = '\0';
- rl_begin_undo_group ();
- rl_delete (1, 0);
- rl_insert_text (mb);
- rl_end_undo_group ();
- rl_vi_check ();
- }
- else
- rl_forward_char (1, 0);
- }
-
- return 0;
-}
-#endif
-
int
rl_vi_change_case (count, ignore)
int count, ignore;
@@ -731,11 +677,6 @@ rl_vi_change_case (count, ignore)
if (rl_point >= rl_end)
return (0);
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- return (_rl_vi_change_mbchar_case (count));
-#endif
-
while (count-- && rl_point < rl_end)
{
if (_rl_uppercase_p (rl_line_buffer[rl_point]))
@@ -745,7 +686,7 @@ rl_vi_change_case (count, ignore)
else
{
/* Just skip over characters neither upper nor lower case. */
- rl_forward_char (1, c);
+ rl_forward (1, c);
continue;
}
@@ -754,12 +695,12 @@ rl_vi_change_case (count, ignore)
{
rl_begin_undo_group ();
rl_delete (1, c);
- _rl_insert_char (1, c);
+ rl_insert (1, c);
rl_end_undo_group ();
rl_vi_check ();
}
else
- rl_forward_char (1, c);
+ rl_forward (1, c);
}
return (0);
}
@@ -769,10 +710,10 @@ rl_vi_put (count, key)
int count, key;
{
if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end))
- rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ rl_point++;
rl_yank (1, key);
- rl_backward_char (1, key);
+ rl_backward (1, key);
return (0);
}
@@ -780,12 +721,7 @@ int
rl_vi_check ()
{
if (rl_point && rl_point == rl_end)
- {
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- else
- rl_point--;
- }
+ rl_point--;
return (0);
}
@@ -808,9 +744,7 @@ rl_vi_domove (key, nextkey)
int old_end;
rl_mark = rl_point;
- RL_SETSTATE(RL_STATE_MOREINPUT);
c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
*nextkey = c;
if (!member (c, vi_motion))
@@ -821,9 +755,7 @@ rl_vi_domove (key, nextkey)
rl_numeric_arg = _rl_digit_value (c);
rl_digit_loop1 ();
rl_numeric_arg *= save;
- RL_SETSTATE(RL_STATE_MOREINPUT);
c = rl_read_key (); /* real command */
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
*nextkey = c;
}
else if (key == c && (key == 'd' || key == 'y' || key == 'c'))
@@ -887,36 +819,24 @@ rl_vi_domove (key, nextkey)
}
if (rl_mark < rl_point)
- SWAP (rl_point, rl_mark);
+ exchange (rl_point, rl_mark);
return (0);
}
/* A simplified loop for vi. Don't dispatch key at end.
- Don't recognize minus sign?
- Should this do rl_save_prompt/rl_restore_prompt? */
+ Don't recognize minus sign? */
static int
rl_digit_loop1 ()
{
int key, c;
- RL_SETSTATE(RL_STATE_NUMERICARG);
while (1)
{
- if (rl_numeric_arg > 1000000)
- {
- rl_explicit_arg = rl_numeric_arg = 0;
- rl_ding ();
- rl_clear_message ();
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
- return 1;
- }
- rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
- RL_SETSTATE(RL_STATE_MOREINPUT);
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg, 0);
key = c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- if (c >= 0 && _rl_keymap[c].type == ISFUNC &&
+ if (_rl_keymap[c].type == ISFUNC &&
_rl_keymap[c].function == rl_universal_argument)
{
rl_numeric_arg *= 4;
@@ -939,8 +859,6 @@ rl_digit_loop1 ()
break;
}
}
-
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
return (0);
}
@@ -957,7 +875,7 @@ rl_vi_delete_to (count, key)
if (rl_vi_domove (key, &c))
{
- rl_ding ();
+ ding ();
return -1;
}
@@ -985,7 +903,7 @@ rl_vi_change_to (count, key)
if (rl_vi_domove (key, &c))
{
- rl_ding ();
+ ding ();
return -1;
}
@@ -1035,7 +953,7 @@ rl_vi_yank_to (count, key)
if (rl_vi_domove (key, &c))
{
- rl_ding ();
+ ding ();
return -1;
}
@@ -1061,14 +979,11 @@ rl_vi_delete (count, key)
if (rl_end == 0)
{
- rl_ding ();
+ ding ();
return -1;
}
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- end = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO);
- else
- end = rl_point + count;
+ end = rl_point + count;
if (end >= rl_end)
end = rl_end;
@@ -1076,7 +991,7 @@ rl_vi_delete (count, key)
rl_kill_text (rl_point, end);
if (rl_point > 0 && rl_point == rl_end)
- rl_backward_char (1, key);
+ rl_backward (1, key);
return (0);
}
@@ -1101,12 +1016,7 @@ int
rl_vi_char_search (count, key)
int count, key;
{
-#if defined (HANDLE_MULTIBYTE)
- static char *target;
- static int mb_len;
-#else
static char target;
-#endif
static int orig_dir, dir;
if (key == ';' || key == ',')
@@ -1114,22 +1024,9 @@ rl_vi_char_search (count, key)
else
{
if (vi_redoing)
-#if defined (HANDLE_MULTIBYTE)
- target = _rl_vi_last_search_mbchar;
-#else
target = _rl_vi_last_search_char;
-#endif
else
- {
-#if defined (HANDLE_MULTIBYTE)
- mb_len = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
- target = _rl_vi_last_search_mbchar;
-#else
- RL_SETSTATE(RL_STATE_MOREINPUT);
- _rl_vi_last_search_char = target = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
-#endif
- }
+ _rl_vi_last_search_char = target = (*rl_getc_function) (rl_instream);
switch (key)
{
@@ -1151,11 +1048,7 @@ rl_vi_char_search (count, key)
}
}
-#if defined (HANDLE_MULTIBYTE)
- return (_rl_char_search_internal (count, dir, target, mb_len));
-#else
return (_rl_char_search_internal (count, dir, target));
-#endif
}
/* Match brackets */
@@ -1163,30 +1056,19 @@ int
rl_vi_match (ignore, key)
int ignore, key;
{
- int count = 1, brack, pos, tmp, pre;
+ int count = 1, brack, pos;
pos = rl_point;
if ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0)
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0)
- {
- pre = rl_point;
- rl_forward_char (1, key);
- if (pre == rl_point)
- break;
- }
- }
- else
- while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0 &&
- rl_point < rl_end - 1)
- rl_forward_char (1, key);
+ while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0 &&
+ rl_point < rl_end - 1)
+ rl_forward (1, key);
if (brack <= 0)
{
rl_point = pos;
- rl_ding ();
+ ding ();
return -1;
}
}
@@ -1197,16 +1079,7 @@ rl_vi_match (ignore, key)
{
while (count)
{
- tmp = pos;
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
- pos--;
- else
- {
- pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY);
- if (tmp == pos)
- pos--;
- }
- if (pos >= 0)
+ if (--pos >= 0)
{
int b = rl_vi_bracktype (rl_line_buffer[pos]);
if (b == -brack)
@@ -1216,7 +1089,7 @@ rl_vi_match (ignore, key)
}
else
{
- rl_ding ();
+ ding ();
return -1;
}
}
@@ -1225,12 +1098,7 @@ rl_vi_match (ignore, key)
{ /* brack > 0 */
while (count)
{
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
- pos++;
- else
- pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY);
-
- if (pos < rl_end)
+ if (++pos < rl_end)
{
int b = rl_vi_bracktype (rl_line_buffer[pos]);
if (b == -brack)
@@ -1240,7 +1108,7 @@ rl_vi_match (ignore, key)
}
else
{
- rl_ding ();
+ ding ();
return -1;
}
}
@@ -1265,11 +1133,6 @@ rl_vi_bracktype (c)
}
}
-/* XXX - think about reading an entire mbchar with _rl_read_mbchar and
- inserting it in one bunch instead of the loop below (like in
- rl_vi_char_search or _rl_vi_change_mbchar_case. Set c to mbchar[0]
- for test against 033 or ^C. Make sure that _rl_read_mbchar does
- this right. */
int
rl_vi_change_char (count, key)
int count, key;
@@ -1279,11 +1142,7 @@ rl_vi_change_char (count, key)
if (vi_redoing)
c = _rl_vi_last_replacement;
else
- {
- RL_SETSTATE(RL_STATE_MOREINPUT);
- _rl_vi_last_replacement = c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- }
+ _rl_vi_last_replacement = c = (*rl_getc_function) (rl_instream);
if (c == '\033' || c == CTRL ('C'))
return -1;
@@ -1293,19 +1152,9 @@ rl_vi_change_char (count, key)
rl_begin_undo_group ();
rl_delete (1, c);
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- while (_rl_insert_char (1, c))
- {
- RL_SETSTATE (RL_STATE_MOREINPUT);
- c = rl_read_key ();
- RL_UNSETSTATE (RL_STATE_MOREINPUT);
- }
- else
-#endif
- _rl_insert_char (1, c);
+ rl_insert (1, c);
if (count == 0)
- rl_backward_char (1, c);
+ rl_backward (1, c);
rl_end_undo_group ();
}
@@ -1316,29 +1165,66 @@ int
rl_vi_subst (count, key)
int count, key;
{
- /* If we are redoing, rl_vi_change_to will stuff the last motion char */
- if (vi_redoing == 0)
- rl_stuff_char ((key == 'S') ? 'c' : ' '); /* `S' == `cc', `s' == `c ' */
+ rl_begin_undo_group ();
+
+ if (_rl_uppercase_p (key))
+ {
+ rl_beg_of_line (1, key);
+ rl_kill_line (1, key);
+ }
+ else
+ rl_delete_text (rl_point, rl_point+count);
+
+ rl_end_undo_group ();
- return (rl_vi_change_to (count, 'c'));
+ _rl_vi_set_last (key, count, rl_arg_sign);
+
+ if (vi_redoing)
+ {
+ int o = _rl_doing_an_undo;
+
+ _rl_doing_an_undo = 1;
+ if (vi_insert_buffer && *vi_insert_buffer)
+ rl_insert_text (vi_insert_buffer);
+ _rl_doing_an_undo = o;
+ }
+ else
+ {
+ rl_begin_undo_group ();
+ _rl_vi_doing_insert = 1;
+ rl_vi_insertion_mode (1, key);
+ }
+
+ return (0);
}
int
rl_vi_overstrike (count, key)
int count, key;
{
+ int i;
+
if (_rl_vi_doing_insert == 0)
{
_rl_vi_doing_insert = 1;
rl_begin_undo_group ();
}
- if (count > 0)
+ for (i = 0; i < count; i++)
{
- _rl_overwrite_char (count, key);
- vi_replace_count += count;
- }
+ vi_replace_count++;
+ rl_begin_undo_group ();
+
+ if (rl_point < rl_end)
+ {
+ rl_delete (1, key);
+ rl_insert (1, key);
+ }
+ else
+ rl_insert (1, key);
+ rl_end_undo_group ();
+ }
return (0);
}
@@ -1352,7 +1238,7 @@ rl_vi_overstrike_delete (count, key)
{
if (vi_replace_count == 0)
{
- rl_ding ();
+ ding ();
break;
}
s = rl_point;
@@ -1361,7 +1247,7 @@ rl_vi_overstrike_delete (count, key)
vi_replace_count--;
if (rl_point == s)
- rl_backward_char (1, key);
+ rl_backward (1, key);
}
if (vi_replace_count == 0 && _rl_vi_doing_insert)
@@ -1422,7 +1308,7 @@ rl_vi_possible_completions()
}
else if (rl_line_buffer[rl_point - 1] == ';')
{
- rl_ding ();
+ ding ();
return (0);
}
@@ -1440,13 +1326,10 @@ rl_vi_set_mark (count, key)
{
int ch;
- RL_SETSTATE(RL_STATE_MOREINPUT);
ch = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
-
- if (ch < 'a' || ch > 'z')
+ if (_rl_lowercase_p (ch) == 0)
{
- rl_ding ();
+ ding ();
return -1;
}
ch -= 'a';
@@ -1460,25 +1343,22 @@ rl_vi_goto_mark (count, key)
{
int ch;
- RL_SETSTATE(RL_STATE_MOREINPUT);
ch = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
-
if (ch == '`')
{
rl_point = rl_mark;
return 0;
}
- else if (ch < 'a' || ch > 'z')
+ else if (_rl_lowercase_p (ch) == 0)
{
- rl_ding ();
+ ding ();
return -1;
}
ch -= 'a';
if (vi_mark_chars[ch] == -1)
{
- rl_ding ();
+ ding ();
return -1;
}
rl_point = vi_mark_chars[ch];