예제 #1
0
파일: Buffer.cpp 프로젝트: rdrago/LCSource
// move all data from another buffer to this one
void CBuffer::MoveBuffer(CBuffer &buFrom)
{
    // repeat
    for(;;) {
        // read a block from the other buffer
        UBYTE aub[256];
        SLONG slSize = buFrom.ReadBytes(aub, sizeof(aub));
        // if nothing read
        if (slSize<=0) {
            // stop
            return;
        }
        // write here what was read
        WriteBytes(&aub, slSize);
    }
}