OSDN Git Service

2001-02-16 Greg Bumgardner <bumgard@roguewave.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Feb 2001 17:51:45 +0000 (17:51 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 17 Feb 2001 17:51:45 +0000 (17:51 +0000)
libstdc++/1734
        * include/bits/std_ostream.h: Replaced usage of
        _Traits::_S_eos() with _CharT() as per section 17.2.2.1.3.
        * include/bits/char_traits.h: Removed non-standard
        methods that cannot be used elsewhere.

libstdc++/1885
        * include/bits/basic_ios.h: Uncommented #include of
        bits/basic_ios.tcc

libstdc++/1897
        * include/bits/codecvt.h: See next...
        * include/bits/fstream.tcc: See next...
        * include/bits/ostream.tcc: Add __extension__
        to variable-length arrays.

libstdc++/1967
        * include/bits/localefwd.h: Changed int counter type to size_t.

libstdc++/1968
        * include/bits/std_fstream.h: Added typedef for __ctype_type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39802 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/basic_ios.h
libstdc++-v3/include/bits/basic_ios.tcc
libstdc++-v3/include/bits/char_traits.h
libstdc++-v3/include/bits/codecvt.h
libstdc++-v3/include/bits/fstream.tcc
libstdc++-v3/include/bits/localefwd.h
libstdc++-v3/include/bits/ostream.tcc
libstdc++-v3/include/bits/std_fstream.h
libstdc++-v3/include/bits/std_ostream.h

index f9fe2d3..6203763 100644 (file)
@@ -1,3 +1,27 @@
+2001-02-16  Greg Bumgardner <bumgard@roguewave.com>
+
+       libstdc++/1734
+        * include/bits/std_ostream.h: Replaced usage of
+        _Traits::_S_eos() with _CharT() as per section 17.2.2.1.3.  
+        * include/bits/char_traits.h: Removed non-standard
+        methods that cannot be used elsewhere.  
+       
+       libstdc++/1885
+        * include/bits/basic_ios.h: Uncommented #include of
+        bits/basic_ios.tcc 
+       
+       libstdc++/1897
+        * include/bits/codecvt.h: See next...
+        * include/bits/fstream.tcc: See next...
+        * include/bits/ostream.tcc: Add __extension__ 
+        to variable-length arrays.  
+       
+       libstdc++/1967
+        * include/bits/localefwd.h: Changed int counter type to size_t.
+
+       libstdc++/1968
+        * include/bits/std_fstream.h: Added typedef for __ctype_type.
+
 2001-02-16  Benjamin Kosnik  <bkoz@redhat.com>
 
        * testsuite/21_strings/char_traits.cc: Move to ...
index a6a6a87..d03e656 100644 (file)
@@ -31,6 +31,7 @@
 #define _CPP_BITS_BASICIOS_H 1
 
 #include <bits/sbuf_iter.h>
+#include <bits/locale_facets.h>
 
 namespace std {
 
@@ -205,7 +206,7 @@ namespace std {
 
 #ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
 # define export
-//#include <bits/basic_ios.tcc>
+#include <bits/basic_ios.tcc>
 #endif
 
 #endif /* _CPP_BITS_BASICIOS_H */
@@ -214,3 +215,6 @@ namespace std {
 
 
 
+
+
+
index 2b9d6f8..d4178c2 100644 (file)
@@ -1,6 +1,6 @@
 // basic_ios locale and locale-related member functions -*- C++ -*-
 
-// Copyright (C) 1999 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2001 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
index caa90e9..43dee93 100644 (file)
@@ -130,16 +130,10 @@ namespace std {
       eq_int_type(const int_type& __c1, const int_type& __c2)
       { return __c1 == __c2; }
 
-      static state_type 
-      _S_get_state(const pos_type& __pos) { return __pos.state(); }
-
       static int_type 
       eof() { return static_cast<int_type>(-1); }
 
       static int_type 
-      _S_eos() { return char_type(); }
-
-      static int_type 
       not_eof(const int_type& __c)
       { return eq_int_type(__c, eof()) ? int_type(0) : __c; }
     };
@@ -205,16 +199,10 @@ namespace std {
       eq_int_type(const int_type& __c1, const int_type& __c2)
       { return __c1 == __c2; }
 
-      static state_type 
-      _S_get_state(const pos_type& __pos) { return __pos.state(); }
-
       static int_type 
       eof() { return static_cast<int_type>(EOF); }
 
       static int_type 
-      _S_eos() { return char_type(); }
-
-      static int_type 
       not_eof(const int_type& __c)
       { return (__c == eof()) ? 0 : __c; }
   };
@@ -276,16 +264,10 @@ namespace std {
       eq_int_type(const int_type& __c1, const int_type& __c2)
       { return __c1 == __c2; }
 
-      static state_type 
-      _S_get_state(const pos_type& __pos) { return __pos.state(); }
-
       static int_type 
       eof() { return static_cast<int_type>(WEOF); }
 
       static int_type 
-      _S_eos() { return char_type(); }
-
-      static int_type 
       not_eof(const int_type& __c)
       { return eq_int_type(__c, eof()) ? 0 : __c; }
   };
index 8873298..a023102 100644 (file)
@@ -1,6 +1,6 @@
 // Locale support (codecvt) -*- C++ -*-
 
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001 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
          if (__int_bom)
            {     
              size_t __size = __from_end - __from;
-             intern_type __cfixed[__size + 1];
+             __extension__ intern_type __cfixed[__size + 1];
              __cfixed[0] = static_cast<intern_type>(__int_bom);
              char_traits<intern_type>::copy(__cfixed + 1, __from, __size);
              __cfrom = reinterpret_cast<char*>(__cfixed);
          if (__ext_bom)
            {     
              size_t __size = __from_end - __from;
-             extern_type __cfixed[__size + 1];
+             __extension__ extern_type __cfixed[__size + 1];
              __cfixed[0] = static_cast<extern_type>(__ext_bom);
              char_traits<extern_type>::copy(__cfixed + 1, __from, __size);
              __cfrom = reinterpret_cast<char*>(__cfixed);
index 5898a21..be31be0 100644 (file)
@@ -262,7 +262,7 @@ namespace std
              // Part one: (Re)fill external buf (_M_file->_IO_*) from
              // external byte sequence (whatever physical byte sink or
              // FILE actually is.)
-             char_type __conv_buf[_M_buf_size];
+             __extension__ char_type __conv_buf[_M_buf_size];
              streamsize __size = _M_file->xsgetn(__conv_buf, _M_buf_size);
              
              // Part two: (Re)fill internal buf contents from external buf.
@@ -436,7 +436,7 @@ namespace std
          // stack. Convert internal buffer plus __c (ie,
          // "pending sequence") to temporary conversion buffer.
          int __plen = _M_out_end - _M_out_beg;
-         char_type __pbuf[__plen + 1];       
+         __extension__ char_type __pbuf[__plen + 1];         
          traits_type::copy(__pbuf, this->pbase(), __plen);
          if (!__testeof)
            {
@@ -445,7 +445,7 @@ namespace std
            }
 
          char_type* __pend;
-         char __conv_buf[__plen];
+         __extension__ char __conv_buf[__plen];
          char* __conv_end;
          _M_state_beg = _M_state_cur;
 
index 17a2ec2..d15afd9 100644 (file)
@@ -397,7 +397,7 @@ namespace std
     {
       _M_impl = new _Impl(*__other._M_impl, 1);
       _M_impl->_M_install_facet(&_Facet::id, __f);
-      for (int __i = 0; __i < _S_num_categories; ++__i)
+      for (size_t __i = 0; __i < _S_num_categories; ++__i)
        _M_impl->_M_names[__i] = "*";
     }
 
index 64e006f..77bce26 100644 (file)
@@ -417,7 +417,7 @@ namespace std {
       typedef typename traits_type::int_type int_type;
       
       int_type __plen = static_cast<size_t>(__newlen - __oldlen); 
-      char_type __pads[__plen];
+      __extension__ char_type __pads[__plen];
       traits_type::assign(__pads, __plen, __ios.fill()); 
 
       char_type* __beg;
@@ -496,7 +496,7 @@ namespace std {
        {
          try {
            streamsize __w = __out.width();
-           _CharT __pads[__w];
+           __extension__ _CharT __pads[__w];
            __pads[0] = __c;
            streamsize __len = 1;
            if (__w > __len)
@@ -529,7 +529,7 @@ namespace std {
        {
          try {
            streamsize __w = __out.width();
-           char __pads[__w + 1];
+           __extension__ char __pads[__w + 1];
            __pads[0] = __c;
            streamsize __len = 1;
            if (__w > __len)
@@ -596,7 +596,7 @@ namespace std {
       if (__cerb)
        {
          size_t __clen = __ctraits_type::length(__s);
-         _CharT __ws[__clen + 1];
+         __extension__ _CharT __ws[__clen + 1];
          for (size_t  __i = 0; __i <= __clen; ++__i)
            __ws[__i] = __out.widen(__s[__i]);
          _CharT* __str = __ws;
@@ -604,7 +604,7 @@ namespace std {
          try {
            streamsize __len = static_cast<streamsize>(__clen);
            streamsize __w = __out.width();
-           _CharT __pads[__w];
+           __extension__ _CharT __pads[__w];
 
            if (__w > __len)
              {
@@ -637,7 +637,7 @@ namespace std {
        {
          try {
            streamsize __w = __out.width();
-           char __pads[__w];
+           __extension__ char __pads[__w];
            streamsize __len = static_cast<streamsize>(_Traits::length(__s));
            if (__w > __len)
              {
index 4cafb2d..0860650 100644 (file)
@@ -1,6 +1,6 @@
 // File based streams -*- C++ -*-
 
-// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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
@@ -60,7 +60,8 @@ namespace std {
       typedef typename traits_type::state_type          __state_type;
       typedef codecvt<char_type, char, __state_type>    __codecvt_type;
       typedef typename __codecvt_type::result          __res_type;
-      
+      typedef ctype<char_type>                          __ctype_type;
+
       friend class ios_base; // For sync_with_stdio.
 
     private:
index eb63e93..bec1f15 100644 (file)
@@ -1,6 +1,6 @@
 // Output streams -*- C++ -*-
 
-// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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
@@ -262,7 +262,7 @@ namespace std {
   template<typename _CharT, typename _Traits>
     basic_ostream<_CharT, _Traits>& 
     ends(basic_ostream<_CharT, _Traits>& __os)
-    { return __os.put(_Traits::_S_eos()); }
+    { return __os.put(_CharT()); }
   
   template<typename _CharT, typename _Traits>
     basic_ostream<_CharT, _Traits>&