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 // ----------------------------------------------------------------------------
60 // VC++ and BC++ starting with 5.2 have TCHAR support
62 #define wxHAVE_TCHAR_FUNCTIONS
63 #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
64 #define wxHAVE_TCHAR_FUNCTIONS
65 #elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
66 #define wxHAVE_TCHAR_FUNCTIONS
70 #elif defined(__CYGWIN__)
73 #endif // !HAVE_WCSLEN
76 #elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
77 // VisualAge 4.0+ supports TCHAR
78 #define wxHAVE_TCHAR_FUNCTIONS
80 // but not stdio.h nor time nor conversion functions
81 #define wxNO_TCHAR_STDIO
82 #define wxNO_TCHAR_STDLIB
83 #define wxNO_TCHAR_TIME
84 #define wxNO_TCHAR_LOCALE
86 // supplemental VA V4 defs so at least we know what these are
87 // just define to standard defs
93 // locale.h functons -- not defined in tchar.h
94 #define wxSetlocale setlocale
95 // some stdio functions are defined others are not
97 #define wxFgetchar fgetchar
99 #define wxFputchar fputchar
100 #define wxFreopen freopen
102 #define wxPerror perror
104 #define wxRemove remove
105 #define wxRename rename
106 #define wxTmpnam tmpnam
107 #define wxUngetc ungetc
108 #define wxVsscanf vsscanf
109 // stdlib not defined in VA V4
115 #define wxGetenv getenv
116 #define wxSystem system
117 // time.h functions -- none defined in tchar.h
118 #define wxAsctime asctime
119 #define wxCtime ctime
120 #elif defined(__MWERKS__)
125 #endif // compilers with (good) TCHAR support
127 #ifdef wxHAVE_TCHAR_FUNCTIONS
128 # define HAVE_WCSLEN 1
132 # if wxUSE_UNICODE // temporary - preserve binary compatibility
133 #if defined(__GNUWIN32__)
135 #define _TSCHAR TCHAR
136 #define _TUCHAR TCHAR
139 typedef _TCHAR wxChar
;
140 typedef _TSCHAR wxSChar
;
141 typedef _TUCHAR wxUChar
;
144 # define wxSChar signed char
145 # define wxUChar unsigned char
148 // wchar_t is available
149 #ifndef wxUSE_WCHAR_T
150 #define wxUSE_WCHAR_T 1
151 #endif // !defined(wxUSE_WCHAR_T)
154 #ifndef wxNO_TCHAR_CTYPE
158 # define wxIsalnum _istalnum
159 # define wxIsalpha _istalpha
160 # define wxIsctrl _istctrl
161 # define wxIsdigit _istdigit
162 # define wxIsgraph _istgraph
163 # define wxIslower _istlower
164 # define wxIsprint _istprint
165 # define wxIspunct _istpunct
166 # define wxIsspace _istspace
167 # define wxIsupper _istupper
168 # define wxIsxdigit _istxdigit
169 # define wxTolower _totlower
170 # define wxToupper _totupper
171 #endif // wxNO_TCHAR_CTYPE
174 #ifndef wxNO_TCHAR_LOCALE
175 # define wxSetlocale _tsetlocale
176 #endif // wxNO_TCHAR_LOCALE
178 // string.h functions
179 #ifndef wxNO_TCHAR_STRING
180 # define wxStrcat _tcscat
181 # define wxStrchr _tcschr
182 # define wxStrcmp _tcscmp
183 # define wxStrcoll _tcscoll
184 # define wxStrcpy _tcscpy
185 # define wxStrcspn _tcscspn
186 # define wxStrftime _tcsftime
187 # define wxStricmp _tcsicmp
188 # define wxStrnicmp _tcsnicmp
189 # define wxStrlen_ _tcslen // used in wxStrlen inline function
190 # define wxStrncat _tcsncat
191 # define wxStrncmp _tcsncmp
192 # define wxStrncpy _tcsncpy
193 # define wxStrpbrk _tcspbrk
194 # define wxStrrchr _tcsrchr
195 # define wxStrspn _tcsspn
196 # define wxStrstr _tcsstr
197 # define wxStrtod _tcstod
198 # define wxStrtol _tcstol
199 # define wxStrtoul _tcstoul
200 # define wxStrxfrm _tcsxfrm
201 #endif // wxNO_TCHAR_STRING
204 #ifndef wxNO_TCHAR_STDIO
205 # if wxUSE_UNICODE_MSLU
206 # define wxRemove wxMSLU__tremove
207 # define wxRename wxMSLU__trename
209 # define wxRemove _tremove
210 # define wxRename _trename
212 # define wxFgetc _fgettc
213 # define wxFgetchar _fgettchar
214 # define wxFgets _fgetts
215 # define wxFopen _tfopen
216 # define wxFputc _fputtc
217 # define wxFputchar _fputtchar
218 # define wxFprintf _ftprintf
219 # define wxFreopen _tfreopen
220 # define wxFscanf _ftscanf
221 # define wxGetc _gettc
222 # define wxGetchar _gettchar
223 # define wxGets _getts
224 # define wxPerror _tperror
225 # define wxPrintf _tprintf
226 # define wxPutc _puttc
227 # define wxPutchar _puttchar
228 # define wxPuts _putts
229 # define wxScanf _tscanf
230 # define wxSprintf _stprintf
231 # define wxSscanf _stscanf
232 # define wxTmpnam _ttmpnam
233 # define wxUngetc _tungetc
234 # define wxVfprint _vftprintf
235 # define wxVprintf _vtprintf
236 # define wxVsscanf _vstscanf
237 # define wxVsprintf _vstprintf
238 #elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
239 // it has some stdio.h functions, apparently
240 # define wxFgetc _fgettc
241 # define wxFgets _fgetts
242 # define wxFputc _fputtc
243 # define wxFprintf _ftprintf
244 # define wxFscanf _ftscanf
245 # define wxGetc _gettc
246 # define wxGetchar _gettchar
247 # define wxPrintf _tprintf
248 # define wxPutc _puttc
249 # define wxPutchar _puttchar
250 # define wxScanf _tscanf
251 # define wxSprintf _stprintf
252 # define wxSscanf _stscanf
253 # define wxVfprint _vftprintf
254 # define wxVprintf _vtprintf
255 # define wxVsprintf _vstprintf
256 #endif // wxNO_TCHAR_STDIO
258 // stdlib.h functions
259 #ifndef wxNO_TCHAR_STDLIB
263 # define wxAtoi _ttoi
264 # define wxAtol _ttol
265 # define wxGetenv _tgetenv
266 # define wxSystem _tsystem
267 #endif // wxNO_TCHAR_STDLIB
270 #ifndef wxNO_TCHAR_TIME
271 # define wxAsctime _tasctime
272 # define wxCtime _tctime
273 #endif // wxNO_TCHAR_TIME
275 #else // !TCHAR-aware compilers
277 // check whether we should include wchar.h or equivalent
278 # if !defined(wxUSE_WCHAR_T)
279 # if defined(__VISUALC__) && (__VISUALC__ < 900)
280 # define wxUSE_WCHAR_T 0 // wchar_t is not available for MSVC++ 1.5
281 # elif defined(__UNIX__)
282 # if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__) || defined(__DARWIN__)
283 # define wxUSE_WCHAR_T 1
285 # define wxUSE_WCHAR_T 0
287 # elif defined(__GNUWIN32__) && !defined(__MINGW32__) // Cygwin (not Mingw32) doesn't have wcslen.h, needed in buffer.h
288 # define wxUSE_WCHAR_T 0
289 # elif defined(__BORLANDC__) // WIN16 BC++
290 # define wxUSE_WCHAR_T 0
291 # elif defined(__WATCOMC__)
292 # define wxUSE_WCHAR_T 0
293 # elif defined(__VISAGECPP__) && (__IBMCPP__ < 400)
294 # define wxUSE_WCHAR_T 0
296 // add additional compiler checks if this fails
297 # define wxUSE_WCHAR_T 1
299 # endif // !defined(wxUSE_WCHAR_T)
303 // include wchar.h to get wcslen() declaration used by wx/buffer.h
304 // stddef.h is needed for Cygwin
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 // VS: wxWindows used to define wxChar as __WCHAR_TYPE__ here. However, this doesn't
326 // work with new GCC 3.x compilers because wchar_t is C++'s builtin type in the new
327 // standard. OTOH, old compilers (GCC 2.x) won't accept new definition
328 // of wx{S,U}Char, therefore we have to define wxChar conditionally depending on
329 // detected compiler & compiler version.
330 // The most complicated case is the infamous so-called "gcc-2.96" which does not
331 // accept new definition of wxSChar but doesn't work with old definition of wxChar.
332 #if defined(__GNUC__) && (__GNUC__ >= 3)
333 // modern C++ compiler
334 typedef wchar_t wxChar
;
335 typedef signed wchar_t wxSChar
;
336 typedef unsigned wchar_t wxUChar
;
338 #if defined(__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 96)
339 typedef wchar_t wxChar
;
341 typedef __WCHAR_TYPE__ wxChar
;
343 typedef signed __WCHAR_TYPE__ wxSChar
;
344 typedef unsigned __WCHAR_TYPE__ wxUChar
;
349 // ctype.h functions (wctype.h)
350 # define wxIsalnum iswalnum
351 # define wxIsalpha iswalpha
352 # define wxIsctrl iswcntrl
353 # define wxIsdigit iswdigit
354 # define wxIsgraph iswgraph
355 # define wxIslower iswlower
356 # define wxIsprint iswprint
357 # define wxIspunct iswpunct
358 # define wxIsspace iswspace
359 # define wxIsupper iswupper
360 # define wxIsxdigit iswxdigit
362 # if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
363 // /usr/include/wctype.h incorrectly declares translations tables which
364 // provokes tons of compile-time warnings - try to correct this
365 # define wxTolower(wc) towctrans((wc), (wctrans_t)__ctype_tolower)
366 # define wxToupper(wc) towctrans((wc), (wctrans_t)__ctype_toupper)
368 # define wxTolower towlower
369 # define wxToupper towupper
372 // string.h functions (wchar.h)
373 # define wxStrcat wcscat
374 # define wxStrchr wcschr
375 # define wxStrcmp wcscmp
376 # define wxStrcoll wcscoll
377 # define wxStrcpy wcscpy
378 # define wxStrcspn wcscspn
379 # define wxStrlen_ wcslen // used in wxStrlen inline function
380 # define wxStrncat wcsncat
381 # define wxStrncmp wcsncmp
382 # define wxStrncpy wcsncpy
383 # define wxStrpbrk wcspbrk
384 # define wxStrrchr wcsrchr
385 # define wxStrspn wcsspn
386 # define wxStrstr wcsstr
387 # define wxStrtod wcstod
388 # define wxStrtok wcstok
389 # define wxStrtol wcstol
390 # define wxStrtoul wcstoul
391 # define wxStrxfrm wcsxfrm
393 # define wxFgetc fgetwc
394 # define wxFgetchar fgetwchar
395 # define wxFgets fgetws
396 # define wxFputc fputwc
397 # define wxFputchar fputwchar
398 # define wxFprintf fwprintf
399 # define wxFscanf fwscanf
400 # define wxGetc getwc
401 # define wxGetchar getwchar
402 # define wxGets getws
403 # define wxPrintf wprintf
404 # define wxPutc wputc
405 # define wxPutchar wputchar
406 # define wxPuts putws
407 # define wxScanf wscanf
408 # define wxSnprintf swprintf
409 # define wxSscanf swscanf
410 # define wxUngetc ungetwc
411 # define wxVfprint vfwprintf
412 # define wxVprintf vwprintf
413 # define wxVsscanf vswscanf
414 # define wxVsnprintf vswprintf
416 // glibc doesn't have wc equivalents of the other stuff
417 # define wxNEED_WX_STDIO_H
418 # define wxNEED_WX_STDLIB_H
419 # define wxNEED_WX_TIME_H
422 # error "Please define your compiler's Unicode conventions in wxChar.h"
430 typedef signed char wxSChar
;
431 typedef unsigned char wxUChar
;
433 # if defined(__FreeBSD__) || defined(__DARWIN__)
437 # if !defined(__MINGW32__) || !defined(_T)
442 # define wxIsalnum isalnum
443 # define wxIsalpha isalpha
444 # define wxIsctrl isctrl
445 # define wxIsdigit isdigit
446 # define wxIsgraph isgraph
447 # define wxIslower islower
448 # define wxIsprint isprint
449 # define wxIspunct ispunct
450 # define wxIsspace isspace
451 # define wxIsupper isupper
452 # define wxIsxdigit isxdigit
453 # define wxTolower tolower
454 # define wxToupper toupper
457 # define wxSetlocale setlocale
459 // string.h functions
460 // #define wxStricmp strcasecmp
461 // wxStricmp is defined below!!
464 #define wxStrtok(str, sep, last) strtok_r(str, sep, last)
466 #define wxStrtok(str, sep, last) strtok(str, sep)
469 // leave the rest to defaults below
470 # define wxNEED_WX_STRING_H
471 # define wxNEED_WX_STDIO_H
472 # define wxNEED_WX_STDLIB_H
473 # define wxNEED_WX_TIME_H
476 #endif//TCHAR-aware compilers
478 // define wxStricmp for various compilers without Unicode possibilities
479 #if !defined(wxStricmp) && !wxUSE_UNICODE
480 # if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__SALFORDC__) || defined(__VISAGECPP__) || defined(__EMX__) || defined(__DJGPP__)
481 # define wxStricmp stricmp
482 # define wxStrnicmp strnicmp
483 # elif defined(__SC__) || defined(__VISUALC__) || (defined(__MWERKS__) && defined(__INTEL__))
484 # define wxStricmp _stricmp
485 # define wxStrnicmp _strnicmp
486 # elif defined(__UNIX__) || defined(__GNUWIN32__)
487 # define wxStricmp strcasecmp
488 # define wxStrnicmp strncasecmp
489 # elif defined(__MWERKS__) && !defined(__INTEL__)
490 // use wxWindows' implementation
492 // if you leave wxStricmp undefined, wxWindows' implementation will be used
493 # error "Please define string case-insensitive compare for your OS/compiler"
497 // if we need to define for standard headers, and we're not using Unicode,
498 // just define to standard C library routines
500 # ifdef wxNEED_WX_STRING_H
501 # define wxStrcat strcat
502 # define wxStrchr strchr
503 # define wxStrcmp strcmp
504 # define wxStrcoll strcoll
505 # define wxStrcpy strcpy
506 # define wxStrcspn strcspn
507 #if !defined(__MWERKS__) || !defined(__WXMAC__)
508 # define wxStrdup strdup
510 # define wxStrlen_ strlen // used in wxStrlen inline function
511 # define wxStrncat strncat
512 # define wxStrncmp strncmp
513 # define wxStrncpy strncpy
514 # define wxStrpbrk strpbrk
515 # define wxStrrchr strrchr
516 # define wxStrspn strspn
517 # define wxStrstr strstr
518 # define wxStrtod strtod
519 # define wxStrtol strtol
520 # define wxStrtoul strtoul
521 # define wxStrxfrm strxfrm
522 # undef wxNEED_WX_STRING_H
525 # ifdef wxNEED_WX_STDIO_H
526 # define wxFopen fopen
527 # define wxFreopen freopen
528 # define wxPerror perror
529 # define wxRemove remove
530 # define wxRename rename
531 # define wxTmpnam tmpnam
533 # define wxFgetc fgetc
534 # define wxFgetchar fgetchar
535 # define wxFgets fgets
536 # define wxFputc fputc
537 # define wxFputchar fputchar
538 # define wxFprintf fprintf
539 # define wxFscanf fscanf
541 # define wxGetchar getchar
543 # define wxPrintf printf
545 # define wxPutchar putchar
547 # define wxScanf scanf
548 # define wxSprintf sprintf
549 # define wxSscanf sscanf
550 # define wxUngetc ungetc
551 # define wxVfprint vfprintf
552 # define wxVprintf vprintf
553 # define wxVsscanf vsscanf
554 # define wxVsprintf vsprintf
555 # undef wxNEED_WX_STDIO_H
559 # ifdef wxNEED_WX_STDLIB_H
563 # define wxGetenv getenv
564 # define wxSystem system
565 # undef wxNEED_WX_STDLIB_H
568 # ifdef wxNEED_WX_TIME_H
569 # define wxAsctime asctime
570 # define wxCtime ctime
571 # define wxStrftime strftime
572 # undef wxNEED_WX_TIME_H
576 // checks whether the passed in pointer is NULL and if the string is empty
577 inline bool wxIsEmpty(const wxChar
*p
) { return !p
|| !*p
; }
579 #ifndef wxNEED_WX_STRING_H
580 // safe version of strlen() (returns 0 if passed NULL pointer)
581 inline size_t wxStrlen(const wxChar
*psz
)
582 { return psz
? wxStrlen_(psz
) : 0; }
586 // multibyte<->widechar conversion
587 WXDLLEXPORT
size_t wxMB2WC(wchar_t *buf
, const char *psz
, size_t n
);
588 WXDLLEXPORT
size_t wxWC2MB(char *buf
, const wchar_t *psz
, size_t n
);
590 # define wxMB2WX wxMB2WC
591 # define wxWX2MB wxWC2MB
592 # define wxWC2WX wxStrncpy
593 # define wxWX2WC wxStrncpy
595 # define wxMB2WX wxStrncpy
596 # define wxWX2MB wxStrncpy
597 # define wxWC2WX wxWC2MB
598 # define wxWX2WC wxMB2WC
601 // No wxUSE_WCHAR_T: we have to do something (JACS)
602 # define wxMB2WC wxStrncpy
603 # define wxWC2MB wxStrncpy
604 # define wxMB2WX wxStrncpy
605 # define wxWX2MB wxStrncpy
606 # define wxWC2WX wxWC2MB
607 # define wxWX2WC wxMB2WC
610 WXDLLEXPORT
bool wxOKlibc(); // for internal use
612 // if libc versions are not available, use replacements defined in wxchar.cpp
614 WXDLLEXPORT wxChar
* wxStrdup(const wxChar
*psz
);
618 WXDLLEXPORT
int wxStricmp(const wxChar
*psz1
, const wxChar
*psz2
);
622 WXDLLEXPORT
int wxStrnicmp(const wxChar
*psz1
, const wxChar
*psz2
, size_t len
);
626 WXDLLEXPORT wxChar
* wxStrtok(wxChar
*psz
, const wxChar
*delim
, wxChar
**save_ptr
);
631 WXDLLEXPORT wxWCharBuffer
wxSetlocale(int category
, const wxChar
*locale
);
634 #ifdef wxNEED_WX_CTYPE_H
635 WXDLLEXPORT
int wxIsalnum(wxChar ch
);
636 WXDLLEXPORT
int wxIsalpha(wxChar ch
);
637 WXDLLEXPORT
int wxIsctrl(wxChar ch
);
638 WXDLLEXPORT
int wxIsdigit(wxChar ch
);
639 WXDLLEXPORT
int wxIsgraph(wxChar ch
);
640 WXDLLEXPORT
int wxIslower(wxChar ch
);
641 WXDLLEXPORT
int wxIsprint(wxChar ch
);
642 WXDLLEXPORT
int wxIspunct(wxChar ch
);
643 WXDLLEXPORT
int wxIsspace(wxChar ch
);
644 WXDLLEXPORT
int wxIsupper(wxChar ch
);
645 WXDLLEXPORT
int wxIsxdigit(wxChar ch
);
646 WXDLLEXPORT
int wxTolower(wxChar ch
);
647 WXDLLEXPORT
int wxToupper(wxChar ch
);
650 #ifdef wxNEED_WX_STRING_H
651 WXDLLEXPORT wxChar
* wxStrcat(wxChar
*dest
, const wxChar
*src
);
652 WXDLLEXPORT
const wxChar
* wxStrchr(const wxChar
*s
, wxChar c
);
653 WXDLLEXPORT wxChar
* wxStrchr(wxChar
*s
, wxChar c
)
654 { return (wxChar
*)wxStrchr((const wxChar
*)s
, c
); }
655 WXDLLEXPORT
int wxStrcmp(const wxChar
*s1
, const wxChar
*s2
);
656 WXDLLEXPORT
int wxStrcoll(const wxChar
*s1
, const wxChar
*s2
);
657 WXDLLEXPORT wxChar
* wxStrcpy(wxChar
*dest
, const wxChar
*src
);
658 WXDLLEXPORT
size_t wxStrcspn(const wxChar
*s
, const wxChar
*reject
);
659 WXDLLEXPORT
size_t wxStrlen(const wxChar
*s
);
660 WXDLLEXPORT wxChar
* wxStrncat(wxChar
*dest
, const wxChar
*src
, size_t n
);
661 WXDLLEXPORT
int wxStrncmp(const wxChar
*s1
, const wxChar
*s2
, size_t n
);
662 WXDLLEXPORT wxChar
* wxStrncpy(wxChar
*dest
, const wxChar
*src
, size_t n
);
663 WXDLLEXPORT
const wxChar
* wxStrpbrk(const wxChar
*s
, const wxChar
*accept
);
664 WXDLLEXPORT wxChar
* wxStrpbrk(wxChar
*s
, const wxChar
*accept
)
665 { return (wxChar
*)wxStrpbrk((const wxChar
*)s
, accept
); }
666 WXDLLEXPORT
const wxChar
* wxStrrchr(const wxChar
*s
, wxChar c
);
667 WXDLLEXPORT wxChar
* wxStrrchr(wxChar
*s
, wxChar c
)
668 { return (wxChar
*)wxStrrchr((const wxChar
*)s
, c
); }
669 WXDLLEXPORT
size_t wxStrspn(const wxChar
*s
, const wxChar
*accept
);
670 WXDLLEXPORT
const wxChar
* wxStrstr(const wxChar
*haystack
, const wxChar
*needle
);
671 WXDLLEXPORT wxChar
*wxStrstr(wxChar
*haystack
, const wxChar
*needle
)
672 { return (wxChar
*)wxStrstr((const wxChar
*)haystack
, needle
); }
673 WXDLLEXPORT
double wxStrtod(const wxChar
*nptr
, wxChar
**endptr
);
674 WXDLLEXPORT
long int wxStrtol(const wxChar
*nptr
, wxChar
**endptr
, int base
);
675 WXDLLEXPORT
unsigned long int wxStrtoul(const wxChar
*nptr
, wxChar
**endptr
, int base
);
676 WXDLLEXPORT
size_t wxStrxfrm(wxChar
*dest
, const wxChar
*src
, size_t n
);
679 #ifdef wxNEED_WX_STDIO_H
682 WXDLLEXPORT
FILE * wxFopen(const wxChar
*path
, const wxChar
*mode
);
683 WXDLLEXPORT
FILE * wxFreopen(const wxChar
*path
, const wxChar
*mode
, FILE *stream
);
684 WXDLLEXPORT
int wxRemove(const wxChar
*path
);
685 WXDLLEXPORT
int wxRename(const wxChar
*oldpath
, const wxChar
*newpath
);
689 WXDLLEXPORT
double wxAtof(const wxChar
*psz
);
692 #ifdef wxNEED_WX_STDLIB_H
693 WXDLLEXPORT
int wxAtoi(const wxChar
*psz
);
694 WXDLLEXPORT
long wxAtol(const wxChar
*psz
);
695 WXDLLEXPORT wxChar
* wxGetenv(const wxChar
*name
);
696 WXDLLEXPORT
int wxSystem(const wxChar
*psz
);
699 #ifdef wxNEED_WX_TIME_H
700 WXDLLEXPORT
size_t wxStrftime(wxChar
*s
, size_t max
, const wxChar
*fmt
, const struct tm
*tm
);
703 // under VC++ 6.0 isspace() returns 1 for 8 bit chars which completely breaks
704 // the file parsing - this may be true for 5.0 as well, update #ifdef then
705 #if defined(__VISUALC__) && (__VISUALC__ >= 1200) && !wxUSE_UNICODE
707 #define wxIsspace(c) ((((unsigned)c) < 128) && isspace(c))
710 // ----------------------------------------------------------------------------
711 // common macros which are always defined
712 // ----------------------------------------------------------------------------
714 // although global macros with such names are really bad, we want to have
715 // another name for _T() which should be used to avoid confusion between _T()
716 // and _() in wxWindows sources
719 // Unicode-friendly __FILE__, __DATE__ and __TIME__ analogs
721 #define __XFILE__(x) wxT(x)
722 #define __TFILE__ __XFILE__(__FILE__)
726 #define __XDATE__(x) wxT(x)
727 #define __TDATE__ __XDATE__(__DATE__)
731 #define __XTIME__(x) wxT(x)
732 #define __TTIME__ __XTIME__(__TIME__)