diff --git a/common/attrstr.h b/common/attrstr.h index fb2346d1..2f4e42b4 100644 --- a/common/attrstr.h +++ b/common/attrstr.h @@ -5,11 +5,6 @@ #define uiprivAlloc(x, y) uiAlloc(x, y) #define uiprivRealloc(x, y, z) uiRealloc(x, y, z) #define uiprivFree(x) uiFree(x) -#ifndef _WIN32 -#define uiprivStricmp(x, y) strcasecmp(x, y) -#else -#define uiprivStricmp(x, y) stricmp(x, y) -#endif // attribute.c extern uiAttribute *uiprivAttributeRetain(uiAttribute *a); diff --git a/common/uipriv.h b/common/uipriv.h index 3cd23605..02676a16 100644 --- a/common/uipriv.h +++ b/common/uipriv.h @@ -58,6 +58,9 @@ extern void fallbackSkew(uiDrawMatrix *, double, double, double, double); extern void scaleCenter(double, double, double *, double *); extern void fallbackTransformSize(uiDrawMatrix *, double *, double *); +// OS-specific text.* files +extern int uiprivStricmp(const char *a, const char *b); + #ifdef __cplusplus } #endif diff --git a/windows/text.cpp b/windows/text.cpp index af79fb80..e3a23570 100644 --- a/windows/text.cpp +++ b/windows/text.cpp @@ -105,3 +105,16 @@ void uiWindowsSetWindowText(HWND hwnd, const char *text) setWindowText(hwnd, wtext); uiFree(wtext); } + +int uiprivStricmp(const char *a, const char *b) +{ + WCHAR *wa, *wb; + int ret; + + wa = toUTF16(a); + wb = toUTF16(b); + ret = _wcsicmp(wa, wb); + uiFree(wb); + uiFree(wa); + return ret; +}