aboutsummaryrefslogtreecommitdiffstats
path: root/util/argparse.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-06-11 07:16:50 +0000
committerWerner Koch <[email protected]>1998-06-11 07:16:50 +0000
commitd9b3dc000085007bdd198ca4c0500e80a72475d7 (patch)
treebb3ffa42fa8b9e30476fdbc843632c896fcfec37 /util/argparse.c
parent. (diff)
downloadgnupg-d9b3dc000085007bdd198ca4c0500e80a72475d7.tar.gz
gnupg-d9b3dc000085007bdd198ca4c0500e80a72475d7.zip
update from tobold
Diffstat (limited to '')
-rw-r--r--util/argparse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/argparse.c b/util/argparse.c
index ce1dbc6af..9a9909e30 100644
--- a/util/argparse.c
+++ b/util/argparse.c
@@ -72,6 +72,7 @@
* Bit 3 : Do not use -- to stop option processing.
* Bit 4 : Do not skip the first arg.
* Bit 5 : allow usage of long option with only one dash
+ * Bit 6 : ignore --version
* all other bits must be set to zero, this value is modified by the function
* so assume this is write only.
* Local flags (for each option):
@@ -377,8 +378,10 @@ arg_parse( ARGPARSE_ARGS *arg, ARGPARSE_OPTS *opts)
if( !opts[i].short_opt && !strcmp( "help", s+2) )
show_help(opts, arg->flags);
else if( !opts[i].short_opt && !strcmp( "version", s+2) ) {
- show_version();
- exit(0);
+ if( !(arg->flags & (1<<6)) ) {
+ show_version();
+ exit(0);
+ }
}
else if( !opts[i].short_opt && !strcmp( "warranty", s+2) ) {
puts( strusage(16) );