|
@@ -860,7 +860,6 @@ CODE
|
|
#include "imgui_internal.h"
|
|
#include "imgui_internal.h"
|
|
|
|
|
|
// System includes
|
|
// System includes
|
|
-#include <ctype.h> // toupper
|
|
|
|
#include <stdio.h> // vsnprintf, sscanf, printf
|
|
#include <stdio.h> // vsnprintf, sscanf, printf
|
|
#if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier
|
|
#if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier
|
|
#include <stddef.h> // intptr_t
|
|
#include <stddef.h> // intptr_t
|
|
@@ -1613,14 +1612,14 @@ ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c,
|
|
int ImStricmp(const char* str1, const char* str2)
|
|
int ImStricmp(const char* str1, const char* str2)
|
|
{
|
|
{
|
|
int d;
|
|
int d;
|
|
- while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; }
|
|
|
|
|
|
+ while ((d = ImToUpper(*str2) - ImToUpper(*str1)) == 0 && *str1) { str1++; str2++; }
|
|
return d;
|
|
return d;
|
|
}
|
|
}
|
|
|
|
|
|
int ImStrnicmp(const char* str1, const char* str2, size_t count)
|
|
int ImStrnicmp(const char* str1, const char* str2, size_t count)
|
|
{
|
|
{
|
|
int d = 0;
|
|
int d = 0;
|
|
- while (count > 0 && (d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; count--; }
|
|
|
|
|
|
+ while (count > 0 && (d = ImToUpper(*str2) - ImToUpper(*str1)) == 0 && *str1) { str1++; str2++; count--; }
|
|
return d;
|
|
return d;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1687,14 +1686,14 @@ const char* ImStristr(const char* haystack, const char* haystack_end, const char
|
|
if (!needle_end)
|
|
if (!needle_end)
|
|
needle_end = needle + strlen(needle);
|
|
needle_end = needle + strlen(needle);
|
|
|
|
|
|
- const char un0 = (char)toupper(*needle);
|
|
|
|
|
|
+ const char un0 = (char)ImToUpper(*needle);
|
|
while ((!haystack_end && *haystack) || (haystack_end && haystack < haystack_end))
|
|
while ((!haystack_end && *haystack) || (haystack_end && haystack < haystack_end))
|
|
{
|
|
{
|
|
- if (toupper(*haystack) == un0)
|
|
|
|
|
|
+ if (ImToUpper(*haystack) == un0)
|
|
{
|
|
{
|
|
const char* b = needle + 1;
|
|
const char* b = needle + 1;
|
|
for (const char* a = haystack + 1; b < needle_end; a++, b++)
|
|
for (const char* a = haystack + 1; b < needle_end; a++, b++)
|
|
- if (toupper(*a) != toupper(*b))
|
|
|
|
|
|
+ if (ImToUpper(*a) != ImToUpper(*b))
|
|
break;
|
|
break;
|
|
if (b == needle_end)
|
|
if (b == needle_end)
|
|
return haystack;
|
|
return haystack;
|