aboutsummaryrefslogtreecommitdiffstats
path: root/util/ttyio.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/ttyio.c')
-rw-r--r--util/ttyio.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/ttyio.c b/util/ttyio.c
index bb795c282..99927d660 100644
--- a/util/ttyio.c
+++ b/util/ttyio.c
@@ -328,3 +328,15 @@ tty_kill_prompt()
last_prompt_len = 0;
}
+
+int
+tty_get_answer_is_yes( const char *prompt )
+{
+ int yes;
+ char *p = tty_get( prompt );
+ tty_kill_prompt();
+ yes = answer_is_yes(p);
+ m_free(p);
+ return yes;
+}
+