common: Allow abbreviations of standard options.
authorMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Tue, 18 Jul 2017 16:08:25 +0000 (18:08 +0200)
committerMarcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
Tue, 18 Jul 2017 16:08:25 +0000 (18:08 +0200)
commitf17862d47d184d7f6ef883778cf63801365599a0
treeaaa3c994a5b616e113ab1037142dcf9a07382aef
parent2e1342b78b020f5b28359b08a4f63cf11479602f
common: Allow abbreviations of standard options.

* argparse.h (ARGPARSE_SHORTOPT_HELP, ARGPARSE_SHORTOPT_VERSION,
ARGPARSE_SHORTOPT_WARRANTY, ARGPARSE_SHORTOPT_DUMP_OPTIONS): New
macros.
(ARGPARSE_end): Add some placeholders for standard options.
* argparse.c (arg_parse): Fill in missing standard options so
default machinery works.  Check for standard options in new way.
Do not write out standard options for --dump-options.

Signed-off-by: Marcus Brinkmann <mb@g10code.com>
GnuPG-bug-id: 1747
common/argparse.c
common/argparse.h