mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 11:14:58 -06:00
23.01
This commit is contained in:
@@ -49,7 +49,7 @@ static HRESULT SetOutProperties(IOutFolderArchive *outArchive, UInt32 method)
|
||||
*/
|
||||
NCOM::CPropVariant value = (UInt32)method;
|
||||
const wchar_t *name = L"x";
|
||||
RINOK(setProperties->SetProperties(&name, &value, 1));
|
||||
RINOK(setProperties->SetProperties(&name, &value, 1))
|
||||
}
|
||||
return S_OK;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ HRESULT CPlugin::AfterUpdate(CWorkDirTempFile &tempFile, const UStringVector &pa
|
||||
*/
|
||||
|
||||
NFileOperationReturnCode::EEnum CPlugin::PutFiles(
|
||||
struct PluginPanelItem *panelItems, int numItems,
|
||||
struct PluginPanelItem *panelItems, unsigned numItems,
|
||||
int moveMode, int opMode)
|
||||
{
|
||||
if (moveMode != 0
|
||||
@@ -106,7 +106,7 @@ NFileOperationReturnCode::EEnum CPlugin::PutFiles(
|
||||
unsigned methodIndex = 0;
|
||||
|
||||
unsigned i;
|
||||
for (i = ARRAY_SIZE(g_MethodMap); i != 0;)
|
||||
for (i = Z7_ARRAY_SIZE(g_MethodMap); i != 0;)
|
||||
{
|
||||
i--;
|
||||
if (compressionInfo.Level >= g_MethodMap[i])
|
||||
@@ -144,17 +144,17 @@ NFileOperationReturnCode::EEnum CPlugin::PutFiles(
|
||||
{ DI_BUTTON, 0, kYSize - 3, 0, 0, false, false, DIF_CENTERGROUP, false, NMessageID::kCancel, NULL, NULL }
|
||||
};
|
||||
|
||||
const int kNumDialogItems = ARRAY_SIZE(initItems);
|
||||
const int kNumDialogItems = Z7_ARRAY_SIZE(initItems);
|
||||
const int kOkButtonIndex = kNumDialogItems - 2;
|
||||
FarDialogItem dialogItems[kNumDialogItems];
|
||||
g_StartupInfo.InitDialogItems(initItems, dialogItems, kNumDialogItems);
|
||||
int askCode = g_StartupInfo.ShowDialog(76, kYSize,
|
||||
const int askCode = g_StartupInfo.ShowDialog(76, kYSize,
|
||||
kHelpTopic, dialogItems, kNumDialogItems);
|
||||
if (askCode != kOkButtonIndex)
|
||||
return NFileOperationReturnCode::kInterruptedByUser;
|
||||
|
||||
compressionInfo.Level = g_MethodMap[0];
|
||||
for (i = 0; i < ARRAY_SIZE(g_MethodMap); i++)
|
||||
for (i = 0; i < Z7_ARRAY_SIZE(g_MethodMap); i++)
|
||||
if (dialogItems[kMethodRadioIndex + i].Selected)
|
||||
compressionInfo.Level = g_MethodMap[i];
|
||||
|
||||
@@ -168,7 +168,7 @@ NFileOperationReturnCode::EEnum CPlugin::PutFiles(
|
||||
|
||||
compressionInfo.Save();
|
||||
|
||||
CWorkDirTempFile tempFile;;
|
||||
CWorkDirTempFile tempFile;
|
||||
if (tempFile.CreateTempFile(m_FileName) != S_OK)
|
||||
return NFileOperationReturnCode::kError;
|
||||
|
||||
@@ -337,7 +337,7 @@ void CParsedPath::ParsePath(const UString &path)
|
||||
// the bug was fixed:
|
||||
curPos = path.Find((wchar_t)kDirDelimiter, 2);
|
||||
if (curPos < 0)
|
||||
curPos = path.Len();
|
||||
curPos = (int)path.Len();
|
||||
else
|
||||
curPos++;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ static void SetArcName(UString &arcName, const CArcInfoEx &arcInfo)
|
||||
if (dotPos > slashPos + 1)
|
||||
arcName.DeleteFrom(dotPos);
|
||||
}
|
||||
arcName += '.';
|
||||
arcName.Add_Dot();
|
||||
arcName += arcInfo.GetMainExt();
|
||||
}
|
||||
|
||||
@@ -420,9 +420,9 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
if (arcInfo.UpdateEnabled)
|
||||
{
|
||||
if (archiverIndex == -1)
|
||||
archiverIndex = i;
|
||||
archiverIndex = (int)i;
|
||||
if (MyStringCompareNoCase(arcInfo.Name, compressionInfo.ArcType) == 0)
|
||||
archiverIndex = i;
|
||||
archiverIndex = (int)i;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -480,7 +480,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
|
||||
unsigned methodIndex = 0;
|
||||
unsigned i;
|
||||
for (i = ARRAY_SIZE(g_MethodMap); i != 0;)
|
||||
for (i = Z7_ARRAY_SIZE(g_MethodMap); i != 0;)
|
||||
{
|
||||
i--;
|
||||
if (compressionInfo.Level >= g_MethodMap[i])
|
||||
@@ -522,7 +522,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
{ DI_BUTTON, 0, kYSize - 3, 0, 0, false, false, DIF_CENTERGROUP, false, NMessageID::kCancel, NULL, NULL }
|
||||
};
|
||||
|
||||
const int kNumDialogItems = ARRAY_SIZE(initItems);
|
||||
const int kNumDialogItems = Z7_ARRAY_SIZE(initItems);
|
||||
|
||||
const int kOkButtonIndex = kNumDialogItems - 3;
|
||||
const int kSelectarchiverButtonIndex = kNumDialogItems - 2;
|
||||
@@ -537,7 +537,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
MultiByteToUnicodeString2(arcName, archiveNameA, CP_OEMCP);
|
||||
|
||||
compressionInfo.Level = g_MethodMap[0];
|
||||
for (i = 0; i < ARRAY_SIZE(g_MethodMap); i++)
|
||||
for (i = 0; i < Z7_ARRAY_SIZE(g_MethodMap); i++)
|
||||
if (dialogItems[kMethodRadioIndex + i].Selected)
|
||||
compressionInfo.Level = g_MethodMap[i];
|
||||
|
||||
@@ -549,7 +549,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
|
||||
if (askCode == kSelectarchiverButtonIndex)
|
||||
{
|
||||
CIntVector indices;
|
||||
CUIntVector indices;
|
||||
AStringVector archiverNames;
|
||||
FOR_VECTOR (k, codecs->Formats)
|
||||
{
|
||||
@@ -561,7 +561,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
}
|
||||
}
|
||||
|
||||
int index = g_StartupInfo.Menu(FMENU_AUTOHIGHLIGHT,
|
||||
const int index = g_StartupInfo.Menu(FMENU_AUTOHIGHLIGHT,
|
||||
g_StartupInfo.GetMsgString(NMessageID::kUpdateSelectArchiverMenuTitle),
|
||||
NULL, archiverNames, archiverIndex);
|
||||
if (index >= 0)
|
||||
@@ -574,7 +574,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
if (arcName.Len() >= prevExtensionLen &&
|
||||
MyStringCompareNoCase(arcName.RightPtr(prevExtensionLen), prevExtension) == 0)
|
||||
{
|
||||
int pos = arcName.Len() - prevExtensionLen;
|
||||
const unsigned pos = arcName.Len() - prevExtensionLen;
|
||||
if (pos > 2)
|
||||
{
|
||||
if (arcName[pos - 1] == '.')
|
||||
@@ -583,7 +583,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
}
|
||||
}
|
||||
|
||||
archiverIndex = indices[index];
|
||||
archiverIndex = (int)indices[index];
|
||||
const CArcInfoEx &arcInfo = codecs->Formats[archiverIndex];
|
||||
prevFormat = archiverIndex;
|
||||
|
||||
@@ -612,8 +612,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
return E_FAIL;
|
||||
|
||||
CWorkDirTempFile tempFile;
|
||||
RINOK(tempFile.CreateTempFile(fullArcName));
|
||||
|
||||
RINOK(tempFile.CreateTempFile(fullArcName))
|
||||
CScreenRestorer screenRestorer;
|
||||
CProgressBox progressBox;
|
||||
CProgressBox *progressBoxPointer = NULL;
|
||||
@@ -640,15 +639,15 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
archiveHandler = agentSpec;
|
||||
// CLSID realClassID;
|
||||
CMyComBSTR archiveType;
|
||||
RINOK(agentSpec->Open(NULL,
|
||||
RINOK(archiveHandler->Open(NULL,
|
||||
GetUnicodeString(fullArcName, CP_OEMCP), UString(),
|
||||
// &realClassID,
|
||||
&archiveType,
|
||||
NULL));
|
||||
NULL))
|
||||
|
||||
if (MyStringCompareNoCase(archiverInfoFinal.Name, (const wchar_t *)archiveType) != 0)
|
||||
throw "Type of existing archive differs from specified type";
|
||||
HRESULT result = archiveHandler.QueryInterface(
|
||||
const HRESULT result = archiveHandler.QueryInterface(
|
||||
IID_IOutFolderArchive, &outArchive);
|
||||
if (result != S_OK)
|
||||
{
|
||||
@@ -690,7 +689,7 @@ HRESULT CompressFiles(const CObjectVector<PluginPanelItem> &pluginPanelItems)
|
||||
updateCallbackSpec->Init(/* archiveHandler, */ progressBoxPointer);
|
||||
|
||||
|
||||
RINOK(SetOutProperties(outArchive, compressionInfo.Level));
|
||||
RINOK(SetOutProperties(outArchive, compressionInfo.Level))
|
||||
|
||||
// FStringVector requestedPaths;
|
||||
// FStringVector processedPaths;
|
||||
@@ -754,7 +753,7 @@ HRESULT CPlugin::CreateFolder()
|
||||
{ DI_BUTTON, 0, kYSize - 3, 0, 0, false, false, DIF_CENTERGROUP, false, NMessageID::kCancel, NULL, NULL }
|
||||
};
|
||||
|
||||
const int kNumDialogItems = ARRAY_SIZE(initItems);
|
||||
const int kNumDialogItems = Z7_ARRAY_SIZE(initItems);
|
||||
const int kOkButtonIndex = kNumDialogItems - 2;
|
||||
|
||||
FarDialogItem dialogItems[kNumDialogItems];
|
||||
|
||||
Reference in New Issue
Block a user