1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +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>
(cherry picked from commit e2f18023b3)

This might come handy when we eventually backport other changes.
This commit is contained in:
Werner Koch 2019-02-08 09:32:55 +01:00
parent 14816c7980
commit ee8d1a9e6c
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
4 changed files with 71 additions and 1 deletions

View file

@ -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 )
{