Fri Feb 2 10:34:07 2001 Earnie Boyd <earnie@users.sourceforge.net>

* include/tchar.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 16:50:06 +00:00
parent 47f810920a
commit a562294385
2 changed files with 30 additions and 13 deletions

View File

@ -1,4 +1,13 @@
Fri Feb 2 10:34:07 2001 Earnie Boyd <earnie@users.sourceforge.net>
* include/tchar.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:12:51 2001 Earnie Boyd <earnie@users.sourceforge.net>
* Makefile.in: Increment version to 0.5

View File

@ -61,14 +61,13 @@ typedef wchar_t TCHAR;
/*
* Enclose constant strings and literal characters in the _TEXT macro to make
* them unicode constant strings when _UNICODE is defined.
* __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.
*/
#define _TEXT(x) L ## x
#ifndef _T
#define _T(x) L ## x
#endif
#undef __TEXT
#define __TEXT(x) L ## x
/* for porting from other Windows compilers */
#if 0 // no wide startup module
@ -213,13 +212,13 @@ typedef char TCHAR;
#endif
/*
* Enclose constant strings and characters in the _TEXT macro.
* __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.
*/
#define _TEXT(x) x
#ifndef _T
#define _T(x) x
#endif
#undef __TEXT
#define __TEXT(x) x
/* for porting from other Windows compilers */
#define _tmain main
@ -351,5 +350,14 @@ typedef char TCHAR;
#endif /* Not _UNICODE */
/*
* UNICODE a constant string when _UNICODE is defined else returns the string
* unmodified. Also defined in w32api/winnt.h.
*/
#undef _TEXT
#define _TEXT(x) __TEXT(x)
#undef _T
#define _T(x) __TEXT(x)
#endif /* Not _TCHAR_H_ */