Compare commits

...

1 Commits
16.01 ... 16.02

Author SHA1 Message Date
Igor Pavlov
1eddf527ca 16.02 2016-05-28 00:17:00 +01:00
25 changed files with 86 additions and 74 deletions

View File

@@ -1,9 +1,9 @@
#define MY_VER_MAJOR 16 #define MY_VER_MAJOR 16
#define MY_VER_MINOR 01 #define MY_VER_MINOR 02
#define MY_VER_BUILD 0 #define MY_VER_BUILD 0
#define MY_VERSION_NUMBERS "16.01" #define MY_VERSION_NUMBERS "16.02"
#define MY_VERSION "16.01" #define MY_VERSION "16.02"
#define MY_DATE "2016-05-19" #define MY_DATE "2016-05-21"
#undef MY_COPYRIGHT #undef MY_COPYRIGHT
#undef MY_VERSION_COPYRIGHT_DATE #undef MY_VERSION_COPYRIGHT_DATE
#define MY_AUTHOR_NAME "Igor Pavlov" #define MY_AUTHOR_NAME "Igor Pavlov"

10
C/Aes.c
View File

@@ -1,5 +1,5 @@
/* Aes.c -- AES encryption / decryption /* Aes.c -- AES encryption / decryption
2015-02-23 : Igor Pavlov : Public domain */ 2016-05-21 : Igor Pavlov : Public domain */
#include "Precomp.h" #include "Precomp.h"
@@ -167,10 +167,10 @@ void MY_FAST_CALL Aes_SetKey_Dec(UInt32 *w, const Byte *key, unsigned keySize)
{ {
UInt32 r = w[i]; UInt32 r = w[i];
w[i] = w[i] =
D[ Sbox[gb0(r)]] ^ D[ (unsigned)Sbox[gb0(r)]] ^
D[0x100 + Sbox[gb1(r)]] ^ D[0x100 + (unsigned)Sbox[gb1(r)]] ^
D[0x200 + Sbox[gb2(r)]] ^ D[0x200 + (unsigned)Sbox[gb2(r)]] ^
D[0x300 + Sbox[gb3(r)]]; D[0x300 + (unsigned)Sbox[gb3(r)]];
} }
} }

View File

@@ -1,5 +1,5 @@
/* Ppmd7.c -- PPMdH codec /* Ppmd7.c -- PPMdH codec
2015-09-28 : Igor Pavlov : Public domain 2016-05-21 : Igor Pavlov : Public domain
This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
#include "Precomp.h" #include "Precomp.h"
@@ -639,10 +639,10 @@ CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *escFreq)
unsigned nonMasked = p->MinContext->NumStats - numMasked; unsigned nonMasked = p->MinContext->NumStats - numMasked;
if (p->MinContext->NumStats != 256) if (p->MinContext->NumStats != 256)
{ {
see = p->See[p->NS2Indx[nonMasked - 1]] + see = p->See[(unsigned)p->NS2Indx[nonMasked - 1]] +
(nonMasked < (unsigned)SUFFIX(p->MinContext)->NumStats - p->MinContext->NumStats) + (nonMasked < (unsigned)SUFFIX(p->MinContext)->NumStats - p->MinContext->NumStats) +
2 * (p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + 2 * (unsigned)(p->MinContext->SummFreq < 11 * p->MinContext->NumStats) +
4 * (numMasked > nonMasked) + 4 * (unsigned)(numMasked > nonMasked) +
p->HiBitsFlag; p->HiBitsFlag;
{ {
unsigned r = (see->Summ >> see->Shift); unsigned r = (see->Summ >> see->Shift);

View File

@@ -1,5 +1,5 @@
/* Ppmd7.h -- PPMdH compression codec /* Ppmd7.h -- PPMdH compression codec
2010-03-12 : Igor Pavlov : Public domain 2016-05-21 : Igor Pavlov : Public domain
This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */
/* This code supports virtual RangeDecoder and includes the implementation /* This code supports virtual RangeDecoder and includes the implementation
@@ -86,10 +86,10 @@ void Ppmd7_Update2(CPpmd7 *p);
void Ppmd7_UpdateBin(CPpmd7 *p); void Ppmd7_UpdateBin(CPpmd7 *p);
#define Ppmd7_GetBinSumm(p) \ #define Ppmd7_GetBinSumm(p) \
&p->BinSumm[Ppmd7Context_OneState(p->MinContext)->Freq - 1][p->PrevSuccess + \ &p->BinSumm[(unsigned)Ppmd7Context_OneState(p->MinContext)->Freq - 1][p->PrevSuccess + \
p->NS2BSIndx[Ppmd7_GetContext(p, p->MinContext->Suffix)->NumStats - 1] + \ p->NS2BSIndx[Ppmd7_GetContext(p, p->MinContext->Suffix)->NumStats - 1] + \
(p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]) + \ (p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]) + \
2 * p->HB2Flag[Ppmd7Context_OneState(p->MinContext)->Symbol] + \ 2 * p->HB2Flag[(unsigned)Ppmd7Context_OneState(p->MinContext)->Symbol] + \
((p->RunLength >> 26) & 0x20)] ((p->RunLength >> 26) & 0x20)]
CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *scale); CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *scale);

View File

@@ -1,5 +1,5 @@
/* Ppmd8.c -- PPMdI codec /* Ppmd8.c -- PPMdI codec
2016-05-16 : Igor Pavlov : Public domain 2016-05-21 : Igor Pavlov : Public domain
This code is based on PPMd var.I (2002): Dmitry Shkarin : Public domain */ This code is based on PPMd var.I (2002): Dmitry Shkarin : Public domain */
#include "Precomp.h" #include "Precomp.h"
@@ -1038,9 +1038,9 @@ CPpmd_See *Ppmd8_MakeEscFreq(CPpmd8 *p, unsigned numMasked1, UInt32 *escFreq)
CPpmd_See *see; CPpmd_See *see;
if (p->MinContext->NumStats != 0xFF) if (p->MinContext->NumStats != 0xFF)
{ {
see = p->See[p->NS2Indx[p->MinContext->NumStats + 2] - 3] + see = p->See[(unsigned)p->NS2Indx[(unsigned)p->MinContext->NumStats + 2] - 3] +
(p->MinContext->SummFreq > 11 * ((unsigned)p->MinContext->NumStats + 1)) + (p->MinContext->SummFreq > 11 * ((unsigned)p->MinContext->NumStats + 1)) +
2 * (2 * (unsigned)p->MinContext->NumStats < 2 * (unsigned)(2 * (unsigned)p->MinContext->NumStats <
((unsigned)SUFFIX(p->MinContext)->NumStats + numMasked1)) + ((unsigned)SUFFIX(p->MinContext)->NumStats + numMasked1)) +
p->MinContext->Flags; p->MinContext->Flags;
{ {

View File

@@ -1,5 +1,5 @@
/* Sha1.c -- SHA-1 Hash /* Sha1.c -- SHA-1 Hash
2016-02-09 : Igor Pavlov : Public domain 2016-05-20 : Igor Pavlov : Public domain
This code is based on public domain code of Steve Reid from Wei Dai's Crypto++ library. */ This code is based on public domain code of Steve Reid from Wei Dai's Crypto++ library. */
#include "Precomp.h" #include "Precomp.h"
@@ -212,7 +212,7 @@ void Sha1_Update(CSha1 *p, const Byte *data, size_t size)
} }
} }
void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size, int rar350Mode) void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size /* , int rar350Mode */)
{ {
int returnRes = False; int returnRes = False;
@@ -246,7 +246,8 @@ void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size, int rar350Mode)
SetUi32(prev, d); SetUi32(prev, d);
} }
} }
returnRes = rar350Mode; // returnRes = rar350Mode;
returnRes = True;
} }
} }
} }

View File

@@ -1,5 +1,5 @@
/* Sha1.h -- SHA-1 Hash /* Sha1.h -- SHA-1 Hash
2015-03-04 : Igor Pavlov : Public domain */ 2016-05-20 : Igor Pavlov : Public domain */
#ifndef __7Z_SHA1_H #ifndef __7Z_SHA1_H
#define __7Z_SHA1_H #define __7Z_SHA1_H
@@ -27,7 +27,7 @@ void Sha1_GetBlockDigest(CSha1 *p, const UInt32 *data, UInt32 *destDigest);
void Sha1_Update(CSha1 *p, const Byte *data, size_t size); void Sha1_Update(CSha1 *p, const Byte *data, size_t size);
void Sha1_Final(CSha1 *p, Byte *digest); void Sha1_Final(CSha1 *p, Byte *digest);
void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size, int rar350Mode); void Sha1_Update_Rar(CSha1 *p, Byte *data, size_t size /* , int rar350Mode */);
void Sha1_32_PrepareBlock(const CSha1 *p, UInt32 *block, unsigned size); void Sha1_32_PrepareBlock(const CSha1 *p, UInt32 *block, unsigned size);
void Sha1_32_Update(CSha1 *p, const UInt32 *data, size_t size); void Sha1_32_Update(CSha1 *p, const UInt32 *data, size_t size);

View File

@@ -220,6 +220,8 @@ HRESULT CInArchive::Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit)
ArcInfo.Flags = Get16(buf + 3); ArcInfo.Flags = Get16(buf + 3);
UInt32 headerSize = NHeader::NArchive::kArchiveHeaderSize; UInt32 headerSize = NHeader::NArchive::kArchiveHeaderSize;
/*
if (ArcInfo.IsThereEncryptVer()) if (ArcInfo.IsThereEncryptVer())
{ {
if (blockSize <= headerSize) if (blockSize <= headerSize)
@@ -229,6 +231,8 @@ HRESULT CInArchive::Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit)
ArcInfo.EncryptVersion = buf[NHeader::NArchive::kArchiveHeaderSize]; ArcInfo.EncryptVersion = buf[NHeader::NArchive::kArchiveHeaderSize];
headerSize += 1; headerSize += 1;
} }
*/
if (blockSize < headerSize if (blockSize < headerSize
|| buf[2] != NHeader::NBlockType::kArchiveHeader || buf[2] != NHeader::NBlockType::kArchiveHeader
|| !CheckHeaderCrc(buf, headerSize)) || !CheckHeaderCrc(buf, headerSize))
@@ -509,7 +513,7 @@ HRESULT CInArchive::GetNextItem(CItem &item, ICryptoGetTextPassword *getTextPass
m_RarAESSpec = new NCrypto::NRar3::CDecoder; m_RarAESSpec = new NCrypto::NRar3::CDecoder;
m_RarAES = m_RarAESSpec; m_RarAES = m_RarAESSpec;
} }
m_RarAESSpec->SetRar350Mode(ArcInfo.IsEncryptOld()); // m_RarAESSpec->SetRar350Mode(ArcInfo.IsEncryptOld());
// Salt // Salt
const UInt32 kSaltSize = 8; const UInt32 kSaltSize = 8;
@@ -1552,7 +1556,7 @@ STDMETHODIMP CHandler::Extract(const UInt32 *indices, UInt32 numItems,
rar3CryptoDecoderSpec = new NCrypto::NRar3::CDecoder; rar3CryptoDecoderSpec = new NCrypto::NRar3::CDecoder;
rar3CryptoDecoder = rar3CryptoDecoderSpec; rar3CryptoDecoder = rar3CryptoDecoderSpec;
} }
rar3CryptoDecoderSpec->SetRar350Mode(item.UnPackVersion < 36); // rar3CryptoDecoderSpec->SetRar350Mode(item.UnPackVersion < 36);
/* /*
CMyComPtr<ICompressSetDecoderProperties2> cryptoProperties; CMyComPtr<ICompressSetDecoderProperties2> cryptoProperties;
RINOK(rar3CryptoDecoder.QueryInterface(IID_ICompressSetDecoderProperties2, RINOK(rar3CryptoDecoder.QueryInterface(IID_ICompressSetDecoderProperties2,

View File

@@ -41,9 +41,9 @@ struct CInArcInfo
bool IsRecovery() const { return (Flags & NHeader::NArchive::kRecovery) != 0; } bool IsRecovery() const { return (Flags & NHeader::NArchive::kRecovery) != 0; }
bool IsEncrypted() const { return (Flags & NHeader::NArchive::kBlockEncryption) != 0; } bool IsEncrypted() const { return (Flags & NHeader::NArchive::kBlockEncryption) != 0; }
bool IsFirstVolume() const { return (Flags & NHeader::NArchive::kFirstVolume) != 0; } bool IsFirstVolume() const { return (Flags & NHeader::NArchive::kFirstVolume) != 0; }
bool IsThereEncryptVer() const { return (Flags & NHeader::NArchive::kEncryptVer) != 0; }
bool IsEncryptOld() const { return (!IsThereEncryptVer() || EncryptVersion < 36); } // bool IsThereEncryptVer() const { return (Flags & NHeader::NArchive::kEncryptVer) != 0; }
// bool IsEncryptOld() const { return (!IsThereEncryptVer() || EncryptVersion < 36); }
bool AreMoreVolumes() const { return (EndFlags & NHeader::NArchive::kEndOfArc_Flags_NextVol) != 0; } bool AreMoreVolumes() const { return (EndFlags & NHeader::NArchive::kEndOfArc_Flags_NextVol) != 0; }
bool Is_VolNumber_Defined() const { return (EndFlags & NHeader::NArchive::kEndOfArc_Flags_VolNumber) != 0; } bool Is_VolNumber_Defined() const { return (EndFlags & NHeader::NArchive::kEndOfArc_Flags_VolNumber) != 0; }

View File

@@ -41,7 +41,8 @@ namespace NArchive
const UInt16 kRecovery = 0x40; const UInt16 kRecovery = 0x40;
const UInt16 kBlockEncryption = 0x80; const UInt16 kBlockEncryption = 0x80;
const UInt16 kFirstVolume = 0x100; // (set only by RAR 3.0 and later) const UInt16 kFirstVolume = 0x100; // (set only by RAR 3.0 and later)
const UInt16 kEncryptVer = 0x200; // RAR 3.6 there is EncryptVer Byte in End of MainHeader
// const UInt16 kEncryptVer = 0x200; // RAR 3.6 : that feature was discarded by origial RAR
const UInt16 kEndOfArc_Flags_NextVol = 1; const UInt16 kEndOfArc_Flags_NextVol = 1;
const UInt16 kEndOfArc_Flags_DataCRC = 2; const UInt16 kEndOfArc_Flags_DataCRC = 2;

View File

@@ -203,7 +203,7 @@ HRESULT CHandler::Open2(IInStream *stream, IArchiveOpenCallback *callback)
_streams.Add(stream); _streams.Add(stream);
{ {
UInt64 numFiles = _streams.Size(); const UInt64 numFiles = _streams.Size();
RINOK(callback->SetCompleted(&numFiles, NULL)); RINOK(callback->SetCompleted(&numFiles, NULL));
} }
@@ -218,7 +218,7 @@ HRESULT CHandler::Open2(IInStream *stream, IArchiveOpenCallback *callback)
break; break;
if (result != S_OK) if (result != S_OK)
return result; return result;
if (!stream) if (!nextStream)
break; break;
{ {
/* /*
@@ -228,14 +228,14 @@ HRESULT CHandler::Open2(IInStream *stream, IArchiveOpenCallback *callback)
return E_INVALIDARG; return E_INVALIDARG;
size = prop.uhVal.QuadPart; size = prop.uhVal.QuadPart;
*/ */
RINOK(stream->Seek(0, STREAM_SEEK_END, &size)); RINOK(nextStream->Seek(0, STREAM_SEEK_END, &size));
RINOK(stream->Seek(0, STREAM_SEEK_SET, NULL)); RINOK(nextStream->Seek(0, STREAM_SEEK_SET, NULL));
} }
_totalSize += size; _totalSize += size;
_sizes.Add(size); _sizes.Add(size);
_streams.Add(nextStream); _streams.Add(nextStream);
{ {
UInt64 numFiles = _streams.Size(); const UInt64 numFiles = _streams.Size();
RINOK(callback->SetCompleted(&numFiles, NULL)); RINOK(callback->SetCompleted(&numFiles, NULL));
} }
} }

View File

@@ -388,7 +388,7 @@ static void MethodToProp(int method, int chunksSizeBits, NCOM::CPropVariant &pro
char temp[32]; char temp[32];
if ((unsigned)method < ARRAY_SIZE(k_Methods)) if ((unsigned)method < ARRAY_SIZE(k_Methods))
strcpy(temp, k_Methods[method]); strcpy(temp, k_Methods[(unsigned)method]);
else else
ConvertUInt32ToString((unsigned)method, temp); ConvertUInt32ToString((unsigned)method, temp);

View File

@@ -11,8 +11,8 @@ namespace NRar3 {
CDecoder::CDecoder(): CDecoder::CDecoder():
CAesCbcDecoder(kAesKeySize), CAesCbcDecoder(kAesKeySize),
_thereIsSalt(false), _thereIsSalt(false),
_needCalc(true), _needCalc(true)
_rar350Mode(false) // _rar350Mode(false)
{ {
for (unsigned i = 0; i < sizeof(_salt); i++) for (unsigned i = 0; i < sizeof(_salt); i++)
_salt[i] = 0; _salt[i] = 0;
@@ -111,9 +111,9 @@ void CDecoder::CalcKey()
UInt32 i; UInt32 i;
for (i = 0; i < kNumRounds; i++) for (i = 0; i < kNumRounds; i++)
{ {
sha.UpdateRar(buf, rawSize, _rar350Mode); sha.UpdateRar(buf, rawSize /* , _rar350Mode */);
Byte pswNum[3] = { (Byte)i, (Byte)(i >> 8), (Byte)(i >> 16) }; Byte pswNum[3] = { (Byte)i, (Byte)(i >> 8), (Byte)(i >> 16) };
sha.UpdateRar(pswNum, 3, _rar350Mode); sha.UpdateRar(pswNum, 3 /* , _rar350Mode */);
if (i % (kNumRounds / 16) == 0) if (i % (kNumRounds / 16) == 0)
{ {
NSha1::CContext shaTemp = sha; NSha1::CContext shaTemp = sha;

View File

@@ -24,7 +24,7 @@ class CDecoder:
Byte _salt[8]; Byte _salt[8];
bool _thereIsSalt; bool _thereIsSalt;
bool _needCalc; bool _needCalc;
bool _rar350Mode; // bool _rar350Mode;
CByteBuffer _password; CByteBuffer _password;
@@ -44,7 +44,7 @@ public:
HRESULT SetDecoderProperties2(const Byte *data, UInt32 size); HRESULT SetDecoderProperties2(const Byte *data, UInt32 size);
CDecoder(); CDecoder();
void SetRar350Mode(bool rar350Mode) { _rar350Mode = rar350Mode; } // void SetRar350Mode(bool rar350Mode) { _rar350Mode = rar350Mode; }
}; };
}} }}

View File

@@ -28,7 +28,7 @@ class CContext: public CContextBase
{ {
public: public:
void Update(const Byte *data, size_t size) throw() { Sha1_Update(&_s, data, size); } void Update(const Byte *data, size_t size) throw() { Sha1_Update(&_s, data, size); }
void UpdateRar(Byte *data, size_t size, bool rar350Mode) throw() { Sha1_Update_Rar(&_s, data, size, rar350Mode ? 1 : 0); } void UpdateRar(Byte *data, size_t size /* , bool rar350Mode */) throw() { Sha1_Update_Rar(&_s, data, size /* , rar350Mode ? 1 : 0 */); }
void Final(Byte *digest) throw() { Sha1_Final(&_s, digest); } void Final(Byte *digest) throw() { Sha1_Final(&_s, digest); }
}; };

View File

@@ -1740,10 +1740,10 @@ struct CTotalBenchRes
} }
}; };
static void PrintNumber(IBenchPrintCallback &f, UInt64 value, int size) static void PrintNumber(IBenchPrintCallback &f, UInt64 value, unsigned size)
{ {
char s[128]; char s[128];
int startPos = (int)sizeof(s) - 32; unsigned startPos = (unsigned)sizeof(s) - 32;
memset(s, ' ', startPos); memset(s, ' ', startPos);
ConvertUInt64ToString(value, s + startPos); ConvertUInt64ToString(value, s + startPos);
// if (withSpace) // if (withSpace)
@@ -1751,7 +1751,7 @@ static void PrintNumber(IBenchPrintCallback &f, UInt64 value, int size)
startPos--; startPos--;
size++; size++;
} }
int len = (int)strlen(s + startPos); unsigned len = (unsigned)strlen(s + startPos);
if (size > len) if (size > len)
{ {
startPos -= (size - len); startPos -= (size - len);
@@ -1761,26 +1761,26 @@ static void PrintNumber(IBenchPrintCallback &f, UInt64 value, int size)
f.Print(s + startPos); f.Print(s + startPos);
} }
static const int kFieldSize_Name = 12; static const unsigned kFieldSize_Name = 12;
static const int kFieldSize_SmallName = 4; static const unsigned kFieldSize_SmallName = 4;
static const int kFieldSize_Speed = 9; static const unsigned kFieldSize_Speed = 9;
static const int kFieldSize_Usage = 5; static const unsigned kFieldSize_Usage = 5;
static const int kFieldSize_RU = 6; static const unsigned kFieldSize_RU = 6;
static const int kFieldSize_Rating = 6; static const unsigned kFieldSize_Rating = 6;
static const int kFieldSize_EU = 5; static const unsigned kFieldSize_EU = 5;
static const int kFieldSize_Effec = 5; static const unsigned kFieldSize_Effec = 5;
static const int kFieldSize_TotalSize = 4 + kFieldSize_Speed + kFieldSize_Usage + kFieldSize_RU + kFieldSize_Rating; static const unsigned kFieldSize_TotalSize = 4 + kFieldSize_Speed + kFieldSize_Usage + kFieldSize_RU + kFieldSize_Rating;
static const int kFieldSize_EUAndEffec = 2 + kFieldSize_EU + kFieldSize_Effec; static const unsigned kFieldSize_EUAndEffec = 2 + kFieldSize_EU + kFieldSize_Effec;
static void PrintRating(IBenchPrintCallback &f, UInt64 rating, int size) static void PrintRating(IBenchPrintCallback &f, UInt64 rating, unsigned size)
{ {
PrintNumber(f, (rating + 500000) / 1000000, size); PrintNumber(f, (rating + 500000) / 1000000, size);
} }
static void PrintPercents(IBenchPrintCallback &f, UInt64 val, UInt64 divider, int size) static void PrintPercents(IBenchPrintCallback &f, UInt64 val, UInt64 divider, unsigned size)
{ {
PrintNumber(f, (val * 100 + divider / 2) / divider, size); PrintNumber(f, (val * 100 + divider / 2) / divider, size);
} }
@@ -1882,7 +1882,7 @@ struct CBenchCallbackToPrint: public IBenchCallback
UInt32 DictSize; UInt32 DictSize;
bool Use2Columns; bool Use2Columns;
int NameFieldSize; unsigned NameFieldSize;
bool ShowFreq; bool ShowFreq;
UInt64 CpuFreq; UInt64 CpuFreq;
@@ -2712,7 +2712,7 @@ HRESULT Bench(
f.NewLine(); f.NewLine();
f.Print("Size"); f.Print("Size");
const int kFieldSize_CrcSpeed = 6; const unsigned kFieldSize_CrcSpeed = 6;
unsigned numThreadsTests = 0; unsigned numThreadsTests = 0;
for (;;) for (;;)
{ {
@@ -2875,7 +2875,7 @@ HRESULT Bench(
showFreq = true; showFreq = true;
} }
int fileldSize = kFieldSize_TotalSize; unsigned fileldSize = kFieldSize_TotalSize;
if (showFreq) if (showFreq)
fileldSize += kFieldSize_EUAndEffec; fileldSize += kFieldSize_EUAndEffec;
@@ -2943,9 +2943,8 @@ HRESULT Bench(
printCallback->NewLine(); printCallback->NewLine();
HRESULT res; HRESULT res;
int freqTest; const unsigned kNumCpuTests = 3;
const int kNumCpuTests = 3; for (unsigned freqTest = 0; freqTest < kNumCpuTests; freqTest++)
for (freqTest = 0; freqTest < kNumCpuTests; freqTest++)
{ {
PrintLeft(f, "CPU", kFieldSize_Name); PrintLeft(f, "CPU", kFieldSize_Name);
UInt32 resVal; UInt32 resVal;

View File

@@ -497,7 +497,7 @@ static HRESULT Archive_GetArcProp_UInt(IInArchive *arc, PROPID propid, UInt64 &r
switch (prop.vt) switch (prop.vt)
{ {
case VT_UI4: result = prop.ulVal; defined = true; break; case VT_UI4: result = prop.ulVal; defined = true; break;
case VT_I4: result = prop.lVal; defined = true; break; case VT_I4: result = (Int64)prop.lVal; defined = true; break;
case VT_UI8: result = (UInt64)prop.uhVal.QuadPart; defined = true; break; case VT_UI8: result = (UInt64)prop.uhVal.QuadPart; defined = true; break;
case VT_I8: result = (UInt64)prop.hVal.QuadPart; defined = true; break; case VT_I8: result = (UInt64)prop.hVal.QuadPart; defined = true; break;
case VT_EMPTY: break; case VT_EMPTY: break;
@@ -864,7 +864,7 @@ HRESULT CArc::GetItem(UInt32 index, CReadArcItem &item) const
{ {
item.MainPath.DeleteFrom(colon); item.MainPath.DeleteFrom(colon);
item.AltStreamName = item.Path.Ptr(colon + 1); item.AltStreamName = item.Path.Ptr(colon + 1);
item.MainIsDir = (colon == 0 || IsPathSepar(item.Path[colon - 1])); item.MainIsDir = (colon == 0 || IsPathSepar(item.Path[(unsigned)colon - 1]));
item.IsAltStream = true; item.IsAltStream = true;
} }
} }

View File

@@ -310,7 +310,7 @@ void CLinkDialog::OnButton_Link()
void CApp::Link() void CApp::Link()
{ {
int srcPanelIndex = GetFocusedPanelIndex(); unsigned srcPanelIndex = GetFocusedPanelIndex();
CPanel &srcPanel = Panels[srcPanelIndex]; CPanel &srcPanel = Panels[srcPanelIndex];
if (!srcPanel.IsFSFolder()) if (!srcPanel.IsFSFolder())
{ {

View File

@@ -310,7 +310,7 @@ HRESULT CThreadCrc::ProcessVirt()
HRESULT CApp::CalculateCrc2(const UString &methodName) HRESULT CApp::CalculateCrc2(const UString &methodName)
{ {
int srcPanelIndex = GetFocusedPanelIndex(); unsigned srcPanelIndex = GetFocusedPanelIndex();
CPanel &srcPanel = Panels[srcPanelIndex]; CPanel &srcPanel = Panels[srcPanelIndex];
CRecordVector<UInt32> indices; CRecordVector<UInt32> indices;
@@ -379,7 +379,7 @@ void CApp::CalculateCrc(const UString &methodName)
HRESULT res = CalculateCrc2(methodName); HRESULT res = CalculateCrc2(methodName);
if (res != S_OK && res != E_ABORT) if (res != S_OK && res != E_ABORT)
{ {
int srcPanelIndex = GetFocusedPanelIndex(); unsigned srcPanelIndex = GetFocusedPanelIndex();
CPanel &srcPanel = Panels[srcPanelIndex]; CPanel &srcPanel = Panels[srcPanelIndex];
srcPanel.MessageBoxError(res); srcPanel.MessageBoxError(res);
} }

View File

@@ -343,7 +343,7 @@ static HRESULT ShowDialog(
int index = FindActionSet(actionSet); int index = FindActionSet(actionSet);
if (index < 0) if (index < 0)
return E_NOTIMPL; return E_NOTIMPL;
di.UpdateMode = g_UpdateMode_Pairs[index].UpdateMode; di.UpdateMode = g_UpdateMode_Pairs[(unsigned)index].UpdateMode;
} }
if (dialog.Create(hwndParent) != IDOK) if (dialog.Create(hwndParent) != IDOK)

View File

@@ -10,8 +10,8 @@ AppName = "7-Zip"
InstallDir = %CE1%\%AppName% InstallDir = %CE1%\%AppName%
[Strings] [Strings]
AppVer = "16.01" AppVer = "16.02"
AppDate = "2016-05-19" AppDate = "2016-05-21"
[CEDevice] [CEDevice]
; ProcessorType = 2577 ; ARM ; ProcessorType = 2577 ; ARM

View File

@@ -2,7 +2,7 @@
;Defines ;Defines
!define VERSION_MAJOR 16 !define VERSION_MAJOR 16
!define VERSION_MINOR 01 !define VERSION_MINOR 02
!define VERSION_POSTFIX_FULL "" !define VERSION_POSTFIX_FULL ""
!ifdef WIN64 !ifdef WIN64
!ifdef IA64 !ifdef IA64

View File

@@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<?define VerMajor = "16" ?> <?define VerMajor = "16" ?>
<?define VerMinor = "01" ?> <?define VerMinor = "02" ?>
<?define VerBuild = "00" ?> <?define VerBuild = "00" ?>
<?define MmVer = "$(var.VerMajor).$(var.VerMinor)" ?> <?define MmVer = "$(var.VerMajor).$(var.VerMinor)" ?>
<?define MmHex = "$(var.VerMajor)$(var.VerMinor)" ?> <?define MmHex = "$(var.VerMajor)$(var.VerMinor)" ?>

View File

@@ -1,4 +1,4 @@
7-Zip 16.01 Sources 7-Zip 16.02 Sources
------------------- -------------------
7-Zip is a file archiver for Windows. 7-Zip is a file archiver for Windows.

View File

@@ -1,6 +1,13 @@
HISTORY of the 7-Zip source code HISTORY of the 7-Zip source code
-------------------------------- --------------------------------
16.02 2016-05-21
-------------------------
- The BUG in 16.00 - 16.01 was fixed:
Split Handler (SplitHandler.cpp) returned incorrect
total size value (kpidSize) for split archives.
16.01 2016-05-19 16.01 2016-05-19
------------------------- -------------------------
- Some bugs were fixed, - Some bugs were fixed,