aboutsummaryrefslogtreecommitdiffstats
path: root/jnlib/argparse.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2002-04-24 01:55:58 +0000
committerMarcus Brinkmann <[email protected]>2002-04-24 01:55:58 +0000
commita559c32a55e3077ee42f82d8794e6383adbb1e41 (patch)
tree0ca7955cbbf3bbf5e60e9b588b93499ab163f0b9 /jnlib/argparse.c
parent* key.c (gpgme_key_get_ulong_attr): Swapped use of can_encrypt and (diff)
downloadgpgme-a559c32a55e3077ee42f82d8794e6383adbb1e41.tar.gz
gpgme-a559c32a55e3077ee42f82d8794e6383adbb1e41.zip
Update assuan and jnlib to 20020424 from newpg.
Diffstat (limited to '')
-rw-r--r--jnlib/argparse.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/jnlib/argparse.c b/jnlib/argparse.c
index 0e353e4d..0eb99d45 100644
--- a/jnlib/argparse.c
+++ b/jnlib/argparse.c
@@ -276,10 +276,12 @@ optfile_parse( FILE *fp, const char *filename, unsigned *lineno,
arg->r_opt = -arg->r_opt;
if( !opts[idx].short_opt ) /* unknown command/option */
arg->r_opt = (opts[idx].flags & 256)? -7:-2;
- else if( (opts[idx].flags & 8) ) /* no argument */
- arg->r_opt = -3; /* error */
- else /* no or optional argument */
+ else if( !(opts[idx].flags & 7) ) /* does not take an arg */
arg->r_type = 0; /* okay */
+ else if( (opts[idx].flags & 8) ) /* argument is optional */
+ arg->r_type = 0; /* okay */
+ else /* required argument */
+ arg->r_opt = -3; /* error */
break;
}
else if( state == 3 ) { /* no argument found */
@@ -900,7 +902,7 @@ strusage( int level )
switch( level ) {
case 11: p = "foo"; break;
case 13: p = "0.0"; break;
- case 14: p = "Copyright (C) 2001 Free Software Foundation, Inc."; break;
+ case 14: p = "Copyright (C) 2002 Free Software Foundation, Inc."; break;
case 15: p =
"This program comes with ABSOLUTELY NO WARRANTY.\n"
"This is free software, and you are welcome to redistribute it\n"