提交 49a4a292 编写于 作者: A Andrea Bolognani

tools: vsh: Drop obsolete readline compatibility code

This code is needed to use readline older than 4.1, but all
our target platforms ship with at least 6.0 these days so we
can safely get rid of it.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
上级 51f17c98
......@@ -2945,32 +2945,15 @@ vshReadlineInit(vshControl *ctl)
/* Opaque data for autocomplete callbacks. */
autoCompleteOpaque = ctl;
/* Allow conditional parsing of the ~/.inputrc file.
* Work around ancient readline 4.1 (hello Mac OS X),
* which declared it as 'char *' instead of 'const char *'.
*/
# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402
rl_readline_name = ctl->name;
# else
rl_readline_name = (char *) ctl->name;
# endif
/* Tell the completer that we want a crack first. */
rl_attempted_completion_function = vshReadlineCompletion;
# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402
rl_basic_word_break_characters = break_characters;
# else
rl_basic_word_break_characters = (char *) break_characters;
# endif
# if defined(RL_READLINE_VERSION) && RL_READLINE_VERSION > 0x0402
rl_completer_quote_characters = quote_characters;
rl_char_is_quoted_p = vshReadlineCharIsQuoted;
# else
rl_completer_quote_characters = (char *) quote_characters;
rl_char_is_quoted_p = (Function *) vshReadlineCharIsQuoted;
# endif
if (virAsprintf(&histsize_env, "%s_HISTSIZE", ctl->env_prefix) < 0)
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册