* win32/win32.c (init_env): refactoring. remove unused code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
77a6c82eab
commit
50c7751b60
@ -1,3 +1,7 @@
|
|||||||
|
Tue Oct 2 20:16:55 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (init_env): refactoring. remove unused code.
|
||||||
|
|
||||||
Tue Oct 2 12:30:40 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Tue Oct 2 12:30:40 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* array.c (rb_ary_product): generalized product, now takes
|
* array.c (rb_ary_product): generalized product, now takes
|
||||||
|
@ -372,19 +372,16 @@ init_env(void)
|
|||||||
SetEnvironmentVariable("HOME", env);
|
SetEnvironmentVariable("HOME", env);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (GetEnvironmentVariable("USER", env, sizeof env)) {
|
|
||||||
len = strlen(env);
|
if (!GetEnvironmentVariable("USER", env, sizeof env)) {
|
||||||
}
|
if (GetEnvironmentVariable("USERNAME", env, sizeof env) ||
|
||||||
if (GetEnvironmentVariable("USERNAME", env, sizeof env)) {
|
GetUserName(env, (len = sizeof env, &len))) {
|
||||||
len = strlen(env);
|
SetEnvironmentVariable("USER", env);
|
||||||
SetEnvironmentVariable("USER", env);
|
}
|
||||||
}
|
else {
|
||||||
else if (GetUserName(env, (len = sizeof env, &len))) {
|
NTLoginName = "<Unknown>";
|
||||||
SetEnvironmentVariable("USER", env);
|
return;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
NTLoginName = "<Unknown>";
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
NTLoginName = strdup(env);
|
NTLoginName = strdup(env);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user