aboutsummaryrefslogtreecommitdiff
path: root/C/Util/SfxSetup
diff options
context:
space:
mode:
authorIgor Pavlov <87184205+ip7z@users.noreply.github.com>2026-06-25 00:00:00 +0000
committerIgor Pavlov <87184205+ip7z@users.noreply.github.com>2026-06-26 11:00:29 +0500
commitf9d78aff31a5f2521ae7ddbdc97c4a8855808959 (patch)
treebf7e13577f75aa4c7c56af1153d6fa15c6052445 /C/Util/SfxSetup
parent8c63d71ff886bda90c86db28466287f977374237 (diff)
download7zip-main.tar.gz
7zip-main.tar.bz2
7zip-main.zip
Diffstat (limited to '')
-rw-r--r--C/Util/SfxSetup/SfxSetup.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/C/Util/SfxSetup/SfxSetup.c b/C/Util/SfxSetup/SfxSetup.c
index 9b5c1f9..344aa73 100644
--- a/C/Util/SfxSetup/SfxSetup.c
+++ b/C/Util/SfxSetup/SfxSetup.c
@@ -1,5 +1,5 @@
1/* SfxSetup.c - 7z SFX Setup 1/* SfxSetup.c - 7z SFX Setup
22024-01-24 : Igor Pavlov : Public domain */ 2: Igor Pavlov : Public domain */
3 3
4#include "Precomp.h" 4#include "Precomp.h"
5 5
@@ -54,7 +54,7 @@ static const char * const kNames[] =
54 , "start" 54 , "start"
55}; 55};
56 56
57static unsigned FindExt(const wchar_t *s, unsigned *extLen) 57static unsigned FindExt(const WCHAR *s, unsigned *extLen)
58{ 58{
59 unsigned len = (unsigned)wcslen(s); 59 unsigned len = (unsigned)wcslen(s);
60 unsigned i; 60 unsigned i;
@@ -72,7 +72,7 @@ static unsigned FindExt(const wchar_t *s, unsigned *extLen)
72 72
73#define MAKE_CHAR_UPPER(c) ((((c) >= 'a' && (c) <= 'z') ? (c) - 0x20 : (c))) 73#define MAKE_CHAR_UPPER(c) ((((c) >= 'a' && (c) <= 'z') ? (c) - 0x20 : (c)))
74 74
75static unsigned FindItem(const char * const *items, unsigned num, const wchar_t *s, unsigned len) 75static unsigned FindItem(const char * const *items, unsigned num, const WCHAR *s, unsigned len)
76{ 76{
77 unsigned i; 77 unsigned i;
78 for (i = 0; i < num; i++) 78 for (i = 0; i < num; i++)
@@ -268,7 +268,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
268 #endif 268 #endif
269 size_t pathLen; 269 size_t pathLen;
270 DWORD winRes; 270 DWORD winRes;
271 const wchar_t *cmdLineParams; 271 const WCHAR *cmdLineParams;
272 const char *errorMessage = NULL; 272 const char *errorMessage = NULL;
273 BoolInt useShellExecute = True; 273 BoolInt useShellExecute = True;
274 DWORD exitCode = 0; 274 DWORD exitCode = 0;
@@ -306,7 +306,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
306 BoolInt quoteMode = False; 306 BoolInt quoteMode = False;
307 for (;; cmdLineParams++) 307 for (;; cmdLineParams++)
308 { 308 {
309 const wchar_t c = *cmdLineParams; 309 const WCHAR c = *cmdLineParams;
310 if (c == L'\"') 310 if (c == L'\"')
311 quoteMode = !quoteMode; 311 quoteMode = !quoteMode;
312 else if (c == 0 || (c == L' ' && !quoteMode)) 312 else if (c == 0 || (c == L' ' && !quoteMode))
@@ -335,14 +335,14 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
335 wcscpy(path + pathLen, L"7z"); 335 wcscpy(path + pathLen, L"7z");
336 336
337 { 337 {
338 wchar_t *s = path + wcslen(path); 338 WCHAR *s = path + wcslen(path);
339 UInt32 value = d; 339 UInt32 value = d;
340 unsigned k; 340 unsigned k;
341 for (k = 0; k < 8; k++) 341 for (k = 0; k < 8; k++)
342 { 342 {
343 const unsigned t = value & 0xF; 343 const unsigned t = value & 0xF;
344 value >>= 4; 344 value >>= 4;
345 s[7 - k] = (wchar_t)((t < 10) ? ('0' + t) : ('A' + (t - 10))); 345 s[7 - k] = (WCHAR)((t < 10) ? ('0' + t) : ('A' + (t - 10)));
346 } 346 }
347 s[k] = '\0'; 347 s[k] = '\0';
348 } 348 }