Author: sebor
Date: Tue Jan 10 19:28:46 2006
New Revision: 367898
URL: http://svn.apache.org/viewcvs?rev=367898&view=rev
Log:
2006-01-10 Martin Sebor <[EMAIL PROTECTED]>
* _mbstate.h (_RWSTD_MBSTATE_T): New macro for std::mbstate_t,
::mbstate_t, the internal ::__mbstate_t (on Linux and Solaris),
char* on AIX, char on IRIX, and int for MSVC.
* iosfwd (_mbstate.h, _RWSTD_MBSTATE_T): Unconditionally included
and used the macro instead of referring to mbstate_t directly.
* _codecvt.h: Same.
* _locale.h: Same.
* _messages.cc: Same.
* _traits.h: Same.
* codecvt.cpp: Same.
* iso2022.cpp: Same.
* iso2022.h: Same.
* wcodecvt.cpp: Same.
Modified:
incubator/stdcxx/trunk/include/iosfwd
incubator/stdcxx/trunk/include/loc/_codecvt.h
incubator/stdcxx/trunk/include/loc/_locale.h
incubator/stdcxx/trunk/include/loc/_messages.cc
incubator/stdcxx/trunk/include/rw/_mbstate.h
incubator/stdcxx/trunk/include/rw/_traits.h
incubator/stdcxx/trunk/src/codecvt.cpp
incubator/stdcxx/trunk/src/iso2022.cpp
incubator/stdcxx/trunk/src/iso2022.h
incubator/stdcxx/trunk/src/wcodecvt.cpp
Modified: incubator/stdcxx/trunk/include/iosfwd
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/iosfwd?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/iosfwd (original)
+++ incubator/stdcxx/trunk/include/iosfwd Tue Jan 10 19:28:46 2006
@@ -3,7 +3,7 @@
*
* iosfwd - forward declarations for the iostreams
*
- * $Id: //stdlib/dev/include/iosfwd#32 $
+ * $Id$
*
***************************************************************************
*
@@ -25,31 +25,7 @@
#include <rw/_defs.h>
#include <rw/_iosfwd.h>
-
-#ifndef _RWSTD_NO_MBSTATE_T
-
-# if defined (__GNUG__) && __GNUG__ < 3 &&__GNUC_MINOR__ < 96
- // <cstring> included to work around a g++ 2.95.2 bug
-# include _RWSTD_CSTRING
-# endif
-
- // get mbstate_t (and wchar_t for MSVC 6.0)
-# include _RWSTD_CWCHAR
-
-# if defined (_RWSTD_NO_LIBC_IN_STD)
-
-_RWSTD_NAMESPACE (std) {
-
-// bring global mbstate_t into namespace std if it's not there yet
-_USING (::mbstate_t);
-
-} // namespace std
-
-# endif // _RWSTD_NO_LIBC_IN_STD
-
-#else // if defined (_RWSTD_NO_MBSTATE_T)
-# include <rw/_mbstate.h>
-#endif // _RWSTD_NO_MBSTATE_T
+#include <rw/_mbstate.h> // for _RWSTD_MBSTATE_T
_RWSTD_NAMESPACE (std) {
@@ -238,8 +214,8 @@
// 27.2, p9 - identical to std::fpos<char_traits<char>::state_type>
// and std::fpos<char_traits<wchar_t>::state_type>, respectively
-typedef fpos<mbstate_t> streampos;
-typedef fpos<mbstate_t> wstreampos;
+typedef fpos<_RWSTD_MBSTATE_T> streampos;
+typedef fpos<_RWSTD_MBSTATE_T> wstreampos;
} // namespace std
Modified: incubator/stdcxx/trunk/include/loc/_codecvt.h
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/loc/_codecvt.h?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/loc/_codecvt.h (original)
+++ incubator/stdcxx/trunk/include/loc/_codecvt.h Tue Jan 10 19:28:46 2006
@@ -5,7 +5,7 @@
* This is an internal header file used to implement the C++ Standard
* Library. It should never be #included directly by a program.
*
- * $Id: //stdlib/dev/include/loc/_codecvt.h#47 $
+ * $Id$
*
***************************************************************************
*
@@ -26,34 +26,9 @@
#define _RWSTD_LOC_CODECVT_H_INCLUDED
-#include <loc/_facet.h>
#include <rw/_defs.h>
-
-
-#ifndef _RWSTD_NO_MBSTATE_T
-
-# if defined (__GNUG__) && __GNUG__ < 3 &&__GNUC_MINOR__ < 96
- // <cstring> included to work around a g++ 2.95.2 bug
-# include _RWSTD_CSTRING
-# endif
-
- // get mbstate_t (and wchar_t for MSVC 6.0)
-# include _RWSTD_CWCHAR
-
-# if defined (_RWSTD_NO_LIBC_IN_STD)
-
-_RWSTD_NAMESPACE (std) {
-
-// bring global mbstate_t into namespace std if it's not there yet
-_USING (::mbstate_t);
-
-} // namespace std
-
-# endif // _RWSTD_NO_LIBC_IN_STD
-
-#else // if defined (_RWSTD_NO_MBSTATE_T)
-# include <rw/_mbstate.h>
-#endif // _RWSTD_NO_MBSTATE_T
+#include <loc/_facet.h>
+#include <rw/_mbstate.h> // for _RWSTD_MBSTATE_T
_RWSTD_NAMESPACE (__rw) {
@@ -194,15 +169,15 @@
// 22.2.1.5, p3 - performs no conversion
_RWSTD_SPECIALIZED_CLASS
-class _RWSTD_EXPORT codecvt<char, char, mbstate_t>
+class _RWSTD_EXPORT codecvt<char, char, _RWSTD_MBSTATE_T>
: public _RW::__rw_facet,
public codecvt_base
{
public:
- typedef char extern_type;
- typedef char intern_type;
- typedef mbstate_t state_type;
+ typedef char extern_type;
+ typedef char intern_type;
+ typedef _RWSTD_MBSTATE_T state_type;
_EXPLICIT codecvt (_RWSTD_SIZE_T __refs = 0)
: _RW::__rw_facet (__refs), _C_always_noconv (-1) { }
@@ -286,14 +261,14 @@
inline bool
-codecvt<char, char, mbstate_t>::
+codecvt<char, char, _RWSTD_MBSTATE_T>::
always_noconv () const _THROWS (())
{
// optimize away repeated calls to the virtual function
if (_C_always_noconv < 0) {
// typedef works around an HP aCC x.38 bug (PR #25832)
- typedef codecvt<char, char, mbstate_t> _CodeCvt;
+ typedef codecvt<char, char, _RWSTD_MBSTATE_T> _CodeCvt;
_CodeCvt *__self = _RWSTD_CONST_CAST (_CodeCvt*, this);
@@ -310,15 +285,15 @@
// of the native character set (i.e., widens and narrows)
_RWSTD_SPECIALIZED_CLASS
-class _RWSTD_EXPORT codecvt<wchar_t, char, mbstate_t>
+class _RWSTD_EXPORT codecvt<wchar_t, char, _RWSTD_MBSTATE_T>
: public _RW::__rw_facet,
public codecvt_base
{
public:
- typedef wchar_t intern_type;
- typedef char extern_type;
- typedef mbstate_t state_type;
+ typedef wchar_t intern_type;
+ typedef char extern_type;
+ typedef _RWSTD_MBSTATE_T state_type;
protected:
@@ -430,8 +405,8 @@
#ifndef _RWSTD_NO_WCHAR_T
_RWSTD_SPECIALIZED_CLASS
-class _RWSTD_EXPORT codecvt_byname<wchar_t, char, mbstate_t>
- : public codecvt<wchar_t, char, mbstate_t>
+class _RWSTD_EXPORT codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>
+ : public codecvt<wchar_t, char, _RWSTD_MBSTATE_T>
{
char _C_namebuf [32];
Modified: incubator/stdcxx/trunk/include/loc/_locale.h
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/loc/_locale.h?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/loc/_locale.h (original)
+++ incubator/stdcxx/trunk/include/loc/_locale.h Tue Jan 10 19:28:46 2006
@@ -5,7 +5,7 @@
* This is an internal header file used to implement the C++ Standard
* Library. It should never be #included directly by a program.
*
- * $Id: //stdlib/dev/include/loc/_locale.h#63 $
+ * $Id$
*
***************************************************************************
*
@@ -397,7 +397,7 @@
#define _OutIter(T) _STD::ostreambuf_iterator< T, _STD::char_traits<T > >
// convenience typedefs to allow them to be used as macro arguments
-typedef _STD::codecvt<char, char, _RWSTD_C::mbstate_t> __rw_codecvt_c;
+typedef _STD::codecvt<char, char, _RWSTD_MBSTATE_T> __rw_codecvt_c;
typedef _Facet (moneypunct, char, false) __rw_mpunct_c_0;
typedef _Facet (moneypunct, char, true) __rw_mpunct_c_1;
typedef _Facet (money_get, char, _InIter (char)) __rw_mget_c;
@@ -464,7 +464,7 @@
#ifndef _RWSTD_NO_WCHAR_T
-typedef _STD::codecvt<wchar_t, char, _RWSTD_C::mbstate_t> __rw_codecvt_w;
+typedef _STD::codecvt<wchar_t, char, _RWSTD_MBSTATE_T> __rw_codecvt_w;
typedef _Facet (moneypunct, wchar_t, false) __rw_mpunct_w_0;
typedef _Facet (moneypunct, wchar_t, true) __rw_mpunct_w_1;
typedef _Facet (money_get, wchar_t, _InIter (wchar_t)) __rw_mget_w;
Modified: incubator/stdcxx/trunk/include/loc/_messages.cc
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/loc/_messages.cc?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/loc/_messages.cc (original)
+++ incubator/stdcxx/trunk/include/loc/_messages.cc Tue Jan 10 19:28:46 2006
@@ -38,7 +38,7 @@
const char* const __text = _RW::__rw_get_message (__cat, __set, __msgid);
if (__text) {
- typedef _V3_LOCALE::codecvt<_CharT, char, _RWSTD_C::mbstate_t>
+ typedef _V3_LOCALE::codecvt<_CharT, char, _RWSTD_MBSTATE_T>
_CodeCvt;
typedef _TYPENAME _CodeCvt::state_type state_type;
Modified: incubator/stdcxx/trunk/include/rw/_mbstate.h
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/rw/_mbstate.h?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_mbstate.h (original)
+++ incubator/stdcxx/trunk/include/rw/_mbstate.h Tue Jan 10 19:28:46 2006
@@ -29,7 +29,13 @@
#include <rw/_defs.h>
-#if defined (__hpux)
+/*** AIX ******************************************************************/
+#if defined (_RWSTD_OS_AIX)
+
+# define _RWSTD_MBSTATE_T char*
+
+/*** HP-UX ****************************************************************/
+#elif defined (_RWSTD_OS_HP_UX)
# ifndef _MBSTATE_T
# define _MBSTATE_T
@@ -59,9 +65,10 @@
} // namespace std
-# else
+# define _RWSTD_MBSTATE_T _STD::mbstate_t
+# else // if !(HP aCC -AA)
-#define _RWSTD_NO_MBSTATE_T_IN_STD
+# define _RWSTD_NO_STD_MBSTATE_T
_RWSTD_NAMESPACE (std) {
@@ -69,11 +76,12 @@
} // namespace std
+# define _RWSTD_MBSTATE_T mbstate_t
# endif // HP aCC -AA
# else // if defined (_MBSTATE_T)
// /usr/include/sys/_mbstate_t.h #included and mbstate_t defined
# ifndef _NAMESPACE_STD
-# define _RWSTD_NO_MBSTATE_T_IN_STD
+# define _RWSTD_NO_STD_MBSTATE_T
_RWSTD_NAMESPACE (std) {
@@ -81,12 +89,46 @@
} // namespace std
+# define _RWSTD_MBSTATE_T mbstate_t
# endif // _NAMESPACE_STD
# endif // _MBSTATE_T
+/*** IRIX64 ***************************************************************/
+#elif defined (_RWSTD_OS_IRIX64)
+
+# define _RWSTD_MBSTATE_T char
+
+/*** MSVC 6.0 - 8.0 *******************************************************/
+#elif defined (_MSC_VER)
+
+# define _RWSTD_MBSTATE_T int
+
+/*** not HP-UX that has a mbstate_t ***************************************/
#elif !defined (_RWSTD_NO_MBSTATE_T)
-# if defined (_RWSTD_OS_SUNOS)
+# if defined (_RWSTD_OS_LINUX)
+
+ // define __mbstate_t at file scope (see /usr/include/wchar.h)
+# ifndef __mbstate_t_defined
+# define __mbstate_t_defined 1
+
+extern "C" {
+
+typedef struct {
+ int __count;
+ union {
+ _RWSTD_WINT_T __wch;
+ char __wchb [4];
+ } __value;
+} __mbstate_t;
+
+} // extern "C"
+
+# endif // __mbstate_t_defined
+
+# define _RWSTD_MBSTATE_T __mbstate_t
+
+# elif defined (_RWSTD_OS_SUNOS)
# ifndef _MBSTATET_H
# define _MBSTATET_H
@@ -107,24 +149,13 @@
# endif // _MBSTATET_H
-# ifndef _RWSTD_NO_USING_LIBC_IN_STD
-
-namespace std {
-
-typedef __mbstate_t mbstate_t;
-
-} // namespace std
-
-# else // if defined (_RWSTD_NO_USING_LIBC_IN_STD)
-
-typedef __mbstate_t mbstate_t;
-
-# endif // _RWSTD_NO_USING_LIBC_IN_STD
+# define _RWSTD_MBSTATE_T __mbstate_t
# else // if !defined (_RWSTD_OS_SUNOS)
# include _RWSTD_CWCHAR
# endif // _RWSTD_OS_SUNOS
+/*** not HP-UX that does not define mbstate_t *****************************/
#elif !defined (_RWSTD_MBSTATE_T_DEFINED)
# define _RWSTD_MBSTATE_T_DEFINED
@@ -156,21 +187,7 @@
# endif // _MBSTATET_H
# endif // _WCHAR_IMPL_H
-
-# ifndef _RWSTD_NO_USING_LIBC_IN_STD
-
-_RWSTD_NAMESPACE (std) {
-
-# endif // _RWSTD_NO_USING_LIBC_IN_STD
-
-typedef __mbstate_t mbstate_t;
-
-# ifndef _RWSTD_NO_USING_LIBC_IN_STD
-
-} // namespace std
-
-# endif // _RWSTD_NO_USING_LIBC_IN_STD
-
+# define _RWSTD_MBSTATE_T __mbstate_t
# else // any other OS
# ifndef _RWSTD_NO_USING_LIBC_IN_STD
Modified: incubator/stdcxx/trunk/include/rw/_traits.h
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/rw/_traits.h?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_traits.h (original)
+++ incubator/stdcxx/trunk/include/rw/_traits.h Tue Jan 10 19:28:46 2006
@@ -26,16 +26,16 @@
#define _RWSTD_TRAITS_H_INCLUDED
#include <rw/_iosfwd.h>
+#include <rw/_mbstate.h> // for _RWSTD_MBSTATE_T
#include <rw/_defs.h>
+
#if defined (_RWSTDDEBUG) || defined (_RWSTD_EDG_ECCP)
// avoid including <cstring> and <cwchar> in debug mode or when using
// the vanilla EDG eccp (i.e., in strict conformance mode) to prevent
// namespace pollutiuon
-# include <rw/_mbstate.h>
-
_RWSTD_NAMESPACE (__rw) {
_RWSTD_EXPORT void* __rw_memcpy (void*, const void*, _RWSTD_SIZE_T);
@@ -74,11 +74,7 @@
# define _RWSTD_WCSLEN _RW::__rw_wcslen
#else // if !defined (_RWSTDDEBUG) && !defined (_RWSTD_EDG_ECCP)
# include _RWSTD_CSTRING // for memcmp(), ...
-# include _RWSTD_CWCHAR // for mbstate_t, wmemcmp(), ...
-
-# ifdef _RWSTD_NO_MBSTATE_T
-# include <rw/_mbstate.h>
-# endif // _RWSTD_NO_MBSTATE_T
+# include _RWSTD_CWCHAR // wmemcmp(), ...
# define _RWSTD_MEMCPY memcpy
# define _RWSTD_MEMCMP memcmp
@@ -273,7 +269,7 @@
typedef _CharT char_type;
typedef int int_type;
typedef _RWSTD_STREAMOFF off_type;
- typedef mbstate_t state_type;
+ typedef _RWSTD_MBSTATE_T state_type;
typedef fpos<state_type> pos_type;
static int_type eof () {
@@ -367,7 +363,7 @@
typedef char char_type;
typedef _RWSTD_INT_T int_type;
typedef _RWSTD_STREAMOFF off_type;
- typedef mbstate_t state_type;
+ typedef _RWSTD_MBSTATE_T state_type;
typedef fpos<state_type> pos_type;
static int_type eof () {
@@ -450,7 +446,7 @@
typedef wchar_t char_type;
typedef _RWSTD_WINT_T int_type;
typedef _RWSTD_STREAMOFF off_type;
- typedef mbstate_t state_type;
+ typedef _RWSTD_MBSTATE_T state_type;
typedef fpos<state_type> pos_type;
static int_type eof () {
Modified: incubator/stdcxx/trunk/src/codecvt.cpp
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/src/codecvt.cpp?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/codecvt.cpp (original)
+++ incubator/stdcxx/trunk/src/codecvt.cpp Tue Jan 10 19:28:46 2006
@@ -2,7 +2,7 @@
*
* codecvt.cpp - definition of codecvt<char, char, mbstate_t> members
*
- * $Id: //stdlib/dev/source/stdlib/codecvt.cpp#122 $
+ * $Id$
*
***************************************************************************
*
@@ -61,7 +61,7 @@
_RWSTD_NAMESPACE (__rw) {
-static inline int __rw_mbsinit (const _RWSTD_C::mbstate_t *ps)
+static inline int __rw_mbsinit (const _RWSTD_MBSTATE_T *ps)
{
#ifndef _RWSTD_NO_MBSINIT
@@ -70,7 +70,7 @@
#else // if defined (_RWSTD_NO_MBSINIT)
// commented out to work around an HP aCC 1.21 bug
- /* static */ const _RWSTD_C::mbstate_t state = _RWSTD_C::mbstate_t ();
+ /* static */ const _RWSTD_MBSTATE_T state = _RWSTD_MBSTATE_T ();
return !ps || 0 == memcmp (ps, &state, sizeof state);
#endif // _RWSTD_NO_MBSINIT
@@ -84,17 +84,17 @@
_RWSTD_NAMESPACE (_V3_LOCALE) {
-_RW::__rw_facet_id codecvt<char, char, mbstate_t>::id;
+_RW::__rw_facet_id codecvt<char, char, _RWSTD_MBSTATE_T>::id;
-/* virtual */ codecvt<char, char, mbstate_t>::~codecvt ()
+/* virtual */ codecvt<char, char, _RWSTD_MBSTATE_T>::~codecvt ()
{
// no-op
}
/* virtual */ codecvt_base::result
-codecvt<char, char, mbstate_t>::
+codecvt<char, char, _RWSTD_MBSTATE_T>::
do_out (state_type &state,
const intern_type *from,
const intern_type *from_end,
@@ -150,7 +150,7 @@
/* virtual */ codecvt_base::result
-codecvt<char, char, mbstate_t>::
+codecvt<char, char, _RWSTD_MBSTATE_T>::
do_in (state_type &state,
const extern_type *from,
const extern_type *from_end,
@@ -165,7 +165,7 @@
_RWSTD_ASSERT (from && from_end || !from && !from_end);
_RWSTD_ASSERT (to && to_end || !to && !to_end);
- typedef codecvt<char, char, mbstate_t> This;
+ typedef codecvt<char, char, _RWSTD_MBSTATE_T> This;
// call do_out() above (avoid calling overridden do_out(), if any)
return This::do_out (state,
@@ -175,7 +175,7 @@
/* virtual */ codecvt_base::result
-codecvt<char, char, mbstate_t>::
+codecvt<char, char, _RWSTD_MBSTATE_T>::
do_unshift (state_type &state,
extern_type *to,
extern_type *to_end,
@@ -198,7 +198,7 @@
/* virtual */ int
-codecvt<char, char, mbstate_t>::
+codecvt<char, char, _RWSTD_MBSTATE_T>::
do_encoding () const _THROWS (())
{
return 1; // 1 external char converts to a single internal char
@@ -206,7 +206,7 @@
/* virtual */ bool
-codecvt<char, char, mbstate_t>::
+codecvt<char, char, _RWSTD_MBSTATE_T>::
do_always_noconv () const _THROWS (())
{
return true; // conversion never necessary
@@ -215,7 +215,7 @@
// signature follows lwg issue 75
/* virtual */ int
-codecvt<char, char, mbstate_t>::
+codecvt<char, char, _RWSTD_MBSTATE_T>::
do_length (state_type &state,
const extern_type *from,
const extern_type *from_end,
@@ -240,7 +240,7 @@
/* virtual */ int
-codecvt<char, char, mbstate_t>::
+codecvt<char, char, _RWSTD_MBSTATE_T>::
do_max_length () const _THROWS (())
{
return 1; // 22.2.1.5.2, p11
@@ -249,7 +249,7 @@
} // namespace _V3_LOCALE
-#define TARGS_C <char, char, _RWSTD_C::mbstate_t>
+#define TARGS_C <char, char, _RWSTD_MBSTATE_T>
_RWSTD_DEFINE_FACET_FACTORY (static, codecvt, TARGS_C, codecvt);
_RWSTD_SPECIALIZE_USE_FACET (codecvt);
Modified: incubator/stdcxx/trunk/src/iso2022.cpp
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/src/iso2022.cpp?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/iso2022.cpp (original)
+++ incubator/stdcxx/trunk/src/iso2022.cpp Tue Jan 10 19:28:46 2006
@@ -2,7 +2,7 @@
*
* rw_iso2022.cpp
*
- * $Id: //stdlib/dev/source/stdlib/iso2022.cpp#41 $
+ * $Id$
*
***************************************************************************
*
@@ -431,7 +431,7 @@
// argument represents an initial shift state
static inline
void __rw_deallocate_state (__rw_iso2022_state_t &iso_state,
- _RWSTD_C::mbstate_t &state,
+ _RWSTD_MBSTATE_T &state,
bool initial_only)
{
_RWSTD_MT_CLASS_GUARD (__rw_iso2022_state_t);
@@ -456,7 +456,7 @@
static __rw_iso2022_state_t*
-__rw_get_iso2022_state (_RWSTD_C::mbstate_t& state, int enc)
+__rw_get_iso2022_state (_RWSTD_MBSTATE_T& state, int enc)
{
__rw_iso2022_state_t* pstate = 0;
@@ -1588,7 +1588,7 @@
// does the conversion of one character to internal representation
static _V3_LOCALE::codecvt_base::result
-__rw_iso2022_to_ucs4 (_RWSTD_C::mbstate_t& state,
+__rw_iso2022_to_ucs4 (_RWSTD_MBSTATE_T& state,
__rw_iso2022_state_t* iso_state,
const char*& from,
const char* from_end,
@@ -1689,11 +1689,11 @@
// Conversion from ISO-2022-JP to UCS-4
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp_do_in (_RWSTD_C::mbstate_t& state,
- const char*& from,
- const char* from_end,
- wchar_t*& to,
- wchar_t* to_end)
+__rw_iso2022jp_do_in (_RWSTD_MBSTATE_T& state,
+ const char*& from,
+ const char* from_end,
+ wchar_t*& to,
+ wchar_t* to_end)
{
// the iso2022 state
__rw_iso2022_state_t* iso_state =
@@ -1734,11 +1734,11 @@
// Conversion from UCS-4 to ISO-2022-JP
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp_do_out (_RWSTD_C::mbstate_t& state,
- const wchar_t*& from,
- const wchar_t* from_end,
- char*& to,
- char* to_end)
+__rw_iso2022jp_do_out (_RWSTD_MBSTATE_T& state,
+ const wchar_t*& from,
+ const wchar_t* from_end,
+ char*& to,
+ char* to_end)
{
// the iso2022 state
__rw_iso2022_state_t* iso_state =
@@ -1811,7 +1811,7 @@
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp_do_unshift (_RWSTD_C::mbstate_t& state,
+__rw_iso2022jp_do_unshift (_RWSTD_MBSTATE_T& state,
char*& to, char* to_end)
{
_V3_LOCALE::codecvt_base::result res =
@@ -1840,7 +1840,7 @@
_RWSTD_SIZE_T
-__rw_iso2022jp_do_length (_RWSTD_C::mbstate_t& state,
+__rw_iso2022jp_do_length (_RWSTD_MBSTATE_T& state,
const char* from, const char* from_end,
_RWSTD_SIZE_T max)
{
@@ -1905,11 +1905,11 @@
// Conversion from ISO-2022-JP to UCS-4
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp2_do_in (_RWSTD_C::mbstate_t& state,
- const char*& from,
- const char* from_end,
- wchar_t*& to,
- wchar_t* to_end)
+__rw_iso2022jp2_do_in (_RWSTD_MBSTATE_T& state,
+ const char*& from,
+ const char* from_end,
+ wchar_t*& to,
+ wchar_t* to_end)
{
// the iso2022 state
__rw_iso2022_state_t* iso_state =
@@ -1951,11 +1951,11 @@
// Conversion from UCS-4 to ISO-2022-JP-2
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp2_do_out (_RWSTD_C::mbstate_t& state,
- const wchar_t*& from,
- const wchar_t* from_end,
- char*& to,
- char* to_end)
+__rw_iso2022jp2_do_out (_RWSTD_MBSTATE_T& state,
+ const wchar_t*& from,
+ const wchar_t* from_end,
+ char*& to,
+ char* to_end)
{
// the iso2022 state
__rw_iso2022_state_t* iso_state =
@@ -2052,7 +2052,7 @@
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp2_do_unshift (_RWSTD_C::mbstate_t& state,
+__rw_iso2022jp2_do_unshift (_RWSTD_MBSTATE_T& state,
char*& to, char* to_end)
{
return __rw_iso2022jp_do_unshift (state, to, to_end);
@@ -2060,7 +2060,7 @@
_RWSTD_SIZE_T
-__rw_iso2022jp2_do_length (_RWSTD_C::mbstate_t& state,
+__rw_iso2022jp2_do_length (_RWSTD_MBSTATE_T& state,
const char* from, const char* from_end,
_RWSTD_SIZE_T max)
{
Modified: incubator/stdcxx/trunk/src/iso2022.h
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/src/iso2022.h?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/iso2022.h (original)
+++ incubator/stdcxx/trunk/src/iso2022.h Tue Jan 10 19:28:46 2006
@@ -5,7 +5,7 @@
* This is an internal header file used to implement the C++ Standard
* Library. It should never be #included directly by a program.
*
- * $Id: //stdlib/dev/source/stdlib/iso2022.h#4 $
+ * $Id$
*
***************************************************************************
*
@@ -25,6 +25,8 @@
#ifndef _RWSTD_LOC_ISO2022_H_INCLUDED
#define _RWSTD_LOC_ISO2022_H_INCLUDED
+
+#include <rw/_mbstate.h> // for _RWSTD_MBSTATE_T
#include <rw/_defs.h>
@@ -46,21 +48,21 @@
// Conversions for ISO-2022-JP
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp_do_in (_RWSTD_C::mbstate_t&,
+__rw_iso2022jp_do_in (_RWSTD_MBSTATE_T&,
const char*&, const char*,
wchar_t*&, wchar_t*);
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp_do_out (_RWSTD_C::mbstate_t&,
+__rw_iso2022jp_do_out (_RWSTD_MBSTATE_T&,
const wchar_t*&, const wchar_t*,
char*&, char*);
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp_do_unshift (_RWSTD_C::mbstate_t&, char*&, char*);
+__rw_iso2022jp_do_unshift (_RWSTD_MBSTATE_T&, char*&, char*);
int __rw_iso2022jp_do_encoding ();
-_RWSTD_SIZE_T __rw_iso2022jp_do_length (_RWSTD_C::mbstate_t&, const char*,
+_RWSTD_SIZE_T __rw_iso2022jp_do_length (_RWSTD_MBSTATE_T&, const char*,
const char*, _RWSTD_SIZE_T);
_RWSTD_SIZE_T __rw_iso2022jp_do_max_length ();
@@ -70,21 +72,21 @@
// Conversions for ISO-2022-JP-2
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp2_do_in (_RWSTD_C::mbstate_t&,
+__rw_iso2022jp2_do_in (_RWSTD_MBSTATE_T&,
const char*&, const char*,
wchar_t*&, wchar_t*);
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp2_do_out (_RWSTD_C::mbstate_t&,
+__rw_iso2022jp2_do_out (_RWSTD_MBSTATE_T&,
const wchar_t*&, const wchar_t*,
char*&, char*);
_V3_LOCALE::codecvt_base::result
-__rw_iso2022jp2_do_unshift (_RWSTD_C::mbstate_t&, char*&, char*);
+__rw_iso2022jp2_do_unshift (_RWSTD_MBSTATE_T&, char*&, char*);
int __rw_iso2022jp2_do_encoding ();
-_RWSTD_SIZE_T __rw_iso2022jp2_do_length (_RWSTD_C::mbstate_t&, const char*,
+_RWSTD_SIZE_T __rw_iso2022jp2_do_length (_RWSTD_MBSTATE_T&, const char*,
const char*, _RWSTD_SIZE_T);
_RWSTD_SIZE_T __rw_iso2022jp2_do_max_length ();
Modified: incubator/stdcxx/trunk/src/wcodecvt.cpp
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/src/wcodecvt.cpp?rev=367898&r1=367897&r2=367898&view=diff
==============================================================================
--- incubator/stdcxx/trunk/src/wcodecvt.cpp (original)
+++ incubator/stdcxx/trunk/src/wcodecvt.cpp Tue Jan 10 19:28:46 2006
@@ -23,8 +23,6 @@
#include <rw/_defs.h>
-#ifndef _RWSTD_NO_V3_LOCALE
-
// working around a Compaq C++ bug (see PR #26778)
#if __DECCXX_VER >= 60300000 && __DECCXX_VER < 60400000
@@ -61,9 +59,6 @@
#include "use_facet.h"
-typedef _RWSTD_C::mbstate_t MBStateT;
-
-
// declare mbrlen() if it's not declared in the system headers
// but is known to be defined in the libc binary
#if defined (_RWSTD_NO_MBRLEN) && !defined (_RWSTD_NO_MBRLEN_IN_LIBC)
@@ -71,7 +66,7 @@
# undef _RWSTD_NO_MBRLEN
extern "C" _RWSTD_SIZE_T
-mbrlen (const char*, _RWSTD_SIZE_T, MBStateT*) _LIBC_THROWS();
+mbrlen (const char*, _RWSTD_SIZE_T, _RWSTD_MBSTATE_T*) _LIBC_THROWS();
#endif // _RWSTD_NO_MBRLEN && !_RWSTD_NO_MBRLEN_IN_LIBC
@@ -95,7 +90,8 @@
# undef _RWSTD_NO_WCSRTOMBS
extern "C" _RWSTD_SIZE_T
-wcsrtombs (char*, const wchar_t**, _RWSTD_SIZE_T, MBStateT*) _LIBC_THROWS();
+wcsrtombs (char*, const wchar_t**,
+ _RWSTD_SIZE_T, _RWSTD_MBSTATE_T*) _LIBC_THROWS();
#endif // _RWSTD_NO_WCSRTOMBS && !_RWSTD_NO_WCSRTOMBS_IN_LIBC
@@ -107,7 +103,7 @@
# undef _RWSTD_NO_WCRTOMB
extern "C" _RWSTD_SIZE_T
-wcrtomb (char*, wchar_t, _RWSTD_SIZE_T, MBStateT*) _LIBC_THROWS();
+wcrtomb (char*, wchar_t, _RWSTD_SIZE_T, _RWSTD_MBSTATE_T*) _LIBC_THROWS();
#endif // _RWSTD_NO_WCRTOMB && !_RWSTD_NO_WCRTOMB_IN_LIBC
@@ -194,7 +190,7 @@
_RWSTD_NAMESPACE (__rw) {
-static inline int __rw_mbsinit (const MBStateT *psrc)
+static inline int __rw_mbsinit (const _RWSTD_MBSTATE_T *psrc)
{
#ifndef _RWSTD_NO_MBSINIT
@@ -203,7 +199,7 @@
#else // if defined (_RWSTD_NO_MBSINIT)
// commented out to work around an HP aCC 1.21 bug
- /* static */ const MBStateT state = MBStateT ();
+ /* static */ const _RWSTD_MBSTATE_T state = _RWSTD_MBSTATE_T ();
return !psrc || 0 == memcmp (psrc, &state, sizeof state);
#endif // _RWSTD_NO_MBSINIT
@@ -223,9 +219,9 @@
// by `str' is the NUL character and `emax' is non-zero, the function
// returns 1
static inline _RWSTD_SIZE_T
-__rw_libc_mbrlen (MBStateT &state,
- const char *str,
- _RWSTD_SIZE_T emax)
+__rw_libc_mbrlen (_RWSTD_MBSTATE_T &state,
+ const char *str,
+ _RWSTD_SIZE_T emax)
{
_RWSTD_ASSERT (0 != str);
@@ -295,21 +291,21 @@
// This returns two result codes: error and ok. The partial error result
// is not returned because there is no way to know whether or not the
// input sequence contains any more valid characters.
-static _V3_LOCALE::codecvt_base::result
-__rw_libc_do_in (MBStateT &state,
- const char *from,
- const char *from_end,
- const char* &from_next,
- wchar_t *to,
- wchar_t *to_limit,
- wchar_t* &to_next)
+static _STD::codecvt_base::result
+__rw_libc_do_in (_RWSTD_MBSTATE_T &state,
+ const char *from,
+ const char *from_end,
+ const char* &from_next,
+ wchar_t *to,
+ wchar_t *to_limit,
+ wchar_t* &to_next)
{
_RWSTD_ASSERT (from <= from_end);
_RWSTD_ASSERT (to <= to_limit);
- _V3_LOCALE::codecvt_base::result res = _V3_LOCALE::codecvt_base::ok;
+ _STD::codecvt_base::result res = _STD::codecvt_base::ok;
- MBStateT save_state = state; // saved state before conversion
+ _RWSTD_MBSTATE_T save_state = state; // saved state before conversion
_RWSTD_SIZE_T src_len = from_end - from; // source length
_RWSTD_SIZE_T dst_len = to_limit - to; // destination length
@@ -341,7 +337,7 @@
// error; -1 result comes only from an illegal sequence
if (_RWSTD_SIZE_MAX == tmp) {
- res = _V3_LOCALE::codecvt_base::error;
+ res = _STD::codecvt_base::error;
break;
}
@@ -388,25 +384,25 @@
// if the conversion has exhausted all space in the destination
// range AND there are more COMPLETE characters in the source
// range then we have a "partial" conversion
- if (res == _V3_LOCALE::codecvt_base::ok && src_len && !dst_len) {
- MBStateT tmp_state = state;
+ if (res == _STD::codecvt_base::ok && src_len && !dst_len) {
+ _RWSTD_MBSTATE_T tmp_state = state;
_RWSTD_SIZE_T tmp = __rw_libc_mbrlen (tmp_state, psrc, src_len);
if (tmp < (_RWSTD_SIZE_T)(-2))
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
}
return res;
}
-static _V3_LOCALE::codecvt_base::result
-__rw_libc_do_out (MBStateT &state,
- const wchar_t *from,
- const wchar_t *from_end,
- const wchar_t* &from_next,
- char *to,
- char *to_limit,
- char* &to_next)
+static _STD::codecvt_base::result
+__rw_libc_do_out (_RWSTD_MBSTATE_T &state,
+ const wchar_t *from,
+ const wchar_t *from_end,
+ const wchar_t* &from_next,
+ char *to,
+ char *to_limit,
+ char* &to_next)
{
_RWSTD_ASSERT (from <= from_end);
_RWSTD_ASSERT (to <= to_limit);
@@ -430,7 +426,7 @@
const _RWSTD_SIZE_T mb_cur_max = (_RWSTD_SIZE_T)MB_CUR_MAX;
// the result of conversion
- _V3_LOCALE::codecvt_base::result res = _V3_LOCALE::codecvt_base::ok;
+ _STD::codecvt_base::result res = _STD::codecvt_base::ok;
// the size of the available space in the destination range
_RWSTD_SIZE_T dst_free = 0;
@@ -449,7 +445,7 @@
dst_free = to_limit - to_next;
if (0 == dst_free) {
// out of space, return partial as per Table 53
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
break;
}
@@ -507,7 +503,7 @@
else if (src) {
// not enough space in the destination range
// to convert even a single source character
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
from_next = src;
break;
}
@@ -575,7 +571,7 @@
// -1 is returned as an indication of an illegal sequence
if (_RWSTD_SIZE_MAX == dst_len) {
- res = _V3_LOCALE::codecvt_base::error;
+ res = _STD::codecvt_base::error;
break;
}
@@ -593,7 +589,7 @@
// the source character converted to a multibyte
// character whose length in bytes is greater than
// the available space in the destination sequence
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
break;
}
@@ -617,29 +613,29 @@
}
-static _V3_LOCALE::codecvt_base::result
-__rw_libc_do_unshift (MBStateT& state, char*& to_next, char* to_limit)
+static _STD::codecvt_base::result
+__rw_libc_do_unshift (_RWSTD_MBSTATE_T& state, char*& to_next, char* to_limit)
{
// save current state
- const MBStateT tmp_state = state;
+ const _RWSTD_MBSTATE_T tmp_state = state;
// 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);
if (_RWSTD_SIZE_MAX == ret)
- return _V3_LOCALE::codecvt_base::error;
+ return _STD::codecvt_base::error;
if (ret > (_RWSTD_SIZE_T)(to_limit - to_next)) {
// restore the state and return partial
state = tmp_state;
- return _V3_LOCALE::codecvt_base::partial;
+ return _STD::codecvt_base::partial;
}
// copy the shift sequence
memcpy (to_next, tmp, ret);
to_next += ret;
- return _V3_LOCALE::codecvt_base::ok;
+ return _STD::codecvt_base::ok;
}
@@ -702,7 +698,7 @@
}
-static _V3_LOCALE::codecvt_base::result
+static _STD::codecvt_base::result
__rw_libstd_do_in (const char *from_end,
const char *&from_next,
wchar_t *to_limit,
@@ -718,17 +714,17 @@
const bool use_ucs = 0 != UCS_TYPE (flags);
const bool strict_utf = 0 != (flags & __rw_strict);
- _V3_LOCALE::codecvt_base::result res;
+ _STD::codecvt_base::result res;
for (const unsigned* const tab = impl ? impl->n_to_w_tab () : 0; ; ) {
if (from_next == from_end) {
- res = _V3_LOCALE::codecvt_base::ok;
+ res = _STD::codecvt_base::ok;
break;
}
if (to_next == to_limit) {
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
break;
}
@@ -747,14 +743,14 @@
if (_RWSTD_UINT_MAX == off) {
// the source sequence forms neither a valid multibyte
// character, nor is it an initial subsequence of one
- res = _V3_LOCALE::codecvt_base::error;
+ res = _STD::codecvt_base::error;
break;
}
if (from == from_next) {
// the source sequence forms an incomplete initial
// subsequence of a valid multibyte character
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
break;
}
@@ -781,14 +777,14 @@
if (!from) {
// the source sequence forms neither a valid UTF-8
// character, nor is it an initial subsequence of one
- res = _V3_LOCALE::codecvt_base::error;
+ res = _STD::codecvt_base::error;
break;
}
if (from_next == from) {
// the source sequence forms an incomplete initial
// subsequence of a valid UTF-8 character
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
break;
}
@@ -803,7 +799,7 @@
}
-static _V3_LOCALE::codecvt_base::result
+static _STD::codecvt_base::result
__rw_libstd_do_out (const wchar_t *from,
const wchar_t *from_end,
const wchar_t *&from_next,
@@ -814,7 +810,7 @@
const _RW::__rw_codecvt_t *impl)
{
// final result of the transformation
- _V3_LOCALE::codecvt_base::result res = _V3_LOCALE::codecvt_base::ok;
+ _STD::codecvt_base::result res = _STD::codecvt_base::ok;
const bool use_ucs = IS_UCS (flags);
@@ -827,7 +823,7 @@
for (from_next = from, to_next = to; from_next != from_end; ++from_next) {
if (to_next == to_limit) {
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
break;
}
@@ -853,7 +849,7 @@
if ( WIntT (0xd800U) <= wi && wi <= WIntT (0xdfffU)
|| WIntT (0xfffeU) <= wi && wi <= WIntT (0xffffU)) {
- res = _V3_LOCALE::codecvt_base::error;
+ res = _STD::codecvt_base::error;
break;
}
}
@@ -877,20 +873,20 @@
// try transliteration
off = __rw_xlit (impl, utfbuf, utf8_len);
if (0 == off) {
- res = _V3_LOCALE::codecvt_base::error;
+ res = _STD::codecvt_base::error;
break;
}
}
if (_RWSTD_UINT_MAX == off) {
// the sequence does not form a valid character
- res = _V3_LOCALE::codecvt_base::error;
+ res = _STD::codecvt_base::error;
break;
}
if (utf == utfbuf) {
// the next multibyte character position was incomplete
- res = _V3_LOCALE::codecvt_base::ok;
+ res = _STD::codecvt_base::ok;
break;
}
@@ -900,7 +896,7 @@
// check that there's enough space in the destination sequence
utf8_len = *utf ? strlen (utf) : 1;
if (bytes_avail < utf8_len) {
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
break;
}
@@ -918,7 +914,7 @@
utf8_len = __rw_itoutf8 (*from_next, utfbuf);
if (bytes_avail < utf8_len) {
- res = _V3_LOCALE::codecvt_base::partial;
+ res = _STD::codecvt_base::partial;
break;
}
@@ -938,10 +934,10 @@
// implements do_length() on top of libc mbrlen()
static _RWSTD_SIZE_T
-__rw_libc_do_length (MBStateT &state,
- const char *from,
- const char *from_end,
- _RWSTD_SIZE_T imax)
+__rw_libc_do_length (_RWSTD_MBSTATE_T &state,
+ const char *from,
+ const char *from_end,
+ _RWSTD_SIZE_T imax)
{
const char* const from_begin = from;
@@ -1100,10 +1096,10 @@
_RWSTD_NAMESPACE (_V3_LOCALE) {
-_RW::__rw_facet_id codecvt<wchar_t, char, mbstate_t>::id;
+_RW::__rw_facet_id codecvt<wchar_t, char, _RWSTD_MBSTATE_T>::id;
-/* explicit */ codecvt<wchar_t, char, mbstate_t>::
+/* explicit */ codecvt<wchar_t, char, _RWSTD_MBSTATE_T>::
codecvt (_RWSTD_SIZE_T __ref /* = 0 */)
: _RW::__rw_facet (__ref)
{
@@ -1112,7 +1108,7 @@
/* virtual */ codecvt_base::result
-codecvt<wchar_t, char, mbstate_t>::
+codecvt<wchar_t, char, _RWSTD_MBSTATE_T>::
do_out (state_type &state,
const intern_type *from,
const intern_type *from_end,
@@ -1159,7 +1155,7 @@
/* virtual */ codecvt_base::result
-codecvt<wchar_t, char, mbstate_t>::
+codecvt<wchar_t, char, _RWSTD_MBSTATE_T>::
do_in (state_type &state,
const extern_type *from,
const extern_type *from_end,
@@ -1198,7 +1194,7 @@
/* virtual */ codecvt_base::result
-codecvt<wchar_t, char, mbstate_t>::
+codecvt<wchar_t, char, _RWSTD_MBSTATE_T>::
do_unshift (state_type &state,
extern_type *to,
extern_type *to_end,
@@ -1224,7 +1220,7 @@
/* virtual */ int
-codecvt<wchar_t, char, mbstate_t>::
+codecvt<wchar_t, char, _RWSTD_MBSTATE_T>::
do_length (state_type &state,
const extern_type *from,
const extern_type *from_end,
@@ -1249,9 +1245,9 @@
// codecvt_byname <wchar,char> specialization
-codecvt_byname<wchar_t, char, mbstate_t>::
+codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>::
codecvt_byname (const char *name, _RWSTD_SIZE_T ref)
- : codecvt<wchar_t, char, mbstate_t>(ref)
+ : codecvt<wchar_t, char, _RWSTD_MBSTATE_T>(ref)
{
_C_flags = _RW::__rw_encoding_from_name (name);
@@ -1379,7 +1375,7 @@
/* virtual */ codecvt_base::result
-codecvt_byname<wchar_t, char, mbstate_t>::
+codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>::
do_in (state_type& state,
const extern_type* from,
const extern_type* from_end,
@@ -1465,7 +1461,7 @@
/* virtual */ codecvt_base::result
-codecvt_byname<wchar_t, char, mbstate_t>::
+codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>::
do_out (state_type &state,
const intern_type *from,
const intern_type *from_end,
@@ -1547,7 +1543,7 @@
/* virtual */ codecvt_base::result
-codecvt_byname<wchar_t, char, mbstate_t>::
+codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>::
do_unshift (state_type& state,
extern_type* to,
extern_type* to_limit,
@@ -1611,7 +1607,7 @@
/* virtual */ int
-codecvt_byname<wchar_t, char, mbstate_t>::
+codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>::
do_length (state_type& state,
const extern_type *from,
const extern_type *from_end,
@@ -1677,7 +1673,7 @@
/* virtual */ int
-codecvt_byname<wchar_t, char, mbstate_t>::
+codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>::
do_encoding () const _THROWS (())
{
@@ -1750,7 +1746,7 @@
/* virtual */ int
-codecvt_byname<wchar_t, char, mbstate_t>::
+codecvt_byname<wchar_t, char, _RWSTD_MBSTATE_T>::
do_max_length () const _THROWS (())
{
// returns the max value do_length (s, from, from_end, 1) can return
@@ -1800,13 +1796,11 @@
} // namespace _V3_LOCALE
-# ifndef _RWSTD_NO_WCHAR_T
+#ifndef _RWSTD_NO_WCHAR_T
-# define TARGS_W <wchar_t, char, MBStateT>
+# define TARGS_W <wchar_t, char, _RWSTD_MBSTATE_T>
_RWSTD_DEFINE_FACET_FACTORY (static, codecvt, TARGS_W, wcodecvt);
_RWSTD_SPECIALIZE_USE_FACET (wcodecvt);
-# endif // _RWSTD_NO_WCHAR_T
-
-#endif // _RWSTD_NO_V3_LOCALE
+#endif // _RWSTD_NO_WCHAR_T