trying to make comments readable again after their auto-mangling by RN...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/**
|
/*
|
||||||
* Name: wx/wxchar.h
|
* Name: wx/wxchar.h
|
||||||
* Purpose: Declarations common to wx char/wchar_t usage (wide chars)
|
* Purpose: Declarations common to wx char/wchar_t usage (wide chars)
|
||||||
* Author: Joel Farley, Ove K<>ven
|
* Author: Joel Farley, Ove K<>ven
|
||||||
@@ -20,10 +20,7 @@
|
|||||||
|
|
||||||
#include "wx/defs.h" /* for wxUSE_UNICODE */
|
#include "wx/defs.h" /* for wxUSE_UNICODE */
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------- */
|
|
||||||
/* check whether we have wchar_t and which size it is if we do */
|
/* check whether we have wchar_t and which size it is if we do */
|
||||||
/* ---------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
#if !defined(wxUSE_WCHAR_T)
|
#if !defined(wxUSE_WCHAR_T)
|
||||||
#if defined(__WIN16__)
|
#if defined(__WIN16__)
|
||||||
/* no wchar_t under Win16 regadrless of compiler used */
|
/* no wchar_t under Win16 regadrless of compiler used */
|
||||||
@@ -51,12 +48,12 @@
|
|||||||
#error "wchar_t must be available in Unicode build"
|
#error "wchar_t must be available in Unicode build"
|
||||||
#endif /* Unicode */
|
#endif /* Unicode */
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------- */
|
/*
|
||||||
/* standard headers we need here */
|
Standard headers we need here.
|
||||||
/* */
|
|
||||||
/* NB: don't include any wxWindows headers here because almost of them include */
|
NB: don't include any wxWindows headers here because almost of them include
|
||||||
/* this one! */
|
this one!
|
||||||
/* ---------------------------------------------------------------------------- */
|
*/
|
||||||
|
|
||||||
/* Required for wxPrintf() etc */
|
/* Required for wxPrintf() etc */
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
@@ -68,9 +65,12 @@
|
|||||||
#define wxStrdupA strdup
|
#define wxStrdupA strdup
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* non Unix compilers which do have wchar.h (but not tchar.h which is included */
|
/*
|
||||||
/* below and which includes wchar.h anyhow). */
|
non Unix compilers which do have wchar.h (but not tchar.h which is included
|
||||||
/* Actually MinGW has tchar.h, but it does not include wchar.h */
|
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__) || defined(__WATCOMC__)
|
#if defined(__MWERKS__) || defined(__VISAGECPP__) || defined(__MINGW32__) || defined(__WATCOMC__)
|
||||||
#ifndef HAVE_WCHAR_H
|
#ifndef HAVE_WCHAR_H
|
||||||
#define HAVE_WCHAR_H
|
#define HAVE_WCHAR_H
|
||||||
@@ -227,13 +227,13 @@
|
|||||||
#define __TTIME__ __XTIME__(__TIME__)
|
#define __TTIME__ __XTIME__(__TIME__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------- */
|
/*
|
||||||
/* define wxFoo() function for each standard foo() function whose signature */
|
define wxFoo() function for each standard foo() function whose signature
|
||||||
/* (exceptionally including the return type) includes any mention of char: */
|
(exceptionally including the return type) includes any mention of char:
|
||||||
/* wxFoo() is going to be a Unicode-friendly version of foo(), i.e. will have */
|
wxFoo() is going to be a Unicode-friendly version of foo(), i.e. will have
|
||||||
/* the same signature but with char replaced by wxChar which allows us to use */
|
the same signature but with char replaced by wxChar which allows us to use
|
||||||
/* it in Unicode build as well */
|
it in Unicode build as well
|
||||||
/* ---------------------------------------------------------------------------- */
|
*/
|
||||||
|
|
||||||
#ifdef wxHAVE_TCHAR_SUPPORT
|
#ifdef wxHAVE_TCHAR_SUPPORT
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@@ -606,12 +606,12 @@
|
|||||||
#endif /* Unicode/ASCII */
|
#endif /* Unicode/ASCII */
|
||||||
#endif /* TCHAR-aware compilers/the others */
|
#endif /* TCHAR-aware compilers/the others */
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------- */
|
/*
|
||||||
/* various special cases */
|
various special cases
|
||||||
/* ---------------------------------------------------------------------------- */
|
*/
|
||||||
|
|
||||||
/* define wxStricmp and wxStrnicmp for various compilers */
|
/* define wxStricmp and wxStrnicmp for various compilers */
|
||||||
/* */
|
|
||||||
/* note that in Unicode mode we definitely are going to need our own version */
|
/* note that in Unicode mode we definitely are going to need our own version */
|
||||||
#if !defined(wxStricmp) && !wxUSE_UNICODE
|
#if !defined(wxStricmp) && !wxUSE_UNICODE
|
||||||
#if defined(__BORLANDC__) || defined(__WATCOMC__) || \
|
#if defined(__BORLANDC__) || defined(__WATCOMC__) || \
|
||||||
@@ -656,11 +656,13 @@ inline bool wxIsEmpty(const wxChar *p) { return !p || !*p; }
|
|||||||
inline size_t wxStrlen(const wxChar *psz) { return psz ? wxStrlen_(psz) : 0; }
|
inline size_t wxStrlen(const wxChar *psz) { return psz ? wxStrlen_(psz) : 0; }
|
||||||
#endif
|
#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 */
|
each of strdup() and wcsdup() may or may not be available but we need both
|
||||||
/* wxchar.cpp and so we should always have both wxStrdupA and wxStrdupW */
|
of them anyhow for wx/buffer.h so we define the missing one(s) in
|
||||||
/* defined -- if this is somehow not the case in some situations, please */
|
wxchar.cpp and so we should always have both wxStrdupA and wxStrdupW
|
||||||
/* correct that and not the lines here */
|
defined -- if this is somehow not the case in some situations, please
|
||||||
|
correct that and not the lines here
|
||||||
|
*/
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
#define wxStrdup wxStrdupW
|
#define wxStrdup wxStrdupW
|
||||||
#else
|
#else
|
||||||
@@ -670,9 +672,8 @@ inline size_t wxStrlen(const wxChar *psz) { return psz ? wxStrlen_(psz) : 0; }
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */
|
WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */
|
||||||
#endif
|
#endif
|
||||||
/* ---------------------------------------------------------------------------- */
|
|
||||||
/* printf() family saga */
|
/* printf() family saga */
|
||||||
/* ---------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
For some systems vsnprintf() exists in the system libraries but not in the
|
For some systems vsnprintf() exists in the system libraries but not in the
|
||||||
@@ -757,9 +758,11 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(wxNEED_PRINTF_CONVERSION) || defined(wxNEED_WPRINTF)
|
#if defined(wxNEED_PRINTF_CONVERSION) || defined(wxNEED_WPRINTF)
|
||||||
/* we need to implement all wide character printf and scanf functions */
|
/*
|
||||||
/* either because we don't have them at all or because they don't have the */
|
we need to implement all wide character printf and scanf functions
|
||||||
/* semantics we need */
|
either because we don't have them at all or because they don't have the
|
||||||
|
semantics we need
|
||||||
|
*/
|
||||||
|
|
||||||
#include <stdio.h> /* for FILE */
|
#include <stdio.h> /* for FILE */
|
||||||
|
|
||||||
@@ -785,13 +788,13 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */
|
|||||||
#define wxVsnprintf wxVsnprintf_
|
#define wxVsnprintf wxVsnprintf_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------- */
|
/*
|
||||||
/* various functions which might not be available in libc and for which we */
|
various functions which might not be available in libc and for which we
|
||||||
/* provide our own replacements in wxchar.cpp */
|
provide our own replacements in wxchar.cpp
|
||||||
/* ---------------------------------------------------------------------------- */
|
*/
|
||||||
|
|
||||||
/* ctype.h functions */
|
/* ctype.h functions */
|
||||||
/* */
|
|
||||||
/* VZ: note that this is never defined currently */
|
/* VZ: note that this is never defined currently */
|
||||||
#ifdef wxNEED_WX_CTYPE_H
|
#ifdef wxNEED_WX_CTYPE_H
|
||||||
WXDLLIMPEXP_BASE int wxIsalnum(wxChar ch);
|
WXDLLIMPEXP_BASE int wxIsalnum(wxChar ch);
|
||||||
@@ -825,7 +828,7 @@ WXDLLIMPEXP_BASE bool wxOKlibc(); /* for internal use */
|
|||||||
#define wxIsctrl wxIscntrl
|
#define wxIsctrl wxIscntrl
|
||||||
|
|
||||||
/* string.h functions */
|
/* string.h functions */
|
||||||
/* */
|
|
||||||
/* VZ: this is never defined neither currently */
|
/* VZ: this is never defined neither currently */
|
||||||
#ifdef wxNEED_WX_STRING_H
|
#ifdef wxNEED_WX_STRING_H
|
||||||
WXDLLIMPEXP_BASE wxChar * wxStrcat(wxChar *dest, const wxChar *src);
|
WXDLLIMPEXP_BASE wxChar * wxStrcat(wxChar *dest, const wxChar *src);
|
||||||
@@ -930,9 +933,7 @@ WXDLLIMPEXP_BASE int isascii( int c );
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------- */
|
|
||||||
/* multibyte to wide char conversion functions and macros */
|
/* multibyte to wide char conversion functions and macros */
|
||||||
/* ---------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
#if wxUSE_WCHAR_T
|
#if wxUSE_WCHAR_T
|
||||||
/* multibyte<->widechar conversion */
|
/* multibyte<->widechar conversion */
|
||||||
|
Reference in New Issue
Block a user