Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 288 of file locale_impl.cpp.
Referenced by locale::locale().
{ if (name[0] == 0) name = _Locale_time_default(buf); if (name == 0 || name[0] == 0 || is_C_locale_name(name)) { _Locale_impl* i2 = locale::classic()._M_impl; this->insert(i2, time_get<char, istreambuf_iterator<char, char_traits<char> > >::id); this->insert(i2, time_put<char, ostreambuf_iterator<char, char_traits<char> > >::id); #ifndef _STLP_NO_WCHAR_T this->insert(i2, time_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id); this->insert(i2, time_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id); #endif } else { locale::facet *get = 0; locale::facet *put = 0; #ifndef _STLP_NO_WCHAR_T locale::facet *wget = 0; locale::facet *wput = 0; #endif int __err_code; _Locale_time *__time = _STLP_PRIV __acquire_time(name, buf, hint, &__err_code); if (!__time) { // time facets category is not mandatory for correct stream behavior so if platform // do not support it we do not generate a runtime_error exception. if (__err_code == _STLP_LOC_NO_MEMORY) { _STLP_THROW_BAD_ALLOC; } return hint; } if (!hint) hint = _Locale_get_time_hint(__time); _STLP_TRY { get = new time_get_byname<char, istreambuf_iterator<char, char_traits<char> > >(__time); put = new time_put_byname<char, ostreambuf_iterator<char, char_traits<char> > >(__time); #ifndef _STLP_NO_WCHAR_T wget = new time_get_byname<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >(__time); wput = new time_put_byname<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >(__time); #endif } #ifndef _STLP_NO_WCHAR_T _STLP_UNWIND(delete wget; delete put; delete get; _STLP_PRIV __release_time(__time)); #else _STLP_UNWIND(delete get; _STLP_PRIV __release_time(__time)); #endif _STLP_PRIV __release_time(__time); this->insert(get, time_get<char, istreambuf_iterator<char, char_traits<char> > >::id); this->insert(put, time_put<char, ostreambuf_iterator<char, char_traits<char> > >::id); #ifndef _STLP_NO_WCHAR_T this->insert(wget, time_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id); this->insert(wput, time_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id); #endif } return hint; }