diff options
Diffstat (limited to 'common/compat.c')
-rw-r--r-- | common/compat.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/compat.c b/common/compat.c index 1e17230..2e559c7 100644 --- a/common/compat.c +++ b/common/compat.c @@ -953,3 +953,19 @@ fdwalk (int (* cb) (void *data, int fd), #endif /* HAVE_FDWALK */ #endif /* OS_UNIX */ + +int +p11_ascii_tolower (int c) +{ + if (c >= 'A' && c <= 'Z') + return 'a' + (c - 'A'); + return c; +} + +int +p11_ascii_toupper (int c) +{ + if (c >= 'a' && c <= 'z') + return 'A' + (c - 'a'); + return c; +} |