mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 05:15:00 -06:00
Code deduplication GetQuotedString()
Moved single function GetQuotedString() to MyString Signed-off-by: Sergey G. Brester <info@sebres.de> Reviewed-by: Tino Reichardt <milky-7zip@mcmilk.de>
This commit is contained in:
@@ -50,14 +50,6 @@ using namespace NWindows;
|
||||
static NCompression::CInfo m_RegistryInfo;
|
||||
extern HWND g_HWND;
|
||||
|
||||
UString GetQuotedString(const UString &s)
|
||||
{
|
||||
UString s2 ('\"');
|
||||
s2 += s;
|
||||
s2 += '\"';
|
||||
return s2;
|
||||
}
|
||||
|
||||
static void ErrorMessage(LPCWSTR message)
|
||||
{
|
||||
MessageBoxW(g_HWND, message, L"7-Zip ZS", MB_ICONERROR | MB_OK);
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
|
||||
#include "../../../Common/MyString.h"
|
||||
|
||||
UString GetQuotedString(const UString &s);
|
||||
|
||||
HRESULT CompressFiles(
|
||||
const UString &arcPathPrefix,
|
||||
const UString &arcName,
|
||||
|
||||
@@ -59,17 +59,6 @@ static void ThrowException_if_Error(HRESULT res)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
UString GetQuotedString(const UString &s)
|
||||
{
|
||||
UString s2 ('\"');
|
||||
s2 += s;
|
||||
s2 += '\"';
|
||||
return s2;
|
||||
}
|
||||
|
||||
static void ErrorMessage(LPCWSTR message)
|
||||
{
|
||||
MessageBoxW(g_HWND, message, L"7-Zip ZS", MB_ICONERROR);
|
||||
|
||||
@@ -685,9 +685,6 @@ static bool DoItemAlwaysStart(const UString &name)
|
||||
return FindExt(kStartExtensions, name);
|
||||
}
|
||||
|
||||
UString GetQuotedString(const UString &s);
|
||||
|
||||
|
||||
void SplitCmdLineSmart(const UString &cmd, UString &prg, UString ¶ms);
|
||||
void SplitCmdLineSmart(const UString &cmd, UString &prg, UString ¶ms)
|
||||
{
|
||||
|
||||
@@ -1803,3 +1803,13 @@ FString us2fs(const wchar_t *s)
|
||||
}
|
||||
|
||||
#endif // USE_UNICODE_FSTRING
|
||||
|
||||
// ----------------------------------------
|
||||
|
||||
UString GetQuotedString(const UString &s)
|
||||
{
|
||||
UString s2 ('\"');
|
||||
s2 += s;
|
||||
s2 += '\"';
|
||||
return s2;
|
||||
}
|
||||
|
||||
@@ -994,9 +994,6 @@ typedef const FChar *CFSTR;
|
||||
|
||||
typedef CObjectVector<FString> FStringVector;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined(_WIN32)
|
||||
// #include <wchar.h>
|
||||
@@ -1012,3 +1009,7 @@ typedef CObjectVector<FString> FStringVector;
|
||||
#define WCHAR_IN_FILE_NAME_BACKSLASH_REPLACEMENT ((wchar_t)((unsigned)(0xF000) + (unsigned)'\\'))
|
||||
// #define WCHAR_IN_FILE_NAME_BACKSLASH_REPLACEMENT '_'
|
||||
#endif
|
||||
|
||||
UString GetQuotedString(const UString &s);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,16 +12,6 @@ extern bool g_IsNT;
|
||||
|
||||
namespace NWindows {
|
||||
|
||||
#ifndef UNDER_CE
|
||||
static UString GetQuotedString(const UString &s)
|
||||
{
|
||||
UString s2 ('\"');
|
||||
s2 += s;
|
||||
s2 += '\"';
|
||||
return s2;
|
||||
}
|
||||
#endif
|
||||
|
||||
WRes CProcess::Create(LPCWSTR imageName, const UString ¶ms, LPCWSTR curDir)
|
||||
{
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user