aboutsummaryrefslogtreecommitdiffstats
path: root/util/miscutil.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1997-12-20 17:23:29 +0000
committerWerner Koch <[email protected]>1997-12-20 17:23:29 +0000
commitcb5459aed775ed1eafcd89bb38544c6360c40e49 (patch)
tree38716e06e78ec08cf557b1df68ef001f8c9dfeb1 /util/miscutil.c
parentbetter prime number generator. improved ELG key generation (diff)
downloadgnupg-cb5459aed775ed1eafcd89bb38544c6360c40e49.tar.gz
gnupg-cb5459aed775ed1eafcd89bb38544c6360c40e49.zip
very first release
Diffstat (limited to '')
-rw-r--r--util/miscutil.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/util/miscutil.c b/util/miscutil.c
index 327eae860..d04d1595a 100644
--- a/util/miscutil.c
+++ b/util/miscutil.c
@@ -20,6 +20,7 @@
#include <config.h>
#include <stdio.h>
+#include <string.h>
#include <time.h>
#include <ctype.h>
#include "types.h"
@@ -52,3 +53,15 @@ print_string( FILE *fp, byte *p, size_t n )
putc(*p, fp);
}
+int
+answer_is_yes( const char *s )
+{
+ if( !stricmp(s, "yes") )
+ return 1;
+ if( *s == 'y' && !s[1] )
+ return 1;
+ if( *s == 'Y' && !s[1] )
+ return 1;
+ return 0;
+}
+