]>
Commit | Line | Data |
---|---|---|
0214010c BK |
1 | // Wrapper for underlying C-language localization -*- C++ -*- |
2 | ||
32ade559 | 3 | // Copyright (C) 2001, 2002, 2009, 2010 Free Software Foundation, Inc. |
0214010c BK |
4 | // |
5 | // This file is part of the GNU ISO C++ Library. This library is free | |
6 | // software; you can redistribute it and/or modify it under the | |
7 | // terms of the GNU General Public License as published by the | |
748086b7 | 8 | // Free Software Foundation; either version 3, or (at your option) |
0214010c BK |
9 | // any later version. |
10 | ||
11 | // This library is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | ||
748086b7 JJ |
16 | // Under Section 7 of GPL version 3, you are granted additional |
17 | // permissions described in the GCC Runtime Library Exception, version | |
18 | // 3.1, as published by the Free Software Foundation. | |
0214010c | 19 | |
748086b7 JJ |
20 | // You should have received a copy of the GNU General Public License and |
21 | // a copy of the GCC Runtime Library Exception along with this program; | |
22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
23 | // <http://www.gnu.org/licenses/>. | |
0214010c BK |
24 | |
25 | // | |
26 | // ISO C++ 14882: 22.8 Standard locale categories. | |
27 | // | |
28 | ||
29 | // Written by Benjamin Kosnik <bkoz@redhat.com> | |
30 | ||
31 | #include <locale> | |
0214010c | 32 | |
12ffa228 | 33 | namespace std _GLIBCXX_VISIBILITY(default) |
0214010c BK |
34 | { |
35 | void | |
d3a193e3 | 36 | locale::facet::_S_create_c_locale(__c_locale&, const char*, __c_locale*) |
0214010c BK |
37 | { } |
38 | ||
39 | void | |
33590f13 | 40 | locale::facet::_S_destroy_c_locale(__c_locale&) |
0214010c BK |
41 | { } |
42 | ||
33590f13 | 43 | __c_locale |
32ade559 | 44 | locale::facet::_S_clone_c_locale(__c_locale&) throw() |
33590f13 BK |
45 | { return __c_locale(); } |
46 | ||
0214010c BK |
47 | template<> |
48 | void | |
33590f13 | 49 | numpunct<char>::_M_initialize_numpunct(__c_locale) |
0214010c BK |
50 | { |
51 | // "C" locale | |
52 | _M_decimal_point = '.'; | |
53 | _M_thousands_sep = ','; | |
54 | _M_grouping = ""; | |
55 | _M_truename = "true"; | |
56 | _M_falsename = "false"; | |
57 | } | |
58 | ||
3d7c150e | 59 | #ifdef _GLIBCXX_USE_WCHAR_T |
0214010c BK |
60 | template<> |
61 | void | |
33590f13 | 62 | numpunct<wchar_t>::_M_initialize_numpunct(__c_locale) |
0214010c BK |
63 | { |
64 | // "C" locale | |
65 | _M_decimal_point = L'.'; | |
66 | _M_thousands_sep = L','; | |
67 | _M_grouping = ""; | |
68 | _M_truename = L"true"; | |
69 | _M_falsename = L"false"; | |
70 | } | |
71 | #endif | |
72 | ||
73 | template<> | |
74 | void | |
33590f13 | 75 | moneypunct<char>::_M_initialize_moneypunct(__c_locale) |
0214010c BK |
76 | { |
77 | // "C" locale | |
78 | _M_decimal_point = '.'; | |
79 | _M_thousands_sep = ','; | |
80 | _M_grouping = ""; | |
81 | _M_curr_symbol = string_type(); | |
82 | _M_positive_sign = string_type(); | |
83 | _M_negative_sign = string_type(); | |
84 | _M_frac_digits = 0; | |
85 | _M_pos_format = money_base::_S_default_pattern; | |
86 | _M_neg_format = money_base::_S_default_pattern; | |
87 | } | |
88 | ||
3d7c150e | 89 | #ifdef _GLIBCXX_USE_WCHAR_T |
0214010c BK |
90 | template<> |
91 | void | |
33590f13 | 92 | moneypunct<wchar_t>::_M_initialize_moneypunct(__c_locale) |
0214010c BK |
93 | { |
94 | // "C" locale | |
95 | _M_decimal_point = L'.'; | |
96 | _M_thousands_sep = L','; | |
97 | _M_grouping = ""; | |
98 | _M_curr_symbol = string_type(); | |
99 | _M_positive_sign = string_type(); | |
100 | _M_negative_sign = string_type(); | |
101 | _M_frac_digits = 0; | |
102 | _M_pos_format = money_base::_S_default_pattern; | |
103 | _M_neg_format = money_base::_S_default_pattern; | |
104 | } | |
105 | #endif | |
106 | } // namespace std | |
33590f13 | 107 |