From 41dcca8426893e5683320b6d6382ccf728d75ccc Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Tue, 16 Sep 1997 14:17:23 +0000 Subject: Changes for GNU make 3.76 --- w32/pathstuff.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'w32') diff --git a/w32/pathstuff.c b/w32/pathstuff.c index 01ed52f..52f24a2 100644 --- a/w32/pathstuff.c +++ b/w32/pathstuff.c @@ -38,11 +38,15 @@ convert_Path_to_windows32(char *Path, char to_delim) if ((etok - p) == 1) { if (*(etok - 1) == ';' || *(etok - 1) == ':') { - etok[-1] = to_delim; - etok[0] = to_delim; + etok[-1] = to_delim; + etok[0] = to_delim; p = ++etok; continue; /* ignore empty bucket */ - } else if (etok = strpbrk(etok+1, ":;")) { + } else if (!isalpha(*p)) { + /* found one to count, handle things like '.' */ + *etok = to_delim; + p = ++etok; + } else if ((*etok == ':') && (etok = strpbrk(etok+1, ":;"))) { /* found one to count, handle drive letter */ *etok = to_delim; p = ++etok; @@ -55,11 +59,6 @@ convert_Path_to_windows32(char *Path, char to_delim) p = ++etok; } -#if 0 - /* convert to backward slashes */ - for (p = Path, p = strchr(p, '/'); p; p = strchr(p, '/')) - *p = '\\'; -#endif return Path; } -- cgit v1.2.3