diff -Naur netxx-0.4.2/include/netxx/netbuf.h netxx-0.4.2-gcc3.4/include/netxx/netbuf.h --- netxx-0.4.2/include/netxx/netbuf.h 2004-02-06 04:12:36.000000000 +0100 +++ netxx-0.4.2-gcc3.4/include/netxx/netbuf.h 2005-03-25 15:58:59.000000000 +0100 @@ -61,7 +61,7 @@ * This streambuf is buffered so you should call std::flush to make sure it * sends the data that you inserted. **/ -template > +template > class Netbuf : public std::basic_streambuf { public: /// int type @@ -70,6 +70,9 @@ /// char type typedef typename std::basic_streambuf::char_type char_type; + /// traits type + typedef typename std::basic_streambuf::traits_type traits_type; + //#################################################################### /** * Construct a Netxx::Netbuf object and link it to the given StreamBase @@ -142,26 +145,26 @@ //############################################################################# template int Netbuf::buffer_out (void) { - int length = pptr() - pbase(); + int length = this->pptr() - this->pbase(); int rc = stream_.write(putbuf_, length); - pbump(-length); + this->pbump(-length); return rc; } //############################################################################# template typename Netbuf::int_type Netbuf::underflow (void) { - if (gptr() < egptr()) return traits_type::to_int_type(*gptr()); + if (this->gptr() < this->egptr()) return traits_type::to_int_type(*(this->gptr())); if (buffer_in() < 0) return traits_type::eof(); - else return traits_type::to_int_type(*gptr()); + else return traits_type::to_int_type(*(this->gptr())); } //############################################################################# template typename Netbuf::int_type Netbuf::pbackfail(int_type c) { - if (gptr() != eback()) { - gbump(-1); + if (this->gptr() != this->eback()) { + this->gbump(-1); if (!traits_type::eq_int_type(c, traits_type::eof())) { - *(gptr()) = traits_type::to_char_type(c); + *(this->gptr()) = traits_type::to_char_type(c); } return traits_type::not_eof(c); @@ -172,14 +175,14 @@ //############################################################################# template int Netbuf::buffer_in (void) { - std::streamsize number_putbacks = std::min(gptr() - eback(), PUTBACK_SIZE); + std::streamsize number_putbacks = std::min(this->gptr() - this->eback(), PUTBACK_SIZE); std::memcpy(getbuf_ + (PUTBACK_SIZE - number_putbacks) * sizeof(char_type), - gptr() - number_putbacks * sizeof(char_type), number_putbacks * sizeof(char_type)); + this->gptr() - number_putbacks * sizeof(char_type), number_putbacks * sizeof(char_type)); int rc = stream_.read(getbuf_ + PUTBACK_SIZE * sizeof(char_type), bufsize - PUTBACK_SIZE); if (rc <= 0) { - setg(0, 0, 0); + this->setg(0, 0, 0); return -1; } else { setg(getbuf_ + PUTBACK_SIZE - number_putbacks, getbuf_ + PUTBACK_SIZE, getbuf_ + PUTBACK_SIZE + rc);