]> git.saurik.com Git - wxWidgets.git/blob - include/wx/wxchar.h
1. wxMotif toolbar works; the toggle buttons have the same width as the other
[wxWidgets.git] / include / wx / wxchar.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wxchar.h
3 // Purpose: Declarations common to wx char/wchar_t usage (wide chars)
4 // Author: Joel Farley
5 // Modified by:
6 // Created: 1998/06/12
7 // RCS-ID: $Id$
8 // Copyright: (c) wxWindows copyright
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_WXCHAR_H_
13 #define _WX_WXCHAR_H_
14
15 #ifdef __GNUG__
16 #pragma interface "wxchar.h"
17 #endif
18
19 // only do SBCS or _UNICODE
20 #if defined (_MBCS )
21 # error "MBCS is not supported by wxChar"
22 #endif
23
24 // set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined
25 #if defined(_UNICODE) || defined(UNICODE)
26 # undef wxUSE_UNICODE
27 # define wxUSE_UNICODE 1
28 #else
29 # ifndef wxUSE_UNICODE
30 # define wxUSE_UNICODE 0
31 # endif
32 #endif
33
34 // and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1...
35 #if wxUSE_UNICODE
36 # ifndef _UNICODE
37 # define _UNICODE
38 # endif
39 # ifndef UNICODE
40 # define UNICODE
41 # endif
42 #endif
43
44 // ----------------------------------------------------------------------------
45 // define wxHAVE_TCHAR_FUNCTIONS for the compilers which support the
46 // wide-character functions
47 // ----------------------------------------------------------------------------
48
49 #ifdef __WIN32__
50 // VC++ and BC++ starting with 5.2 have TCHAR support
51 #ifdef __VISUALC__
52 #define wxHAVE_TCHAR_FUNCTIONS
53 #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520)
54 #define wxHAVE_TCHAR_FUNCTIONS
55 #endif
56 #elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
57 // VisualAge 4.0+ supports TCHAR
58 #define wxHAVE_TCHAR_FUNCTIONS
59
60 // but not stdio.h nor time nor conversion functions
61 #define wxNO_TCHAR_STDIO
62 #define wxNO_TCHAR_STDLIB
63 #define wxNO_TCHAR_TIME
64 #define wxNO_TCHAR_LOCALE
65 //
66 // supplemental VA V4 defs so at least we know what these are
67 // just define to standard defs
68 //
69
70 // for wcslen
71 #include <wchar.h>
72
73 // locale.h functons -- not defined in tchar.h
74 #define wxSetlocale setlocale
75 // some stdio functions are defined others are not
76 // these are not
77 #define wxFgetchar fgetchar
78 #define wxFopen fopen
79 #define wxFputchar fputchar
80 #define wxFreopen freopen
81 #define wxGets gets
82 #define wxPerror perror
83 #define wxPuts puts
84 #define wxRemove remove
85 #define wxRename rename
86 #define wxTmpnam tmpnam
87 #define wxUngetc ungetc
88 #define wxVsscanf vsscanf
89 // stdlib not defined in VA V4
90 #if !wxUSE_UNICODE
91 # define wxAtof atof
92 #endif
93 #define wxAtoi atoi
94 #define wxAtol atol
95 #define wxGetenv getenv
96 #define wxSystem system
97 // time.h functions -- none defined in tchar.h
98 #define wxAsctime asctime
99 #define wxCtime ctime
100
101
102 #endif
103
104 #ifdef wxHAVE_TCHAR_FUNCTIONS
105 # define HAVE_WCSLEN 1
106
107 # include <tchar.h>
108
109 # if wxUSE_UNICODE // temporary - preserve binary compatibility
110 typedef _TCHAR wxChar;
111 typedef _TSCHAR wxSChar;
112 typedef _TUCHAR wxUChar;
113 # else
114 # define wxChar char
115 # define wxSChar signed char
116 # define wxUChar unsigned char
117 # endif
118 // wchar_t is available
119 # undef wxUSE_WCHAR_T
120 # define wxUSE_WCHAR_T 1
121
122 // ctype.h functions
123 #ifndef wxNO_TCHAR_CTYPE
124 # define wxIsalnum _istalnum
125 # define wxIsalpha _istalpha
126 # define wxIsctrl _istctrl
127 # define wxIsdigit _istdigit
128 # define wxIsgraph _istgraph
129 # define wxIslower _istlower
130 # define wxIsprint _istprint
131 # define wxIspunct _istpunct
132 # define wxIsspace _istspace
133 # define wxIsupper _istupper
134 # define wxIsxdigit _istxdigit
135 # define wxTolower _totlower
136 # define wxToupper _totupper
137 #endif // wxNO_TCHAR_CTYPE
138
139 // locale.h functons
140 #ifndef wxNO_TCHAR_LOCALE
141 # define wxSetlocale _tsetlocale
142 #endif // wxNO_TCHAR_LOCALE
143
144 // string.h functions
145 #ifndef wxNO_TCHAR_STRING
146 # define wxStrcat _tcscat
147 # define wxStrchr _tcschr
148 # define wxStrcmp _tcscmp
149 # define wxStrcoll _tcscoll
150 # define wxStrcpy _tcscpy
151 # define wxStrcspn _tcscspn
152 # define wxStrftime _tcsftime
153 # define wxStricmp _tcsicmp
154 # define wxStrlen_ _tcslen // used in wxStrlen inline function
155 # define wxStrncat _tcsncat
156 # define wxStrncmp _tcsncmp
157 # define wxStrncpy _tcsncpy
158 # define wxStrpbrk _tcspbrk
159 # define wxStrrchr _tcsrchr
160 # define wxStrspn _tcsspn
161 # define wxStrstr _tcsstr
162 # define wxStrtod _tcstod
163 # define wxStrtol _tcstol
164 # define wxStrtoul _tcstoul
165 # define wxStrxfrm _tcsxfrm
166 #endif // wxNO_TCHAR_STRING
167
168 // stdio.h functions
169 #ifndef wxNO_TCHAR_STDIO
170 # define wxFgetc _fgettc
171 # define wxFgetchar _fgettchar
172 # define wxFgets _fgetts
173 # define wxFopen _tfopen
174 # define wxFputc _fputtc
175 # define wxFputchar _fputtchar
176 # define wxFprintf _ftprintf
177 # define wxFreopen _tfreopen
178 # define wxFscanf _ftscanf
179 # define wxGetc _gettc
180 # define wxGetchar _gettchar
181 # define wxGets _getts
182 # define wxPerror _tperror
183 # define wxPrintf _tprintf
184 # define wxPutc _puttc
185 # define wxPutchar _puttchar
186 # define wxPuts _putts
187 # define wxRemove _tremove
188 # define wxRename _trename
189 # define wxScanf _tscanf
190 # define wxSprintf _stprintf
191 # define wxSscanf _stscanf
192 # define wxTmpnam _ttmpnam
193 # define wxUngetc _tungetc
194 # define wxVfprint _vftprintf
195 # define wxVprintf _vtprintf
196 # define wxVsscanf _vstscanf
197 # define wxVsprintf _vstprintf
198 #elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
199 // it has some stdio.h functions, apparently
200 # define wxFgetc _fgettc
201 # define wxFgets _fgetts
202 # define wxFputc _fputtc
203 # define wxFprintf _ftprintf
204 # define wxFscanf _ftscanf
205 # define wxGetc _gettc
206 # define wxGetchar _gettchar
207 # define wxPrintf _tprintf
208 # define wxPutc _puttc
209 # define wxPutchar _puttchar
210 # define wxScanf _tscanf
211 # define wxSprintf _stprintf
212 # define wxSscanf _stscanf
213 # define wxVfprint _vftprintf
214 # define wxVprintf _vtprintf
215 # define wxVsprintf _vstprintf
216 #endif // wxNO_TCHAR_STDIO
217
218 // stdlib.h functions
219 #ifndef wxNO_TCHAR_STDLIB
220 # if !wxUSE_UNICODE
221 # define wxAtof atof
222 # endif
223 # define wxAtoi _ttoi
224 # define wxAtol _ttol
225 # define wxGetenv _tgetenv
226 # define wxSystem _tsystem
227 #endif // wxNO_TCHAR_STDLIB
228
229 // time.h functions
230 #ifndef wxNO_TCHAR_TIME
231 # define wxAsctime _tasctime
232 # define wxCtime _tctime
233 #endif // wxNO_TCHAR_TIME
234
235 #else // !TCHAR-aware compilers
236
237 // check whether we should include wchar.h or equivalent
238 # if wxUSE_UNICODE
239 # undef wxUSE_WCHAR_T
240 # define wxUSE_WCHAR_T 1 // wchar_t *must* be available in Unicode mode
241 # elif !defined(wxUSE_WCHAR_T)
242 # if defined(__VISUALC__) && (__VISUALC__ < 900)
243 # define wxUSE_WCHAR_T 0 // wchar_t is not available for MSVC++ 1.5
244 # elif defined(__UNIX__)
245 # if defined(HAVE_WCSTR_H) || defined(HAVE_WCHAR_H) || defined(__FreeBSD__)
246 # define wxUSE_WCHAR_T 1
247 # else
248 # define wxUSE_WCHAR_T 0
249 # endif
250 # elif defined(__GNUWIN32__) && !defined(__MINGW32__) // Cygwin (not Mingw32) doesn't have wcslen.h, needed in buffer.h
251 # define wxUSE_WCHAR_T 0
252 # elif defined(__BORLANDC__) // WIN16 BC++
253 # define wxUSE_WCHAR_T 0
254 # elif defined(__WATCOMC__)
255 # define wxUSE_WCHAR_T 0
256 # elif defined(__VISAGECPP__) && (__IBMCPP__ >= 400)
257 # define wxUSE_WCHAR_T 1
258 # else
259 // add additional compiler checks if this fails
260 # define wxUSE_WCHAR_T 1
261 # endif
262 # endif//wxUSE_UNICODE
263
264 # if wxUSE_WCHAR_T
265 # ifdef HAVE_WCSTR_H
266 # include <wcstr.h>
267 # else
268 # ifndef __FreeBSD__
269 # include <wchar.h>
270 # else
271 # include <stdlib.h>
272 # define wxNEED_WCSLEN
273 # endif
274 # endif
275 # endif
276
277 // check whether we are doing Unicode
278 # if wxUSE_UNICODE
279
280 # include <wctype.h>
281
282 // this is probably glibc-specific
283 # if defined(__WCHAR_TYPE__)
284
285 typedef __WCHAR_TYPE__ wxChar;
286 typedef signed __WCHAR_TYPE__ wxSChar;
287 typedef unsigned __WCHAR_TYPE__ wxUChar;
288
289 # define _T(x) L##x
290
291 // ctype.h functions (wctype.h)
292 # define wxIsalnum iswalnum
293 # define wxIsalpha iswalpha
294 # define wxIsctrl iswcntrl
295 # define wxIsdigit iswdigit
296 # define wxIsgraph iswgraph
297 # define wxIslower iswlower
298 # define wxIsprint iswprint
299 # define wxIspunct iswpunct
300 # define wxIsspace iswspace
301 # define wxIsupper iswupper
302 # define wxIsxdigit iswxdigit
303
304 # if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
305 // /usr/include/wctype.h incorrectly declares translations tables which
306 // provokes tons of compile-time warnings - try to correct this
307 # define wxTolower(wc) towctrans((wc), (wctrans_t)__ctype_tolower)
308 # define wxToupper(wc) towctrans((wc), (wctrans_t)__ctype_toupper)
309 # else
310 # define wxTolower towlower
311 # define wxToupper towupper
312 # endif // gcc/!gcc
313
314 // string.h functions (wchar.h)
315 # define wxStrcat wcscat
316 # define wxStrchr wcschr
317 # define wxStrcmp wcscmp
318 # define wxStrcoll wcscoll
319 # define wxStrcpy wcscpy
320 # define wxStrcspn wcscspn
321 # define wxStrlen_ wcslen // used in wxStrlen inline function
322 # define wxStrncat wcsncat
323 # define wxStrncmp wcsncmp
324 # define wxStrncpy wcsncpy
325 # define wxStrpbrk wcspbrk
326 # define wxStrrchr wcsrchr
327 # define wxStrspn wcsspn
328 # define wxStrstr wcsstr
329 # define wxStrtod wcstod
330 # define wxStrtok wcstok
331 # define wxStrtol wcstol
332 # define wxStrtoul wcstoul
333 # define wxStrxfrm wcsxfrm
334
335 // glibc doesn't have wc equivalents of the other stuff
336 # define wxNEED_WX_STDIO_H
337 # define wxNEED_WX_STDLIB_H
338 # define wxNEED_WX_TIME_H
339
340 # else//!glibc
341 # error "Please define your compiler's Unicode conventions in wxChar.h"
342 # endif
343 # else//!Unicode
344
345 # include <ctype.h>
346 # include <string.h>
347
348 # if 0 // temporary - preserve binary compatibilty
349 typedef char wxChar;
350 typedef signed char wxSChar;
351 typedef unsigned char wxUChar;
352 # else
353 # define wxChar char
354 # define wxSChar signed char
355 # define wxUChar unsigned char
356 # endif
357
358 # ifdef __FreeBSD__
359 # undef _T
360 # endif
361
362 # if !defined(__MINGW32__) || !defined(_T)
363 # define _T(x) x
364 # endif
365
366 // ctype.h functions
367 # define wxIsalnum isalnum
368 # define wxIsalpha isalpha
369 # define wxIsctrl isctrl
370 # define wxIsdigit isdigit
371 # define wxIsgraph isgraph
372 # define wxIslower islower
373 # define wxIsprint isprint
374 # define wxIspunct ispunct
375 # define wxIsspace isspace
376 # define wxIsupper isupper
377 # define wxIsxdigit isxdigit
378 # define wxTolower tolower
379 # define wxToupper toupper
380
381 // locale.h functons
382 # define wxSetlocale setlocale
383
384 // string.h functions
385 // #define wxStricmp strcasecmp
386 // wxStricmp is defined below!!
387
388 #ifdef HAVE_STRTOK_R
389 #define wxStrtok(str, sep, last) strtok_r(str, sep, last)
390 #else
391 #define wxStrtok(str, sep, last) strtok(str, sep)
392 #endif
393
394 // leave the rest to defaults below
395 # define wxNEED_WX_STRING_H
396 # define wxNEED_WX_STDIO_H
397 # define wxNEED_WX_STDLIB_H
398 # define wxNEED_WX_TIME_H
399
400 # endif//Unicode
401 #endif//TCHAR-aware compilers
402
403 // define wxStricmp for various compilers without Unicode possibilities
404 #if !defined(wxStricmp) && !wxUSE_UNICODE
405 # if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__SALFORDC__) || defined(__VISAGECPP__) || defined(__EMX__)
406 # define wxStricmp stricmp
407 # define wxStrnicmp strnicmp
408 # elif defined(__SC__) || defined(__VISUALC__) || (defined(__MWERKS__) && defined(__INTEL__))
409 # define wxStricmp _stricmp
410 # define wxStrnicmp _strnicmp
411 # elif defined(__UNIX__) || defined(__GNUWIN32__)
412 # define wxStricmp strcasecmp
413 # define wxStrnicmp strncasecmp
414 # elif defined(__MWERKS__) && !defined(__INTEL__)
415 // use wxWindows' implementation
416 # else
417 // if you leave wxStricmp undefined, wxWindows' implementation will be used
418 # error "Please define string case-insensitive compare for your OS/compiler"
419 # endif
420 #endif
421
422 // if we need to define for standard headers, and we're not using Unicode,
423 // just define to standard C library routines
424 #if !wxUSE_UNICODE
425 # ifdef wxNEED_WX_STRING_H
426 # define wxStrcat strcat
427 # define wxStrchr strchr
428 # define wxStrcmp strcmp
429 # define wxStrcoll strcoll
430 # define wxStrcpy strcpy
431 # define wxStrcspn strcspn
432 # define wxStrdup strdup
433 # define wxStrlen_ strlen // used in wxStrlen inline function
434 # define wxStrncat strncat
435 # define wxStrncmp strncmp
436 # define wxStrncpy strncpy
437 # define wxStrpbrk strpbrk
438 # define wxStrrchr strrchr
439 # define wxStrspn strspn
440 # define wxStrstr strstr
441 # define wxStrtod strtod
442 # define wxStrtol strtol
443 # define wxStrtoul strtoul
444 # define wxStrxfrm strxfrm
445 # undef wxNEED_WX_STRING_H
446 # endif
447
448 # ifdef wxNEED_WX_STDIO_H
449 # define wxFgetc fgetc
450 # define wxFgetchar fgetchar
451 # define wxFgets fgets
452 # define wxFopen fopen
453 # define wxFputc fputc
454 # define wxFputchar fputchar
455 # define wxFprintf fprintf
456 # define wxFreopen freopen
457 # define wxFscanf fscanf
458 # define wxGetc getc
459 # define wxGetchar getchar
460 # define wxGets gets
461 # define wxPerror perror
462 # define wxPrintf printf
463 # define wxPutc putc
464 # define wxPutchar putchar
465 # define wxPuts puts
466 # define wxRemove remove
467 # define wxRename rename
468 # define wxScanf scanf
469 # define wxSprintf sprintf
470 # define wxSscanf sscanf
471 # define wxTmpnam tmpnam
472 # define wxUngetc ungetc
473 # define wxVfprint vfprintf
474 # define wxVprintf vprintf
475 # define wxVsscanf vsscanf
476 # define wxVsprintf vsprintf
477 # undef wxNEED_WX_STDIO_H
478 # endif
479
480 # ifdef wxNEED_WX_STDLIB_H
481 # define wxAtof atof
482 # define wxAtoi atoi
483 # define wxAtol atol
484 # define wxGetenv getenv
485 # define wxSystem system
486 # undef wxNEED_WX_STDLIB_H
487 # endif
488
489 # ifdef wxNEED_WX_TIME_H
490 # define wxAsctime asctime
491 # define wxCtime ctime
492 # define wxStrftime strftime
493 # undef wxNEED_WX_TIME_H
494 # endif
495 #endif //!Unicode
496
497 #if defined(wxNEED_WCSLEN) && wxUSE_UNICODE
498 # define wcslen wxStrlen
499 # undef wxNEED_WCSLEN
500 #endif
501
502 // checks whether the passed in pointer is NULL and if the string is empty
503 WXDLLEXPORT inline bool wxIsEmpty(const wxChar *p) { return !p || !*p; }
504
505 #ifndef wxNEED_WX_STRING_H
506 // safe version of strlen() (returns 0 if passed NULL pointer)
507 WXDLLEXPORT inline size_t wxStrlen(const wxChar *psz)
508 { return psz ? wxStrlen_(psz) : 0; }
509 #endif
510
511 #if wxUSE_WCHAR_T
512 // multibyte<->widechar conversion
513 WXDLLEXPORT size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n);
514 WXDLLEXPORT size_t wxWC2MB(char *buf, const wchar_t *psz, size_t n);
515 # if wxUSE_UNICODE
516 # define wxMB2WX wxMB2WC
517 # define wxWX2MB wxWC2MB
518 # define wxWC2WX wxStrncpy
519 # define wxWX2WC wxStrncpy
520 # else
521 # define wxMB2WX wxStrncpy
522 # define wxWX2MB wxStrncpy
523 # define wxWC2WX wxWC2MB
524 # define wxWX2WC wxMB2WC
525 # endif
526 #else
527 // No wxUSE_WCHAR_T: we have to do something (JACS)
528 # define wxMB2WC wxStrncpy
529 # define wxWC2MB wxStrncpy
530 # define wxMB2WX wxStrncpy
531 # define wxWX2MB wxStrncpy
532 # define wxWC2WX wxWC2MB
533 # define wxWX2WC wxMB2WC
534 #endif
535
536 WXDLLEXPORT bool wxOKlibc(); // for internal use
537
538 // if libc versions are not available, use replacements defined in wxchar.cpp
539 #ifndef wxStrdup
540 WXDLLEXPORT wxChar * wxStrdup(const wxChar *psz);
541 #endif
542
543 #ifndef wxStricmp
544 WXDLLEXPORT int wxStricmp(const wxChar *psz1, const wxChar *psz2);
545 #endif
546
547 #ifndef wxStrtok
548 WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr);
549 #endif
550
551 #ifndef wxSetlocale
552 WXDLLEXPORT wxWCharBuffer wxSetlocale(int category, const wxChar *locale);
553 #endif
554
555 #ifdef wxNEED_WCSLEN // for use in buffer.h
556 WXDLLEXPORT size_t wcslen(const wchar_t *s);
557 #endif
558
559 #ifdef wxNEED_WX_CTYPE_H
560 WXDLLEXPORT int wxIsalnum(wxChar ch);
561 WXDLLEXPORT int wxIsalpha(wxChar ch);
562 WXDLLEXPORT int wxIsctrl(wxChar ch);
563 WXDLLEXPORT int wxIsdigit(wxChar ch);
564 WXDLLEXPORT int wxIsgraph(wxChar ch);
565 WXDLLEXPORT int wxIslower(wxChar ch);
566 WXDLLEXPORT int wxIsprint(wxChar ch);
567 WXDLLEXPORT int wxIspunct(wxChar ch);
568 WXDLLEXPORT int wxIsspace(wxChar ch);
569 WXDLLEXPORT int wxIsupper(wxChar ch);
570 WXDLLEXPORT int wxIsxdigit(wxChar ch);
571 WXDLLEXPORT int wxTolower(wxChar ch);
572 WXDLLEXPORT int wxToupper(wxChar ch);
573 #endif
574
575 #ifdef wxNEED_WX_STRING_H
576 WXDLLEXPORT wxChar * wxStrcat(wxChar *dest, const wxChar *src);
577 WXDLLEXPORT wxChar * wxStrchr(const wxChar *s, wxChar c);
578 WXDLLEXPORT int wxStrcmp(const wxChar *s1, const wxChar *s2);
579 WXDLLEXPORT int wxStrcoll(const wxChar *s1, const wxChar *s2);
580 WXDLLEXPORT wxChar * wxStrcpy(wxChar *dest, const wxChar *src);
581 WXDLLEXPORT size_t wxStrcspn(const wxChar *s, const wxChar *reject);
582 WXDLLEXPORT size_t wxStrlen(const wxChar *s);
583 WXDLLEXPORT wxChar * wxStrncat(wxChar *dest, const wxChar *src, size_t n);
584 WXDLLEXPORT int wxStrncmp(const wxChar *s1, const wxChar *s2, size_t n);
585 WXDLLEXPORT wxChar * wxStrncpy(wxChar *dest, const wxChar *src, size_t n);
586 WXDLLEXPORT wxChar * wxStrpbrk(const wxChar *s, const wxChar *accept);
587 WXDLLEXPORT wxChar * wxStrrchr(const wxChar *s, wxChar c);
588 WXDLLEXPORT size_t wxStrspn(const wxChar *s, const wxChar *accept);
589 WXDLLEXPORT wxChar * wxStrstr(const wxChar *haystack, const wxChar *needle);
590 WXDLLEXPORT double wxStrtod(const wxChar *nptr, wxChar **endptr);
591 WXDLLEXPORT long int wxStrtol(const wxChar *nptr, wxChar **endptr, int base);
592 WXDLLEXPORT unsigned long int wxStrtoul(const wxChar *nptr, wxChar **endptr, int base);
593 WXDLLEXPORT size_t wxStrxfrm(wxChar *dest, const wxChar *src, size_t n);
594 #endif
595
596 #ifdef wxNEED_WX_STDIO_H
597 # include <stdio.h>
598 # include <stdarg.h>
599 WXDLLEXPORT FILE * wxFopen(const wxChar *path, const wxChar *mode);
600 WXDLLEXPORT FILE * wxFreopen(const wxChar *path, const wxChar *mode, FILE *stream);
601 WXDLLEXPORT int wxPrintf(const wxChar *fmt, ...);
602 WXDLLEXPORT int wxVprintf(const wxChar *fmt, va_list argptr);
603 WXDLLEXPORT int wxFprintf(FILE *stream, const wxChar *fmt, ...);
604 WXDLLEXPORT int wxVfprintf(FILE *stream, const wxChar *fmt, va_list argptr);
605 WXDLLEXPORT int wxSprintf(wxChar *buf, const wxChar *fmt, ...);
606 WXDLLEXPORT int wxVsprintf(wxChar *buf, const wxChar *fmt, va_list argptr);
607 WXDLLEXPORT int wxSscanf(const wxChar *buf, const wxChar *fmt, ...);
608 WXDLLEXPORT int wxVsscanf(const wxChar *buf, const wxChar *fmt, va_list argptr);
609 #endif
610
611 #ifndef wxAtof
612 WXDLLEXPORT double wxAtof(const wxChar *psz);
613 #endif
614
615 #ifdef wxNEED_WX_STDLIB_H
616 WXDLLEXPORT int wxAtoi(const wxChar *psz);
617 WXDLLEXPORT long wxAtol(const wxChar *psz);
618 WXDLLEXPORT wxChar * wxGetenv(const wxChar *name);
619 WXDLLEXPORT int wxSystem(const wxChar *psz);
620 #endif
621
622 #ifdef wxNEED_WX_TIME_H
623 WXDLLEXPORT size_t wxStrftime(wxChar *s, size_t max, const wxChar *fmt, const struct tm *tm);
624 #endif
625
626 // although global macros with such names are really bad, we want to have
627 // another name for _T() which should be used to avoid confusion between _T()
628 // and _() in wxWindows sources
629 #define wxT(x) _T(x)
630
631 // a Unicode-friendly __FILE__ analog
632 #ifndef __TFILE__
633 #define __XFILE__(x) wxT(x)
634 #define __TFILE__ __XFILE__(__FILE__)
635 #endif
636
637 #endif
638 //_WX_WXCHAR_H_
639