summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2025-10-30 11:57:59 -0400
committerAndrew Opalach <andrew@akon.city> 2025-10-30 11:57:59 -0400
commit320e1f5825393d83a7c494b24a6ba37380e8204c (patch)
tree592a553bd1d0111a6a1f247b63837d0b8a2a3218
parent1b15b6ba0a78e0fe87716cc1df07f092c64dfefb (diff)
downloadlibalabaster-320e1f5825393d83a7c494b24a6ba37380e8204c.tar.gz
libalabaster-320e1f5825393d83a7c494b24a6ba37380e8204c.tar.bz2
libalabaster-320e1f5825393d83a7c494b24a6ba37380e8204c.zip
lib: Internalize isupper/lower()
Signed-off-by: Andrew Opalach <andrew@akon.city>
-rw-r--r--include/al/lib.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/al/lib.h b/include/al/lib.h
index f5379e5..71a6f7d 100644
--- a/include/al/lib.h
+++ b/include/al/lib.h
@@ -46,7 +46,6 @@
#include <wchar.h>
#include <stdio.h>
#include <stdarg.h>
-#include <ctype.h>
#ifdef AL_MEMORY_TRACKING
void al_malloc_init(void);
@@ -206,14 +205,15 @@ static inline bool al_isspace(char c)
return (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v');
}
+// ASCII-only.
static inline bool al_isupper(char c)
{
- return isupper(c);
+ return c >= 'A' && c <= 'Z';
}
static inline bool al_islower(char c)
{
- return islower(c);
+ return c >= 'a' && c <= 'z';
}
static inline char al_tolower(char c)