| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
namespace std _GLIBCXX_VISIBILITY(default) |
| 39 |
{ |
| 40 |
_GLIBCXX_BEGIN_NAMESPACE_VERSION |
| 41 |
|
| 42 |
template<typename _CharT> |
| 43 |
__timepunct<_CharT>::__timepunct(size_t __refs) |
| 44 |
: facet(__refs), _M_data(0), _M_c_locale_timepunct(0), |
| 45 |
_M_name_timepunct(_S_get_c_name()) |
| 46 |
{ _M_initialize_timepunct(); } |
| 47 |
|
| 48 |
template<typename _CharT> |
| 49 |
__timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs) |
| 50 |
: facet(__refs), _M_data(__cache), _M_c_locale_timepunct(0), |
| 51 |
_M_name_timepunct(_S_get_c_name()) |
| 52 |
{ _M_initialize_timepunct(); } |
| 53 |
|
| 54 |
template<typename _CharT> |
| 55 |
__timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s, |
| 56 |
size_t __refs) |
| 57 |
: facet(__refs), _M_data(0), _M_c_locale_timepunct(0), |
| 58 |
_M_name_timepunct(0) |
| 59 |
{ |
| 60 |
if (__builtin_strcmp(__s, _S_get_c_name()) != 0) |
| 61 |
{ |
| 62 |
const size_t __len = __builtin_strlen(__s) + 1; |
| 63 |
char* __tmp = new char[__len]; |
| 64 |
__builtin_memcpy(__tmp, __s, __len); |
| 65 |
_M_name_timepunct = __tmp; |
| 66 |
} |
| 67 |
else |
| 68 |
_M_name_timepunct = _S_get_c_name(); |
| 69 |
|
| 70 |
__try |
| 71 |
{ _M_initialize_timepunct(__cloc); } |
| 72 |
__catch(...) |
| 73 |
{ |
| 74 |
if (_M_name_timepunct != _S_get_c_name()) |
| 75 |
delete [] _M_name_timepunct; |
| 76 |
__throw_exception_again; |
| 77 |
} |
| 78 |
} |
| 79 |
|
| 80 |
template<typename _CharT> |
| 81 |
__timepunct<_CharT>::~__timepunct() |
| 82 |
{ |
| 83 |
if (_M_name_timepunct != _S_get_c_name()) |
| 84 |
delete [] _M_name_timepunct; |
| 85 |
delete _M_data; |
| 86 |
_S_destroy_c_locale(_M_c_locale_timepunct); |
| 87 |
} |
| 88 |
|
| 89 |
|
| 90 |
template<> |
| 91 |
__timepunct<wchar_t>::~__timepunct(); |
| 92 |
|
| 93 |
|
| 94 |
_GLIBCXX_END_NAMESPACE_VERSION |
| 95 |
} |