acconfig.h: Remove _GLIBCXX_USE_LONG_DOUBLE entry, not used anymore.
authorPaolo Carlini <pcarlini@suse.de>
Fri, 16 Apr 2004 09:23:05 +0000 (09:23 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 16 Apr 2004 09:23:05 +0000 (09:23 +0000)
2004-04-16  Paolo Carlini  <pcarlini@suse.de>

* acconfig.h: Remove _GLIBCXX_USE_LONG_DOUBLE entry, not
used anymore.
* config.h.in: Regenerate.

2004-04-16  Paolo Carlini  <pcarlini@suse.de>

* config/locale/generic/monetary_members.cc
(moneypunct<wchar_t>::_M_initialize_moneypunct): Avoid calling
btowc unnecessarily, just cast to wchar_t (the concerned chars
all belong to the basic character set).
* config/locale/generic/numeric_members.cc
(numpunct<wchar_t>::_M_initialize_numpunct): Likewise.
* config/locale/gnu/monetary_members.cc
(moneypunct<wchar_t>::_M_initialize_moneypunct): Likewise.
* config/locale/gnu/numeric_members.cc
(numpunct<wchar_t>::_M_initialize_numpunct): Likewise.

From-SVN: r80746

libstdc++-v3/ChangeLog
libstdc++-v3/acconfig.h
libstdc++-v3/config.h.in
libstdc++-v3/config/locale/generic/monetary_members.cc
libstdc++-v3/config/locale/generic/numeric_members.cc
libstdc++-v3/config/locale/gnu/monetary_members.cc
libstdc++-v3/config/locale/gnu/numeric_members.cc

index 491f75d7d0cd54fa98ea20ee2b989506ceafb4da..9ef62bd2e1c1abd2f3ccbb13cb144b2fef4251b8 100644 (file)
@@ -1,3 +1,22 @@
+2004-04-16  Paolo Carlini  <pcarlini@suse.de>
+
+       * acconfig.h: Remove _GLIBCXX_USE_LONG_DOUBLE entry, not
+       used anymore.
+       * config.h.in: Regenerate.
+
+2004-04-16  Paolo Carlini  <pcarlini@suse.de>
+
+       * config/locale/generic/monetary_members.cc
+       (moneypunct<wchar_t>::_M_initialize_moneypunct): Avoid calling
+       btowc unnecessarily, just cast to wchar_t (the concerned chars
+       all belong to the basic character set).
+       * config/locale/generic/numeric_members.cc
+       (numpunct<wchar_t>::_M_initialize_numpunct): Likewise.
+       * config/locale/gnu/monetary_members.cc
+       (moneypunct<wchar_t>::_M_initialize_moneypunct): Likewise.
+       * config/locale/gnu/numeric_members.cc
+       (numpunct<wchar_t>::_M_initialize_numpunct): Likewise.
+
 2004-04-15  Paolo Carlini  <pcarlini@suse.de>
 
        * src/locale.cc (locale::operator==): When _M_impl == __rhs._M_impl
index cad2748bbdb52cdc9e70e90619130ef061bdeec2..c2a96c2248b0fd1237b02f537c2b03255bce2913 100644 (file)
@@ -13,9 +13,6 @@
 // Include I/O support for 'long long' and 'unsigned long long'.
 #undef _GLIBCXX_USE_LONG_LONG
 
-// Include support for 'long double'.
-#undef _GLIBCXX_USE_LONG_DOUBLE
-
 // Define if C99 math functions (like fpclassify) should be exposed.
 #undef _GLIBCXX_USE_C99_MATH
 
index bef3e8c82487c450f3bebf277bd40f5b3576f142..ecb29eb35dbd152928ad0aa0a841bfee1a3f6b29 100644 (file)
@@ -14,9 +14,6 @@
 // Include I/O support for 'long long' and 'unsigned long long'.
 #undef _GLIBCXX_USE_LONG_LONG
 
-// Include support for 'long double'.
-#undef _GLIBCXX_USE_LONG_DOUBLE
-
 // Define if C99 math functions (like fpclassify) should be exposed.
 #undef _GLIBCXX_USE_C99_MATH
 
index 957a326dbd42f22e23dec5243e0aea4d26d41eae..71ad6d218b1007f9f4d3393462f492754aa467da 100644 (file)
@@ -127,12 +127,9 @@ namespace std
       _M_data->_M_pos_format = money_base::_S_default_pattern;
       _M_data->_M_neg_format = money_base::_S_default_pattern;
 
-      unsigned char uc;
       for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-       {
-         uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
-         _M_data->_M_atoms[__i] = btowc(uc);
-       }
+       _M_data->_M_atoms[__i] =
+         static_cast<wchar_t>(money_base::_S_atoms[__i]);
     }
 
   template<> 
@@ -158,12 +155,9 @@ namespace std
       _M_data->_M_pos_format = money_base::_S_default_pattern;
       _M_data->_M_neg_format = money_base::_S_default_pattern;
 
-      unsigned char uc;
       for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-       {
-         uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
-         _M_data->_M_atoms[__i] = btowc(uc);
-       }
+       _M_data->_M_atoms[__i] =
+         static_cast<wchar_t>(money_base::_S_atoms[__i]);
     }
 
   template<> 
index e2afed9c193f950541360753b14e6cee35e93324..62017e02d178ad40a693c71f653b93714cbfd6f1 100644 (file)
@@ -59,9 +59,9 @@ namespace std
        _M_data->_M_atoms_in[__i] = __num_base::_S_atoms_in[__i];
 
       _M_data->_M_truename = "true";
-      _M_data->_M_truename_size = strlen(_M_data->_M_truename);
+      _M_data->_M_truename_size = 4;
       _M_data->_M_falsename = "false";
-      _M_data->_M_falsename_size = strlen(_M_data->_M_falsename);
+      _M_data->_M_falsename_size = 5;
     }
 
   template<> 
@@ -85,23 +85,18 @@ namespace std
       _M_data->_M_thousands_sep = L',';
       
       // Use ctype::widen code without the facet...
-      unsigned char uc;
       for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-       {
-         uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]);
-         _M_data->_M_atoms_out[__i] = btowc(uc);
-       }
+       _M_data->_M_atoms_out[__i] =
+         static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
       
       for (size_t __i = 0; __i < __num_base::_S_iend; ++__i)
-       {
-         uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__i]);
-         _M_data->_M_atoms_in[__i] = btowc(uc);
-       }
+       _M_data->_M_atoms_in[__i] =
+         static_cast<wchar_t>(__num_base::_S_atoms_in[__i]);
 
       _M_data->_M_truename = L"true";
-      _M_data->_M_truename_size = wcslen(_M_data->_M_truename);
+      _M_data->_M_truename_size = 4;
       _M_data->_M_falsename = L"false";
-      _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename);
+      _M_data->_M_falsename_size = 5;
     }
 
   template<> 
index 38d9c39969b75864765a27fa64643e102a3092fd..f1cb25fe58b7b425012c0fac2887cf599f2fb8f7 100644 (file)
@@ -372,12 +372,9 @@ namespace std
          _M_data->_M_neg_format = money_base::_S_default_pattern;
 
          // Use ctype::widen code without the facet...
-         unsigned char uc;
          for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-           {
-             uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
-             _M_data->_M_atoms[__i] = btowc(uc);
-           }
+           _M_data->_M_atoms[__i] =
+             static_cast<wchar_t>(money_base::_S_atoms[__i]);
        }
       else
        {
@@ -517,12 +514,9 @@ namespace std
          _M_data->_M_neg_format = money_base::_S_default_pattern;
 
          // Use ctype::widen code without the facet...
-         unsigned char uc;
          for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-           {
-             uc = static_cast<unsigned char>(money_base::_S_atoms[__i]);
-             _M_data->_M_atoms[__i] = btowc(uc);
-           }
+           _M_data->_M_atoms[__i] =
+             static_cast<wchar_t>(money_base::_S_atoms[__i]);
        }
       else
        {
index ef1f5bf5703a06ed21f5a16bab35b934c9868aa4..01e922515f375c5283f5ab4f1789b5fb31531086 100644 (file)
@@ -78,10 +78,10 @@ namespace std
       // NB: There is no way to extact this info from posix locales.
       // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
       _M_data->_M_truename = "true";
-      _M_data->_M_truename_size = strlen(_M_data->_M_truename);
+      _M_data->_M_truename_size = 4;
       // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
       _M_data->_M_falsename = "false";
-      _M_data->_M_falsename_size = strlen(_M_data->_M_falsename);
+      _M_data->_M_falsename_size = 5;
     }
  
   template<> 
@@ -107,18 +107,13 @@ namespace std
          _M_data->_M_thousands_sep = L',';
 
          // Use ctype::widen code without the facet...
-         unsigned char uc;
          for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-           {
-             uc = static_cast<unsigned char>(__num_base::_S_atoms_out[__i]);
-             _M_data->_M_atoms_out[__i] = btowc(uc);
-           }
+           _M_data->_M_atoms_out[__i] =
+             static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
 
          for (size_t __i = 0; __i < __num_base::_S_iend; ++__i)
-           {
-             uc = static_cast<unsigned char>(__num_base::_S_atoms_in[__i]);
-             _M_data->_M_atoms_in[__i] = btowc(uc);
-           }
+           _M_data->_M_atoms_in[__i] =
+             static_cast<wchar_t>(__num_base::_S_atoms_in[__i]);
        }
       else
        {
@@ -140,10 +135,10 @@ namespace std
       // NB: There is no way to extact this info from posix locales.
       // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
       _M_data->_M_truename = L"true";
-      _M_data->_M_truename_size = wcslen(_M_data->_M_truename);
+      _M_data->_M_truename_size = 4;
       // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
       _M_data->_M_falsename = L"false";
-      _M_data->_M_falsename_size = wcslen(_M_data->_M_falsename);
+      _M_data->_M_falsename_size = 5;
     }
 
   template<>