mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-11 06:07:12 -06:00
15.08
This commit is contained in:
committed by
Kornel Lesiński
parent
f6444c3256
commit
6543c28020
@@ -8,7 +8,6 @@
|
||||
#include "../../Common/MyCom.h"
|
||||
|
||||
#include "../../Windows/Defs.h"
|
||||
#include "../../Windows/PropVariant.h"
|
||||
|
||||
#include "../ICoder.h"
|
||||
|
||||
@@ -23,7 +22,7 @@ extern const CHasherInfo *g_Hashers[];
|
||||
static void SetPropFromAscii(const char *s, PROPVARIANT *prop) throw()
|
||||
{
|
||||
UINT len = (UINT)strlen(s);
|
||||
OLECHAR *dest = ::SysAllocStringLen(NULL, len);
|
||||
BSTR dest = ::SysAllocStringLen(NULL, len);
|
||||
if (dest)
|
||||
{
|
||||
for (UINT i = 0; i <= len; i++)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
static HRESULT SResToHRESULT(SRes res)
|
||||
{
|
||||
switch(res)
|
||||
switch (res)
|
||||
{
|
||||
case SZ_OK: return S_OK;
|
||||
case SZ_ERROR_MEM: return E_OUTOFMEMORY;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
static HRESULT SResToHRESULT(SRes res)
|
||||
{
|
||||
switch(res)
|
||||
switch (res)
|
||||
{
|
||||
case SZ_OK: return S_OK;
|
||||
case SZ_ERROR_MEM: return E_OUTOFMEMORY;
|
||||
|
||||
@@ -457,17 +457,16 @@ HRESULT CDecoder::CodeSpec(UInt32 curSize)
|
||||
|
||||
HRESULT CDecoder::Code(const Byte *inData, size_t inSize, UInt32 outSize)
|
||||
{
|
||||
if (_pos == _winSize)
|
||||
{
|
||||
_pos = 0;
|
||||
_overDict = true;
|
||||
}
|
||||
|
||||
if (!_keepHistory)
|
||||
{
|
||||
_pos = 0;
|
||||
_overDict = false;
|
||||
}
|
||||
else if (_pos == _winSize)
|
||||
{
|
||||
_pos = 0;
|
||||
_overDict = true;
|
||||
}
|
||||
|
||||
_writePos = _pos;
|
||||
_unpackedData = _win + _pos;
|
||||
|
||||
@@ -49,7 +49,7 @@ STDMETHODIMP CDecoder::SetDecoderProperties2(const Byte *props, UInt32 size)
|
||||
|
||||
HRESULT CDecoder::CodeSpec(Byte *memStream, UInt32 size)
|
||||
{
|
||||
switch(_status)
|
||||
switch (_status)
|
||||
{
|
||||
case kStatus_Finished: return S_OK;
|
||||
case kStatus_Error: return S_FALSE;
|
||||
|
||||
@@ -56,7 +56,7 @@ Byte CFilter::Decode(int &channelDelta, Byte deltaByte)
|
||||
Dif[i] = 0;
|
||||
}
|
||||
|
||||
switch(numMinDif)
|
||||
switch (numMinDif)
|
||||
{
|
||||
case 1: if (K1 >= -16) K1--; break;
|
||||
case 2: if (K1 < 16) K1++; break;
|
||||
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
_winPos += len;
|
||||
do
|
||||
*dest++ = *src++;
|
||||
while(--len != 0);
|
||||
while (--len != 0);
|
||||
return;
|
||||
}
|
||||
do
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
winPos = (winPos + 1) & kWindowMask;
|
||||
pos = (pos + 1) & kWindowMask;
|
||||
}
|
||||
while(--len != 0);
|
||||
while (--len != 0);
|
||||
_winPos = winPos;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ void CBitDecoder::Prepare2() throw()
|
||||
|
||||
size_t rem = _bufLim - _buf;
|
||||
if (rem != 0)
|
||||
memcpy(_bufBase, _buf, rem);
|
||||
memmove(_bufBase, _buf, rem);
|
||||
|
||||
_bufLim = _bufBase + rem;
|
||||
_processedSize += (_buf - _bufBase);
|
||||
|
||||
Reference in New Issue
Block a user