mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 16:07:05 -06:00
23.01
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#include "../../../Windows/ErrorMsg.h"
|
||||
#include "../../../Windows/PropVariantConv.h"
|
||||
|
||||
#ifndef _7ZIP_ST
|
||||
#ifndef Z7_ST
|
||||
#include "../../../Windows/Synchronization.h"
|
||||
#endif
|
||||
|
||||
@@ -183,7 +183,7 @@ void CExtractScanConsole::PrintStat(const CDirItemsStat &st)
|
||||
|
||||
|
||||
|
||||
#ifndef _7ZIP_ST
|
||||
#ifndef Z7_ST
|
||||
static NSynchronization::CCriticalSection g_CriticalSection;
|
||||
#define MT_LOCK NSynchronization::CCriticalSectionLock lock(g_CriticalSection);
|
||||
#else
|
||||
@@ -235,7 +235,7 @@ static const char * const k_ErrorFlagsMessages[] =
|
||||
, "CRC Error"
|
||||
};
|
||||
|
||||
STDMETHODIMP CExtractCallbackConsole::SetTotal(UInt64 size)
|
||||
Z7_COM7F_IMF(CExtractCallbackConsole::SetTotal(UInt64 size))
|
||||
{
|
||||
MT_LOCK
|
||||
|
||||
@@ -247,7 +247,7 @@ STDMETHODIMP CExtractCallbackConsole::SetTotal(UInt64 size)
|
||||
return CheckBreak2();
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackConsole::SetCompleted(const UInt64 *completeValue)
|
||||
Z7_COM7F_IMF(CExtractCallbackConsole::SetCompleted(const UInt64 *completeValue))
|
||||
{
|
||||
MT_LOCK
|
||||
|
||||
@@ -281,14 +281,14 @@ static void PrintFileInfo(CStdOutStream *_so, const wchar_t *path, const FILETIM
|
||||
}
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackConsole::AskOverwrite(
|
||||
Z7_COM7F_IMF(CExtractCallbackConsole::AskOverwrite(
|
||||
const wchar_t *existName, const FILETIME *existTime, const UInt64 *existSize,
|
||||
const wchar_t *newName, const FILETIME *newTime, const UInt64 *newSize,
|
||||
Int32 *answer)
|
||||
Int32 *answer))
|
||||
{
|
||||
MT_LOCK
|
||||
|
||||
RINOK(CheckBreak2());
|
||||
RINOK(CheckBreak2())
|
||||
|
||||
ClosePercentsAndFlush();
|
||||
|
||||
@@ -302,7 +302,7 @@ STDMETHODIMP CExtractCallbackConsole::AskOverwrite(
|
||||
|
||||
NUserAnswerMode::EEnum overwriteAnswer = ScanUserYesNoAllQuit(_so);
|
||||
|
||||
switch (overwriteAnswer)
|
||||
switch ((int)overwriteAnswer)
|
||||
{
|
||||
case NUserAnswerMode::kQuit: return E_ABORT;
|
||||
case NUserAnswerMode::kNo: *answer = NOverwriteAnswer::kNo; break;
|
||||
@@ -325,7 +325,7 @@ STDMETHODIMP CExtractCallbackConsole::AskOverwrite(
|
||||
return CheckBreak2();
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackConsole::PrepareOperation(const wchar_t *name, Int32 isFolder, Int32 askExtractMode, const UInt64 *position)
|
||||
Z7_COM7F_IMF(CExtractCallbackConsole::PrepareOperation(const wchar_t *name, Int32 isFolder, Int32 askExtractMode, const UInt64 *position))
|
||||
{
|
||||
MT_LOCK
|
||||
|
||||
@@ -341,7 +341,7 @@ STDMETHODIMP CExtractCallbackConsole::PrepareOperation(const wchar_t *name, Int3
|
||||
case NArchive::NExtract::NAskMode::kSkip: s = kSkipString; requiredLevel = 2; break;
|
||||
case NArchive::NExtract::NAskMode::kReadExternal: s = kReadString; requiredLevel = 0; break;
|
||||
default: s = "???"; requiredLevel = 2;
|
||||
};
|
||||
}
|
||||
|
||||
bool show2 = (LogLevel >= requiredLevel && _so);
|
||||
|
||||
@@ -394,11 +394,11 @@ STDMETHODIMP CExtractCallbackConsole::PrepareOperation(const wchar_t *name, Int3
|
||||
return CheckBreak2();
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackConsole::MessageError(const wchar_t *message)
|
||||
Z7_COM7F_IMF(CExtractCallbackConsole::MessageError(const wchar_t *message))
|
||||
{
|
||||
MT_LOCK
|
||||
|
||||
RINOK(CheckBreak2());
|
||||
RINOK(CheckBreak2())
|
||||
|
||||
NumFileErrors_in_Current++;
|
||||
NumFileErrors++;
|
||||
@@ -460,7 +460,7 @@ void SetExtractErrorMessage(Int32 opRes, Int32 encrypted, AString &dest)
|
||||
}
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackConsole::SetOperationResult(Int32 opRes, Int32 encrypted)
|
||||
Z7_COM7F_IMF(CExtractCallbackConsole::SetOperationResult(Int32 opRes, Int32 encrypted))
|
||||
{
|
||||
MT_LOCK
|
||||
|
||||
@@ -499,7 +499,7 @@ STDMETHODIMP CExtractCallbackConsole::SetOperationResult(Int32 opRes, Int32 encr
|
||||
return CheckBreak2();
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackConsole::ReportExtractResult(Int32 opRes, Int32 encrypted, const wchar_t *name)
|
||||
Z7_COM7F_IMF(CExtractCallbackConsole::ReportExtractResult(Int32 opRes, Int32 encrypted, const wchar_t *name))
|
||||
{
|
||||
if (opRes != NArchive::NExtract::NOperationResult::kOK)
|
||||
{
|
||||
@@ -512,7 +512,7 @@ STDMETHODIMP CExtractCallbackConsole::ReportExtractResult(Int32 opRes, Int32 enc
|
||||
|
||||
|
||||
|
||||
#ifndef _NO_CRYPTO
|
||||
#ifndef Z7_NO_CRYPTO
|
||||
|
||||
HRESULT CExtractCallbackConsole::SetPassword(const UString &password)
|
||||
{
|
||||
@@ -521,7 +521,7 @@ HRESULT CExtractCallbackConsole::SetPassword(const UString &password)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
STDMETHODIMP CExtractCallbackConsole::CryptoGetTextPassword(BSTR *password)
|
||||
Z7_COM7F_IMF(CExtractCallbackConsole::CryptoGetTextPassword(BSTR *password))
|
||||
{
|
||||
COM_TRY_BEGIN
|
||||
MT_LOCK
|
||||
@@ -533,7 +533,7 @@ STDMETHODIMP CExtractCallbackConsole::CryptoGetTextPassword(BSTR *password)
|
||||
|
||||
HRESULT CExtractCallbackConsole::BeforeOpen(const wchar_t *name, bool testMode)
|
||||
{
|
||||
RINOK(CheckBreak2());
|
||||
RINOK(CheckBreak2())
|
||||
|
||||
NumTryArcs++;
|
||||
ThereIsError_in_Current = false;
|
||||
@@ -560,7 +560,7 @@ static AString GetOpenArcErrorMessage(UInt32 errorFlags)
|
||||
{
|
||||
AString s;
|
||||
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(k_ErrorFlagsMessages); i++)
|
||||
for (unsigned i = 0; i < Z7_ARRAY_SIZE(k_ErrorFlagsMessages); i++)
|
||||
{
|
||||
UInt32 f = (1 << i);
|
||||
if ((errorFlags & f) == 0)
|
||||
@@ -739,7 +739,7 @@ HRESULT CExtractCallbackConsole::OpenResult(
|
||||
{
|
||||
if (_so)
|
||||
{
|
||||
RINOK(Print_OpenArchive_Props(*_so, codecs, arcLink));
|
||||
RINOK(Print_OpenArchive_Props(*_so, codecs, arcLink))
|
||||
*_so << endl;
|
||||
}
|
||||
}
|
||||
@@ -753,8 +753,8 @@ HRESULT CExtractCallbackConsole::OpenResult(
|
||||
*_se << kError;
|
||||
_se->NormalizePrint_wstr(name);
|
||||
*_se << endl;
|
||||
HRESULT res = Print_OpenArchive_Error(*_se, codecs, arcLink);
|
||||
RINOK(res);
|
||||
const HRESULT res = Print_OpenArchive_Error(*_se, codecs, arcLink);
|
||||
RINOK(res)
|
||||
if (result == S_FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user