35#if __DECCXX_VER >= 60300000 && __DECCXX_VER < 60400000
43# define _RWSTD_NO_ICONV_CONST_CHAR
53#if defined (__SUNPRO_CC) && __SUNPRO_CC <= 0x540 \
54 && (defined (__SunOS_5_8) || defined (__SunOS_5_9))
74__rw_mbsinit (
const StateT *ps)
76#ifndef _RWSTD_NO_MBSINIT
78 return ::mbsinit (ps);
84 return !ps || 0 == memcmp (ps, &state,
sizeof state);
97_RW::__rw_facet_id codecvt<char, char, _RWSTD_MBSTATE_T>::id;
100codecvt<char, char, _RWSTD_MBSTATE_T>::
101codecvt (
size_t refs )
102 : _RW::__rw_facet (refs), _C_always_noconv (-1)
110 codecvt<char, char, _RWSTD_MBSTATE_T>::
118codecvt<char, char, _RWSTD_MBSTATE_T>::
119do_out (state_type &state,
120 const intern_type *from,
121 const intern_type *from_end,
122 const intern_type *&from_next,
125 extern_type *&to_next)
const
140 const int mbstate_valid = _RW::__rw_mbsinit (&state);
152 if (always_noconv ())
155 const _RWSTD_SIZE_T nfrom = from_end - from;
156 const _RWSTD_SIZE_T nto = to_end - to;
158 const _RWSTD_SIZE_T nconv = nfrom < nto ? nfrom : nto;
161 memmove (to, from, nconv);
169 return nto < nfrom ? partial : ok;
174codecvt<char, char, _RWSTD_MBSTATE_T>::
175do_in (state_type &state,
176 const extern_type *from,
177 const extern_type *from_end,
178 const extern_type *&from_next,
181 intern_type *&to_next)
const
189 typedef codecvt<char, char, _RWSTD_MBSTATE_T> This;
192 return This::do_out (state,
193 from, from_end, from_next,
194 to, to_end, to_next);
199codecvt<char, char, _RWSTD_MBSTATE_T>::
200do_unshift (state_type &state,
203 extern_type *&to_next)
const
214 const int mbstate_valid = _RW::__rw_mbsinit (&state);
217 return mbstate_valid ? noconv : error;
222codecvt<char, char, _RWSTD_MBSTATE_T>::
223do_encoding ()
const _THROWS (())
230codecvt<char, char, _RWSTD_MBSTATE_T>::
231do_always_noconv ()
const _THROWS (())
239codecvt<char, char, _RWSTD_MBSTATE_T>::
240do_length (state_type &state,
241 const extern_type *from,
242 const extern_type *from_end,
243 _RWSTD_SIZE_T imax)
const
251 const int mbstate_valid = _RW::__rw_mbsinit (&state);
258 const _RWSTD_SIZE_T
len = from_end - from;
259 return int (
len < imax ?
len : imax);
264codecvt<char, char, _RWSTD_MBSTATE_T>::
265do_max_length ()
const _THROWS (())
271codecvt_byname<char, char, _RWSTD_MBSTATE_T>::
272codecvt_byname (
const char *
name,
size_t ref)
273 : codecvt <intern_type, extern_type, state_type> (ref)
275 _C_set_name (
name, _C_namebuf,
sizeof _C_namebuf);
281 codecvt_byname<char, char, _RWSTD_MBSTATE_T>::
290#define TARGS_C <char, char, _RWSTD_MBSTATE_T>
#define _RWSTD_UNUSED(arg)
#define _RWSTD_NAMESPACE(name)
#define _RWSTD_ASSERT(ignore)
#define _RWSTD_SPECIALIZE_USE_FACET(fid)
#define _RWSTD_DEFINE_FACET_FACTORY(Linkage, Facet, TArgs, fid)