* include/winnt.h: (__TEXT): Add private macro.

(_TEXT): Modify definition to use __TEXT.
	(_T): Ditto.
	This change allows the passing of a MACRO as an argument and have that
	MACRO resolved first.
	Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com>
This commit is contained in:
Earnie Boyd 2001-02-02 18:10:58 +00:00
parent a562294385
commit 7152ac2bb3
2 changed files with 29 additions and 7 deletions

View File

@ -1,4 +1,13 @@
Fri Feb 2 13:08:09 2001 Earnie Boyd <earnie@users.sourceforge.net>
* include/winnt.h: (__TEXT): Add private macro.
(_TEXT): Modify definition to use __TEXT.
(_T): Ditto.
This change allows the passing of a MACRO as an argument and have that
MACRO resolved first.
Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com>
Wed Jan 31 17:35:59 2001 Earnie Boyd <earnie@users.sourceforge.net>
* Makefile.in: Increment VERSION to 0.5

View File

@ -69,7 +69,7 @@ typedef CHAR *PCHAR,*LPCH,*PCH,*NPSTR,*LPSTR,*PSTR;
typedef CONST CHAR *LPCCH,*PCSTR,*LPCSTR;
#ifndef _TCHAR_DEFINED
#define _TCHAR_DEFINED
#ifdef UNICODE
#ifdef _UNICODE
typedef WCHAR TCHAR;
#else
typedef CHAR TCHAR;
@ -78,14 +78,27 @@ typedef CHAR TCHAR;
typedef TCHAR TBYTE,*PTCH,*PTBYTE;
typedef TCHAR *LPTCH,*PTSTR,*LPTSTR,*LP,*PTCHAR;
typedef const TCHAR *LPCTSTR;
#ifdef UNICODE
#define _TEXT(q) L##q
#ifdef _UNICODE
/*
* __TEXT is a private macro whose specific use is to force the expansion of a
* macro passed as an argument to the macros _T or _TEXT. DO NOT use this
* macro within your programs. It's name and function could change without
* notice.
*/
#undef __TEXT
#define __TEXT(q) L##q
#else
#define _TEXT(q) q
#endif
#ifndef _T
#define _T _TEXT
#undef __TEXT
#define __TEXT(q) q
#endif
/*
* UNICODE a constant string when _UNICODE is defined else returns the string
* unmodified. Also defined in mingw/tchar.h.
*/
#undef _TEXT
#define _TEXT(q) __TEXT(q)
#undef _T
#define _T(q) __TEXT(q)
typedef SHORT *PSHORT;
typedef LONG *PLONG;
typedef void *HANDLE;