diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-09-10 14:33:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-10 14:33:43 +0200 |
commit | 4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9 (patch) | |
tree | b62862e24e506e0010852d23b68c79103637500c /src/nvim/os/env.c | |
parent | 40f9f479b746d0f76fbdd4bc0567d593ca7a6070 (diff) | |
parent | 684bc749efef0fa31395d349f4495d79ec5f3fd5 (diff) | |
download | rneovim-4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9.tar.gz rneovim-4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9.tar.bz2 rneovim-4638fcf4fb688fa548b8ce337ec3b7c1327fbfe9.zip |
Merge pull request #20068 from dundargoc/refactor/char_u/10
refactor: replace char_u with char 10: remove `FNAMECMP`, `FNAMENCMP` and `STRLCAT`
Diffstat (limited to 'src/nvim/os/env.c')
-rw-r--r-- | src/nvim/os/env.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index 2f2a8c7fdc..34ed3aaf6e 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -476,7 +476,7 @@ void init_homedir(void) // Change to the directory and get the actual path. This resolves // links. Don't do it when we can't return. if (os_dirname((char_u *)os_buf, MAXPATHL) == OK && os_chdir(os_buf) == 0) { - if (!os_chdir(var) && os_dirname(IObuff, IOSIZE) == OK) { + if (!os_chdir(var) && os_dirname((char_u *)IObuff, IOSIZE) == OK) { var = (char *)IObuff; } if (os_chdir(os_buf) != 0) { @@ -804,7 +804,7 @@ static char *remove_tail(char *path, char *pend, char *dirname) char *new_tail = pend - len - 1; if (new_tail >= path - && FNAMENCMP((char_u *)new_tail, (char_u *)dirname, len) == 0 + && path_fnamencmp(new_tail, dirname, len) == 0 && (new_tail == path || after_pathsep(path, new_tail))) { return new_tail; } @@ -1098,7 +1098,7 @@ size_t home_replace(const buf_T *const buf, const char *src, char *const dst, si size_t len = dirlen; for (;;) { if (len - && FNAMENCMP(src, (char_u *)p, len) == 0 + && path_fnamencmp(src, p, len) == 0 && (vim_ispathsep(src[len]) || (!one && (src[len] == ',' || src[len] == ' ')) || src[len] == NUL)) { |