| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include <errno.h> | 5 #include <errno.h> |
| 6 | 6 |
| 7 #include "bin/utils.h" | 7 #include "bin/utils.h" |
| 8 #include "bin/log.h" | 8 #include "bin/log.h" |
| 9 | 9 |
| 10 static void FormatMessageIntoBuffer(DWORD code, | 10 static void FormatMessageIntoBuffer(DWORD code, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 return const_cast<const char*>(ConsoleStringToUtf8(const_cast<char*>(str))); | 97 return const_cast<const char*>(ConsoleStringToUtf8(const_cast<char*>(str))); |
| 98 } | 98 } |
| 99 | 99 |
| 100 const char* StringUtils::WideToUtf8(const wchar_t* wide) { | 100 const char* StringUtils::WideToUtf8(const wchar_t* wide) { |
| 101 return const_cast<const char*>(WideToUtf8(const_cast<wchar_t*>(wide))); | 101 return const_cast<const char*>(WideToUtf8(const_cast<wchar_t*>(wide))); |
| 102 } | 102 } |
| 103 | 103 |
| 104 const wchar_t* StringUtils::Utf8ToWide(const char* utf8) { | 104 const wchar_t* StringUtils::Utf8ToWide(const char* utf8) { |
| 105 return const_cast<const wchar_t*>(Utf8ToWide(const_cast<char*>(utf8))); | 105 return const_cast<const wchar_t*>(Utf8ToWide(const_cast<char*>(utf8))); |
| 106 } | 106 } |
| 107 |
| 108 wchar_t** ShellUtils::GetUnicodeArgv(int* argc) { |
| 109 wchar_t* command_line = GetCommandLineW(); |
| 110 return CommandLineToArgvW(command_line, argc); |
| 111 } |
| 112 |
| 113 void ShellUtils::FreeUnicodeArgv(wchar_t** argv) { |
| 114 LocalFree(argv); |
| 115 } |
| OLD | NEW |