diff options
Diffstat (limited to 'libstdc++-v3/config/locale/gnu/codecvt_members.cc')
-rw-r--r-- | libstdc++-v3/config/locale/gnu/codecvt_members.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libstdc++-v3/config/locale/gnu/codecvt_members.cc b/libstdc++-v3/config/locale/gnu/codecvt_members.cc index 451d2195d69..dc1c5d6ba4d 100644 --- a/libstdc++-v3/config/locale/gnu/codecvt_members.cc +++ b/libstdc++-v3/config/locale/gnu/codecvt_members.cc @@ -41,7 +41,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #ifdef _GLIBCXX_USE_WCHAR_T codecvt_base::result codecvt<wchar_t, char, mbstate_t>:: - do_out(state_type& __state, const intern_type* __from, + do_out(state_type& __state, const intern_type* __from, const intern_type* __from_end, const intern_type*& __from_next, extern_type* __to, extern_type* __to_end, extern_type*& __to_next) const @@ -111,12 +111,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __uselocale(__old); #endif - return __ret; + return __ret; } - + codecvt_base::result codecvt<wchar_t, char, mbstate_t>:: - do_in(state_type& __state, const extern_type* __from, + do_in(state_type& __state, const extern_type* __from, const extern_type* __from_end, const extern_type*& __from_next, intern_type* __to, intern_type* __to_end, intern_type*& __to_next) const @@ -160,12 +160,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION break; } __from_next = __from; - __state = __tmp_state; + __state = __tmp_state; __ret = error; } else if (__from_next && __from_next < __from_chunk_end) { - // It is unclear what to return in this case (see DR 382). + // It is unclear what to return in this case (see DR 382). __to_next += __conv; __ret = partial; } @@ -180,7 +180,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (__to_next < __to_end) { // XXX Probably wrong for stateful encodings - __tmp_state = __state; + __tmp_state = __state; ++__from_next; *__to_next++ = L'\0'; } @@ -193,10 +193,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __uselocale(__old); #endif - return __ret; + return __ret; } - int + int codecvt<wchar_t, char, mbstate_t>:: do_encoding() const throw() { @@ -212,9 +212,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __uselocale(__old); #endif return __ret; - } + } - int + int codecvt<wchar_t, char, mbstate_t>:: do_max_length() const throw() { @@ -228,8 +228,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #endif return __ret; } - - int + + int codecvt<wchar_t, char, mbstate_t>:: do_length(state_type& __state, const extern_type* __from, const extern_type* __end, size_t __max) const @@ -244,10 +244,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // mbsnrtowcs is *very* fast but stops if encounters NUL characters: // in case we advance past it and then continue, in a loop. // NB: mbsnrtowcs is a GNU extension - + // A dummy internal buffer is needed in order for mbsnrtocws to consider // its fourth parameter (it wouldn't with NULL as first parameter). - wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) + wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t) * __max)); while (__from < __end && __max) { @@ -281,7 +281,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } if (!__from) __from = __from_chunk_end; - + __ret += __from - __tmp_from; __max -= __conv; @@ -299,7 +299,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __uselocale(__old); #endif - return __ret; + return __ret; } #endif |