1169691Skan// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 2132720Skan// Free Software Foundation, Inc. 3132720Skan// 4132720Skan// This file is part of the GNU ISO C++ Library. This library is free 5132720Skan// software; you can redistribute it and/or modify it under the 6132720Skan// terms of the GNU General Public License as published by the 7132720Skan// Free Software Foundation; either version 2, or (at your option) 8132720Skan// any later version. 9132720Skan 10132720Skan// This library is distributed in the hope that it will be useful, 11132720Skan// but WITHOUT ANY WARRANTY; without even the implied warranty of 12132720Skan// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13132720Skan// GNU General Public License for more details. 14132720Skan 15132720Skan// You should have received a copy of the GNU General Public License along 16132720Skan// with this library; see the file COPYING. If not, write to the Free 17169691Skan// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18132720Skan// USA. 19132720Skan 20132720Skan// As a special exception, you may use this file as part of a free software 21132720Skan// library without restriction. Specifically, if other files instantiate 22132720Skan// templates or use macros or inline functions from this file, or you compile 23132720Skan// this file and link it with other files to produce an executable, this 24132720Skan// file does not by itself cause the resulting executable to be covered by 25132720Skan// the GNU General Public License. This exception does not however 26132720Skan// invalidate any other reasons why the executable file might be covered by 27132720Skan// the GNU General Public License. 28132720Skan 29132720Skan#include <locale> 30132720Skan 31169691Skan_GLIBCXX_BEGIN_NAMESPACE(std) 32169691Skan 33132720Skan // Definitions for static const data members of time_base. 34132720Skan template<> 35132720Skan const char* 36132720Skan __timepunct_cache<char>::_S_timezones[14] = 37132720Skan { 38132720Skan "GMT", "HST", "AKST", "PST", "MST", "CST", "EST", "AST", "NST", "CET", 39132720Skan "IST", "EET", "CST", "JST" 40132720Skan }; 41132720Skan 42132720Skan#ifdef _GLIBCXX_USE_WCHAR_T 43132720Skan template<> 44132720Skan const wchar_t* 45132720Skan __timepunct_cache<wchar_t>::_S_timezones[14] = 46132720Skan { 47132720Skan L"GMT", L"HST", L"AKST", L"PST", L"MST", L"CST", L"EST", L"AST", 48132720Skan L"NST", L"CET", L"IST", L"EET", L"CST", L"JST" 49132720Skan }; 50132720Skan#endif 51132720Skan 52132720Skan // Definitions for static const data members of money_base. 53132720Skan const money_base::pattern 54132720Skan money_base::_S_default_pattern = { {symbol, sign, none, value} }; 55132720Skan 56132720Skan const char* money_base::_S_atoms = "-0123456789"; 57132720Skan 58132720Skan const char* __num_base::_S_atoms_in = "-+xX0123456789abcdefABCDEF"; 59132720Skan const char* __num_base::_S_atoms_out ="-+xX0123456789abcdef0123456789ABCDEF"; 60132720Skan 61132720Skan // _GLIBCXX_RESOLVE_LIB_DEFECTS 62132720Skan // According to the resolution of DR 231, about 22.2.2.2.2, p11, 63132720Skan // "str.precision() is specified in the conversion specification". 64132720Skan void 65132720Skan __num_base::_S_format_float(const ios_base& __io, char* __fptr, char __mod) 66132720Skan { 67132720Skan ios_base::fmtflags __flags = __io.flags(); 68132720Skan *__fptr++ = '%'; 69132720Skan // [22.2.2.2.2] Table 60 70132720Skan if (__flags & ios_base::showpos) 71132720Skan *__fptr++ = '+'; 72132720Skan if (__flags & ios_base::showpoint) 73132720Skan *__fptr++ = '#'; 74132720Skan 75132720Skan // As per DR 231: _always_, not only when 76132720Skan // __flags & ios_base::fixed || __prec > 0 77132720Skan *__fptr++ = '.'; 78132720Skan *__fptr++ = '*'; 79132720Skan 80132720Skan if (__mod) 81132720Skan *__fptr++ = __mod; 82132720Skan ios_base::fmtflags __fltfield = __flags & ios_base::floatfield; 83132720Skan // [22.2.2.2.2] Table 58 84132720Skan if (__fltfield == ios_base::fixed) 85132720Skan *__fptr++ = 'f'; 86132720Skan else if (__fltfield == ios_base::scientific) 87132720Skan *__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e'; 88132720Skan else 89132720Skan *__fptr++ = (__flags & ios_base::uppercase) ? 'G' : 'g'; 90132720Skan *__fptr = '\0'; 91132720Skan } 92132720Skan 93169691Skan_GLIBCXX_END_NAMESPACE 94169691Skan 95