4.25 beta

This commit is contained in:
Igor Pavlov
2005-08-01 00:00:00 +00:00
committed by Kornel Lesiński
parent 47f4915611
commit af1fe52701
359 changed files with 5969 additions and 9853 deletions

View File

@@ -5,6 +5,7 @@
#ifndef _WIN32
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#endif
#include "FileStreams.h"

View File

@@ -59,9 +59,9 @@ public:
if(_pos >= _bufferSize)
WriteBlock();
}
void WriteBytes(const void *data, UInt32 size)
void WriteBytes(const void *data, size_t size)
{
for (UInt32 i = 0; i < size; i++)
for (size_t i = 0; i < size; i++)
WriteByte(((const Byte *)data)[i]);
}

View File

@@ -4,5 +4,6 @@
#define __STDAFX_H
#include "../../Common/MyWindows.h"
#include "../../Common/NewHandler.h"
#endif

View File

@@ -88,7 +88,7 @@ STDMETHODIMP CSequentialOutStreamImp2::Write(const void *data, UInt32 size, UInt
{
UInt32 newSize = size;
if (_pos + size > _size)
newSize = _size - _pos;
newSize = (UInt32)(_size - _pos);
memmove(_buffer + _pos, data, newSize);
if(processedSize != NULL)
*processedSize = newSize;
@@ -148,9 +148,9 @@ STDMETHODIMP CSequentialInStreamRollback::ReadPart(void *data, UInt32 size, UInt
{
if (_currentPos != _currentSize)
{
UInt32 curSize = _currentSize - _currentPos;
size_t curSize = _currentSize - _currentPos;
if (size > curSize)
size = curSize;
size = (UInt32)curSize;
memmove(data, _buffer + _currentPos, size);
_currentPos += size;
if (processedSize != 0)
@@ -159,7 +159,7 @@ STDMETHODIMP CSequentialInStreamRollback::ReadPart(void *data, UInt32 size, UInt
}
UInt32 realProcessedSize;
if (size > _bufferSize)
size = _bufferSize;
size = (UInt32)_bufferSize;
HRESULT result = _stream->ReadPart(_buffer, size, &realProcessedSize);
memmove(data, _buffer, realProcessedSize);
_size += realProcessedSize;