42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
*/
#ifdef __CYGWIN__
void
TclpFindExecutable(
TCL_UNUSED(const char *) /*argv0*/)
{
size_t length;
wchar_t buf[PATH_MAX] = L"";
char name[PATH_MAX * TCL_UTF_MAX + 1];
GetModuleFileNameW(NULL, buf, PATH_MAX);
cygwin_conv_path(3, buf, name, sizeof(name));
length = strlen(name);
if ((length > 4) && !strcasecmp(name + length - 4, ".exe")) {
/* Strip '.exe' part. */
|
|
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
*/
#ifdef __CYGWIN__
void
TclpFindExecutable(
TCL_UNUSED(const char *) /*argv0*/)
{
size_t length;
WCHAR buf[PATH_MAX] = L"";
char name[PATH_MAX * TCL_UTF_MAX + 1];
GetModuleFileNameW(NULL, buf, PATH_MAX);
cygwin_conv_path(3, buf, name, sizeof(name));
length = strlen(name);
if ((length > 4) && !strcasecmp(name + length - 4, ".exe")) {
/* Strip '.exe' part. */
|