summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2012-02-16 20:05:18 +0100
committerBert Belder <bertbelder@gmail.com>2012-02-16 20:19:33 +0100
commit9364699be194cf9175d1bc421050b17ac9875447 (patch)
tree82ed1a17a6567a9deda1db1ef319e7d75af2e700 /src
parent3415427dbfbd590bbee3d777ffc73dde3c67790d (diff)
downloadnode-new-9364699be194cf9175d1bc421050b17ac9875447.tar.gz
Revert "Windows: support non-ansi command line arguments"
CommandLineToArgvW doesn't behave exactly the same as the crt, which makes it useless. This reverts commit ef032cbe85b46584304c665b539b4f7561c4c26c.
Diffstat (limited to 'src')
-rw-r--r--src/node.cc28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/node.cc b/src/node.cc
index 6cbfd02748..652e30a7ab 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -2032,40 +2032,12 @@ Handle<Object> SetupProcessObject(int argc, char *argv[]) {
process->Set(String::NewSymbol("platform"), String::New(PLATFORM));
// process.argv
-#ifdef _WIN32
- // Windows - use unicode
- WCHAR* command_line = GetCommandLineW();
- if (command_line == NULL) {
- winapi_perror("GetCommandLineW");
- exit(1);
- }
-
- int wargc = 0;
- WCHAR** wargv = CommandLineToArgvW(command_line, &wargc);
- if (wargv == NULL || wargc <= 0) {
- winapi_perror("CommandLineToArgvW");
- exit(1);
- }
-
- assert(wargc == argc);
-
- Local<Array> arguments = Array::New(wargc - option_end_index + 1);
- arguments->Set(Integer::New(0), String::New(reinterpret_cast<uint16_t*>(wargv[0])));
- for (j = 1, i = option_end_index; i < wargc; j++, i++) {
- Local<String> arg = String::New(reinterpret_cast<uint16_t*>(wargv[i]));
- arguments->Set(Integer::New(j), arg);
- }
-
- LocalFree(wargv);
-#else
- // Unix
Local<Array> arguments = Array::New(argc - option_end_index + 1);
arguments->Set(Integer::New(0), String::New(argv[0]));
for (j = 1, i = option_end_index; i < argc; j++, i++) {
Local<String> arg = String::New(argv[i]);
arguments->Set(Integer::New(j), arg);
}
-#endif
// assign it
process->Set(String::NewSymbol("argv"), arguments);