summaryrefslogtreecommitdiff
path: root/src/gpg-error.h.in
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2020-02-25 21:03:32 +0100
committerWerner Koch <wk@gnupg.org>2020-02-25 21:03:32 +0100
commit6fc2d7cb8ce9e08cb189608466803ee7c8eb6930 (patch)
treeda5d16a40f913feb018dc626504aff86b676b945 /src/gpg-error.h.in
parentca79d5edee8c6d93575708643ec825f81107e624 (diff)
downloadlibgpg-error-6fc2d7cb8ce9e08cb189608466803ee7c8eb6930.tar.gz
core: Add parser for meta commands to gpgrt_argparser.
* src/gpg-error.h.in (ARGPARSE_INVALID_META): New (ARGPARSE_UNKNOWN_META, ARGPARSE_UNEXPECTED_META): New. * src/argparse.c (struct _gpgrt_argparse_internal_s): Add flag insysconfig. (initialize): Init flag. Add error strings. (_gpgrt_argparser): Set that flag. (_gpgrt_argparse): Add parsing of meta commands. * tests/etc/t-argparse.conf: Add some test cases. * tests/t-argparse.conf: Ditto. * tests/t-argparse.c (main): Die only after printing all warnings. -- Noe that this is just the framework to add meta commands to the global config file. We also need to get away from fixes test config files and create them on the fly to that we are able to test also errors. GnuPG-bug-id: 4788
Diffstat (limited to 'src/gpg-error.h.in')
-rw-r--r--src/gpg-error.h.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in
index e353700..165881b 100644
--- a/src/gpg-error.h.in
+++ b/src/gpg-error.h.in
@@ -1206,6 +1206,9 @@ typedef struct
#define ARGPARSE_PERMISSION_ERROR (-13)
#define ARGPARSE_NO_CONFFILE (-14)
#define ARGPARSE_CONFFILE (-15)
+#define ARGPARSE_INVALID_META (-16)
+#define ARGPARSE_UNKNOWN_META (-17)
+#define ARGPARSE_UNEXPECTED_META (-18)
/* Flags for the option descriptor (gpgrt_opt_t)->flags. Note that
* a TYPE constant may be or-ed with the OPT constants. */