1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

See ChangeLog: Thu May 27 09:40:55 CEST 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-05-27 07:45:46 +00:00
parent d5fd04e0ce
commit a6a548ab56
12 changed files with 225 additions and 65 deletions

View file

@ -164,3 +164,26 @@ answer_is_yes( const char *s )
}
/****************
* Return 1 for yes, -1 for quit, or 0 for no
*/
int
answer_is_yes_no_quit( const char *s )
{
char *long_yes = _("yes");
char *long_quit = _("quit");
char *short_yes = _("yY");
char *short_quit = _("qQ");
if( !stricmp(s, long_yes ) )
return 1;
if( !stricmp(s, long_quit ) )
return -1;
if( strchr( short_yes, *s ) && !s[1] )
return 1;
if( strchr( short_quit, *s ) && !s[1] )
return -1;
return 0;
}