*
* This code is distributed in the hope that it will be useful but
* WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
- * DISCLAMED. This includes but is not limited to warranties of
+ * DISCLAIMED. This includes but is not limited to warranties of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision$
#ifndef _TCHAR_H_
#define _TCHAR_H_
+#include <msvcrt/string.h>
+
/*
* NOTE: This tests _UNICODE, which is different from the UNICODE define
* used to differentiate Win32 API calls.
*/
#ifndef _TCHAR_DEFINED
#ifndef RC_INVOKED
-typedef wchar_t TCHAR;
+typedef wchar_t _TCHAR;
+typedef wchar_t _TSCHAR;
+typedef wchar_t _TUCHAR;
+typedef wchar_t _TXCHAR;
+/* #if !__STDC__ */
+typedef wchar_t TCHAR;
+/* #endif */
#endif /* Not RC_INVOKED */
#define _TCHAR_DEFINED
#endif
* Enclose constant strings and literal characters in the _TEXT and _T macro to make
* them unicode constant strings when _UNICODE is defined.
*/
+#ifndef _TEXT
#define _TEXT(x) L ## x
+#endif
+#ifndef _T
#define _T(x) L ## x
+#endif
/*
* Unicode functions
*/
+#define _tmain _wmain
+
#define _tprintf wprintf
#define _ftprintf fwprintf
#define _stprintf swprintf
#define _tcsncat wcsncat
#define _tcsncmp wcsncmp
#define _tcsncpy wcsncpy
+#define _tcsnlen wcsnlen
#define _tcspbrk wcspbrk
#define _tcsrchr wcsrchr
#define _tcsspn wcsspn
*/
#ifndef _TCHAR_DEFINED
#ifndef RC_INVOKED
-typedef char TCHAR;
+typedef char _TCHAR;
+typedef signed char _TSCHAR;
+typedef unsigned char _TUCHAR;
+typedef char _TXCHAR;
+
+/*#if !__STDC__*/
+typedef char TCHAR;
+/*#endif*/
+
#endif
#define _TCHAR_DEFINED
#endif
/*
* Enclose constant strings and characters in the _TEXT and _T macro.
*/
+#ifndef _TEXT
#define _TEXT(x) x
+#endif
+#ifndef _T
#define _T(x) x
+#endif
/*
* Non-unicode (standard) functions
*/
+#define _tmain main
+
#define _tprintf printf
#define _ftprintf fprintf
#define _stprintf sprintf
#define _tcsncat strncat
#define _tcsncmp strncmp
#define _tcsncpy strncpy
+#define _tcsnlen strnlen
#define _tcspbrk strpbrk
#define _tcsrchr strrchr
#define _tcsspn strspn