summaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/locale-inst.cc
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-11 21:55:49 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-11 21:55:49 +0000
commit9e1f287f147299b670b89674a432688ad639dbc7 (patch)
treeae05f85f062db887de7dda075837f8e2c8f428a7 /libstdc++-v3/src/locale-inst.cc
parent3370e9b1f636ef0bc06ac09779d415cea5bb24d6 (diff)
downloadgcc-9e1f287f147299b670b89674a432688ad639dbc7.tar.gz
2003-02-11 Jerry Quinn <jlquinn@optonline.net>
Benjamin Kosnik <benjamin@redhat.com> * include/bits/locale_facets.h (__num_base): Add _S_atoms_out. Add indexes into this array. (__num_base::_S_atoms): To _S_atoms_in. (num_put::_M_insert): Rename to _M_pad. (num_put::_M_convert_int): Adjust remove __mod, __modl arguments. (num_put::_M_widen_int): Rename to _M_group_int. (num_put::_M_widen_float): Rename to _M_group_float. * include/bits/locale_facets.tcc (__int_to_char): New inline function and adapter functions. (num_put::_M_group_int): Streamline. (num_put::_M_group_float): Streamline. (num_put::_M_convert_int): Remove unused parameter names. Choose large enough buffer for text. Use __int_to_char instead of __convert_from_v. Formatted text is now at the end of the buffer. (num_put::_M_convert_float): Preliminary fixups. * src/locale-inst.cc (__convert_from_v<long long>): Add ifdef. (__int_to_char<unsigned long long>): Same. (__int_to_char<char, unsigned long>): New. (__int_to_char<char, unsigned long long>): New. (__int_to_char<wchar_t, unsigned long>): New. (__int_to_char<wchar_t, unsigned long long>): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62731 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src/locale-inst.cc')
-rw-r--r--libstdc++-v3/src/locale-inst.cc58
1 files changed, 43 insertions, 15 deletions
diff --git a/libstdc++-v3/src/locale-inst.cc b/libstdc++-v3/src/locale-inst.cc
index 8f2c8638177..954e5170998 100644
--- a/libstdc++-v3/src/locale-inst.cc
+++ b/libstdc++-v3/src/locale-inst.cc
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -64,26 +64,26 @@ namespace std
template
ostreambuf_iterator<char>
num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
+ _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
long) const;
template
ostreambuf_iterator<char>
num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
+ _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
unsigned long) const;
#ifdef _GLIBCPP_USE_LONG_LONG
template
ostreambuf_iterator<char>
num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
+ _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
long long) const;
template
ostreambuf_iterator<char>
num_put<char, ostreambuf_iterator<char> >::
- _M_convert_int(ostreambuf_iterator<char>, ios_base&, char, char, char,
+ _M_convert_int(ostreambuf_iterator<char>, ios_base&, char,
unsigned long long) const;
#endif
@@ -97,8 +97,8 @@ namespace std
ostreambuf_iterator<char>
num_put<char, ostreambuf_iterator<char> >::
_M_convert_float(ostreambuf_iterator<char>, ios_base&, char, char,
- long double) const;
-
+ long double) const;
+
#ifdef _GLIBCPP_USE_WCHAR_T
template class numpunct<wchar_t>;
template class numpunct_byname<wchar_t>;
@@ -108,27 +108,27 @@ namespace std
template
ostreambuf_iterator<wchar_t>
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- char, long) const;
+ _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
+ long) const;
template
ostreambuf_iterator<wchar_t>
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- char, unsigned long) const;
+ _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
+ unsigned long) const;
#ifdef _GLIBCPP_USE_LONG_LONG
template
ostreambuf_iterator<wchar_t>
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- char, long long) const;
+ _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
+ long long) const;
template
ostreambuf_iterator<wchar_t>
num_put<wchar_t, ostreambuf_iterator<wchar_t> >::
- _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t, char,
- char, unsigned long long) const;
+ _M_convert_int(ostreambuf_iterator<wchar_t>, ios_base&, wchar_t,
+ unsigned long long) const;
#endif
template
@@ -451,6 +451,7 @@ namespace std
__convert_from_v(char*, const int, const char*, unsigned long,
const __c_locale&, int);
+#ifdef _GLIBCPP_USE_LONG_LONG
template
int
__convert_from_v(char*, const int, const char*, long long,
@@ -460,4 +461,31 @@ namespace std
int
__convert_from_v(char*, const int, const char*, unsigned long long,
const __c_locale&, int);
+#endif
+
+ template
+ int
+ __int_to_char(char*, const int, unsigned long, const char*,
+ ios_base::fmtflags, bool);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+ template
+ int
+ __int_to_char(wchar_t*, const int, unsigned long, const wchar_t*,
+ ios_base::fmtflags, bool);
+#endif
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+ template
+ int
+ __int_to_char(char*, const int, unsigned long long, const char*,
+ ios_base::fmtflags, bool);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+ template
+ int
+ __int_to_char(wchar_t*, const int, unsigned long long, const wchar_t*,
+ ios_base::fmtflags, bool);
+#endif
+#endif
} // namespace std