From 87ee1f8fe678555474a3ab5b9734744e7da75dd4 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Sat, 11 Sep 2010 23:39:49 +1000 Subject: win32: lineedit: split $PATH the Windows way --- libbb/lineedit.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 7aca71176..9a04c38bf 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -564,7 +564,11 @@ static int path_parse(char ***p, int flags) tmp = (char*)pth; npth = 1; /* path component count */ while (1) { +#if ENABLE_PLATFORM_MINGW32 + tmp = next_path_sep(tmp); +#else tmp = strchr(tmp, ':'); +#endif if (!tmp) break; if (*++tmp == '\0') @@ -576,7 +580,11 @@ static int path_parse(char ***p, int flags) res[0] = tmp = xstrdup(pth); npth = 1; while (1) { +#if ENABLE_PLATFORM_MINGW32 + tmp = next_path_sep(tmp); +#else tmp = strchr(tmp, ':'); +#endif if (!tmp) break; *tmp++ = '\0'; /* ':' -> '\0' */ -- cgit v1.2.3-55-g6feb