5050#define __pragma (...) _Pragma (#__VA_ARGS__)
5151#define __declspec (x )
5252#define CALLBACK
53+ #define TEXT (x ) strdup(x)
54+
55+ inline char *_strlwr_l (char *str, locale_t loc)
56+ {
57+ // TODO
58+ }
59+
60+ inline char *_strupr_l (char *str, locale_t loc)
61+ {
62+ // TODO
63+ }
64+
65+ #define VOID void
66+ #define HKL void *
67+ #define ActivateKeyboardLayout (x, y ) {}
68+ #define GetCursorPos (point ) {}
69+ #define ScreenToClient (hwnd, p ) {}
5370
5471#define __except (X ) catch (X)
5572
@@ -94,7 +111,7 @@ inline int GetExceptionCode()
94111
95112#define xr_unlink unlink
96113
97- typedef char BOOL;
114+ typedef bool BOOL;
98115typedef char * LPSTR;
99116typedef char * PSTR;
100117typedef char * LPTSTR;
@@ -194,10 +211,15 @@ typedef struct tagPOINT {
194211 long y;
195212} POINT, *PPOINT, *LPPOINT;
196213
214+ #define DWORD_PTR UINT_PTR
197215#define WM_USER 0x0400
216+ #define WA_INACTIVE 0
217+ #define HIWORD (l ) ((WORD)((DWORD_PTR)(l) >> 16 ))
218+ #define LOWORD (l ) ((WORD)((DWORD_PTR)(l) & 0xFFFF ))
198219
199- #define TRUE 1
200- #define FALSE 0
220+
221+ #define TRUE true
222+ #define FALSE false
201223#define NONE 0
202224#define CONST const
203225
@@ -218,6 +240,7 @@ typedef dirent DirEntryType;
218240#define strcmpi stricmp
219241#define lstrcpy strcpy
220242#define stricmp strcasecmp
243+ #define strupr SDL_strupr
221244#define strncpy_s (dest, size, source, num ) (NULL == strncpy(dest, source, num))
222245#define strcpy_s (dest, num, source ) (NULL == strcpy(dest, source))
223246#define strcat_s (dest, num, source ) (dest == strcat(dest, source))
@@ -267,6 +290,9 @@ inline int _filelength(int fd)
267290
268291#define itoa SDL_itoa
269292#define _itoa_s (value, buffer, radix ) SDL_itoa(value, buffer, radix)
293+ #define _locale_t locale_t
294+ #define _isalpha_l isalpha_l
295+ #define _create_locale (category, arg ) newlocale(category, arg, (locale_t ) 0 )
270296
271297#define ZeroMemory (p, sz ) memset((p), 0 , (sz))
272298#define CopyMemory (d, s, n ) memcpy(d, s, n)
@@ -282,3 +308,6 @@ inline int _filelength(int fd)
282308#define _MAX_DIR 256
283309#define _MAX_FNAME 256
284310#define _MAX_EXT 256
311+
312+ #define SEM_FAILCRITICALERRORS 1
313+ #define SetErrorMode (x ) {x=x}
0 commit comments