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:
parent
14816c7980
commit
ee8d1a9e6c
4 changed files with 71 additions and 1 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue