This commit is contained in:
Igor Pavlov
2017-04-30 00:00:00 +00:00
committed by Kornel
parent 603abd5528
commit 2efa10565a
442 changed files with 15479 additions and 8525 deletions

View File

@@ -23,15 +23,15 @@ static NSynchronization::CCriticalSection g_CriticalSection;
#define MT_LOCK
#endif
static const wchar_t *kEmptyFileAlias = L"[Content]";
static const wchar_t * const kEmptyFileAlias = L"[Content]";
static const char *kOpenArchiveMessage = "Open archive: ";
static const char *kCreatingArchiveMessage = "Creating archive: ";
static const char *kUpdatingArchiveMessage = "Updating archive: ";
static const char *kScanningMessage = "Scanning the drive:";
static const char * const kOpenArchiveMessage = "Open archive: ";
static const char * const kCreatingArchiveMessage = "Creating archive: ";
static const char * const kUpdatingArchiveMessage = "Updating archive: ";
static const char * const kScanningMessage = "Scanning the drive:";
static const char *kError = "ERROR: ";
static const char *kWarning = "WARNING: ";
static const char * const kError = "ERROR: ";
static const char * const kWarning = "WARNING: ";
static HRESULT CheckBreak2()
{
@@ -259,7 +259,7 @@ HRESULT CUpdateCallbackConsole::FinishScanning(const CDirItemsStat &st)
return S_OK;
}
static const char *k_StdOut_ArcName = "StdOut";
static const char * const k_StdOut_ArcName = "StdOut";
HRESULT CUpdateCallbackConsole::StartOpenArchive(const wchar_t *name)
{
@@ -316,7 +316,7 @@ HRESULT CUpdateCallbackConsole::WriteSfx(const wchar_t *name, UInt64 size)
{
*_so << "Write SFX: ";
*_so << name;
AString s = " : ";
AString s (" : ");
PrintSize_bytes_Smart(s, size);
*_so << s << endl;
}
@@ -398,14 +398,31 @@ HRESULT CUpdateCallbackConsole::Finalize()
}
*/
HRESULT CUpdateCallbackConsole::SetNumItems(UInt64 numItems)
void static PrintToDoStat(CStdOutStream *_so, const CDirItemsStat &stat, const char *name)
{
AString s;
Print_DirItemsStat(s, stat);
*_so << name << ": " << s << endl;
}
HRESULT CUpdateCallbackConsole::SetNumItems(const CArcToDoStat &stat)
{
if (_so)
{
ClosePercents_for_so();
AString s;
PrintPropPair(s, "Items to compress", numItems);
*_so << s << endl << endl;
if (!stat.DeleteData.IsEmpty())
{
*_so << endl;
PrintToDoStat(_so, stat.DeleteData, "Delete data from archive");
}
if (!stat.OldData.IsEmpty())
PrintToDoStat(_so, stat.OldData, "Keep old data in archive");
// if (!stat.NewData.IsEmpty())
{
PrintToDoStat(_so, stat.NewData, "Add new data to archive");
}
*_so << endl;
}
return S_OK;
}
@@ -622,7 +639,7 @@ HRESULT CUpdateCallbackConsole::CryptoGetTextPassword2(Int32 *passwordIsDefined,
{
if (AskPassword)
{
Password = GetPassword(_so);
RINOK(GetPassword_HRESULT(_so, Password));
PasswordIsDefined = true;
}
}
@@ -649,7 +666,7 @@ HRESULT CUpdateCallbackConsole::CryptoGetTextPassword(BSTR *password)
if (!PasswordIsDefined)
{
{
Password = GetPassword(_so);
RINOK(GetPassword_HRESULT(_so, Password))
PasswordIsDefined = true;
}
}