diff --git a/CPP/7zip/UI/Common/CompressCall.cpp b/CPP/7zip/UI/Common/CompressCall.cpp index 29b3a1b6..23fd03f4 100644 --- a/CPP/7zip/UI/Common/CompressCall.cpp +++ b/CPP/7zip/UI/Common/CompressCall.cpp @@ -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); diff --git a/CPP/7zip/UI/Common/CompressCall.h b/CPP/7zip/UI/Common/CompressCall.h index 2697fda5..2087e802 100644 --- a/CPP/7zip/UI/Common/CompressCall.h +++ b/CPP/7zip/UI/Common/CompressCall.h @@ -5,8 +5,6 @@ #include "../../../Common/MyString.h" -UString GetQuotedString(const UString &s); - HRESULT CompressFiles( const UString &arcPathPrefix, const UString &arcName, diff --git a/CPP/7zip/UI/Common/CompressCall2.cpp b/CPP/7zip/UI/Common/CompressCall2.cpp index 951c1df8..3c43c952 100644 --- a/CPP/7zip/UI/Common/CompressCall2.cpp +++ b/CPP/7zip/UI/Common/CompressCall2.cpp @@ -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); diff --git a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp index 17301b5e..77b129ac 100644 --- a/CPP/7zip/UI/FileManager/PanelItemOpen.cpp +++ b/CPP/7zip/UI/FileManager/PanelItemOpen.cpp @@ -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) { diff --git a/CPP/Common/MyString.cpp b/CPP/Common/MyString.cpp index 599550fe..d9a857c8 100644 --- a/CPP/Common/MyString.cpp +++ b/CPP/Common/MyString.cpp @@ -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; +} diff --git a/CPP/Common/MyString.h b/CPP/Common/MyString.h index 05a25d45..6d0666fc 100644 --- a/CPP/Common/MyString.h +++ b/CPP/Common/MyString.h @@ -994,9 +994,6 @@ typedef const FChar *CFSTR; typedef CObjectVector FStringVector; -#endif - - #if defined(_WIN32) // #include @@ -1012,3 +1009,7 @@ typedef CObjectVector 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 diff --git a/CPP/Windows/ProcessUtils.cpp b/CPP/Windows/ProcessUtils.cpp index 9bf05383..d42a9a4d 100644 --- a/CPP/Windows/ProcessUtils.cpp +++ b/CPP/Windows/ProcessUtils.cpp @@ -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) { /*