1 2 #ifdef _UNICODE 3 //TODO: bah 4 #include <wchar.h> 5 #define __TEXT(q) L##q 6 7 typedef wchar_t TCHAR; 8 typedef wchar_t _TCHAR; 9 10 #else 11 12 13 #define __TEXT(q) q 14 15 #ifndef RC_INVOKED 16 typedef char TCHAR; 17 typedef char _TCHAR; 18 #endif 19 20 // WTF? This is a normal string function! 21 // #define wcslen(void) 22 23 #define _tcslen strlen 24 #define _tcscpy strcpy 25 #define _tcsncpy strncpy 26 27 #define _tprintf printf 28 #define _vstprintf vsprintf 29 #define _vsntprintf vsnprintf 30 #define _stprintf sprintf 31 #define _sntprintf snprintf 32 #define _ftprintf fprintf 33 #define _tsprintf sprintf 34 35 #define _tcscmp strcmp 36 #define _tcsncmp strncmp 37 #define _tcsicmp stricmp 38 #define _tcsnicmp _strnicmp 39 40 #define _tcstol strtol 41 42 #define _fgetts fgets 43 #define _fputts fputs 44 45 #define _istspace isspace 46 47 #define _tfopen fopen 48 49 50 // FBA function, change this! 51 #define dprintf printf 52 53 54 #endif 55 56 #define _TEXT(x) __TEXT(x) 57 #define _T(x) __TEXT(x) 58 59