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

common: New functions get_option_value and ascii_strupr.

* common/server-help.c (get_option_value): New.
* common/stringhelp.c (ascii_strupr): New.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-02-08 09:32:55 +01:00
parent b79bc877f2
commit e2f18023b3
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 71 additions and 1 deletions

View file

@ -55,6 +55,14 @@ int has_leading_option (const char *line, const char *name);
or a space. */
const char *has_option_name (const char *line, const char *name);
/* Same as has_option_name but ignores all options after a "--" and
* does not return a const char ptr. */
char *has_leading_option_name (char *line, const char *name);
/* Parse an option with the format "--NAME=VALUE" and return the value
* as a malloced string. */
gpg_error_t get_option_value (char *line, const char *name, char **r_value);
/* Return a pointer to the argument of the option with NAME. If such
an option is not given, NULL is returned. */
char *option_value (const char *line, const char *name);