GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / arm-brcm-linux-uclibcgnueabi / include / c++ / 4.5.3 / arm-brcm-linux-uclibcgnueabi / bits / time_members.h
blobd06faf409b10e1a7c126eac55eaf45fa474a8ad6
1 // std::time_get, std::time_put implementation, generic version -*- C++ -*-
3 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4 // Free Software Foundation, Inc.
5 //
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
10 // any later version.
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // Under Section 7 of GPL version 3, you are granted additional
18 // permissions described in the GCC Runtime Library Exception, version
19 // 3.1, as published by the Free Software Foundation.
21 // You should have received a copy of the GNU General Public License and
22 // a copy of the GCC Runtime Library Exception along with this program;
23 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 // <http://www.gnu.org/licenses/>.
26 /** @file time_members.h
27 * This is an internal header file, included by other library headers.
28 * You should not attempt to use it directly.
32 // ISO C++ 14882: 22.2.5.1.2 - time_get functions
33 // ISO C++ 14882: 22.2.5.3.2 - time_put functions
36 // Written by Benjamin Kosnik <bkoz@redhat.com>
38 _GLIBCXX_BEGIN_NAMESPACE(std)
40 template<typename _CharT>
41 __timepunct<_CharT>::__timepunct(size_t __refs)
42 : facet(__refs), _M_data(NULL)
44 _M_name_timepunct = _S_get_c_name();
45 _M_initialize_timepunct();
48 template<typename _CharT>
49 __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
50 : facet(__refs), _M_data(__cache)
52 _M_name_timepunct = _S_get_c_name();
53 _M_initialize_timepunct();
56 template<typename _CharT>
57 __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
58 size_t __refs)
59 : facet(__refs), _M_data(NULL)
61 if (__builtin_strcmp(__s, _S_get_c_name()) != 0)
63 const size_t __len = __builtin_strlen(__s) + 1;
64 char* __tmp = new char[__len];
65 __builtin_memcpy(__tmp, __s, __len);
66 _M_name_timepunct = __tmp;
68 else
69 _M_name_timepunct = _S_get_c_name();
71 __try
72 { _M_initialize_timepunct(__cloc); }
73 __catch(...)
75 if (_M_name_timepunct != _S_get_c_name())
76 delete [] _M_name_timepunct;
77 __throw_exception_again;
81 template<typename _CharT>
82 __timepunct<_CharT>::~__timepunct()
84 if (_M_name_timepunct != _S_get_c_name())
85 delete [] _M_name_timepunct;
86 delete _M_data;
87 _S_destroy_c_locale(_M_c_locale_timepunct);
90 _GLIBCXX_END_NAMESPACE