From 3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 11 Aug 1998 17:29:34 +0000 Subject: bug fix release --- util/miscutil.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'util/miscutil.c') 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 #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; } -- cgit v1.2.3