summaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-08-04 21:29:45 +0000
committerBram Moolenaar <Bram@vim.org>2005-08-04 21:29:45 +0000
commit1d94f9b30eb9b90332d5043bc3c52b1841bcb7e6 (patch)
treec0c448b589daac7ff86d70bdc08dbea5e3ce509e /src/misc2.c
parent04a09c1975b02f88cbbddcb143bd081e99fc0007 (diff)
downloadvim-git-1d94f9b30eb9b90332d5043bc3c52b1841bcb7e6.tar.gz
updated for version 7.0123
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 93b3bbe56..704e17693 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -4058,7 +4058,7 @@ vim_findfile_init(path, filename, stopdirs, level, free_visited, need_dir,
else
ff_expand_buffer[len++] = FF_MAX_STAR_STAR_EXPAND;
wc_part = (char_u *)errpt;
- if (*wc_part != PATHSEP && *wc_part != NUL)
+ if (*wc_part != NUL && !vim_ispathsep(*wc_part))
{
EMSG2(_("E343: Invalid path: '**[number]' must be at the end of the path or be followed by '%s'."), PATHSEPSTR);
goto error_return;
@@ -4582,10 +4582,10 @@ vim_findfile(search_ctx)
/* cut of last dir */
while (path_end > ff_search_ctx->ffsc_start_dir
- && *path_end == PATHSEP)
+ && vim_ispathsep(*path_end))
path_end--;
while (path_end > ff_search_ctx->ffsc_start_dir
- && *(path_end-1) != PATHSEP)
+ && !vim_ispathsep(path_end[-1]))
path_end--;
*path_end = 0;
path_end--;
@@ -5050,7 +5050,7 @@ ff_path_in_stoplist(path, path_len, stopdirs_v)
int i = 0;
/* eat up trailing path separators, except the first */
- while (path_len > 1 && path[path_len - 1] == PATHSEP)
+ while (path_len > 1 && vim_ispathsep(path[path_len - 1]))
path_len--;
/* if no path consider it as match */
@@ -5066,7 +5066,7 @@ ff_path_in_stoplist(path, path_len, stopdirs_v)
* '/home/r' would also match '/home/rks'
*/
if (fnamencmp(stopdirs_v[i], path, path_len) == 0
- && stopdirs_v[i][path_len] == PATHSEP)
+ && vim_ispathsep(stopdirs_v[i][path_len]))
return TRUE;
}
else