197403Sobrien// Wrapper for underlying C-language localization -*- C++ -*-
297403Sobrien
397403Sobrien// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
497403Sobrien//
597403Sobrien// This file is part of the GNU ISO C++ Library.  This library is free
697403Sobrien// software; you can redistribute it and/or modify it under the
797403Sobrien// terms of the GNU General Public License as published by the
897403Sobrien// Free Software Foundation; either version 2, or (at your option)
997403Sobrien// any later version.
1097403Sobrien
1197403Sobrien// This library is distributed in the hope that it will be useful,
1297403Sobrien// but WITHOUT ANY WARRANTY; without even the implied warranty of
1397403Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1497403Sobrien// GNU General Public License for more details.
1597403Sobrien
1697403Sobrien// You should have received a copy of the GNU General Public License along
1797403Sobrien// with this library; see the file COPYING.  If not, write to the Free
18169691Skan// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
1997403Sobrien// USA.
2097403Sobrien
2197403Sobrien// As a special exception, you may use this file as part of a free software
2297403Sobrien// library without restriction.  Specifically, if other files instantiate
2397403Sobrien// templates or use macros or inline functions from this file, or you compile
2497403Sobrien// this file and link it with other files to produce an executable, this
2597403Sobrien// file does not by itself cause the resulting executable to be covered by
2697403Sobrien// the GNU General Public License.  This exception does not however
2797403Sobrien// invalidate any other reasons why the executable file might be covered by
2897403Sobrien// the GNU General Public License.
2997403Sobrien
3097403Sobrien//
3197403Sobrien// ISO C++ 14882: 22.8  Standard locale categories.
3297403Sobrien//
3397403Sobrien
3497403Sobrien// Written by Benjamin Kosnik <bkoz@redhat.com>
3597403Sobrien
3697403Sobrien#include <locale>
3797403Sobrien
3897403Sobriennamespace std
3997403Sobrien{
4097403Sobrien  void
4197403Sobrien  locale::facet::_S_create_c_locale(__c_locale&, const char*, __c_locale*)
4297403Sobrien  { }
4397403Sobrien
4497403Sobrien  void
4597403Sobrien  locale::facet::_S_destroy_c_locale(__c_locale&)
4697403Sobrien  { }
4797403Sobrien
4897403Sobrien  __c_locale
4997403Sobrien  locale::facet::_S_clone_c_locale(__c_locale&)
5097403Sobrien  { return __c_locale(); }
5197403Sobrien
5297403Sobrien  template<>
5397403Sobrien    void
5497403Sobrien    numpunct<char>::_M_initialize_numpunct(__c_locale)
5597403Sobrien    {
5697403Sobrien      // "C" locale
5797403Sobrien      _M_decimal_point = '.';
5897403Sobrien      _M_thousands_sep = ',';
5997403Sobrien      _M_grouping = "";
6097403Sobrien      _M_truename = "true";
6197403Sobrien      _M_falsename = "false";
6297403Sobrien    }
6397403Sobrien
64132720Skan#ifdef _GLIBCXX_USE_WCHAR_T
6597403Sobrien  template<>
6697403Sobrien    void
6797403Sobrien    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale)
6897403Sobrien    {
6997403Sobrien      // "C" locale
7097403Sobrien      _M_decimal_point = L'.';
7197403Sobrien      _M_thousands_sep = L',';
7297403Sobrien      _M_grouping = "";
7397403Sobrien      _M_truename = L"true";
7497403Sobrien      _M_falsename = L"false";
7597403Sobrien    }
7697403Sobrien#endif
7797403Sobrien
7897403Sobrien  template<>
7997403Sobrien    void
8097403Sobrien    moneypunct<char>::_M_initialize_moneypunct(__c_locale)
8197403Sobrien    {
8297403Sobrien      // "C" locale
8397403Sobrien      _M_decimal_point = '.';
8497403Sobrien      _M_thousands_sep = ',';
8597403Sobrien      _M_grouping = "";
8697403Sobrien      _M_curr_symbol = string_type();
8797403Sobrien      _M_positive_sign = string_type();
8897403Sobrien      _M_negative_sign = string_type();
8997403Sobrien      _M_frac_digits = 0;
9097403Sobrien      _M_pos_format = money_base::_S_default_pattern;
9197403Sobrien      _M_neg_format = money_base::_S_default_pattern;
9297403Sobrien    }
9397403Sobrien
94132720Skan#ifdef _GLIBCXX_USE_WCHAR_T
9597403Sobrien  template<>
9697403Sobrien    void
9797403Sobrien    moneypunct<wchar_t>::_M_initialize_moneypunct(__c_locale)
9897403Sobrien    {
9997403Sobrien      // "C" locale
10097403Sobrien      _M_decimal_point = L'.';
10197403Sobrien      _M_thousands_sep = L',';
10297403Sobrien      _M_grouping = "";
10397403Sobrien      _M_curr_symbol = string_type();
10497403Sobrien      _M_positive_sign = string_type();
10597403Sobrien      _M_negative_sign = string_type();
10697403Sobrien      _M_frac_digits = 0;
10797403Sobrien      _M_pos_format = money_base::_S_default_pattern;
10897403Sobrien      _M_neg_format = money_base::_S_default_pattern;
10997403Sobrien    }
11097403Sobrien#endif
11197403Sobrien}  // namespace std
11297403Sobrien
113