core: Allow returning of attributes from gpgrt_argparser.
* src/gpg-error.h.in (ARGPARSE_FLAG_WITHATTR): New. (ARGPARSE_ATTR_FORCE): New. (ARGPARSE_ATTR_IGNORE): New. (ARGPARSE_TYPE_MASK): Moved from argparse.c to here. * src/argparse.c: Always use macros for constants. (_gpgrt_argparse): Handle ARGPARSE_FLAG_WITHATTR. (arg_parse): Ditto. * tests/t-argparse.c (main): Add commented test case.
This is a ABI compatible hack to allow the ignore and force attributes
as well as to return which option has been ignored in a user file or
on the command line.
- Signed-off-by: Werner Koch <wk@gnupg.org>