X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/30f2fa6c534b69e4b72365fe4cd8f070e0a79c38..efe66bbc0e9f463a6dd3ad49717474dd801bebf3:/include/wx/wxchar.h diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 0bf32e0c16..1435071a50 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -1,13 +1,13 @@ -/* /////////////////////////////////////////////////////////////////////////// */ -/* Name: wx/wxchar.h */ -/* Purpose: Declarations common to wx char/wchar_t usage (wide chars) */ -/* Author: Joel Farley, Ove Kåven */ -/* Modified by: Vadim Zeitlin, Robert Roebling */ -/* Created: 1998/06/12 */ -/* RCS-ID: $Id$ */ -/* Copyright: (c) 1998-2002 wxWindows dev team */ -/* Licence: wxWindows licence */ -/* /////////////////////////////////////////////////////////////////////////// */ +/** +* Name: wx/wxchar.h +* Purpose: Declarations common to wx char/wchar_t usage (wide chars) +* Author: Joel Farley, Ove Kåven +* Modified by: Vadim Zeitlin, Robert Roebling +* Created: 1998/06/12 +* RCS-ID: $Id$ +* Copyright: (c) 1998-2002 wxWindows dev team +* Licence: wxWindows licence +*/ /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ @@ -71,7 +71,7 @@ /* non Unix compilers which do have wchar.h (but not tchar.h which is included */ /* below and which includes wchar.h anyhow). */ /* Actually MinGW has tchar.h, but it does not include wchar.h */ -#if defined(__MWERKS__) || defined(__VISAGECPP__) || defined(__MINGW32__) +#if defined(__MWERKS__) || defined(__VISAGECPP__) || defined(__MINGW32__) || defined(__WATCOMC__) #ifndef HAVE_WCHAR_H #define HAVE_WCHAR_H #endif @@ -651,15 +651,14 @@ #endif #endif /* wxUSE_WCHAR_T */ - /* checks whether the passed in pointer is NULL and if the string is empty */ #ifdef __cplusplus +/* checks whether the passed in pointer is NULL and if the string is empty */ inline bool wxIsEmpty(const wxChar *p) { return !p || !*p; } /* safe version of strlen() (returns 0 if passed NULL pointer) */ inline size_t wxStrlen(const wxChar *psz) { return psz ? wxStrlen_(psz) : 0; } #endif - /* each of strdup() and wcsdup() may or may not be available but we need both */ /* of them anyhow for wx/buffer.h so we define the missing one(s) in */ /* wxchar.cpp and so we should always have both wxStrdupA and wxStrdupW */ @@ -702,6 +701,10 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */ #define HAVE_WCSRTOMBS 1 #define HAVE_VSWPRINTF 1 #endif + #if defined(__WATCOMC__) + #define wxVsnprintf_ _vsnwprintf + #define wxSnprintf_ _snwprintf + #endif #if defined(HAVE__VSNWPRINTF) #define wxVsnprintf_ _vsnwprintf /* MinGW?MSVCRT has the wrong vswprintf */ @@ -711,7 +714,7 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */ #else /* ASCII */ /* all versions of CodeWarrior supported by wxWindows apparently have */ /* vsnprintf() */ - #if defined(HAVE_VSNPRINTF) || defined(__MWERKS__) + #if defined(HAVE_VSNPRINTF) || defined(__MWERKS__) || defined(__WATCOMC__) /* assume we have snprintf() too if we have vsnprintf() */ #define wxVsnprintf_ vsnprintf #define wxSnprintf_ snprintf