diff options
author | Werner Koch <[email protected]> | 1998-08-11 17:29:34 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1998-08-11 17:29:34 +0000 |
commit | 3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0 (patch) | |
tree | dfff62df60f917addc9df4e83a1ed73e31041bab /util/miscutil.c | |
parent | rel 0.3.3 (diff) | |
download | gnupg-3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0.tar.gz gnupg-3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0.zip |
bug fix releaseV0-3-4
Diffstat (limited to '')
-rw-r--r-- | util/miscutil.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/util/miscutil.c b/util/miscutil.c index e4c2cf1ae..041c6faa5 100644 --- a/util/miscutil.c +++ b/util/miscutil.c @@ -25,6 +25,7 @@ #include <ctype.h> #include "types.h" #include "util.h" +#include "i18n.h" u32 make_timestamp() @@ -79,14 +80,16 @@ print_string( FILE *fp, byte *p, size_t n, int delim ) putc(*p, fp); } + int answer_is_yes( const char *s ) { - if( !stricmp(s, "yes") ) - return 1; - if( *s == 'y' && !s[1] ) + char *long_yes = _("yes"); + char *short_yes = _("yY"); + + if( !stricmp(s, long_yes ) ) return 1; - if( *s == 'Y' && !s[1] ) + if( strchr( short_yes, *s ) && !s[1] ) return 1; return 0; } |