From e317e86db3bd3c7eb13564c889cadb7db225f220 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Thu, 23 Apr 2009 00:16:23 +1000 Subject: shell/ash: teach it to understand semicolon as path separator --- shell/ash.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index 5303e15da..e7f4606d4 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2170,7 +2170,11 @@ padvance(const char **path, const char *name) if (*path == NULL) return NULL; start = *path; +#ifdef __MINGW32__ + for (p = start; *p && *p != ';' && *p != '%'; p++); +#else for (p = start; *p && *p != ':' && *p != '%'; p++); +#endif len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */ while (stackblocksize() < len) growstackblock(); @@ -2184,9 +2188,17 @@ padvance(const char **path, const char *name) pathopt = NULL; if (*p == '%') { pathopt = ++p; +#ifdef __MINGW32__ + while (*p && *p != ';') p++; +#else while (*p && *p != ':') p++; +#endif } +#ifdef __MINGW32__ + if (*p == ';') +#else if (*p == ':') +#endif *path = p + 1; else *path = NULL; -- cgit v1.2.3-55-g6feb