1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Declarations common to wx char/wchar_t usage (wide chars)
8 // Copyright: (c) wxWindows copyright
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "wxchar.h"
19 // only do SBCS or _UNICODE
21 // It may be OK anyway.
22 // # error "MBCS is not supported by wxChar"
25 // ----------------------------------------------------------------------------
26 // first deal with Unicode setting
27 // ----------------------------------------------------------------------------
29 // set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined
30 #if defined(_UNICODE) || defined(UNICODE)
32 # define wxUSE_UNICODE 1
34 # ifndef wxUSE_UNICODE
35 # define wxUSE_UNICODE 0
39 // and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1...
49 // Unicode support requires wchar_t
52 # define wxUSE_WCHAR_T 1
55 // ----------------------------------------------------------------------------
56 // define wxHAVE_TCHAR_FUNCTIONS for the compilers which support the
57 // wide-character functions
58 // ----------------------------------------------------------------------------
61 // VC++ and BC++ starting with 5.2 have TCHAR support
63 #define wxHAVE_TCHAR_FUNCTIONS
64 #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
65 #define wxHAVE_TCHAR_FUNCTIONS
66 #elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
67 #define wxHAVE_TCHAR_FUNCTIONS
71 #elif defined(__CYGWIN__)
74 #endif // !HAVE_WCSLEN
78 #elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
79 // VisualAge 4.0+ supports TCHAR
80 #define wxHAVE_TCHAR_FUNCTIONS
82 // but not stdio.h nor time nor conversion functions
83 #define wxNO_TCHAR_STDIO
84 #define wxNO_TCHAR_STDLIB
85 #define wxNO_TCHAR_TIME
86 #define wxNO_TCHAR_LOCALE
88 // supplemental VA V4 defs so at least we know what these are
89 // just define to standard defs
95 // locale.h functons -- not defined in tchar.h
96 #define wxSetlocale setlocale
97 // some stdio functions are defined others are not
99 #define wxFgetchar fgetchar
100 #define wxFopen fopen
101 #define wxFputchar fputchar
102 #define wxFreopen freopen
104 #define wxPerror perror
106 #define wxRemove remove
107 #define wxRename rename
108 #define wxTmpnam tmpnam
109 #define wxUngetc ungetc
110 #define wxVsscanf vsscanf
111 // stdlib not defined in VA V4
117 #define wxGetenv getenv
118 #define wxSystem system
119 // time.h functions -- none defined in tchar.h
120 #define wxAsctime asctime
121 #define wxCtime ctime
122 #elif defined(__MWERKS__)
127 #endif // compilers with (good) TCHAR support
129 #ifdef wxHAVE_TCHAR_FUNCTIONS
130 # define HAVE_WCSLEN 1
134 # if wxUSE_UNICODE // temporary - preserve binary compatibility
135 #if defined(__GNUWIN32__)
137 #define _TSCHAR TCHAR
138 #define _TUCHAR TCHAR
141 typedef _TCHAR wxChar
;
142 typedef _TSCHAR wxSChar
;
143 typedef _TUCHAR wxUChar
;
146 # define wxSChar signed char
147 # define wxUChar unsigned char
150 // wchar_t is available
151 #ifndef wxUSE_WCHAR_T
152 #define wxUSE_WCHAR_T 1
153 #endif // !defined(wxUSE_WCHAR_T)
156 #ifndef wxNO_TCHAR_CTYPE
160 # define wxIsalnum _istalnum
161 # define wxIsalpha _istalpha
162 # define wxIsctrl _istctrl
163 # define wxIsdigit _istdigit
164 # define wxIsgraph _istgraph
165 # define wxIslower _istlower
166 # define wxIsprint _istprint
167 # define wxIspunct _istpunct
168 # define wxIsspace _istspace
169 # define wxIsupper _istupper
170 # define wxIsxdigit _istxdigit
171 # define wxTolower _totlower
172 # define wxToupper _totupper
173 #endif // wxNO_TCHAR_CTYPE
176 #ifndef wxNO_TCHAR_LOCALE
177 # define wxSetlocale _tsetlocale
178 #endif // wxNO_TCHAR_LOCALE
180 // string.h functions
181 #ifndef wxNO_TCHAR_STRING
182 # define wxStrcat _tcscat
183 # define wxStrchr _tcschr
184 # define wxStrcmp _tcscmp
185 # define wxStrcoll _tcscoll
186 # define wxStrcpy _tcscpy
187 # define wxStrcspn _tcscspn
188 # define wxStrftime _tcsftime
189 # define wxStricmp _tcsicmp
190 # define wxStrnicmp _tcsnicmp
191 # define wxStrlen_ _tcslen // used in wxStrlen inline function
192 # define wxStrncat _tcsncat
193 # define wxStrncmp _tcsncmp
194 # define wxStrncpy _tcsncpy
195 # define wxStrpbrk _tcspbrk
196 # define wxStrrchr _tcsrchr
197 # define wxStrspn _tcsspn
198 # define wxStrstr _tcsstr
199 # define wxStrtod _tcstod
200 # define wxStrtol _tcstol
201 # define wxStrtoul _tcstoul
202 # define wxStrxfrm _tcsxfrm
203 #endif // wxNO_TCHAR_STRING
206 #ifndef wxNO_TCHAR_STDIO
207 # if wxUSE_UNICODE_MSLU
208 # define wxRemove wxMSLU__tremove
209 # define wxRename wxMSLU__trename
211 # define wxRemove _tremove
212 # define wxRename _trename
214 # define wxFgetc _fgettc
215 # define wxFgetchar _fgettchar
216 # define wxFgets _fgetts
217 # define wxFopen _tfopen
218 # define wxFputc _fputtc
219 # define wxFputchar _fputtchar
220 # define wxFprintf _ftprintf
221 # define wxFreopen _tfreopen
222 # define wxFscanf _ftscanf
223 # define wxGetc _gettc
224 # define wxGetchar _gettchar
225 # define wxGets _getts
226 # define wxPerror _tperror
227 # define wxPrintf _tprintf
228 # define wxPutc _puttc
229 # define wxPutchar _puttchar
230 # define wxPuts _putts
231 # define wxScanf _tscanf
232 # define wxSprintf _stprintf
233 # define wxSscanf _stscanf
234 # define wxTmpnam _ttmpnam
235 # define wxUngetc _tungetc
236 # define wxVfprint _vftprintf
237 # define wxVprintf _vtprintf
238 # define wxVsscanf _vstscanf
239 # define wxVsprintf _vstprintf
240 #elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
241 // it has some stdio.h functions, apparently
242 # define wxFgetc _fgettc
243 # define wxFgets _fgetts
244 # define wxFputc _fputtc
245 # define wxFprintf _ftprintf
246 # define wxFscanf _ftscanf
247 # define wxGetc _gettc
248 # define wxGetchar _gettchar
249 # define wxPrintf _tprintf
250 # define wxPutc _puttc
251 # define wxPutchar _puttchar
252 # define wxScanf _tscanf
253 # define wxSprintf _stprintf
254 # define wxSscanf _stscanf
255 # define wxVfprint _vftprintf
256 # define wxVprintf _vtprintf
257 # define wxVsprintf _vstprintf
258 #endif // wxNO_TCHAR_STDIO
260 // stdlib.h functions
261 #ifndef wxNO_TCHAR_STDLIB
265 # define wxAtoi _ttoi
266 # define wxAtol _ttol
267 # define wxGetenv _tgetenv
268 # define wxSystem _tsystem
269 #endif // wxNO_TCHAR_STDLIB
272 #ifndef wxNO_TCHAR_TIME
273 # define wxAsctime _tasctime
274 # define wxCtime _tctime
275 #endif // wxNO_TCHAR_TIME
277 #else // !TCHAR-aware compilers
279 // check whether we should include wchar.h or equivalent
280 # if !defined(wxUSE_WCHAR_T)
281 # if defined(__VISUALC__) && (__VISUALC__ < 900)
282 # define wxUSE_WCHAR_T 0 // wchar_t is not available for MSVC++ 1.5
283 # elif defined(__UNIX__)
284 # if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__)
285 # define wxUSE_WCHAR_T 1
287 # define wxUSE_WCHAR_T 0
289 # elif defined(__GNUWIN32__) && !defined(__MINGW32__) // Cygwin (not Mingw32) doesn't have wcslen.h, needed in buffer.h
290 # define wxUSE_WCHAR_T 0
291 # elif defined(__BORLANDC__) // WIN16 BC++
292 # define wxUSE_WCHAR_T 0
293 # elif defined(__WATCOMC__)
294 # define wxUSE_WCHAR_T 0
295 # elif defined(__VISAGECPP__) && (__IBMCPP__ < 400)
296 # define wxUSE_WCHAR_T 0
298 // add additional compiler checks if this fails
299 # define wxUSE_WCHAR_T 1
301 # endif // !defined(wxUSE_WCHAR_T)
305 // include wchar.h to get wcslen() declaration used by wx/buffer.h
307 # elif defined(HAVE_WCSTR_H)
308 // old compilers have wcslen() here
310 # elif defined(__FreeBSD__) || defined(__DARWIN__) || defined(__EMX__)
311 // include stdlib.h for wchar_t, wcslen is provided in wxchar.cpp
313 size_t WXDLLEXPORT
wcslen(const wchar_t *s
);
314 # endif // HAVE_WCHAR_H
315 # endif // wxUSE_WCHAR_T
317 // check whether we are doing Unicode
322 // this is probably glibc-specific
323 # if defined(__WCHAR_TYPE__)
325 typedef __WCHAR_TYPE__ wxChar
;
326 typedef signed __WCHAR_TYPE__ wxSChar
;
327 typedef unsigned __WCHAR_TYPE__ wxUChar
;
331 // ctype.h functions (wctype.h)
332 # define wxIsalnum iswalnum
333 # define wxIsalpha iswalpha
334 # define wxIsctrl iswcntrl
335 # define wxIsdigit iswdigit
336 # define wxIsgraph iswgraph
337 # define wxIslower iswlower
338 # define wxIsprint iswprint
339 # define wxIspunct iswpunct
340 # define wxIsspace iswspace
341 # define wxIsupper iswupper
342 # define wxIsxdigit iswxdigit
344 # if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
345 // /usr/include/wctype.h incorrectly declares translations tables which
346 // provokes tons of compile-time warnings - try to correct this
347 # define wxTolower(wc) towctrans((wc), (wctrans_t)__ctype_tolower)
348 # define wxToupper(wc) towctrans((wc), (wctrans_t)__ctype_toupper)
350 # define wxTolower towlower
351 # define wxToupper towupper
354 // string.h functions (wchar.h)
355 # define wxStrcat wcscat
356 # define wxStrchr wcschr
357 # define wxStrcmp wcscmp
358 # define wxStrcoll wcscoll
359 # define wxStrcpy wcscpy
360 # define wxStrcspn wcscspn
361 # define wxStrlen_ wcslen // used in wxStrlen inline function
362 # define wxStrncat wcsncat
363 # define wxStrncmp wcsncmp
364 # define wxStrncpy wcsncpy
365 # define wxStrpbrk wcspbrk
366 # define wxStrrchr wcsrchr
367 # define wxStrspn wcsspn
368 # define wxStrstr wcsstr
369 # define wxStrtod wcstod
370 # define wxStrtok wcstok
371 # define wxStrtol wcstol
372 # define wxStrtoul wcstoul
373 # define wxStrxfrm wcsxfrm
375 // glibc doesn't have wc equivalents of the other stuff
376 # define wxNEED_WX_STDIO_H
377 # define wxNEED_WX_STDLIB_H
378 # define wxNEED_WX_TIME_H
381 # error "Please define your compiler's Unicode conventions in wxChar.h"
389 typedef signed char wxSChar
;
390 typedef unsigned char wxUChar
;
392 # if defined(__FreeBSD__) || defined(__DARWIN__)
396 # if !defined(__MINGW32__) || !defined(_T)
401 # define wxIsalnum isalnum
402 # define wxIsalpha isalpha
403 # define wxIsctrl isctrl
404 # define wxIsdigit isdigit
405 # define wxIsgraph isgraph
406 # define wxIslower islower
407 # define wxIsprint isprint
408 # define wxIspunct ispunct
409 # define wxIsspace isspace
410 # define wxIsupper isupper
411 # define wxIsxdigit isxdigit
412 # define wxTolower tolower
413 # define wxToupper toupper
416 # define wxSetlocale setlocale
418 // string.h functions
419 // #define wxStricmp strcasecmp
420 // wxStricmp is defined below!!
423 #define wxStrtok(str, sep, last) strtok_r(str, sep, last)
425 #define wxStrtok(str, sep, last) strtok(str, sep)
428 // leave the rest to defaults below
429 # define wxNEED_WX_STRING_H
430 # define wxNEED_WX_STDIO_H
431 # define wxNEED_WX_STDLIB_H
432 # define wxNEED_WX_TIME_H
435 #endif//TCHAR-aware compilers
437 // define wxStricmp for various compilers without Unicode possibilities
438 #if !defined(wxStricmp) && !wxUSE_UNICODE
439 # if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__SALFORDC__) || defined(__VISAGECPP__) || defined(__EMX__) || defined(__DJGPP__)
440 # define wxStricmp stricmp
441 # define wxStrnicmp strnicmp
442 # elif defined(__SC__) || defined(__VISUALC__) || (defined(__MWERKS__) && defined(__INTEL__))
443 # define wxStricmp _stricmp
444 # define wxStrnicmp _strnicmp
445 # elif defined(__UNIX__) || defined(__GNUWIN32__)
446 # define wxStricmp strcasecmp
447 # define wxStrnicmp strncasecmp
448 # elif defined(__MWERKS__) && !defined(__INTEL__)
449 // use wxWindows' implementation
451 // if you leave wxStricmp undefined, wxWindows' implementation will be used
452 # error "Please define string case-insensitive compare for your OS/compiler"
456 // if we need to define for standard headers, and we're not using Unicode,
457 // just define to standard C library routines
459 # ifdef wxNEED_WX_STRING_H
460 # define wxStrcat strcat
461 # define wxStrchr strchr
462 # define wxStrcmp strcmp
463 # define wxStrcoll strcoll
464 # define wxStrcpy strcpy
465 # define wxStrcspn strcspn
466 #if !defined(__MWERKS__) || !defined(__WXMAC__)
467 # define wxStrdup strdup
469 # define wxStrlen_ strlen // used in wxStrlen inline function
470 # define wxStrncat strncat
471 # define wxStrncmp strncmp
472 # define wxStrncpy strncpy
473 # define wxStrpbrk strpbrk
474 # define wxStrrchr strrchr
475 # define wxStrspn strspn
476 # define wxStrstr strstr
477 # define wxStrtod strtod
478 # define wxStrtol strtol
479 # define wxStrtoul strtoul
480 # define wxStrxfrm strxfrm
481 # undef wxNEED_WX_STRING_H
484 # ifdef wxNEED_WX_STDIO_H
485 # define wxFgetc fgetc
486 # define wxFgetchar fgetchar
487 # define wxFgets fgets
488 # define wxFopen fopen
489 # define wxFputc fputc
490 # define wxFputchar fputchar
491 # define wxFprintf fprintf
492 # define wxFreopen freopen
493 # define wxFscanf fscanf
495 # define wxGetchar getchar
497 # define wxPerror perror
498 # define wxPrintf printf
500 # define wxPutchar putchar
502 # define wxRemove remove
503 # define wxRename rename
504 # define wxScanf scanf
505 # define wxSprintf sprintf
506 # define wxSscanf sscanf
507 # define wxTmpnam tmpnam
508 # define wxUngetc ungetc
509 # define wxVfprint vfprintf
510 # define wxVprintf vprintf
511 # define wxVsscanf vsscanf
512 # define wxVsprintf vsprintf
513 # undef wxNEED_WX_STDIO_H
516 # ifdef wxNEED_WX_STDLIB_H
520 # define wxGetenv getenv
521 # define wxSystem system
522 # undef wxNEED_WX_STDLIB_H
525 # ifdef wxNEED_WX_TIME_H
526 # define wxAsctime asctime
527 # define wxCtime ctime
528 # define wxStrftime strftime
529 # undef wxNEED_WX_TIME_H
533 // checks whether the passed in pointer is NULL and if the string is empty
534 inline bool wxIsEmpty(const wxChar
*p
) { return !p
|| !*p
; }
536 #ifndef wxNEED_WX_STRING_H
537 // safe version of strlen() (returns 0 if passed NULL pointer)
538 inline size_t wxStrlen(const wxChar
*psz
)
539 { return psz
? wxStrlen_(psz
) : 0; }
543 // multibyte<->widechar conversion
544 WXDLLEXPORT
size_t wxMB2WC(wchar_t *buf
, const char *psz
, size_t n
);
545 WXDLLEXPORT
size_t wxWC2MB(char *buf
, const wchar_t *psz
, size_t n
);
547 # define wxMB2WX wxMB2WC
548 # define wxWX2MB wxWC2MB
549 # define wxWC2WX wxStrncpy
550 # define wxWX2WC wxStrncpy
552 # define wxMB2WX wxStrncpy
553 # define wxWX2MB wxStrncpy
554 # define wxWC2WX wxWC2MB
555 # define wxWX2WC wxMB2WC
558 // No wxUSE_WCHAR_T: we have to do something (JACS)
559 # define wxMB2WC wxStrncpy
560 # define wxWC2MB wxStrncpy
561 # define wxMB2WX wxStrncpy
562 # define wxWX2MB wxStrncpy
563 # define wxWC2WX wxWC2MB
564 # define wxWX2WC wxMB2WC
567 WXDLLEXPORT
bool wxOKlibc(); // for internal use
569 // if libc versions are not available, use replacements defined in wxchar.cpp
571 WXDLLEXPORT wxChar
* wxStrdup(const wxChar
*psz
);
575 WXDLLEXPORT
int wxStricmp(const wxChar
*psz1
, const wxChar
*psz2
);
579 WXDLLEXPORT
int wxStrnicmp(const wxChar
*psz1
, const wxChar
*psz2
, size_t len
);
583 WXDLLEXPORT wxChar
* wxStrtok(wxChar
*psz
, const wxChar
*delim
, wxChar
**save_ptr
);
588 WXDLLEXPORT wxWCharBuffer
wxSetlocale(int category
, const wxChar
*locale
);
591 #ifdef wxNEED_WX_CTYPE_H
592 WXDLLEXPORT
int wxIsalnum(wxChar ch
);
593 WXDLLEXPORT
int wxIsalpha(wxChar ch
);
594 WXDLLEXPORT
int wxIsctrl(wxChar ch
);
595 WXDLLEXPORT
int wxIsdigit(wxChar ch
);
596 WXDLLEXPORT
int wxIsgraph(wxChar ch
);
597 WXDLLEXPORT
int wxIslower(wxChar ch
);
598 WXDLLEXPORT
int wxIsprint(wxChar ch
);
599 WXDLLEXPORT
int wxIspunct(wxChar ch
);
600 WXDLLEXPORT
int wxIsspace(wxChar ch
);
601 WXDLLEXPORT
int wxIsupper(wxChar ch
);
602 WXDLLEXPORT
int wxIsxdigit(wxChar ch
);
603 WXDLLEXPORT
int wxTolower(wxChar ch
);
604 WXDLLEXPORT
int wxToupper(wxChar ch
);
607 #ifdef wxNEED_WX_STRING_H
608 WXDLLEXPORT wxChar
* wxStrcat(wxChar
*dest
, const wxChar
*src
);
609 WXDLLEXPORT wxChar
* wxStrchr(const wxChar
*s
, wxChar c
);
610 WXDLLEXPORT
int wxStrcmp(const wxChar
*s1
, const wxChar
*s2
);
611 WXDLLEXPORT
int wxStrcoll(const wxChar
*s1
, const wxChar
*s2
);
612 WXDLLEXPORT wxChar
* wxStrcpy(wxChar
*dest
, const wxChar
*src
);
613 WXDLLEXPORT
size_t wxStrcspn(const wxChar
*s
, const wxChar
*reject
);
614 WXDLLEXPORT
size_t wxStrlen(const wxChar
*s
);
615 WXDLLEXPORT wxChar
* wxStrncat(wxChar
*dest
, const wxChar
*src
, size_t n
);
616 WXDLLEXPORT
int wxStrncmp(const wxChar
*s1
, const wxChar
*s2
, size_t n
);
617 WXDLLEXPORT wxChar
* wxStrncpy(wxChar
*dest
, const wxChar
*src
, size_t n
);
618 WXDLLEXPORT wxChar
* wxStrpbrk(const wxChar
*s
, const wxChar
*accept
);
619 WXDLLEXPORT wxChar
* wxStrrchr(const wxChar
*s
, wxChar c
);
620 WXDLLEXPORT
size_t wxStrspn(const wxChar
*s
, const wxChar
*accept
);
621 WXDLLEXPORT wxChar
* wxStrstr(const wxChar
*haystack
, const wxChar
*needle
);
622 WXDLLEXPORT
double wxStrtod(const wxChar
*nptr
, wxChar
**endptr
);
623 WXDLLEXPORT
long int wxStrtol(const wxChar
*nptr
, wxChar
**endptr
, int base
);
624 WXDLLEXPORT
unsigned long int wxStrtoul(const wxChar
*nptr
, wxChar
**endptr
, int base
);
625 WXDLLEXPORT
size_t wxStrxfrm(wxChar
*dest
, const wxChar
*src
, size_t n
);
628 #ifdef wxNEED_WX_STDIO_H
631 WXDLLEXPORT
FILE * wxFopen(const wxChar
*path
, const wxChar
*mode
);
632 WXDLLEXPORT
FILE * wxFreopen(const wxChar
*path
, const wxChar
*mode
, FILE *stream
);
633 WXDLLEXPORT
int wxRemove(const wxChar
*path
);
634 WXDLLEXPORT
int wxRename(const wxChar
*oldpath
, const wxChar
*newpath
);
635 WXDLLEXPORT
int wxPrintf(const wxChar
*fmt
, ...) ATTRIBUTE_PRINTF_1
;
636 WXDLLEXPORT
int wxVprintf(const wxChar
*fmt
, va_list argptr
);
637 WXDLLEXPORT
int wxFprintf(FILE *stream
, const wxChar
*fmt
, ...) ATTRIBUTE_PRINTF_2
;
638 WXDLLEXPORT
int wxVfprintf(FILE *stream
, const wxChar
*fmt
, va_list argptr
);
639 WXDLLEXPORT
int wxSprintf(wxChar
*buf
, const wxChar
*fmt
, ...) ATTRIBUTE_PRINTF_2
;
640 WXDLLEXPORT
int wxVsprintf(wxChar
*buf
, const wxChar
*fmt
, va_list argptr
);
641 WXDLLEXPORT
int wxSscanf(const wxChar
*buf
, const wxChar
*fmt
, ...) ATTRIBUTE_PRINTF_2
;
642 WXDLLEXPORT
int wxVsscanf(const wxChar
*buf
, const wxChar
*fmt
, va_list argptr
);
646 WXDLLEXPORT
double wxAtof(const wxChar
*psz
);
649 #ifdef wxNEED_WX_STDLIB_H
650 WXDLLEXPORT
int wxAtoi(const wxChar
*psz
);
651 WXDLLEXPORT
long wxAtol(const wxChar
*psz
);
652 WXDLLEXPORT wxChar
* wxGetenv(const wxChar
*name
);
653 WXDLLEXPORT
int wxSystem(const wxChar
*psz
);
656 #ifdef wxNEED_WX_TIME_H
657 WXDLLEXPORT
size_t wxStrftime(wxChar
*s
, size_t max
, const wxChar
*fmt
, const struct tm
*tm
);
660 // under VC++ 6.0 isspace() returns 1 for 8 bit chars which completely breaks
661 // the file parsing - this may be true for 5.0 as well, update #ifdef then
662 #if defined(__VISUALC__) && (__VISUALC__ >= 1200) && !wxUSE_UNICODE
664 #define wxIsspace(c) ((((unsigned)c) < 128) && isspace(c))
667 // ----------------------------------------------------------------------------
668 // common macros which are always defined
669 // ----------------------------------------------------------------------------
671 // although global macros with such names are really bad, we want to have
672 // another name for _T() which should be used to avoid confusion between _T()
673 // and _() in wxWindows sources
676 // Unicode-friendly __FILE__, __DATE__ and __TIME__ analogs
678 #define __XFILE__(x) wxT(x)
679 #define __TFILE__ __XFILE__(__FILE__)
683 #define __XDATE__(x) wxT(x)
684 #define __TDATE__ __XDATE__(__DATE__)
688 #define __XTIME__(x) wxT(x)
689 #define __TTIME__ __XTIME__(__TIME__)