167 |
// using GetModuleFileName on MS-Windows, |
// using GetModuleFileName on MS-Windows, |
168 |
// and searching along PATH on other systems. |
// and searching along PATH on other systems. |
169 |
#ifdef _WIN32 |
#ifdef _WIN32 |
170 |
int len = GetModuleFileName(0, curr_prefix, MAX_PATH); |
int len = GetModuleFileName(0, curr_prefix, path_name_max()); |
171 |
if (len) |
if (len) |
172 |
len = GetShortPathName(curr_prefix, curr_prefix, MAX_PATH); |
len = GetShortPathName(curr_prefix, curr_prefix, path_name_max()); |
173 |
# if DEBUG |
# if DEBUG |
174 |
fprintf(stderr, "curr_prefix: %s\n", curr_prefix); |
fprintf(stderr, "curr_prefix: %s\n", curr_prefix); |
175 |
# endif /* DEBUG */ |
# endif /* DEBUG */ |