Use the standard names for ctype functions if inside moon or _LUNA_OVERRIDE_STDC is defined

This commit is contained in:
apio 2022-11-18 21:17:26 +01:00
parent 1b3243a80c
commit be2e915d0d

View File

@ -75,4 +75,22 @@ inline constexpr int _toupper(int c)
{ {
if (_islower(c)) return c & 0x5f; if (_islower(c)) return c & 0x5f;
return c; return c;
} }
#if defined(_LUNA_OVERRIDE_STDC) || defined(IN_MOON)
#define isalnum _isalnum
#define isalpha _isalpha
#define isascii _isascii
#define iscntrl _iscntrl
#define isdigit _isdigit
#define isxdigit _isxdigit
#define isspace _isspace
#define ispunct _ispunct
#define isprint _isprint
#define isgraph _isgraph
#define islower _islower
#define isupper _isupper
#define isblank _isblank
#define tolower _tolower
#define toupper _toupper
#endif