1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

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.
This commit is contained in:
Werner Koch 2022-06-13 17:35:05 +02:00
parent dd600bbc84
commit ce63eaa4f8
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 89 additions and 0 deletions

View file

@ -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. */