From 2cd1a89109651a19138aec9988d765208d7709e5 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 1 Nov 2010 23:15:11 +0000 Subject: Minor changes to the float that may circumvent some stupidness in the mingwrt snprintf code. I really need to write my own number parser/writer. --- src/gatsstream.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/gatsstream.cpp') diff --git a/src/gatsstream.cpp b/src/gatsstream.cpp index 3e9b211..71372db 100644 --- a/src/gatsstream.cpp +++ b/src/gatsstream.cpp @@ -7,9 +7,9 @@ #include #endif -// #include +#include #include -// using namespace Bu; +using namespace Bu; Gats::GatsStream::GatsStream( Bu::Stream &rStream ) : rStream( rStream ) @@ -40,40 +40,40 @@ Gats::Object *Gats::GatsStream::readObject() uint8_t uVer; qbRead.peek( &uVer, 1 ); - // sio << "Gats::GatsStream::readObject(): Packet version: " << (int)uVer << sio.nl; + sio << "Gats::GatsStream::readObject(): Packet version: " << (int)uVer << sio.nl; int32_t iSize; qbRead.peek( &iSize, 4, 1 ); iSize = ntohl( iSize ); - // sio << "Gats::GatsStream::readObject(): Header read, looking for " << iSize << "b, we have " << qbRead.getSize() << "b." << sio.nl; + sio << "Gats::GatsStream::readObject(): Header read, looking for " << iSize << "b, we have " << qbRead.getSize() << "b." << sio.nl; while( qbRead.getSize() < iSize ) { int32_t iRead = iSize - qbRead.getSize(); if( iRead > 1500 ) iRead = 1500; - // sio << "Gats::GatsStream::readObject(): Attempting to read " << iRead << "b." << sio.nl; + sio << "Gats::GatsStream::readObject(): Attempting to read " << iRead << "b." << sio.nl; int32_t iReal = rStream.read( buf, iRead ); - // sio << "Gats::GatsStream::readObject(): Read " << iReal << "b." << sio.nl; + sio << "Gats::GatsStream::readObject(): Read " << iReal << "b." << sio.nl; qbRead.write( buf, iReal ); if( iReal < iRead ) { - // sio << "Gats::GatsStream::readObject(): Insufficient data read in block, bailing on read." << sio.nl; + sio << "Gats::GatsStream::readObject(): Insufficient data read in block, bailing on read." << sio.nl; return NULL; } } if( qbRead.getSize() < iSize ) { - // sio << "Gats::GatsStream::readObject(): Somehow, we still don't have enough data, bailing." << sio.nl; + sio << "Gats::GatsStream::readObject(): Somehow, we still don't have enough data, bailing." << sio.nl; return NULL; } - // sio << "Gats::GatsStream::readObject(): We have " << qbRead.getSize() << "b of " << iSize << "b, time to read the object." << sio.nl; + sio << "Gats::GatsStream::readObject(): We have " << qbRead.getSize() << "b of " << iSize << "b, time to read the object." << sio.nl; qbRead.seek( 5 ); Gats::Object *pObj = Gats::Object::read( qbRead ); - // sio << "Gats::GatsStream::readObject(): Read completed, there are " << qbRead.getSize() << "b left in the buffer." << sio.nl; + sio << "Gats::GatsStream::readObject(): Read completed, there are " << qbRead.getSize() << "b left in the buffer." << sio.nl; return pObj; } -- cgit v1.2.3