X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34cbe514cf01425bdb928c133404ab7b97a661a4..efe66bbc0e9f463a6dd3ad49717474dd801bebf3:/include/wx/wxchar.h?ds=sidebyside diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 0a8f8ea204..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 @@ -504,7 +504,7 @@ #define wxPuts(ws) wxFputs(ws, stdout) #define wxPutchar(wch) wxPutc(wch, stdout) - /* we need %s to %ls conversion for printf and scanf etc */ + // we need %s to %ls conversion for printf and scanf etc */ #define wxNEED_PRINTF_CONVERSION /* glibc doesn't have wide char equivalents of the other stuff so */ /* use our own versions */ @@ -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 @@ -869,10 +872,12 @@ WXDLLIMPEXP_BASE int wxStrnicmp(const wxChar *psz1, const wxChar *psz2, size_t l WXDLLIMPEXP_BASE wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_ptr); #endif +#ifdef __cplusplus #ifndef wxSetlocale class WXDLLIMPEXP_BASE wxWCharBuffer; WXDLLIMPEXP_BASE wxWCharBuffer wxSetlocale(int category, const wxChar *locale); #endif +#endif /* stdio.h functions */ #ifdef wxNEED_WX_STDIO_H