[PATCH] Fix rtconfig's prompt on non-readline environments

Faidon Liambotis paravoid at debian.org
Sun Jul 5 02:13:42 UTC 2009


When readline is not available or disabled, rtconfig displays no prompt,
contrary to what happened in the past and what happens in
readline-enabled builds. (regression, broken with r271)
---
 src/rtconfig/command.y |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/rtconfig/command.y b/src/rtconfig/command.y
index b6f3d9d..f6f1349 100644
--- a/src/rtconfig/command.y
+++ b/src/rtconfig/command.y
@@ -137,8 +137,18 @@ int xx_eof = 0;
 %token <val> KW_OUTBOUND_PKT_FILTER
 
 %%
-input_stream: /* empty */
-| input_stream input
+input_stream: {
+#if !(HAVE_LIBREADLINE && HAVE_LIBHISTORY)
+   if (opt_prompt)
+      std::cout << opt_prompt;
+#endif // HAVE_LIBREADLINE && HAVE_LIBHISTORY
+}
+| input_stream input {
+#if !(HAVE_LIBREADLINE && HAVE_LIBHISTORY)
+   if (opt_prompt)
+      std::cout << opt_prompt;
+#endif // !(HAVE_LIBREADLINE && HAVE_LIBHISTORY)
+}
 ;
 
 input: input_line '\n'
-- 
1.5.6.5




More information about the irrtoolset mailing list