提交 c7bd862e authored 作者: Brian West's avatar Brian West

FS:353: correct #if check for libedit function capability

上级 0b9e5c82
......@@ -1512,7 +1512,7 @@ int main(int argc, char *argv[])
}
bare_prompt_str_len = (int)strlen(bare_prompt_str);
if (feature_level) {
#ifdef HAVE_DECL_EL_PROMPT_ESC
#if HAVE_DECL_EL_PROMPT_ESC
snprintf(prompt_str, sizeof(prompt_str), "\1%s\1%s\1%s\1", prompt_color, bare_prompt_str, input_text_color);
#else
snprintf(prompt_str, sizeof(prompt_str), "%s%s%s", prompt_color, bare_prompt_str, input_text_color);
......@@ -1578,7 +1578,7 @@ int main(int argc, char *argv[])
#ifdef HAVE_LIBEDIT
el = el_init(__FILE__, stdin, stdout, stderr);
#ifdef HAVE_DECL_EL_PROMPT_ESC
#if HAVE_DECL_EL_PROMPT_ESC
el_set(el, EL_PROMPT_ESC, &prompt, '\1');
#else
el_set(el, EL_PROMPT, &prompt);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论