1*404b540aSrobert // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
2*404b540aSrobert // Free Software Foundation, Inc.
3*404b540aSrobert //
4*404b540aSrobert // This file is part of the GNU ISO C++ Library.  This library is free
5*404b540aSrobert // software; you can redistribute it and/or modify it under the
6*404b540aSrobert // terms of the GNU General Public License as published by the
7*404b540aSrobert // Free Software Foundation; either version 2, or (at your option)
8*404b540aSrobert // any later version.
9*404b540aSrobert 
10*404b540aSrobert // This library is distributed in the hope that it will be useful,
11*404b540aSrobert // but WITHOUT ANY WARRANTY; without even the implied warranty of
12*404b540aSrobert // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*404b540aSrobert // GNU General Public License for more details.
14*404b540aSrobert 
15*404b540aSrobert // You should have received a copy of the GNU General Public License along
16*404b540aSrobert // with this library; see the file COPYING.  If not, write to the Free
17*404b540aSrobert // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18*404b540aSrobert // USA.
19*404b540aSrobert 
20*404b540aSrobert // As a special exception, you may use this file as part of a free software
21*404b540aSrobert // library without restriction.  Specifically, if other files instantiate
22*404b540aSrobert // templates or use macros or inline functions from this file, or you compile
23*404b540aSrobert // this file and link it with other files to produce an executable, this
24*404b540aSrobert // file does not by itself cause the resulting executable to be covered by
25*404b540aSrobert // the GNU General Public License.  This exception does not however
26*404b540aSrobert // invalidate any other reasons why the executable file might be covered by
27*404b540aSrobert // the GNU General Public License.
28*404b540aSrobert 
29*404b540aSrobert #include <locale>
30*404b540aSrobert 
31*404b540aSrobert _GLIBCXX_BEGIN_NAMESPACE(std)
32*404b540aSrobert 
33*404b540aSrobert   // Definitions for static const data members of time_base.
34*404b540aSrobert   template<>
35*404b540aSrobert     const char*
36*404b540aSrobert     __timepunct_cache<char>::_S_timezones[14] =
37*404b540aSrobert     {
38*404b540aSrobert       "GMT", "HST", "AKST", "PST", "MST", "CST", "EST", "AST", "NST", "CET",
39*404b540aSrobert       "IST", "EET", "CST", "JST"
40*404b540aSrobert     };
41*404b540aSrobert 
42*404b540aSrobert #ifdef _GLIBCXX_USE_WCHAR_T
43*404b540aSrobert   template<>
44*404b540aSrobert     const wchar_t*
45*404b540aSrobert     __timepunct_cache<wchar_t>::_S_timezones[14] =
46*404b540aSrobert     {
47*404b540aSrobert       L"GMT", L"HST", L"AKST", L"PST", L"MST", L"CST", L"EST", L"AST",
48*404b540aSrobert       L"NST", L"CET", L"IST", L"EET", L"CST", L"JST"
49*404b540aSrobert     };
50*404b540aSrobert #endif
51*404b540aSrobert 
52*404b540aSrobert   // Definitions for static const data members of money_base.
53*404b540aSrobert   const money_base::pattern
54*404b540aSrobert   money_base::_S_default_pattern =  { {symbol, sign, none, value} };
55*404b540aSrobert 
56*404b540aSrobert   const char* money_base::_S_atoms = "-0123456789";
57*404b540aSrobert 
58*404b540aSrobert   const char* __num_base::_S_atoms_in = "-+xX0123456789abcdefABCDEF";
59*404b540aSrobert   const char* __num_base::_S_atoms_out ="-+xX0123456789abcdef0123456789ABCDEF";
60*404b540aSrobert 
61*404b540aSrobert   // _GLIBCXX_RESOLVE_LIB_DEFECTS
62*404b540aSrobert   // According to the resolution of DR 231, about 22.2.2.2.2, p11,
63*404b540aSrobert   // "str.precision() is specified in the conversion specification".
64*404b540aSrobert   void
_S_format_float(const ios_base & __io,char * __fptr,char __mod)65*404b540aSrobert   __num_base::_S_format_float(const ios_base& __io, char* __fptr, char __mod)
66*404b540aSrobert   {
67*404b540aSrobert     ios_base::fmtflags __flags = __io.flags();
68*404b540aSrobert     *__fptr++ = '%';
69*404b540aSrobert     // [22.2.2.2.2] Table 60
70*404b540aSrobert     if (__flags & ios_base::showpos)
71*404b540aSrobert       *__fptr++ = '+';
72*404b540aSrobert     if (__flags & ios_base::showpoint)
73*404b540aSrobert       *__fptr++ = '#';
74*404b540aSrobert 
75*404b540aSrobert     // As per DR 231: _always_, not only when
76*404b540aSrobert     // __flags & ios_base::fixed || __prec > 0
77*404b540aSrobert     *__fptr++ = '.';
78*404b540aSrobert     *__fptr++ = '*';
79*404b540aSrobert 
80*404b540aSrobert     if (__mod)
81*404b540aSrobert       *__fptr++ = __mod;
82*404b540aSrobert     ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
83*404b540aSrobert     // [22.2.2.2.2] Table 58
84*404b540aSrobert     if (__fltfield == ios_base::fixed)
85*404b540aSrobert       *__fptr++ = 'f';
86*404b540aSrobert     else if (__fltfield == ios_base::scientific)
87*404b540aSrobert       *__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
88*404b540aSrobert     else
89*404b540aSrobert       *__fptr++ = (__flags & ios_base::uppercase) ? 'G' : 'g';
90*404b540aSrobert     *__fptr = '\0';
91*404b540aSrobert   }
92*404b540aSrobert 
93*404b540aSrobert _GLIBCXX_END_NAMESPACE
94*404b540aSrobert 
95