aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_System.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-03 14:21:51 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-04 16:44:41 -0700
commit604d0e58dab76f8ab31eb4f7807f7b561c4d571d (patch)
tree56c5f18eaa5cc9e3fa7129a7479e243c4db44988 /toolsrc/src/vcpkg_System.cpp
parent80e48c2756cc2c453ba221fe38c32f969d5139ea (diff)
downloadvcpkg-604d0e58dab76f8ab31eb4f7807f7b561c4d571d.tar.gz
vcpkg-604d0e58dab76f8ab31eb4f7807f7b561c4d571d.zip
cstring_view -> CStringView
Diffstat (limited to 'toolsrc/src/vcpkg_System.cpp')
-rw-r--r--toolsrc/src/vcpkg_System.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/toolsrc/src/vcpkg_System.cpp b/toolsrc/src/vcpkg_System.cpp
index 688773aea..bf0ae9ebd 100644
--- a/toolsrc/src/vcpkg_System.cpp
+++ b/toolsrc/src/vcpkg_System.cpp
@@ -13,7 +13,7 @@ namespace vcpkg::System
return fs::path(buf, buf + bytes);
}
- int cmd_execute_clean(const cwstring_view cmd_line)
+ int cmd_execute_clean(const CWStringView cmd_line)
{
static const std::wstring system_root = get_environmental_variable(L"SystemRoot").value_or_exit(VCPKG_LINE_INFO);
static const std::wstring system_32 = system_root + LR"(\system32)";
@@ -88,7 +88,7 @@ namespace vcpkg::System
return static_cast<int>(exit_code);
}
- int cmd_execute(const cwstring_view cmd_line)
+ int cmd_execute(const CWStringView cmd_line)
{
// Flush stdout before launching external process
_flushall();
@@ -99,7 +99,7 @@ namespace vcpkg::System
return exit_code;
}
- exit_code_and_output cmd_execute_and_capture_output(const cwstring_view cmd_line)
+ exit_code_and_output cmd_execute_and_capture_output(const CWStringView cmd_line)
{
// Flush stdout before launching external process
fflush(stdout);
@@ -125,24 +125,24 @@ namespace vcpkg::System
return { ec, output };
}
- std::wstring create_powershell_script_cmd(const fs::path& script_path, const cwstring_view args)
+ std::wstring create_powershell_script_cmd(const fs::path& script_path, const CWStringView args)
{
// TODO: switch out ExecutionPolicy Bypass with "Remove Mark Of The Web" code and restore RemoteSigned
return Strings::wformat(LR"(powershell -NoProfile -ExecutionPolicy Bypass -Command "& {& '%s' %s}")", script_path.native(), args);
}
- void print(const cstring_view message)
+ void print(const CStringView message)
{
fputs(message, stdout);
}
- void println(const cstring_view message)
+ void println(const CStringView message)
{
print(message);
putchar('\n');
}
- void print(const color c, const cstring_view message)
+ void print(const color c, const CStringView message)
{
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
@@ -155,13 +155,13 @@ namespace vcpkg::System
SetConsoleTextAttribute(hConsole, original_color);
}
- void println(const color c, const cstring_view message)
+ void println(const color c, const CStringView message)
{
print(c, message);
putchar('\n');
}
- optional<std::wstring> get_environmental_variable(const cwstring_view varname) noexcept
+ optional<std::wstring> get_environmental_variable(const CWStringView varname) noexcept
{
auto sz = GetEnvironmentVariableW(varname, nullptr, 0);
if (sz == 0)
@@ -181,7 +181,7 @@ namespace vcpkg::System
return hkey_type == REG_SZ || hkey_type == REG_MULTI_SZ || hkey_type == REG_EXPAND_SZ;
}
- optional<std::wstring> get_registry_string(HKEY base, const cwstring_view subKey, const cwstring_view valuename)
+ optional<std::wstring> get_registry_string(HKEY base, const CWStringView subKey, const CWStringView valuename)
{
HKEY k = nullptr;
LSTATUS ec = RegOpenKeyExW(base, subKey, NULL, KEY_READ, &k);