mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-09 18:07:00 -06:00
Update to 7-Zip Version 18.06
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/* 7zMain.c - Test application for 7z Decoder
|
||||
2018-04-19 : Igor Pavlov : Public domain */
|
||||
2018-08-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#include "Precomp.h"
|
||||
|
||||
@@ -354,7 +354,7 @@ static void PrintError(char *s)
|
||||
PrintLF();
|
||||
}
|
||||
|
||||
static void GetAttribString(UInt32 wa, Bool isDir, char *s)
|
||||
static void GetAttribString(UInt32 wa, BoolInt isDir, char *s)
|
||||
{
|
||||
#ifdef USE_WINDOWS_FILE
|
||||
s[0] = (char)(((wa & FILE_ATTRIBUTE_DIRECTORY) != 0 || isDir) ? 'D' : '.');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* 7zipInstall.c - 7-Zip Installer
|
||||
2017-08-28 : Igor Pavlov : Public domain */
|
||||
2018-08-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#include "Precomp.h"
|
||||
|
||||
@@ -89,9 +89,9 @@ static LPCWSTR const k_Reg_CLSID_7zip_Inproc = L"CLSID\\" k_7zip_CLSID L"\\Inpro
|
||||
|
||||
#define g_AllUsers True
|
||||
|
||||
static Bool g_Install_was_Pressed;
|
||||
static Bool g_Finished;
|
||||
static Bool g_SilentMode;
|
||||
static BoolInt g_Install_was_Pressed;
|
||||
static BoolInt g_Finished;
|
||||
static BoolInt g_SilentMode;
|
||||
|
||||
static HWND g_HWND;
|
||||
static HWND g_Path_HWND;
|
||||
@@ -270,7 +270,7 @@ static int MyRegistry_QueryString2(HKEY hKey, LPCWSTR keyName, LPCWSTR valName,
|
||||
if (res != ERROR_SUCCESS)
|
||||
return False;
|
||||
{
|
||||
Bool res2 = MyRegistry_QueryString(key, valName, dest);
|
||||
BoolInt res2 = MyRegistry_QueryString(key, valName, dest);
|
||||
RegCloseKey(key);
|
||||
return res2;
|
||||
}
|
||||
@@ -343,7 +343,7 @@ static LONG MyRegistry_CreateKeyAndVal_32(HKEY parentKey, LPCWSTR keyName, LPCWS
|
||||
|
||||
#define kSignatureSearchLimit (1 << 22)
|
||||
|
||||
static Bool FindSignature(CSzFile *stream, UInt64 *resPos)
|
||||
static BoolInt FindSignature(CSzFile *stream, UInt64 *resPos)
|
||||
{
|
||||
Byte buf[kBufSize];
|
||||
size_t numPrevBytes = 0;
|
||||
@@ -431,7 +431,7 @@ int CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LPARAM data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static Bool MyBrowseForFolder(HWND owner, LPCWSTR title, UINT ulFlags,
|
||||
static BoolInt MyBrowseForFolder(HWND owner, LPCWSTR title, UINT ulFlags,
|
||||
LPCWSTR initialFolder, LPWSTR resultPath)
|
||||
{
|
||||
WCHAR displayName[MAX_PATH];
|
||||
@@ -694,7 +694,7 @@ static void SetShellProgramsGroup(HWND hwndOwner)
|
||||
|
||||
for (; i < 3; i++)
|
||||
{
|
||||
Bool isOK = True;
|
||||
BoolInt isOK = True;
|
||||
WCHAR link[MAX_PATH + 40];
|
||||
WCHAR destPath[MAX_PATH + 40];
|
||||
|
||||
@@ -874,7 +874,7 @@ static void WriteShellEx()
|
||||
|
||||
static const wchar_t *GetCmdParam(const wchar_t *s)
|
||||
{
|
||||
Bool quoteMode = False;
|
||||
BoolInt quoteMode = False;
|
||||
for (;; s++)
|
||||
{
|
||||
wchar_t c = *s;
|
||||
@@ -988,7 +988,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||
if (path[0] == 0)
|
||||
{
|
||||
HKEY key = 0;
|
||||
Bool ok = False;
|
||||
BoolInt ok = False;
|
||||
LONG res = RegOpenKeyExW(HKEY_CURRENT_USER, k_Reg_Software_7zip, 0, KEY_READ | k_Reg_WOW_Flag, &key);
|
||||
if (res == ERROR_SUCCESS)
|
||||
{
|
||||
@@ -1101,7 +1101,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||
}
|
||||
|
||||
|
||||
static Bool GetErrorMessage(DWORD errorCode, WCHAR *message)
|
||||
static BoolInt GetErrorMessage(DWORD errorCode, WCHAR *message)
|
||||
{
|
||||
LPVOID msgBuf;
|
||||
if (FormatMessageW(
|
||||
@@ -1313,7 +1313,7 @@ if (res == SZ_OK)
|
||||
}
|
||||
|
||||
{
|
||||
// Bool skipFile = False;
|
||||
// BoolInt skipFile = False;
|
||||
|
||||
wcscpy(origPath, path);
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* 7zipUninstall.c - 7-Zip Uninstaller
|
||||
2018-03-01 : Igor Pavlov : Public domain */
|
||||
2018-08-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#include "Precomp.h"
|
||||
|
||||
@@ -70,9 +70,9 @@ static const WCHAR * const k_Reg_CLSID_7zip_Inproc = L"CLSID\\" k_7zip_CLSID L"\
|
||||
|
||||
#define g_AllUsers True
|
||||
|
||||
static Bool g_Install_was_Pressed;
|
||||
static Bool g_Finished;
|
||||
static Bool g_SilentMode;
|
||||
static BoolInt g_Install_was_Pressed;
|
||||
static BoolInt g_Finished;
|
||||
static BoolInt g_SilentMode;
|
||||
|
||||
static HWND g_HWND;
|
||||
static HWND g_Path_HWND;
|
||||
@@ -94,7 +94,7 @@ static const WCHAR * const kUninstallExe = L"Uninstall.exe";
|
||||
|
||||
#define MAKE_CHAR_UPPER(c) ((((c) >= 'a' && (c) <= 'z') ? (c) -= 0x20 : (c)))
|
||||
|
||||
static Bool AreStringsEqual_NoCase(const wchar_t *s1, const wchar_t *s2)
|
||||
static BoolInt AreStringsEqual_NoCase(const wchar_t *s1, const wchar_t *s2)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
@@ -107,7 +107,7 @@ static Bool AreStringsEqual_NoCase(const wchar_t *s1, const wchar_t *s2)
|
||||
}
|
||||
}
|
||||
|
||||
static Bool IsString1PrefixedByString2_NoCase(const wchar_t *s1, const wchar_t *s2)
|
||||
static BoolInt IsString1PrefixedByString2_NoCase(const wchar_t *s1, const wchar_t *s2)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
@@ -149,7 +149,7 @@ static int MyRegistry_QueryString2(HKEY hKey, LPCWSTR keyName, LPCWSTR valName,
|
||||
if (res != ERROR_SUCCESS)
|
||||
return False;
|
||||
{
|
||||
Bool res2 = MyRegistry_QueryString(key, valName, dest);
|
||||
BoolInt res2 = MyRegistry_QueryString(key, valName, dest);
|
||||
RegCloseKey(key);
|
||||
return res2;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ static int MyRegistry_QueryString2_32(HKEY hKey, LPCWSTR keyName, LPCWSTR valNam
|
||||
if (res != ERROR_SUCCESS)
|
||||
return False;
|
||||
{
|
||||
Bool res2 = MyRegistry_QueryString(key, valName, dest);
|
||||
BoolInt res2 = MyRegistry_QueryString(key, valName, dest);
|
||||
RegCloseKey(key);
|
||||
return res2;
|
||||
}
|
||||
@@ -283,7 +283,7 @@ static void SetShellProgramsGroup(HWND hwndOwner)
|
||||
|
||||
for (; i < 3; i++)
|
||||
{
|
||||
// Bool isOK = True;
|
||||
// BoolInt isOK = True;
|
||||
WCHAR link[MAX_PATH + 40];
|
||||
WCHAR destPath[MAX_PATH + 40];
|
||||
|
||||
@@ -300,7 +300,7 @@ static void SetShellProgramsGroup(HWND hwndOwner)
|
||||
{
|
||||
const size_t baseLen = wcslen(link);
|
||||
unsigned k;
|
||||
Bool needDelete = False;
|
||||
BoolInt needDelete = False;
|
||||
|
||||
for (k = 0; k < 2; k++)
|
||||
{
|
||||
@@ -347,7 +347,7 @@ static const WCHAR * const k_AppPaths_7zFm = L"Software\\Microsoft\\Windows\\Cur
|
||||
static const WCHAR * const k_Uninstall_7zip = k_REG_Uninstall L"7-Zip-Zstandard";
|
||||
|
||||
|
||||
static Bool AreEqual_Path_PrefixName(const wchar_t *s, const wchar_t *prefix, const wchar_t *name)
|
||||
static BoolInt AreEqual_Path_PrefixName(const wchar_t *s, const wchar_t *prefix, const wchar_t *name)
|
||||
{
|
||||
if (!IsString1PrefixedByString2_NoCase(s, prefix))
|
||||
return False;
|
||||
@@ -444,7 +444,7 @@ static void WriteCLSID()
|
||||
|
||||
static const wchar_t *GetCmdParam(const wchar_t *s)
|
||||
{
|
||||
Bool quoteMode = False;
|
||||
BoolInt quoteMode = False;
|
||||
for (;; s++)
|
||||
{
|
||||
wchar_t c = *s;
|
||||
@@ -469,7 +469,7 @@ static void RemoveQuotes(wchar_t *s)
|
||||
}
|
||||
}
|
||||
|
||||
static Bool DoesFileOrDirExist()
|
||||
static BoolInt DoesFileOrDirExist()
|
||||
{
|
||||
return (GetFileAttributesW(path) != INVALID_FILE_ATTRIBUTES);
|
||||
}
|
||||
@@ -491,7 +491,7 @@ static BOOL RemoveFileAfterReboot()
|
||||
|
||||
#define IS_LIMIT_CHAR(c) (c == 0 || c == ' ')
|
||||
|
||||
static Bool IsThereSpace(const wchar_t *s)
|
||||
static BoolInt IsThereSpace(const wchar_t *s)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
@@ -505,7 +505,7 @@ static Bool IsThereSpace(const wchar_t *s)
|
||||
|
||||
static void AddPathParam(wchar_t *dest, const wchar_t *src)
|
||||
{
|
||||
Bool needQuote = IsThereSpace(src);
|
||||
BoolInt needQuote = IsThereSpace(src);
|
||||
if (needQuote)
|
||||
wcscat(dest, L"\"");
|
||||
wcscat(dest, src);
|
||||
@@ -515,7 +515,7 @@ static void AddPathParam(wchar_t *dest, const wchar_t *src)
|
||||
|
||||
|
||||
|
||||
static Bool GetErrorMessage(DWORD errorCode, WCHAR *message)
|
||||
static BoolInt GetErrorMessage(DWORD errorCode, WCHAR *message)
|
||||
{
|
||||
LPVOID msgBuf;
|
||||
if (FormatMessageW(
|
||||
@@ -586,7 +586,7 @@ static int Install()
|
||||
SRes res = SZ_OK;
|
||||
WRes winRes = 0;
|
||||
|
||||
// Bool needReboot = False;
|
||||
// BoolInt needReboot = False;
|
||||
const size_t pathLen = wcslen(path);
|
||||
|
||||
if (!g_SilentMode)
|
||||
@@ -805,7 +805,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||
lpCmdLine, int nCmdShow)
|
||||
{
|
||||
const wchar_t *cmdParams;
|
||||
Bool useTemp = True;
|
||||
BoolInt useTemp = True;
|
||||
|
||||
UNUSED_VAR(hPrevInstance)
|
||||
UNUSED_VAR(lpCmdLine)
|
||||
@@ -1005,7 +1005,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||
if (path[0] == 0)
|
||||
{
|
||||
HKEY key = 0;
|
||||
Bool ok = False;
|
||||
BoolInt ok = False;
|
||||
LONG res = RegOpenKeyExW(HKEY_CURRENT_USER, k_Reg_Software_7zip, 0, KEY_READ | k_Reg_WOW_Flag, &key);
|
||||
if (res == ERROR_SUCCESS)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* LzmaUtil.c -- Test application for LZMA compression
|
||||
2017-04-27 : Igor Pavlov : Public domain */
|
||||
2018-07-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#include "../../Precomp.h"
|
||||
|
||||
@@ -177,7 +177,7 @@ static int main2(int numArgs, const char *args[], char *rs)
|
||||
char c;
|
||||
int res;
|
||||
int encodeMode;
|
||||
Bool useOutFile = False;
|
||||
BoolInt useOutFile = False;
|
||||
|
||||
FileSeqInStream_CreateVTable(&inStream);
|
||||
File_Construct(&inStream.file);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* SfxSetup.c - 7z SFX Setup
|
||||
2017-04-04 : Igor Pavlov : Public domain */
|
||||
2018-08-04 : Igor Pavlov : Public domain */
|
||||
|
||||
#include "Precomp.h"
|
||||
|
||||
@@ -127,7 +127,7 @@ static WRes MyCreateDir(const WCHAR *name)
|
||||
|
||||
#define kSignatureSearchLimit (1 << 22)
|
||||
|
||||
static Bool FindSignature(CSzFile *stream, UInt64 *resPos)
|
||||
static BoolInt FindSignature(CSzFile *stream, UInt64 *resPos)
|
||||
{
|
||||
Byte buf[kBufferSize];
|
||||
size_t numPrevBytes = 0;
|
||||
@@ -163,7 +163,7 @@ static Bool FindSignature(CSzFile *stream, UInt64 *resPos)
|
||||
}
|
||||
}
|
||||
|
||||
static Bool DoesFileOrDirExist(const WCHAR *path)
|
||||
static BoolInt DoesFileOrDirExist(const WCHAR *path)
|
||||
{
|
||||
WIN32_FIND_DATAW fd;
|
||||
HANDLE handle;
|
||||
@@ -254,7 +254,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||
DWORD winRes;
|
||||
const wchar_t *cmdLineParams;
|
||||
const char *errorMessage = NULL;
|
||||
Bool useShellExecute = True;
|
||||
BoolInt useShellExecute = True;
|
||||
DWORD exitCode = 0;
|
||||
|
||||
LoadSecurityDlls();
|
||||
@@ -287,7 +287,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
||||
cmdLineParams = GetCommandLineW();
|
||||
#ifndef UNDER_CE
|
||||
{
|
||||
Bool quoteMode = False;
|
||||
BoolInt quoteMode = False;
|
||||
for (;; cmdLineParams++)
|
||||
{
|
||||
wchar_t c = *cmdLineParams;
|
||||
|
||||
Reference in New Issue
Block a user