gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog libbase/IOChannel.cpp libbase/I...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog libbase/IOChannel.cpp libbase/I...
Date: Mon, 09 Jun 2008 19:08:27 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/06/09 19:08:27

Modified files:
        .              : ChangeLog 
        libbase        : IOChannel.cpp IOChannel.h LoadThread.cpp 
                         curl_adapter.cpp jpeg.cpp tu_file.cpp tu_file.h 
                         zlib_adapter.cpp 
        libmedia       : FLVParser.cpp MediaHandler.cpp 
        libmedia/ffmpeg: MediaParserFfmpeg.cpp 
        server         : LoadVariablesThread.cpp impl.cpp stream.cpp 
        server/asobj   : NetConnection.cpp 
        testsuite/libbase: CurlStreamTest.cpp NoSeekFileTest.cpp 

Log message:
                * still on IOChannel-related, rename:
                        read_bytes  -> read
                        write_bytes -> write

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6871&r2=1.6872
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/IOChannel.cpp?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/IOChannel.h?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/LoadThread.cpp?cvsroot=gnash&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/curl_adapter.cpp?cvsroot=gnash&r1=1.64&r2=1.65
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/jpeg.cpp?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/tu_file.cpp?cvsroot=gnash&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/tu_file.h?cvsroot=gnash&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/zlib_adapter.cpp?cvsroot=gnash&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/FLVParser.cpp?cvsroot=gnash&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/MediaHandler.cpp?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/libmedia/ffmpeg/MediaParserFfmpeg.cpp?cvsroot=gnash&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/gnash/server/LoadVariablesThread.cpp?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/server/impl.cpp?cvsroot=gnash&r1=1.155&r2=1.156
http://cvs.savannah.gnu.org/viewcvs/gnash/server/stream.cpp?cvsroot=gnash&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetConnection.cpp?cvsroot=gnash&r1=1.65&r2=1.66
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libbase/CurlStreamTest.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/libbase/NoSeekFileTest.cpp?cvsroot=gnash&r1=1.11&r2=1.12

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6871
retrieving revision 1.6872
diff -u -b -r1.6871 -r1.6872
--- ChangeLog   9 Jun 2008 18:12:54 -0000       1.6871
+++ ChangeLog   9 Jun 2008 19:08:25 -0000       1.6872
@@ -1,5 +1,11 @@
 2008-06-09 Sandro Santilli <address@hidden>
 
+       * still on IOChannel-related, rename:
+               read_bytes  -> read
+               write_bytes -> write
+
+2008-06-09 Sandro Santilli <address@hidden>
+
        * lots of files: methods rename:
                get_position -> tell
                set_position -> seek

Index: libbase/IOChannel.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/IOChannel.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- libbase/IOChannel.cpp       9 Jun 2008 17:23:41 -0000       1.4
+++ libbase/IOChannel.cpp       9 Jun 2008 19:08:25 -0000       1.5
@@ -128,7 +128,7 @@
 IOChannel::read_byte()
 {
        boost::uint8_t u;
-       if ( read_bytes(&u, 1) == -1 )
+       if ( read(&u, 1) == -1 )
        {
                throw IOException("Could not read a single byte from input");
        }
@@ -138,11 +138,11 @@
 void
 IOChannel::write_byte(boost::uint8_t u)
 {
-       write_bytes(&u, 1); // will trhow on error it seems
+       write(&u, 1); // will trhow on error it seems
 }
 
 int
-IOChannel::write_bytes(const void* src, int num)
+IOChannel::write(const void* src, int num)
 {
        throw IOException("This IOChannel implementation doesn't support 
output");
 }

Index: libbase/IOChannel.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/IOChannel.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- libbase/IOChannel.h 9 Jun 2008 18:12:55 -0000       1.5
+++ libbase/IOChannel.h 9 Jun 2008 19:08:25 -0000       1.6
@@ -104,13 +104,13 @@
        //
        /// Throw IOException on error
        ///
-       virtual int read_bytes(void* dst, int num)=0;
+       virtual int read(void* dst, int num)=0;
 
        /// Write the given number of bytes to the stream
        //
        /// Throw IOException on error/unsupported op.
        ///
-       virtual int write_bytes(const void* src, int num);
+       virtual int write(const void* src, int num);
 
        /// \brief Write a 0-terminated string to a stream.
        //

Index: libbase/LoadThread.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/LoadThread.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- libbase/LoadThread.cpp      9 Jun 2008 18:12:55 -0000       1.24
+++ libbase/LoadThread.cpp      9 Jun 2008 19:08:25 -0000       1.25
@@ -158,7 +158,7 @@
                
                // Try to read a wanted amount of bytes into the given 
                // buffer, note the new position and return the actual amount 
read
-               int ret = _stream->read_bytes(dst, bytes);
+               int ret = _stream->read(dst, bytes);
                _userPosition += ret;
                _actualPosition = _userPosition;
                return ret;
@@ -187,7 +187,7 @@
 
                // Try to read a wanted amount of bytes into the given 
                // buffer, note the new position and return the actual amount 
read
-               int ret = _stream->read_bytes(dst, bytes);
+               int ret = _stream->read(dst, bytes);
 
                memcpy(_cache.get() +(_userPosition - _cacheStart), dst, ret);
                _cachedData = _userPosition - _cacheStart + ret;
@@ -229,7 +229,7 @@
 
        // Try to read a wanted amount of bytes into the given 
        // buffer, note the new position and return the actual amount read
-       int ret = _stream->read_bytes(_cache.get(), readdata);
+       int ret = _stream->read(_cache.get(), readdata);
 
        _cachedData = ret;
        _cacheStart = newcachestart;
@@ -292,7 +292,7 @@
 
        size_t setupSize = 1024;
 
-       size_t ret = _stream->read_bytes(_cache.get(), setupSize);
+       size_t ret = _stream->read(_cache.get(), setupSize);
        _cacheStart = 0;
        _cachedData = ret;
        _loadPosition = ret;
@@ -342,7 +342,7 @@
        // the "the edge", and "warm up" the remaining data.
        int ret;
        if (_cachedData + _chunkSize > _cacheSize) {
-               ret = _stream->read_bytes(_cache.get() + _cachedData, 
_cacheSize - _cachedData);
+               ret = _stream->read(_cache.get() + _cachedData, _cacheSize - 
_cachedData);
 
                _cachedData += ret;
                if (ret != _cacheSize - _cachedData) {
@@ -365,7 +365,7 @@
                }
                
        } else {
-               ret = _stream->read_bytes(_cache.get() + _cachedData, 
_chunkSize);
+               ret = _stream->read(_cache.get() + _cachedData, _chunkSize);
                if (ret != _chunkSize) {
 #ifdef GNASH_DEBUG_LOAD_THREAD
                        log_debug("LoadThread completed during fillCache (tried 
to read %d bytes, but read %d)",

Index: libbase/curl_adapter.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/curl_adapter.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -b -r1.64 -r1.65
--- libbase/curl_adapter.cpp    9 Jun 2008 18:12:55 -0000       1.64
+++ libbase/curl_adapter.cpp    9 Jun 2008 19:08:25 -0000       1.65
@@ -371,7 +371,7 @@
        //
        /// Return number of actually read bytes
        ///
-       virtual int read_bytes(void *dst, int bytes);
+       virtual int read(void *dst, int bytes);
 
        /// Return true if EOF has been reached
        virtual bool eof() const;
@@ -851,7 +851,7 @@
 
 /*public*/
 int
-CurlStreamFile::read_bytes(void *dst, int bytes)
+CurlStreamFile::read(void *dst, int bytes)
 {
        if ( eof() || _error ) return 0;
 

Index: libbase/jpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/jpeg.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- libbase/jpeg.cpp    9 Jun 2008 14:31:52 -0000       1.25
+++ libbase/jpeg.cpp    9 Jun 2008 19:08:26 -0000       1.26
@@ -85,7 +85,7 @@
                        rw_source_IOChannel*    src = (rw_source_IOChannel*) 
cinfo->src;
 
                        // TODO: limit read as requested by caller
-                       size_t  bytes_read = 
src->m_in_stream->read_bytes(src->m_buffer, IO_BUF_SIZE);
+                       size_t  bytes_read = 
src->m_in_stream->read(src->m_buffer, IO_BUF_SIZE);
 
                        if (bytes_read <= 0) {
                                // Is the file completely empty?
@@ -263,7 +263,7 @@
                        rw_dest_IOChannel*      dest = (rw_dest_IOChannel*) 
cinfo->dest;
                        assert(dest);
 
-                       if (dest->m_out_stream->write_bytes(dest->m_buffer, 
IO_BUF_SIZE) != IO_BUF_SIZE)
+                       if (dest->m_out_stream->write(dest->m_buffer, 
IO_BUF_SIZE) != IO_BUF_SIZE)
                        {
                                // Error.
                                // @@ bah, exceptions suck.  TODO consider 
alternatives.
@@ -289,7 +289,7 @@
                        // Write any remaining data.
                        int     datacount = IO_BUF_SIZE - 
dest->m_pub.free_in_buffer;
                        if (datacount > 0) {
-                               if 
(dest->m_out_stream->write_bytes(dest->m_buffer, datacount) != datacount)
+                               if (dest->m_out_stream->write(dest->m_buffer, 
datacount) != datacount)
                                {
                                        // Error.
                                        
gnash::log_error("jpeg::rw_dest_IOChannel::term_destination couldn't write 
data.");

Index: libbase/tu_file.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/tu_file.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- libbase/tu_file.cpp 9 Jun 2008 18:12:55 -0000       1.31
+++ libbase/tu_file.cpp 9 Jun 2008 19:08:26 -0000       1.32
@@ -266,8 +266,8 @@
     while (bytes_left) {
        int     to_copy = std::min<int>(bytes_left, BUFSIZE);
        
-       int     read_count = src->read_bytes(buffer, to_copy);
-       int     write_count = write_bytes(buffer, read_count);
+       int     read_count = src->read(buffer, to_copy);
+       int     write_count = write(buffer, read_count);
        
        assert(write_count <= read_count);
        assert(read_count <= to_copy);

Index: libbase/tu_file.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/tu_file.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- libbase/tu_file.h   9 Jun 2008 18:12:55 -0000       1.25
+++ libbase/tu_file.h   9 Jun 2008 19:08:26 -0000       1.26
@@ -156,7 +156,7 @@
     /// TODO: define what happens when the stream
     ///       is in error condition, see get_error().
     ///
-    int read_bytes(void* dst, int num)
+    int read(void* dst, int num)
     {
         return m_read(dst, num, m_data);
     }
@@ -166,7 +166,7 @@
     /// TODO: define what happens when the stream
     ///       is in error condition, see get_error().
     ///
-    int write_bytes(const void* src, int num)
+    int write(const void* src, int num)
     {
         return m_write(src, num, m_data);
     }

Index: libbase/zlib_adapter.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/zlib_adapter.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- libbase/zlib_adapter.cpp    9 Jun 2008 18:12:55 -0000       1.26
+++ libbase/zlib_adapter.cpp    9 Jun 2008 19:08:26 -0000       1.27
@@ -150,7 +150,7 @@
                                if (m_zstream.avail_in == 0)
                                {
                                        // Get more raw data.
-                                       int     new_bytes = 
m_in->read_bytes(m_rawdata, ZBUF_SIZE);
+                                       int     new_bytes = 
m_in->read(m_rawdata, ZBUF_SIZE);
                                        if (new_bytes == 0)
                                        {
                                                // The cupboard is bare!  We 
have nothing to feed to inflate().

Index: libmedia/FLVParser.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/FLVParser.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- libmedia/FLVParser.cpp      9 Jun 2008 18:12:55 -0000       1.15
+++ libmedia/FLVParser.cpp      9 Jun 2008 19:08:26 -0000       1.16
@@ -93,7 +93,7 @@
 
        // Read the tag info
        boost::uint8_t tag[12];
-       int actuallyRead = _stream->read_bytes(tag, 12);
+       int actuallyRead = _stream->read(tag, 12);
        if ( actuallyRead < 12 )
        {
                if ( actuallyRead )
@@ -178,7 +178,7 @@
                                }
                                boost::uint8_t videohead[12];
 
-                               int actuallyRead = 
_stream->read_bytes(videohead, 12);
+                               int actuallyRead = _stream->read(videohead, 12);
                                _stream->seek(bkpos); // rewind
 
                                if ( actuallyRead < 12 )
@@ -260,7 +260,7 @@
 
        // Read the header
        boost::uint8_t header[9];
-       if ( _stream->read_bytes(header, 9) != 9 )
+       if ( _stream->read(header, 9) != 9 )
        {
                log_error("FLVParser::parseHeader: couldn't read 9 bytes of 
header");
                return false;
@@ -320,7 +320,7 @@
        unsigned long int chunkSize = smallestMultipleContaining(READ_CHUNKS, 
dataSize+PADDING_BYTES);
 
        frame->data.reset( new boost::uint8_t[chunkSize] );
-       size_t bytesread = in.read_bytes(frame->data.get(), dataSize);
+       size_t bytesread = in.read(frame->data.get(), dataSize);
        if ( bytesread < dataSize )
        {
                log_error("FLVParser::readAudioFrame: could only read %d/%d 
bytes", bytesread, dataSize);
@@ -344,7 +344,7 @@
        unsigned long int chunkSize = smallestMultipleContaining(READ_CHUNKS, 
dataSize+PADDING_BYTES);
 
        boost::uint8_t* data = new boost::uint8_t[chunkSize];
-       size_t bytesread = in.read_bytes(data, dataSize);
+       size_t bytesread = in.read(data, dataSize);
 
        unsigned long int padding = chunkSize-dataSize;
        assert(padding);

Index: libmedia/MediaHandler.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/MediaHandler.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- libmedia/MediaHandler.cpp   9 Jun 2008 18:12:55 -0000       1.4
+++ libmedia/MediaHandler.cpp   9 Jun 2008 19:08:26 -0000       1.5
@@ -34,7 +34,7 @@
 {
        char head[4] = {0, 0, 0, 0};
        stream.seek(0);
-       size_t actuallyRead = stream.read_bytes(head, 3);
+       size_t actuallyRead = stream.read(head, 3);
        stream.seek(0);
 
        if (actuallyRead < 3)

Index: libmedia/ffmpeg/MediaParserFfmpeg.cpp
===================================================================
RCS file: /sources/gnash/gnash/libmedia/ffmpeg/MediaParserFfmpeg.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- libmedia/ffmpeg/MediaParserFfmpeg.cpp       9 Jun 2008 18:12:56 -0000       
1.11
+++ libmedia/ffmpeg/MediaParserFfmpeg.cpp       9 Jun 2008 19:08:26 -0000       
1.12
@@ -68,7 +68,7 @@
        probe_data.buf_size = 2048;
 
        assert(_stream->tell() == 0);
-       size_t actuallyRead = _stream->read_bytes(probe_data.buf, 
probe_data.buf_size);
+       size_t actuallyRead = _stream->read(probe_data.buf, 
probe_data.buf_size);
        _stream->seek(0);
 
        if (actuallyRead < 1)
@@ -403,7 +403,7 @@
        assert( _stream.get() );
        IOChannel& in = *_stream;
 
-       size_t ret = in.read_bytes(static_cast<void*>(buf), buf_size);
+       size_t ret = in.read(static_cast<void*>(buf), buf_size);
 
        return ret;
 

Index: server/LoadVariablesThread.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/LoadVariablesThread.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- server/LoadVariablesThread.cpp      9 Jun 2008 18:12:56 -0000       1.14
+++ server/LoadVariablesThread.cpp      9 Jun 2008 19:08:26 -0000       1.15
@@ -54,7 +54,7 @@
        char* buf = new char[CHUNK_SIZE];
        unsigned int parsedLines = 0;
        // TODO: use read_string ?
-       while ( size_t read = _stream->read_bytes(buf, CHUNK_SIZE) )
+       while ( size_t read = _stream->read(buf, CHUNK_SIZE) )
        {
 #ifdef DEBUG_LOAD_VARIABLES
                log_debug("Read %u bytes", read);

Index: server/impl.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/impl.cpp,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -b -r1.155 -r1.156
--- server/impl.cpp     9 Jun 2008 18:12:56 -0000       1.155
+++ server/impl.cpp     9 Jun 2008 19:08:26 -0000       1.156
@@ -317,7 +317,7 @@
 
   unsigned char buf[3];
   
-  if ( 3 < in->read_bytes(buf, 3) )
+  if ( 3 < in->read(buf, 3) )
   {
     log_error(_("Can't read file header"));
     in->seek(0);
@@ -350,7 +350,7 @@
   // Check if it is an swf embedded in a player (.exe-file)
   if ((buf[0] == 'M') && (buf[1] == 'Z')) {
 
-    if ( 3 < in->read_bytes(buf, 3) )
+    if ( 3 < in->read(buf, 3) )
     {
       in->seek(0);
       return GNASH_FILETYPE_UNKNOWN;

Index: server/stream.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/stream.cpp,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- server/stream.cpp   9 Jun 2008 18:12:56 -0000       1.57
+++ server/stream.cpp   9 Jun 2008 19:08:26 -0000       1.58
@@ -80,7 +80,7 @@
 
     if ( ! count ) return 0;
 
-    return m_input->read_bytes(buf, count);
+    return m_input->read(buf, count);
 }
 
 bool SWFStream::read_bit()
@@ -132,8 +132,8 @@
         assert (bytesToRead <= 4);
         byte cache[4]; // at most 4 bytes in the cache
 
-        if ( spareBits ) m_input->read_bytes(&cache, bytesToRead+1);
-        else m_input->read_bytes(&cache, bytesToRead);
+        if ( spareBits ) m_input->read(&cache, bytesToRead+1);
+        else m_input->read(&cache, bytesToRead);
 
         for (int i=0; i<bytesToRead; ++i)
         {

Index: server/asobj/NetConnection.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetConnection.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- server/asobj/NetConnection.cpp      9 Jun 2008 18:12:56 -0000       1.65
+++ server/asobj/NetConnection.cpp      9 Jun 2008 19:08:27 -0000       1.66
@@ -176,7 +176,7 @@
     return 0;
   }
 
-  return _loader->read_bytes( dst, bytes );
+  return _loader->read( dst, bytes );
 }
 
 

Index: testsuite/libbase/CurlStreamTest.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libbase/CurlStreamTest.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- testsuite/libbase/CurlStreamTest.cpp        9 Jun 2008 18:12:58 -0000       
1.10
+++ testsuite/libbase/CurlStreamTest.cpp        9 Jun 2008 19:08:27 -0000       
1.11
@@ -50,7 +50,7 @@
 
        char buf[CHUNK_SIZE];
 
-       while (size_t read = reader->read_bytes(buf, CHUNK_SIZE) )
+       while (size_t read = reader->read(buf, CHUNK_SIZE) )
        {
                for (size_t i=0; i<read; i++) {
                        os << buf[i];
@@ -68,7 +68,7 @@
 
        char buf[CHUNK_SIZE];
 
-       while ( size_t read = reader->read_bytes(buf, CHUNK_SIZE) )
+       while ( size_t read = reader->read(buf, CHUNK_SIZE) )
        {
                for (size_t i=0; i<read; i++) {
                        os << buf[i];

Index: testsuite/libbase/NoSeekFileTest.cpp
===================================================================
RCS file: /sources/gnash/gnash/testsuite/libbase/NoSeekFileTest.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- testsuite/libbase/NoSeekFileTest.cpp        9 Jun 2008 18:12:58 -0000       
1.11
+++ testsuite/libbase/NoSeekFileTest.cpp        9 Jun 2008 19:08:27 -0000       
1.12
@@ -65,11 +65,11 @@
        stringstream ss;
 
 
-       size_t read_bytes = 0;
+       size_t read = 0;
 
        for(;;)
        {
-               size_t sz1 = reader->read_bytes(buf, CHUNK_SIZE);
+               size_t sz1 = reader->read(buf, CHUNK_SIZE);
                size_t sz2 = read(fd, buf2, CHUNK_SIZE);
 
                if ( sz1 != sz2 )
@@ -97,10 +97,10 @@
                        return false;
                }
 
-               read_bytes+=sz1;
+               read+=sz1;
        }
 
-       if ( read_bytes == 0 ) 
+       if ( read == 0 ) 
        {
                runtest.fail("No bytes read from either " + string(first) + " 
or " + string(second) + " file");
                return false;
@@ -113,7 +113,7 @@
                return false;
        }
 
-       ss << "compared " << read_bytes << " bytes from "
+       ss << "compared " << read << " bytes from "
                << first << " and " << second;
 
        runtest.pass(ss.str());




reply via email to

[Prev in Thread] Current Thread [Next in Thread]