Move after_pathsep from misc2.c

This commit is contained in:
John Schmidt
2014-03-31 00:39:11 +02:00
committed by Thiago de Arruda
parent 2cb026c65c
commit e29e956348
4 changed files with 12 additions and 12 deletions

View File

@@ -1662,3 +1662,14 @@ char_u *fix_fname(char_u *fname)
#endif
}
/*
* Return TRUE if "p" points to just after a path separator.
* Takes care of multi-byte characters.
* "b" must point to the start of the file name
*/
int after_pathsep(char_u *b, char_u *p)
{
return p > b && vim_ispathsep(p[-1])
&& (!has_mbyte || (*mb_head_off)(b, p - 1) == 0);
}