Likewise codified uiprivStricmp(). Honestly this will probably do for the Windows code for now...

This commit is contained in:
Pietro Gagliardi 2018-03-17 23:21:54 -04:00
parent 8709838a8f
commit 93f0eea140
3 changed files with 16 additions and 5 deletions

View File

@ -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);

View File

@ -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

View File

@ -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;
}