mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
* miscutil.c: New function answer_is_yes_no_default() to give a default
answer.
This commit is contained in:
parent
ed34151773
commit
af5e83329e
@ -1,3 +1,8 @@
|
||||
2002-04-23 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* miscutil.c: New function answer_is_yes_no_default() to give a
|
||||
default answer.
|
||||
|
||||
2002-04-22 Stefan Bellon <sbellon@sbellon.de>
|
||||
|
||||
* riscos.c (riscos_open, riscos_fopen, riscos_fstat, set_filetype):
|
||||
|
@ -290,9 +290,8 @@ make_printable_string( const byte *p, size_t n, int delim )
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
answer_is_yes( const char *s )
|
||||
answer_is_yes_no_default( const char *s, int def_answer )
|
||||
{
|
||||
const char *long_yes = _("yes");
|
||||
const char *short_yes = _("yY");
|
||||
@ -314,9 +313,14 @@ answer_is_yes( const char *s )
|
||||
return 1;
|
||||
if( *s && strchr( "yY", *s ) && !s[1] )
|
||||
return 1;
|
||||
return 0;
|
||||
return def_answer;
|
||||
}
|
||||
|
||||
int
|
||||
answer_is_yes( const char *s )
|
||||
{
|
||||
return answer_is_yes_no_default(s,0);
|
||||
}
|
||||
|
||||
/****************
|
||||
* Return 1 for yes, -1 for quit, or 0 for no
|
||||
|
Loading…
x
Reference in New Issue
Block a user