mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader: Use locale-insensitive string comparison.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
de3423e98e
commit
df72746729
@@ -88,6 +88,29 @@ static inline unsigned int vkd3d_log2i(unsigned int x)
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline int ascii_isupper(int c)
|
||||
{
|
||||
return 'A' <= c && c <= 'Z';
|
||||
}
|
||||
|
||||
static inline int ascii_tolower(int c)
|
||||
{
|
||||
return ascii_isupper(c) ? c - 'A' + 'a' : c;
|
||||
}
|
||||
|
||||
static inline int ascii_strcasecmp(const char *a, const char *b)
|
||||
{
|
||||
int c_a, c_b;
|
||||
|
||||
do
|
||||
{
|
||||
c_a = ascii_tolower(*a++);
|
||||
c_b = ascii_tolower(*b++);
|
||||
} while (c_a == c_b && c_a != '\0');
|
||||
|
||||
return c_a - c_b;
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
# if HAVE_SYNC_ADD_AND_FETCH
|
||||
static inline LONG InterlockedIncrement(LONG volatile *x)
|
||||
|
Reference in New Issue
Block a user