1 #ifndef __PORT_TYPEDEFS_H
2 #define __PORT_TYPEDEFS_H
3 
4 #include <stdint.h>
5 #include <wchar.h>
6 
7 #include "inp_keys.h"
8 #define TCHAR char
9 #define _T(x) x
10 #define _tfopen fopen
11 #define _tcstol strtol
12 #define _tcsstr strstr
13 #define _istspace(x) isspace(x)
14 #define _stprintf sprintf
15 #define _tcslen strlen
16 #define _tcsicmp(a, b) strcasecmp(a, b)
17 #define _tcscpy(to, from) strcpy(to, from)
18 #define _fgetts fgets
19 #define _strnicmp(s1, s2, n) strncasecmp(s1, s2, n)
20 #define _sntprintf  snprintf
21 #define _tcscmp     strcmp
22 #define _tcsncmp strncmp
23 #define _tcsncpy strncpy
24 #define _stscanf sscanf
25 #define _ftprintf fprintf
26 
27 #ifdef _MSC_VER
28 #include <tchar.h>
29 #define strncasecmp(s1, s2, n) _strnicmp(s1, s2, n)
30 #define strcasecmp(x, y) _stricmp(x, y)
31 #define snprintf _snprintf
32 #else
33 #define _stricmp(x, y) strcasecmp(x,y)
34 
35 typedef struct { int x, y, width, height; } RECT;
36 #undef __cdecl
37 #define __cdecl
38 
39 //#define bprintf(...) {}
40 #endif
41 
42 #undef __fastcall
43 #undef _fastcall
44 #define __fastcall			/*what does this correspond to?*/
45 #define _fastcall			/*same as above - what does this correspond to?*/
46 #define ANSIToTCHAR(str, foo, bar) (str)
47 
48 /* for Windows / Xbox 360 (below VS2010) - typedefs for missing stdint.h types such as uintptr_t?*/
49 
50 /*FBA defines*/
51 #define PUF_TEXT_NO_TRANSLATE	(0)
52 #define PUF_TYPE_ERROR		(1)
53 
54 extern TCHAR szAppBurnVer[16];
55 
56 typedef int HWND;
57 
58 extern int bDrvOkay;
59 extern int bRunPause;
60 #ifdef __cplusplus
61 extern bool bAlwaysProcessKeyboardInput;
62 #endif
63 extern HWND hScrnWnd;		// Handle to the screen window
64 
65 extern void InpDIPSWResetDIPs (void);
66 
67 #endif
68