diff options
author | Werner Koch <[email protected]> | 1997-12-20 17:23:29 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1997-12-20 17:23:29 +0000 |
commit | cb5459aed775ed1eafcd89bb38544c6360c40e49 (patch) | |
tree | 38716e06e78ec08cf557b1df68ef001f8c9dfeb1 /util/miscutil.c | |
parent | better prime number generator. improved ELG key generation (diff) | |
download | gnupg-cb5459aed775ed1eafcd89bb38544c6360c40e49.tar.gz gnupg-cb5459aed775ed1eafcd89bb38544c6360c40e49.zip |
very first release
Diffstat (limited to 'util/miscutil.c')
-rw-r--r-- | util/miscutil.c | 13 |
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; +} + |