-/* /////////////////////////////////////////////////////////////////////////// */
-/* 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 */
/* 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
#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 */
#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 */
#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