aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2022-06-13 15:35:05 +0000
committerWerner Koch <[email protected]>2022-06-13 15:50:26 +0000
commitce63eaa4f8f3f41aafcaddd8d658dacd522334a8 (patch)
tree1a9a9bd5fa210ab6573442bef4e1599fea95e3e9 /common/util.h
parentscd: Support specifying keygrip for learn command. (diff)
downloadgnupg-ce63eaa4f8f3f41aafcaddd8d658dacd522334a8.tar.gz
gnupg-ce63eaa4f8f3f41aafcaddd8d658dacd522334a8.zip
common: New function parse_compatibility_flags.
* common/miscellaneous.c (parse_compatibility_flags): New. * common/util.h (struct compatibility_flags_s): New. -- This is similar to parse_debug_flags but does not support specifying a value. This way we can more easily change the internal values or re-use them for other purposes.
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h
index 4327153bc..62e5af51d 100644
--- a/common/util.h
+++ b/common/util.h
@@ -372,6 +372,15 @@ struct debug_flags_s
int parse_debug_flag (const char *string, unsigned int *debugvar,
const struct debug_flags_s *flags);
+struct compatibility_flags_s
+{
+ unsigned int flag;
+ const char *name;
+ const char *desc;
+};
+int parse_compatibility_flags (const char *string, unsigned int *flagvar,
+ const struct compatibility_flags_s *flags);
+
/*-- Simple replacement functions. */