Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2015-10-05 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:56 +0300
commit6543c280208393fa32cb0094f770d14c1cfb13b2 (patch)
treebeb90f5e81e85e7957463ee5ad89cab0b3566560 /CPP/7zip/Compress
parentf6444c32568553e0261ca0105083658f12be6284 (diff)
15.0815.08
Diffstat (limited to 'CPP/7zip/Compress')
-rw-r--r--CPP/7zip/Compress/CodecExports.cpp3
-rw-r--r--CPP/7zip/Compress/Lzma2Decoder.cpp2
-rw-r--r--CPP/7zip/Compress/LzmaDecoder.cpp2
-rw-r--r--CPP/7zip/Compress/LzxDecoder.cpp9
-rw-r--r--CPP/7zip/Compress/PpmdDecoder.cpp2
-rw-r--r--CPP/7zip/Compress/Rar2Decoder.cpp2
-rw-r--r--CPP/7zip/Compress/Rar3Decoder.h4
-rw-r--r--CPP/7zip/Compress/Rar5Decoder.cpp2
8 files changed, 12 insertions, 14 deletions
diff --git a/CPP/7zip/Compress/CodecExports.cpp b/CPP/7zip/Compress/CodecExports.cpp
index 019cb3c1..99085040 100644
--- a/CPP/7zip/Compress/CodecExports.cpp
+++ b/CPP/7zip/Compress/CodecExports.cpp
@@ -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++)
diff --git a/CPP/7zip/Compress/Lzma2Decoder.cpp b/CPP/7zip/Compress/Lzma2Decoder.cpp
index 05b136a7..1a378bbe 100644
--- a/CPP/7zip/Compress/Lzma2Decoder.cpp
+++ b/CPP/7zip/Compress/Lzma2Decoder.cpp
@@ -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;
diff --git a/CPP/7zip/Compress/LzmaDecoder.cpp b/CPP/7zip/Compress/LzmaDecoder.cpp
index d96be8ce..9002678a 100644
--- a/CPP/7zip/Compress/LzmaDecoder.cpp
+++ b/CPP/7zip/Compress/LzmaDecoder.cpp
@@ -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;
diff --git a/CPP/7zip/Compress/LzxDecoder.cpp b/CPP/7zip/Compress/LzxDecoder.cpp
index 8bdcc307..55231ce5 100644
--- a/CPP/7zip/Compress/LzxDecoder.cpp
+++ b/CPP/7zip/Compress/LzxDecoder.cpp
@@ -457,16 +457,15 @@ HRESULT CDecoder::CodeSpec(UInt32 curSize)
HRESULT CDecoder::Code(const Byte *inData, size_t inSize, UInt32 outSize)
{
- if (_pos == _winSize)
+ if (!_keepHistory)
{
_pos = 0;
- _overDict = true;
+ _overDict = false;
}
-
- if (!_keepHistory)
+ else if (_pos == _winSize)
{
_pos = 0;
- _overDict = false;
+ _overDict = true;
}
_writePos = _pos;
diff --git a/CPP/7zip/Compress/PpmdDecoder.cpp b/CPP/7zip/Compress/PpmdDecoder.cpp
index ce00343b..c868730e 100644
--- a/CPP/7zip/Compress/PpmdDecoder.cpp
+++ b/CPP/7zip/Compress/PpmdDecoder.cpp
@@ -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;
diff --git a/CPP/7zip/Compress/Rar2Decoder.cpp b/CPP/7zip/Compress/Rar2Decoder.cpp
index 4d1bd6b2..b3f2b4b3 100644
--- a/CPP/7zip/Compress/Rar2Decoder.cpp
+++ b/CPP/7zip/Compress/Rar2Decoder.cpp
@@ -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;
diff --git a/CPP/7zip/Compress/Rar3Decoder.h b/CPP/7zip/Compress/Rar3Decoder.h
index d8dfd11a..c130cec6 100644
--- a/CPP/7zip/Compress/Rar3Decoder.h
+++ b/CPP/7zip/Compress/Rar3Decoder.h
@@ -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;
}
diff --git a/CPP/7zip/Compress/Rar5Decoder.cpp b/CPP/7zip/Compress/Rar5Decoder.cpp
index 19b40f39..627f7ee6 100644
--- a/CPP/7zip/Compress/Rar5Decoder.cpp
+++ b/CPP/7zip/Compress/Rar5Decoder.cpp
@@ -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);