aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index d5c636ff08..eeb374cf44 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -52,7 +52,8 @@
/// @param s2 Second file name.
/// @param checkname When both files don't exist, only compare their names.
/// @return Enum of type FileComparison. @see FileComparison.
-FileComparison path_full_compare(char_u *s1, char_u *s2, int checkname)
+FileComparison path_full_compare(char_u *const s1, char_u *const s2,
+ const bool checkname)
{
assert(s1 && s2);
char_u exp1[MAXPATHL];
@@ -1769,7 +1770,7 @@ void path_fix_case(char_u *name)
}
// Open the directory where the file is located.
- char_u *slash = vim_strrchr(name, '/');
+ char_u *slash = STRRCHR(name, '/');
char_u *tail;
Directory dir;
bool ok;
@@ -1818,7 +1819,7 @@ void path_fix_case(char_u *name)
int after_pathsep(const char *b, const char *p)
{
return p > b && vim_ispathsep(p[-1])
- && (!has_mbyte || (*mb_head_off)((char_u *)b, (char_u *)p - 1) == 0);
+ && utf_head_off((char_u *)b, (char_u *)p - 1) == 0;
}
/*
@@ -2212,10 +2213,10 @@ static int path_to_absolute(const char_u *fname, char_u *buf, size_t len,
// expand it if forced or not an absolute path
if (force || !path_is_absolute(fname)) {
- p = vim_strrchr(fname, '/');
+ p = STRRCHR(fname, '/');
#ifdef WIN32
if (p == NULL) {
- p = vim_strrchr(fname, '\\');
+ p = STRRCHR(fname, '\\');
}
#endif
if (p != NULL) {