Author: sebor
Date: Wed Feb 1 19:05:28 2006
New Revision: 374235
URL: http://svn.apache.org/viewcvs?rev=374235&view=rev
Log:
2006-02-01 Martin Sebor <[EMAIL PROTECTED]>
* wcodecvt.cpp (__rw_libc_do_out): Removed the RWSTD_WCRTOMB macro and
instead explicitly spelled out the code the macro used to expand to.
(__rw_libc_do_unshift): Same.
(__rw_libc_do_in): Same for _RWSTD_MBRTOWC().
Modified:
incubator/stdcxx/trunk/src/wcodecvt.cpp
Modified: incubator/stdcxx/trunk/src/wcodecvt.cpp
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/src/wcodecvt.cpp?rev=374235&r1=374234&r2=374235&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/wcodecvt.cpp (original)
+++ incubator/stdcxx/trunk/src/wcodecvt.cpp Wed Feb 1 19:05:28 2006
@@ -354,7 +354,14 @@
psrc = from_next ? from_next : "";
while (dst_len && src_len) {
- _RWSTD_SIZE_T tmp = _RWSTD_MBRTOWC (pdst, psrc, src_len, &state);
+
+#ifndef _RWSTD_NO_MBRTOWC
+ _RWSTD_SIZE_T tmp = mbrtowc (pdst, psrc, src_len, &state);
+#elif !defined (_RWSTD_NO_MBTOWC)
+ _RWSTD_SIZE_T tmp = mbtowc (pdst, psrc, src_len);
+#else
+ tmp = _RWSTD_SIZE_MAX;
+#endif
// error; -1 result comes only from an illegal sequence
if (_RWSTD_SIZE_MAX == tmp) {
@@ -588,7 +595,14 @@
char* const tmpdst = dst_free < mb_cur_max ? buff : to_next;
// convert the next source character
- dst_len = _RWSTD_WCRTOMB (tmpdst, *from_next, &state);
+
+#ifndef _RWSTD_NO_WCRTOMB
+ dst_len = wcrtomb (tmpdst, *from_next, &state);
+#elif !defined (_RWSTD_NO_WCTOMB)
+ dst_len = wcrtomb (tmpdst, *from_next);
+#else
+ dst_len = _RWSTD_SIZE_MAX;
+#endif
// -1 is returned as an indication of an illegal sequence
if (_RWSTD_SIZE_MAX == dst_len) {
@@ -642,7 +656,16 @@
// use libc locale to obtain the shift sequence
char tmp [_RWSTD_MB_LEN_MAX];
- _RWSTD_SIZE_T ret = _RWSTD_WCRTOMB (tmp, wchar_t (0), &state);
+
+ _RWSTD_SIZE_T ret;
+
+#ifndef _RWSTD_NO_WCRTOMB
+ ret = wcrtomb (tmp, wchar_t (0), &state);
+#elif !defined (_RWSTD_NO_WCTOMB)
+ ret = wctomb (tmp, wchar_t (0));
+#else
+ ret = _RWSTD_SIZE_MAX;
+#endif
if (_RWSTD_SIZE_MAX == ret)
return _STD::codecvt_base::error;