diff options
author | Werner Koch <[email protected]> | 2019-02-08 08:32:55 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-02-11 09:59:34 +0000 |
commit | ee8d1a9e6c09b3ecc4b46f47b79358f78d458916 (patch) | |
tree | a04241c54896acec7aa73ace2a7511dd21f06651 /common/stringhelp.c | |
parent | scd: Make app_genkey and supporting ISO function more flexible. (diff) | |
download | gnupg-ee8d1a9e6c09b3ecc4b46f47b79358f78d458916.tar.gz gnupg-ee8d1a9e6c09b3ecc4b46f47b79358f78d458916.zip |
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 <[email protected]>
(cherry picked from commit e2f18023b3b3b7e55b35218f65e37448d1011172)
This might come handy when we eventually backport other changes.
Diffstat (limited to '')
-rw-r--r-- | common/stringhelp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/stringhelp.c b/common/stringhelp.c index 0abac8ae5..68fe99796 100644 --- a/common/stringhelp.c +++ b/common/stringhelp.c @@ -810,6 +810,19 @@ ascii_strlwr (char *s) return s; } +/* Upcase all ASCII characters in S. */ +char * +ascii_strupr (char *s) +{ + char *p = s; + + for (p=s; *p; p++ ) + if (isascii (*p) && *p >= 'a' && *p <= 'z') + *p &= ~0x20; + + return s; +} + int ascii_strcasecmp( const char *a, const char *b ) { |