+2003-02-04 Jerry Quinn <jlquinn@optonline.net>
+
+ * include/std/std_ostream.h (ostream::_M_write): Declare.
+ * ostream.tcc (ostream::_M_write): Define.
+ (basic_ostream::write): Use it.
+ (operator<<(basic_ostream, _CharT)): Ditto.
+ (operator<<(basic_ostream, char)): Ditto.
+ (operator<<(basic_ostream, _CharT*)): Ditto.
+ (operator<<(basic_ostream, char*)): Ditto.
+ (operator<<(basic_ostream, basic_string)): Ditto.
+
2003-02-04 Benjamin Kosnik <bkoz@redhat.com>
* testsuite/26_numerics/valarray_name_lookup.cc: Fix.
* include/bits/valarray_before.h (_UnBase::operator[]): Apply unary
operator.
- * include/bits/valarray_before.h (__not_equal_to): Use != instead of ==.
+ * include/bits/valarray_before.h (__not_equal_to): Use != instead
+ of ==.
* testsuite/26_numerics/valarray_operators.cc: New test.
// ostream classes -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
if (traits_type::eq_int_type(__put, traits_type::eof()))
this->setstate(ios_base::badbit);
}
- return *this;
+ return *this;
}
template<typename _CharT, typename _Traits>
{
sentry __cerb(*this);
if (__cerb)
- {
- streamsize __put = this->rdbuf()->sputn(__s, __n);
- if ( __put != __n)
- this->setstate(ios_base::badbit);
- }
+ _M_write(__s, __n);
return *this;
}
&__c, __w, __len, false);
__len = __w;
}
- __out.write(__pads, __len);
+ __out._M_write(__pads, __len);
__out.width(0);
}
catch(exception& __fail)
&__c, __w, __len, false);
__len = __w;
}
- __out.write(__pads, __len);
+ __out._M_write(__pads, __len);
__out.width(0);
}
catch(exception& __fail)
__s = __pads;
__len = __w;
}
- __out.write(__s, __len);
+ __out._M_write(__s, __len);
__out.width(0);
}
catch(exception& __fail)
__str = __pads;
__len = __w;
}
- __out.write(__str, __len);
+ __out._M_write(__str, __len);
__out.width(0);
}
catch(exception& __fail)
__s = __pads;
__len = __w;
}
- __out.write(__s, __len);
+ __out._M_write(__s, __len);
__out.width(0);
}
catch(exception& __fail)
__s = __pads;
__len = __w;
}
- streamsize __res = __out.rdbuf()->sputn(__s, __len);
+ __out._M_write(__s, __len);
__out.width(0);
- if (__res != __len)
- __out.setstate(ios_base::failbit);
}
return __out;
}
// Output streams -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
__ostream_type&
put(char_type __c);
+ // Core write functionality, without sentry.
+ void
+ _M_write(const char_type* __s, streamsize __n)
+ {
+ streamsize __put = this->rdbuf()->sputn(__s, __n);
+ if (__put != __n)
+ this->setstate(ios_base::badbit);
+ }
+
/**
* @brief Character string insertion.
* @param s The array to insert.