ctype_inline.h: Remove spaces.
authorBenjamin Kosnik <bkoz@redhat.com>
Wed, 12 Dec 2001 03:22:25 +0000 (03:22 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Wed, 12 Dec 2001 03:22:25 +0000 (03:22 +0000)
2001-12-11  Benjamin Kosnik  <bkoz@redhat.com>

* config/os/generic/bits/ctype_inline.h: Remove spaces.
* config/os/gnu-linux/bits/ctype_noninline.h: Same.
* include/bits/locale_facets.h (__num_base): Move double data
members to first in class.
* include/bits/locale_facets.tcc: Re-arrange, tweak.
* src/locale.cc: Clean.
*include/bits/stl_vector.h: Space typedefs.

From-SVN: r47918

libstdc++-v3/ChangeLog
libstdc++-v3/config/os/generic/bits/ctype_inline.h
libstdc++-v3/config/os/gnu-linux/bits/ctype_noninline.h
libstdc++-v3/include/bits/locale_facets.h
libstdc++-v3/include/bits/locale_facets.tcc
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/src/locale.cc

index 9a32983e16d5bbd873bbf9d5ba836d3dbd153295..4c604775bdb9d5f2771c2095806d996810e6c560 100644 (file)
@@ -1,3 +1,13 @@
+2001-12-11  Benjamin Kosnik  <bkoz@redhat.com>
+
+       * config/os/generic/bits/ctype_inline.h: Remove spaces.
+       * config/os/gnu-linux/bits/ctype_noninline.h: Same.
+       * include/bits/locale_facets.h (__num_base): Move double data
+       members to first in class.
+       * include/bits/locale_facets.tcc: Re-arrange, tweak.
+       * src/locale.cc: Clean.
+       *include/bits/stl_vector.h: Space typedefs.
+
 2001-12-11  Phil Edwards  <pme@gcc.gnu.org>
 
        * testsuite/ext/allocators.cc:  New file.
index a5f6e855a9330077156e6b7e8275ce0ec2474dbc..c10cb565b76c43247381fa9badf48dc169096ba0 100644 (file)
       ++__low;
     return __low;
   }
-
-
-
-
-
index 0013c5b079aca6807d28ee63a61436ce283de675..0d649f681fb3fe4624d4959a7a61df0eba695e0b 100644 (file)
       }
     return __high;
   }
-
-
-
-
-
-
-
-
-
-
-
-
index a992c455093863b227e5fb46078ed61c42d0bd3a..5d88ea9fc057632c1d8de46b7ef230d836dbc72b 100644 (file)
@@ -419,6 +419,12 @@ namespace std
   class __num_base
   {
   public:
+    // Used to establish gating factor for base 16 input.
+    static const double _S_scale_hex;
+    
+    // Used to establish gating factor for base 8 input.
+    static const double _S_scale_oct;
+
     // String literal of acceptable (narrow) input, for num_get.
     // "0123456789eEabcdfABCDF"
     static const char _S_atoms[];
@@ -439,12 +445,6 @@ namespace std
     // Construct and return valid scanf format for integer types.
     static void
     _S_format_int(const ios_base& __io, char* __fptr, char __mod, char __modl);
-
-    // Used to establish gating factor for base 16 input.
-    static const double _S_scale_hex;
-    
-    // Used to establish gating factor for base 8 input.
-    static const double _S_scale_oct;
   };
 
   template<typename _CharT>
index e4b40af34f338cf5020ce6af48062cf63ac3d622..d4313721a3c7c9e162e3b1a6adcde0fcd80e0cdc 100644 (file)
@@ -299,12 +299,12 @@ namespace std
       // Figure out the maximum number of digits that can be extracted
       // for the given type, using the determined base.
       int __max_digits;
-      if (__base == 10)
-       __max_digits = __max;
-      else if (__base == 16)
+      if (__base == 16)
        __max_digits = static_cast<int>(ceil(__max * _S_scale_hex));
-      else /* if (__base == 8) */
+      else if (__base == 8)
        __max_digits = static_cast<int>(ceil(__max * _S_scale_oct));
+      else
+       __max_digits = __max;
 
       // Add in what's already been extracted.
       __max_digits += __pos;
index 39993b98d669143f7f2a521498ba112a81e00a36..d327628c87655c0752c6790aeca2522d2fa5506d 100644 (file)
@@ -154,15 +154,15 @@ private:
   typedef _Vector_base<_Tp, _Alloc> _Base;
   typedef vector<_Tp, _Alloc> vector_type;
 public:
-  typedef _Tp value_type;
-  typedef value_type* pointer;
-  typedef const value_type* const_pointer;
-  typedef __normal_iterator<pointer, vector_type> iterator;
+  typedef _Tp                                          value_type;
+  typedef value_type*                                  pointer;
+  typedef const value_type*                            const_pointer;
+  typedef __normal_iterator<pointer, vector_type>      iterator;
   typedef __normal_iterator<const_pointer, vector_type> const_iterator;
-  typedef value_type& reference;
-  typedef const value_type& const_reference;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
+  typedef value_type&                                  reference;
+  typedef const value_type&                            const_reference;
+  typedef size_t                                       size_type;
+  typedef ptrdiff_t                                    difference_type;
 
   typedef typename _Base::allocator_type allocator_type;
   allocator_type get_allocator() const { return _Base::get_allocator(); }
index 92a8a5c09807d96d170a98c56b55ae9ca6bcdb36..14938d9d730ba7d077d23c565f2a839a94293651 100644 (file)
@@ -74,12 +74,6 @@ namespace std
   // Definitions for static const data members of locale::id
   size_t locale::id::_S_highwater;  // init'd to 0 by linker
 
-  const char __num_base::_S_atoms[] = "0123456789eEabcdfABCDF";
-
-  const double __num_base::_S_scale_hex = log(10.0)/log(16.0);
-
-  const double __num_base::_S_scale_oct = log(10.0)/log(8.0);
-
   // Definitions for static const data members of locale::_Impl
   const locale::id* const
   locale::_Impl::_S_id_ctype[] =
@@ -440,119 +434,6 @@ namespace std
   : ctype<char>(new mask[table_size], true, __refs)
   { }
 
-  // Definitions for static const data members of time_base
-  template<> 
-    const char*
-    __timepunct<char>::_S_timezones[14] =
-    { 
-      "GMT", "HST", "AKST", "PST", "MST", "CST", "EST", "AST", "NST", "CET", 
-      "IST", "EET", "CST", "JST"  
-    };
-#ifdef _GLIBCPP_USE_WCHAR_T
-  template<> 
-    const wchar_t*
-    __timepunct<wchar_t>::_S_timezones[14] =
-    { 
-      L"GMT", L"HST", L"AKST", L"PST", L"MST", L"CST", L"EST", L"AST", 
-      L"NST", L"CET", L"IST", L"EET", L"CST", L"JST"  
-    };
-#endif
-
-  // Definitions for static const data members of money_base
-  const money_base::pattern 
-  money_base::_S_default_pattern =  {{symbol, sign, none, value}};
-
-  template<>
-    const ctype<char>&
-    use_facet<ctype<char> >(const locale& __loc)
-    {
-      size_t __i = ctype<char>::id._M_index;
-      const locale::_Impl* __tmp = __loc._M_impl;
-      return static_cast<const ctype<char>&>(* (*(__tmp->_M_facets))[__i]);
-    }
-
-#ifdef _GLIBCPP_USE_WCHAR_T
-  template<>
-    const ctype<wchar_t>&
-    use_facet<ctype<wchar_t> >(const locale& __loc)
-    {
-      size_t __i = ctype<wchar_t>::id._M_index;
-      const locale::_Impl* __tmp = __loc._M_impl;
-      return static_cast<const ctype<wchar_t>&>(* (*(__tmp->_M_facets))[__i]);
-    }
-#endif
-
-  bool
-  __num_base::_S_format_float(const ios_base& __io, char* __fptr, char __mod,
-                             streamsize __prec)
-  {
-    bool __incl_prec = false;
-    ios_base::fmtflags __flags = __io.flags();
-    *__fptr++ = '%';
-    // [22.2.2.2.2] Table 60
-    if (__flags & ios_base::showpos)
-      *__fptr++ = '+';
-    if (__flags & ios_base::showpoint)
-      *__fptr++ = '#';
-    // As per [22.2.2.2.2.11]
-    if (__flags & ios_base::fixed || __prec > 0)
-      {
-       *__fptr++ = '.';
-       *__fptr++ = '*';
-       __incl_prec = true;
-      }
-    if (__mod)
-      *__fptr++ = __mod;
-    ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
-    // [22.2.2.2.2] Table 58
-    if (__fltfield == ios_base::fixed)
-      *__fptr++ = 'f';
-    else if (__fltfield == ios_base::scientific)
-      *__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
-    else
-      *__fptr++ = (__flags & ios_base::uppercase) ? 'G' : 'g';
-    *__fptr = '\0';
-    return __incl_prec;
-  }
-  
-  void
-  __num_base::_S_format_int(const ios_base& __io, char* __fptr, char __mod, 
-                           char __modl)
-  {
-    ios_base::fmtflags __flags = __io.flags();
-    *__fptr++ = '%';
-    // [22.2.2.2.2] Table 60
-    if (__flags & ios_base::showpos)
-      *__fptr++ = '+';
-    if (__flags & ios_base::showbase)
-      *__fptr++ = '#';
-    *__fptr++ = 'l';
-
-    // For long long types.
-    if (__modl)
-      *__fptr++ = __modl;
-
-    ios_base::fmtflags __bsefield = __flags & ios_base::basefield;
-    if (__bsefield == ios_base::hex)
-      *__fptr++ = (__flags & ios_base::uppercase) ? 'X' : 'x';
-    else if (__bsefield == ios_base::oct)
-      *__fptr++ = 'o';
-    else
-      *__fptr++ = __mod;
-    *__fptr = '\0';
-  }
-  
-  template<>
-    moneypunct_byname<char, false>::moneypunct_byname(const char* /*__s*/, 
-                                                     size_t __refs)
-    : moneypunct<char, false>(__refs) { }
-  
-  template<>
-    moneypunct_byname<char, true>::moneypunct_byname(const char* /*__s*/, 
-                                                    size_t __refs)
-    : moneypunct<char, true>(__refs) { }
-  
 #ifdef _GLIBCPP_USE_WCHAR_T  
   ctype<wchar_t>::__wmask_type
   ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
@@ -710,4 +591,124 @@ namespace std
   ctype_byname(const char* /*__s*/, size_t __refs)
   : ctype<wchar_t>(__refs) { }
 #endif //  _GLIBCPP_USE_WCHAR_T
+
+  // Definitions for static const data members of time_base
+  template<> 
+    const char*
+    __timepunct<char>::_S_timezones[14] =
+    { 
+      "GMT", "HST", "AKST", "PST", "MST", "CST", "EST", "AST", "NST", "CET", 
+      "IST", "EET", "CST", "JST"  
+    };
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> 
+    const wchar_t*
+    __timepunct<wchar_t>::_S_timezones[14] =
+    { 
+      L"GMT", L"HST", L"AKST", L"PST", L"MST", L"CST", L"EST", L"AST", 
+      L"NST", L"CET", L"IST", L"EET", L"CST", L"JST"  
+    };
+#endif
+
+  // Definitions for static const data members of money_base
+  const money_base::pattern 
+  money_base::_S_default_pattern =  {{symbol, sign, none, value}};
+
+  template<>
+    const ctype<char>&
+    use_facet<ctype<char> >(const locale& __loc)
+    {
+      size_t __i = ctype<char>::id._M_index;
+      const locale::_Impl* __tmp = __loc._M_impl;
+      return static_cast<const ctype<char>&>(* (*(__tmp->_M_facets))[__i]);
+    }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    const ctype<wchar_t>&
+    use_facet<ctype<wchar_t> >(const locale& __loc)
+    {
+      size_t __i = ctype<wchar_t>::id._M_index;
+      const locale::_Impl* __tmp = __loc._M_impl;
+      return static_cast<const ctype<wchar_t>&>(* (*(__tmp->_M_facets))[__i]);
+    }
+#endif
+
+
+  const char __num_base::_S_atoms[] = "0123456789eEabcdfABCDF";
+
+  const double __num_base::_S_scale_hex = log(10.0)/log(16.0);
+
+  const double __num_base::_S_scale_oct = log(10.0)/log(8.0);
+
+  bool
+  __num_base::_S_format_float(const ios_base& __io, char* __fptr, char __mod,
+                             streamsize __prec)
+  {
+    bool __incl_prec = false;
+    ios_base::fmtflags __flags = __io.flags();
+    *__fptr++ = '%';
+    // [22.2.2.2.2] Table 60
+    if (__flags & ios_base::showpos)
+      *__fptr++ = '+';
+    if (__flags & ios_base::showpoint)
+      *__fptr++ = '#';
+    // As per [22.2.2.2.2.11]
+    if (__flags & ios_base::fixed || __prec > 0)
+      {
+       *__fptr++ = '.';
+       *__fptr++ = '*';
+       __incl_prec = true;
+      }
+    if (__mod)
+      *__fptr++ = __mod;
+    ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
+    // [22.2.2.2.2] Table 58
+    if (__fltfield == ios_base::fixed)
+      *__fptr++ = 'f';
+    else if (__fltfield == ios_base::scientific)
+      *__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
+    else
+      *__fptr++ = (__flags & ios_base::uppercase) ? 'G' : 'g';
+    *__fptr = '\0';
+    return __incl_prec;
+  }
+  
+  void
+  __num_base::_S_format_int(const ios_base& __io, char* __fptr, char __mod, 
+                           char __modl)
+  {
+    ios_base::fmtflags __flags = __io.flags();
+    *__fptr++ = '%';
+    // [22.2.2.2.2] Table 60
+    if (__flags & ios_base::showpos)
+      *__fptr++ = '+';
+    if (__flags & ios_base::showbase)
+      *__fptr++ = '#';
+    *__fptr++ = 'l';
+
+    // For long long types.
+    if (__modl)
+      *__fptr++ = __modl;
+
+    ios_base::fmtflags __bsefield = __flags & ios_base::basefield;
+    if (__bsefield == ios_base::hex)
+      *__fptr++ = (__flags & ios_base::uppercase) ? 'X' : 'x';
+    else if (__bsefield == ios_base::oct)
+      *__fptr++ = 'o';
+    else
+      *__fptr++ = __mod;
+    *__fptr = '\0';
+  }
+  
+  template<>
+    moneypunct_byname<char, false>::moneypunct_byname(const char* /*__s*/, 
+                                                     size_t __refs)
+    : moneypunct<char, false>(__refs) { }
+  
+  template<>
+    moneypunct_byname<char, true>::moneypunct_byname(const char* /*__s*/, 
+                                                    size_t __refs)
+    : moneypunct<char, true>(__refs) { }
 } // namespace std