* Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee
* Created: 1998/06/12
* RCS-ID: $Id$
- * Copyright: (c) 1998-2002 wxWindows dev team
+ * Copyright: (c) 1998-2002 wxWidgets dev team
* Licence: wxWindows licence
*/
/*
Standard headers we need here.
- NB: don't include any wxWindows headers here because almost of them include
+ NB: don't include any wxWidgets headers here because almost of them include
this one!
*/
typedef wchar_t wxSChar;
typedef wchar_t wxUChar;
#else /* __WCHAR_TYPE__ and gcc < 2.96 */
- /* VS: wxWindows used to define wxChar as __WCHAR_TYPE__ here. However, */
+ /* VS: wxWidgets used to define wxChar as __WCHAR_TYPE__ here. However, */
/* this doesn't work with new GCC 3.x compilers because wchar_t is */
/* C++'s builtin type in the new standard. OTOH, old compilers (GCC */
/* 2.x) won't accept new definition of wx{S,U}Char, therefore we */
/* although global macros with such names are normally bad, we want to have */
/* another name for _T() which should be used to avoid confusion between _T() */
-/* and _() in wxWindows sources */
+/* and _() in wxWidgets sources */
#define wxT(x) _T(x)
/* Unicode-friendly __FILE__, __DATE__ and __TIME__ analogs */
#define wxIsspace _istspace
#define wxIsupper _istupper
#define wxIsxdigit _istxdigit
- #define wxTolower _totlower
- #define wxToupper _totupper
+
+ /*
+ There is a bug in VC6 C RTL: toxxx() functions dosn't do anything with
+ signed chars < 0, so "fix" it here.
+ */
+ #define wxTolower(c) _totlower((wxUChar)(c))
+ #define wxToupper(c) _totupper((wxUChar)(c))
/* locale.h functons */
#define wxSetlocale _tsetlocale
#define wxGets getws
#define wxUngetc ungetwc
- #ifdef HAVE_FPUTWC
- #define wxPutc wputc
- #define wxPutchar wputchar
- #define wxPuts putws
- #define wxFputs fputws
+ #ifdef HAVE_FPUTWS
+ #define wxFputs fputws
#else
- #define wxNEED_FPUTWC
-
+ #define wxNEED_FPUTS
#include <stdio.h>
-
int wxFputs(const wxChar *ch, FILE *stream);
+ #endif
+
+ #ifdef HAVE_WPUTC
+ #define wxPutc wputc
+ #else
+ #define wxNEED_PUTC
+ #include <stdio.h>
int wxPutc(wxChar ch, FILE *stream);
+ #endif
- #define wxPuts(ws) wxFputs(ws, stdout)
+ #ifdef HAVE_WPUTCHAR
+ #define wxPutchar wputchar
+ #else
#define wxPutchar(wch) wxPutc(wch, stdout)
#endif
+
+ #ifdef HAVE_PUTWS
+ #define wxPuts putws
+ #else
+ #define wxPuts(ws) wxFputs(ws, stdout)
+ #endif
/* we need %s to %ls conversion for printf and scanf etc */
#define wxNEED_PRINTF_CONVERSION
#elif defined(__UNIX__) || defined(__GNUWIN32__)
#define wxStricmp strcasecmp
#define wxStrnicmp strncasecmp
- /* #else -- use wxWindows implementation */
+ /* #else -- use wxWidgets implementation */
#endif
#endif /* !defined(wxStricmp) */
#define wxVsnprintf_ vswprintf
#endif
#else /* ASCII */
- /* all versions of CodeWarrior supported by wxWindows apparently have */
+ /* all versions of CodeWarrior supported by wxWidgets apparently have */
/* vsnprintf() */
#if defined(HAVE_VSNPRINTF) || defined(__MWERKS__) || defined(__WATCOMC__)
/* assume we have snprintf() too if we have vsnprintf() */