diff options
author | Werner Koch <[email protected]> | 1998-02-13 20:58:50 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1998-02-13 20:58:50 +0000 |
commit | f477447d9af4097e8c5d4c15a3dd381237e93ee2 (patch) | |
tree | a655392c92fed02f06ebf503bf10b835b56e54e0 /util/argparse.c | |
parent | added assembler stuff for hppa (diff) | |
download | gnupg-f477447d9af4097e8c5d4c15a3dd381237e93ee2.tar.gz gnupg-f477447d9af4097e8c5d4c15a3dd381237e93ee2.zip |
added option exportV0-2-6
Diffstat (limited to 'util/argparse.c')
-rw-r--r-- | util/argparse.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/util/argparse.c b/util/argparse.c index 0c8ad8f0b..620211e31 100644 --- a/util/argparse.c +++ b/util/argparse.c @@ -538,16 +538,31 @@ show_help( ARGPARSE_OPTS *opts, unsigned flags ) /* get max. length of long options */ for(i=indent=0; opts[i].short_opt; i++ ) { if( opts[i].long_opt ) - if( (j=strlen(opts[i].long_opt)) > indent && j < 35 ) - indent = j; + if( !opts[i].description || *opts[i].description != '\v' ) + if( (j=strlen(opts[i].long_opt)) > indent && j < 35 ) + indent = j; } /* example: " -v, --verbose Viele Sachen ausgeben" */ indent += 10; - puts("Options:"); + if( *opts[0].description != '\v' ) + puts("Options:"); for(i=0; opts[i].short_opt; i++ ) { s = _( opts[i].description ); if( s && *s== '\r' ) /* hide this line */ continue; + if( s && *s == '\v' ) { /* unindented comment only line */ + for(s++; *s; s++ ) { + if( *s == '\n' ) { + if( s[1] ) + putchar('\n'); + } + else + putchar(*s); + } + putchar('\n'); + continue; + } + if( opts[i].short_opt < 256 ) printf(" -%c", opts[i].short_opt ); else |