diff options
Diffstat (limited to 'miscutils/man.c')
-rw-r--r-- | miscutils/man.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/miscutils/man.c b/miscutils/man.c index 567323a88..4ff58a9a0 100644 --- a/miscutils/man.c +++ b/miscutils/man.c | |||
@@ -199,19 +199,10 @@ static char **add_MANPATH(char **man_path_list, int *count_mp, char *path) | |||
199 | if (path) while (*path) { | 199 | if (path) while (*path) { |
200 | char *next_path; | 200 | char *next_path; |
201 | char **path_element; | 201 | char **path_element; |
202 | #if ENABLE_PLATFORM_MINGW32 | 202 | next_path = strchr(path, PATH_SEP); |
203 | char save; | ||
204 | |||
205 | next_path = (char *)next_path_sep(path); | ||
206 | #else | ||
207 | next_path = strchr(path, ':'); | ||
208 | #endif | ||
209 | if (next_path) { | 203 | if (next_path) { |
210 | if (next_path == path) /* "::"? */ | 204 | if (next_path == path) /* "::"? */ |
211 | goto next; | 205 | goto next; |
212 | #if ENABLE_PLATFORM_MINGW32 | ||
213 | save = *next_path; | ||
214 | #endif | ||
215 | *next_path = '\0'; | 206 | *next_path = '\0'; |
216 | } | 207 | } |
217 | /* Do we already have path? */ | 208 | /* Do we already have path? */ |
@@ -230,11 +221,7 @@ static char **add_MANPATH(char **man_path_list, int *count_mp, char *path) | |||
230 | if (!next_path) | 221 | if (!next_path) |
231 | break; | 222 | break; |
232 | /* "path" may be a result of getenv(), be nice and don't mangle it */ | 223 | /* "path" may be a result of getenv(), be nice and don't mangle it */ |
233 | #if ENABLE_PLATFORM_MINGW32 | 224 | *next_path = PATH_SEP; |
234 | *next_path = save; | ||
235 | #else | ||
236 | *next_path = ':'; | ||
237 | #endif | ||
238 | next: | 225 | next: |
239 | path = next_path + 1; | 226 | path = next_path + 1; |
240 | } | 227 | } |