X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4367345099df9e276e4805147ac40ec3e0349021..f148f2bac3fb0fa6d984050fb940112da150aeff:/include/wx/wxchar.h diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 3b34a8f848..41ad07a808 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -12,37 +12,16 @@ #ifndef _WX_WXCHAR_H_ #define _WX_WXCHAR_H_ -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "wxchar.h" #endif +#include "wx/defs.h" // for wxUSE_UNICODE + // ---------------------------------------------------------------------------- -// first deal with Unicode setting: wxUSE_UNICODE should be defined as 0 or 1 -// and is used by wxWindows, _UNICODE and/or UNICODE may be defined or used by -// the system headers so bring these settings in sync +// check whether we have wchar_t and which size it is if we do // ---------------------------------------------------------------------------- -// set wxUSE_UNICODE to 1 if UNICODE or _UNICODE is defined -#if defined(_UNICODE) || defined(UNICODE) - #undef wxUSE_UNICODE - #define wxUSE_UNICODE 1 -#else - #ifndef wxUSE_UNICODE - #define wxUSE_UNICODE 0 - #endif -#endif // Unicode - -// and vice versa: define UNICODE and _UNICODE if wxUSE_UNICODE is 1... -#if wxUSE_UNICODE - #ifndef _UNICODE - #define _UNICODE - #endif - #ifndef UNICODE - #define UNICODE - #endif -#endif // Unicode - -// check whether we have wchar_t #if !defined(wxUSE_WCHAR_T) #if defined(__WIN16__) // no wchar_t under Win16 regadrless of compiler used @@ -131,6 +110,8 @@ #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x520) #define wxHAVE_TCHAR_SUPPORT #include +#elif defined(__WATCOMC__) + #define wxHAVE_TCHAR_SUPPORT #elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 ) #define wxHAVE_TCHAR_SUPPORT #include @@ -339,8 +320,12 @@ #define wxRemove wxMSLU__tremove #define wxRename wxMSLU__trename #else - #define wxRemove _tremove - #define wxRename _trename + #ifdef __WXWINCE__ + #define wxRemove DeleteFile + #else + #define wxRemove _tremove + #define wxRename _trename + #endif #endif // stdlib.h functions @@ -504,7 +489,7 @@ // time.h functions #define wxAsctime wasciitime #define wxCtime wctime - #define wxStrftime wcsftime + // #define wxStrftime wcsftime /* #define wxNEED_FPUTWC @@ -523,8 +508,8 @@ // use our own versions #define wxNEED_WX_STDIO_H #define wxNEED_WX_STDLIB_H - #define wxNEED_WX_TIME_H */ + #define wxNEED_WX_TIME_H #else // !metrowerks for apple #error "Please define wide character functions for your environment" #endif @@ -576,18 +561,11 @@ #define wxStrxfrm strxfrm // stdio.h functions - #if defined(__WXMAC__) && !defined(__DARWIN__) - #include - WXDLLIMPEXP_BASE FILE * wxFopen(const wxChar *path, const wxChar *mode); - WXDLLIMPEXP_BASE FILE * wxFreopen(const wxChar *path, const wxChar *mode, FILE *stream); - WXDLLIMPEXP_BASE int wxRemove(const wxChar *path); - WXDLLIMPEXP_BASE int wxRename(const wxChar *oldpath, const wxChar *newpath); - #else #define wxFopen fopen #define wxFreopen freopen #define wxRemove remove #define wxRename rename - #endif + #define wxPerror perror #define wxTmpnam tmpnam @@ -595,6 +573,7 @@ #define wxFgetchar fgetchar #define wxFgets fgets #define wxFputc fputc + #define wxFputs fputs #define wxFputchar fputchar #define wxFprintf fprintf #define wxFscanf fscanf @@ -923,6 +902,19 @@ WXDLLIMPEXP_BASE int wxSystem(const wxChar *psz); const wxChar *fmt, const struct tm *tm); #endif // wxNEED_WX_TIME_H +// missing functions in some WinCE versions +#ifdef _WIN32_WCE +#if (_WIN32_WCE < 300) +WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size ); +#endif +WXDLLIMPEXP_BASE char* strdup(const char* s); + +#if _WIN32_WCE <= 211 +WXDLLIMPEXP_BASE int isspace(int c); +WXDLLIMPEXP_BASE int isascii( int c ); +#endif +#endif + // ---------------------------------------------------------------------------- // multibyte to wide char conversion functions and macros // ----------------------------------------------------------------------------