# HG changeset patch # User Zoltan K. # Date 1269907664 0 # Node ID 892f7a4277d02a1d2b310c2801aaa5da52abea98 # Parent 3b8469fa0fd7f306195a6ae4d550f9828297fc08 [examples] added missing namespace specifications for some streamsize diff -r 3b8469fa0fd7 -r 892f7a4277d0 examples/Buffer/Buffer.cpp --- a/examples/Buffer/Buffer.cpp Sun Mar 28 17:35:33 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -#include - -#include "Buffer.hpp" - -StreamBufferImpl::StreamBufferImpl(void) - : _buffer(NULL), - _size(0) -{ -} - -StreamBufferImpl * StreamBufferImpl::setbuf(char *, std::streamsize) -{ - if (s != NULL) - { - /* - * We set the get pointer. - * s is the beginning of the get sequence. - * s is also the current position of the get pointer. - * s + n is a pointer to the end of the get sequence. - */ - this->setg(s, s, s + n); - - /* - * We set the put pointer. - * s is the beginning of the put sequence. - * s + n is a pointer to the end of the put sequence. - */ - this->setp(s, s + n); - } - return (*this); -} - -virtual std::streampos seekoff(std::streamoff off, - std::ios_base::seekdir way, - std::ios_base::openmode which = std::ios_base::in | std::ios_base::out) -{ - if (off != 0) - { - } - - if ((which == std::ios_base::in | std::ios_base::out) - || (which == std::ios_base::in)) - return (this->gptr() - this->eback()); - - return (this->pptr() - this->pbase()); -} - -int StreamBufferImpl::sync(void) -{ - return (0); -} - -int StreamBufferImpl::underflow(void) -{ - return (EOF); -} diff -r 3b8469fa0fd7 -r 892f7a4277d0 examples/Buffer/Buffer.hpp --- a/examples/Buffer/Buffer.hpp Sun Mar 28 17:35:33 2010 +0200 +++ b/examples/Buffer/Buffer.hpp Tue Mar 30 00:07:44 2010 +0000 @@ -119,7 +119,7 @@ * * @return The number of characters stored. */ - virtual std::streamsize xsgetn(char * s, streamsize n); + virtual std::streamsize xsgetn(char * s, std::streamsize n); /** * @brief Called when there is a need to read data from the buffer but @@ -168,7 +168,7 @@ * * @return The number of characters written to the buffer. */ - virtual streamsize xsputn(const char * s, streamsize n); + virtual std::streamsize xsputn(const char * s, std::streamsize n); /** * @brief Called when there is no more available space on the buffer. This