1.10.2 and less mbtowc and wctomb HAVE THE COOTIEScd .. (they are just stubs and return 0 - we need our own, even in ANSIcd ..!)\n2.Finalize the null character changes in wxString - change mb_str and wc_str to not stop at null characters\n3.Add unit tests for the above

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2004-10-07 22:28:57 +00:00
parent feb571a4bf
commit 265d5cce05
5 changed files with 104 additions and 16 deletions

View File

@@ -362,13 +362,23 @@
#define wxCtime _tctime
#else /* !TCHAR-aware compilers */
#if __DARWIN__ && ( MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2 ) && !defined(__MWERKS__)
/* even though they are defined and "implemented", they are bad and just
stubs so we need our own - we need these even in ANSI builds!! */
#define mbstowcs wxInternalMbstowcs
#define wcstombs wxInternalWcstombs
WXDLLIMPEXP_BASE size_t wxInternalMbstowcs (wchar_t *, const char *, size_t);
WXDLLIMPEXP_BASE size_t wxInternalWcstombs (char *, const wchar_t *, size_t);
#endif
/* No UNICODE in the c library except wchar_t typedef on mac OSX 10.2 and less - roll our own */
#if wxUSE_UNICODE && __DARWIN__ && ( MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2 ) && !defined(__MWERKS__)
/* we need everything! */
#define wxNEED_WX_STRING_H
#define wxNEED_WX_CTYPE_H
#define wxFgetchar(c) wxFgetc(c, stdin)
#define wxFputc wxPutc
#define wxFputchar(c) wxPutc(c, stdout)
@@ -397,15 +407,7 @@
#define wxNEED_WX_STDIO_H
#define wxNEED_WX_STDLIB_H
#define wxNEED_WX_TIME_H
/* even though they are defined and "implemented", they are bad and just
stubs so we need our own */
#define mbstowcs wxInternalMbstowcs
#define wcstombs wxInternalWcstombs
WXDLLIMPEXP_BASE size_t wxInternalMbstowcs (wchar_t *, const char *, size_t);
WXDLLIMPEXP_BASE size_t wxInternalWcstombs (char *, const wchar_t *, size_t);
#elif wxUSE_UNICODE
#include <wctype.h>