summaryrefslogtreecommitdiff
path: root/src/common/filepart.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/filepart.c')
-rw-r--r--src/common/filepart.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/common/filepart.c b/src/common/filepart.c
index ab8049a..3c0b2de 100644
--- a/src/common/filepart.c
+++ b/src/common/filepart.c
@@ -38,22 +38,14 @@ static char *tryfile (char *buf, char *dir, char *name, char *extn);
char *pathfind(buf, path, name, extn)
char *buf, *path, *name, *extn;
{
- char *s;
char pbuf[MaxPath];
if (tryfile(buf, (char *)NULL, name, extn)) /* try curr directory first */
return buf;
- if (!path) /* if no path, use default */
+ if (!path) /* if no path, use default */
path = DefPath;
- #if CYGWIN
- s = alloca(cygwin_win32_to_posix_path_list_buf_size(path));
- cygwin_win32_to_posix_path_list(path, s);
- #else /* CYGWIN */
- s = path;
- #endif /* CYGWIN */
-
- while ((s = pathelem(s, pbuf)) != 0) /* for each path element */
+ while ((path = pathelem(path, pbuf)) != 0) /* for each path element */
if (tryfile(buf, pbuf, name, extn)) /* look for file */
return buf;
return NULL; /* return NULL if no file found */
@@ -123,12 +115,6 @@ char *s;
int n;
char *p, *q;
- #if CYGWIN
- char posix_s[_POSIX_PATH_MAX + 1];
- cygwin_conv_to_posix_path(s, posix_s);
- s = posix_s;
- #endif /* CYGWIN */
-
q = s;
fp.ext = p = s + strlen(s);
while (--p >= s) {