diff options
| author | Hongxu Jia <hongxu.jia@windriver.com> | 2014-03-03 15:16:51 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-05 15:50:21 +0000 |
| commit | da4c775412d8e3dbaa09842e75e9e8e7918f597a (patch) | |
| tree | 6fe5681188dcf0dcdc0fb5f4a46e1e057d86a172 | |
| parent | eddaf701929a36627fda26e2573d942756a947cc (diff) | |
| download | poky-da4c775412d8e3dbaa09842e75e9e8e7918f597a.tar.gz | |
readline: drop readline-only-enable-meta-key-for-a-single-call-read.patch
The 6.3 has fixed this issue.
(From OE-Core rev: 86f3674b402c7f3f3e0e82043936fb24d5fb5b7e)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/readline/readline-6.2/readline-only-enable-meta-key-for-a-single-call-read.patch | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/meta/recipes-core/readline/readline-6.2/readline-only-enable-meta-key-for-a-single-call-read.patch b/meta/recipes-core/readline/readline-6.2/readline-only-enable-meta-key-for-a-single-call-read.patch deleted file mode 100644 index ccfdb9f8c9..0000000000 --- a/meta/recipes-core/readline/readline-6.2/readline-only-enable-meta-key-for-a-single-call-read.patch +++ /dev/null | |||
| @@ -1,114 +0,0 @@ | |||
| 1 | readline: only enable meta key for a single call readline(). | ||
| 2 | |||
| 3 | terminal.c | ||
| 4 | - change _rl_enable_meta_key to set a flag indicating that it sent the | ||
| 5 | enable-meta sequence | ||
| 6 | - _rl_disable_meta_key: new function to turn off meta mode after we | ||
| 7 | turned it on with _rl_enable_meta_key | ||
| 8 | |||
| 9 | rlprivate.h | ||
| 10 | - extern declaration for _rl_disable_meta_key | ||
| 11 | |||
| 12 | readline.c | ||
| 13 | - _rl_internal_teardown: add call to _rl_disable_meta_key to make the | ||
| 14 | meta key active only for the duration of the call to readline() | ||
| 15 | - _rl_internal_setup: move call to _rl_enable_meta_key here from | ||
| 16 | readline_initialize_everything so the meta key is active only for | ||
| 17 | the duration of the call to readline(). Suggestion from Miroslav | ||
| 18 | Lichvar <mlichvar@redhat.com> | ||
| 19 | |||
| 20 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 21 | Upstream-Status: backport | ||
| 22 | Imported patch from: http://git.savannah.gnu.org/cgit/bash.git/tag/?id=bash-4.3-alpha | ||
| 23 | --- | ||
| 24 | readline.c | 12 ++++++++---- | ||
| 25 | rlprivate.h | 1 + | ||
| 26 | terminal.c | 19 ++++++++++++++++++- | ||
| 27 | 3 files changed, 27 insertions(+), 5 deletions(-) | ||
| 28 | |||
| 29 | diff --git a/readline.c b/readline.c | ||
| 30 | --- a/readline.c | ||
| 31 | +++ b/readline.c | ||
| 32 | @@ -369,6 +369,11 @@ readline_internal_setup () | ||
| 33 | _rl_in_stream = rl_instream; | ||
| 34 | _rl_out_stream = rl_outstream; | ||
| 35 | |||
| 36 | + /* Enable the meta key only for the duration of readline(), if this | ||
| 37 | + terminal has one. */ | ||
| 38 | + if (_rl_enable_meta) | ||
| 39 | + _rl_enable_meta_key (); | ||
| 40 | + | ||
| 41 | if (rl_startup_hook) | ||
| 42 | (*rl_startup_hook) (); | ||
| 43 | |||
| 44 | @@ -437,6 +442,9 @@ readline_internal_teardown (eof) | ||
| 45 | if (rl_undo_list) | ||
| 46 | rl_free_undo_list (); | ||
| 47 | |||
| 48 | + /* Disable the meta key, if this terminal has one. */ | ||
| 49 | + _rl_disable_meta_key (); | ||
| 50 | + | ||
| 51 | /* Restore normal cursor, if available. */ | ||
| 52 | _rl_set_insert_mode (RL_IM_INSERT, 0); | ||
| 53 | |||
| 54 | @@ -1091,10 +1099,6 @@ readline_initialize_everything () | ||
| 55 | /* Try to bind a common arrow key prefix, if not already bound. */ | ||
| 56 | bind_arrow_keys (); | ||
| 57 | |||
| 58 | - /* Enable the meta key, if this terminal has one. */ | ||
| 59 | - if (_rl_enable_meta) | ||
| 60 | - _rl_enable_meta_key (); | ||
| 61 | - | ||
| 62 | /* If the completion parser's default word break characters haven't | ||
| 63 | been set yet, then do so now. */ | ||
| 64 | if (rl_completer_word_break_characters == (char *)NULL) | ||
| 65 | diff --git a/rlprivate.h b/rlprivate.h | ||
| 66 | index 384ff67..be2c2c6 100644 | ||
| 67 | --- a/rlprivate.h | ||
| 68 | +++ b/rlprivate.h | ||
| 69 | @@ -339,6 +339,7 @@ extern int _rl_output_character_function PARAMS((int)); | ||
| 70 | extern void _rl_output_some_chars PARAMS((const char *, int)); | ||
| 71 | extern int _rl_backspace PARAMS((int)); | ||
| 72 | extern void _rl_enable_meta_key PARAMS((void)); | ||
| 73 | +extern void _rl_disable_meta_key PARAMS((void)); | ||
| 74 | extern void _rl_control_keypad PARAMS((int)); | ||
| 75 | extern void _rl_set_cursor PARAMS((int, int)); | ||
| 76 | |||
| 77 | diff --git a/terminal.c b/terminal.c | ||
| 78 | index f8c2f6e..21ee031 100644 | ||
| 79 | --- a/terminal.c | ||
| 80 | +++ b/terminal.c | ||
| 81 | @@ -683,12 +683,29 @@ rl_ding () | ||
| 82 | /* */ | ||
| 83 | /* **************************************************************** */ | ||
| 84 | |||
| 85 | +static int enabled_meta = 0; /* flag indicating we enabled meta mode */ | ||
| 86 | + | ||
| 87 | void | ||
| 88 | _rl_enable_meta_key () | ||
| 89 | { | ||
| 90 | #if !defined (__DJGPP__) | ||
| 91 | if (term_has_meta && _rl_term_mm) | ||
| 92 | - tputs (_rl_term_mm, 1, _rl_output_character_function); | ||
| 93 | + { | ||
| 94 | + tputs (_rl_term_mm, 1, _rl_output_character_function); | ||
| 95 | + enabled_meta = 1; | ||
| 96 | + } | ||
| 97 | +#endif | ||
| 98 | +} | ||
| 99 | + | ||
| 100 | +void | ||
| 101 | +_rl_disable_meta_key () | ||
| 102 | +{ | ||
| 103 | +#if !defined (__DJGPP__) | ||
| 104 | + if (term_has_meta && _rl_term_mo && enabled_meta) | ||
| 105 | + { | ||
| 106 | + tputs (_rl_term_mo, 1, _rl_output_character_function); | ||
| 107 | + enabled_meta = 0; | ||
| 108 | + } | ||
| 109 | #endif | ||
| 110 | } | ||
| 111 | |||
| 112 | -- | ||
| 113 | 1.8.1.2 | ||
| 114 | |||
