aboutsummaryrefslogtreecommitdiffstats
path: root/common/stringhelp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-02-08 08:32:55 +0000
committerWerner Koch <[email protected]>2019-02-08 10:13:33 +0000
commite2f18023b3b3b7e55b35218f65e37448d1011172 (patch)
tree2844ce521fde92a777e00ef91e0bd7ff41722b7c /common/stringhelp.c
parentcard: Print the used algorithm of all keys. (diff)
downloadgnupg-e2f18023b3b3b7e55b35218f65e37448d1011172.tar.gz
gnupg-e2f18023b3b3b7e55b35218f65e37448d1011172.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]>
Diffstat (limited to 'common/stringhelp.c')
-rw-r--r--common/stringhelp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/stringhelp.c b/common/stringhelp.c
index 751e5711f..dd1711684 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 )
{