Add the function 'confirm_yesno' for interactive

User's confirmation is asked in different commands. This commit adds a
function for such confirmation.

Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Pierre Aubert <p.aubert@staubli.com>
This commit is contained in:
Pierre Aubert 2014-04-24 10:30:07 +02:00 committed by Pantelis Antoniou
parent 91fdabc67a
commit a5dffa4b67
5 changed files with 37 additions and 36 deletions

View file

@ -836,7 +836,7 @@ int ctrlc (void);
int had_ctrlc (void); /* have we had a Control-C since last clear? */
void clear_ctrlc (void); /* clear the Control-C condition */
int disable_ctrlc (int); /* 1 to disable, 0 to enable Control-C detect */
int confirm_yesno(void); /* 1 if input is "y", "Y", "yes" or "YES" */
/*
* STDIO based functions (can always be used)
*/