diff options
author | Dundar Goc <gocdundar@gmail.com> | 2022-05-09 11:49:32 +0200 |
---|---|---|
committer | Dundar Goc <gocdundar@gmail.com> | 2022-05-16 13:27:06 +0200 |
commit | f0148de7907ec297647816d51c79745be729439e (patch) | |
tree | 1aaaa4bbb1cff930178e05dd8b0f72482db166e6 /src/nvim/os/env.c | |
parent | 7adecbcd29e17b71bf43e50a444724da184c04a7 (diff) | |
download | rneovim-f0148de7907ec297647816d51c79745be729439e.tar.gz rneovim-f0148de7907ec297647816d51c79745be729439e.tar.bz2 rneovim-f0148de7907ec297647816d51c79745be729439e.zip |
refactor: replace char_u variables and functions with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/os/env.c')
-rw-r--r-- | src/nvim/os/env.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index d0435cd968..c03fd60f03 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -529,9 +529,9 @@ void free_homedir(void) /// again soon. /// @param src String containing environment variables to expand /// @see {expand_env} -char_u *expand_env_save(char_u *src) +char *expand_env_save(char *src) { - return expand_env_save_opt(src, false); + return (char *)expand_env_save_opt((char_u *)src, false); } /// Similar to expand_env_save() but when "one" is `true` handle the string as @@ -644,7 +644,7 @@ void expand_env_esc(char_u *restrict srcp, char_u *restrict dst, int dstlen, boo #endif } else if (src[1] == NUL // home directory || vim_ispathsep(src[1]) - || vim_strchr((char_u *)" ,\t\n", src[1]) != NULL) { + || vim_strchr(" ,\t\n", src[1]) != NULL) { var = (char_u *)homedir; tail = src + 1; } else { // user directory @@ -884,8 +884,7 @@ void vim_get_prefix_from_exepath(char *exe_name) { // TODO(bfredl): param could have been written as "char exe_name[MAXPATHL]" // but c_grammar.lua does not recognize it (yet). - xstrlcpy(exe_name, (char *)get_vim_var_str(VV_PROGPATH), - MAXPATHL * sizeof(*exe_name)); + xstrlcpy(exe_name, get_vim_var_str(VV_PROGPATH), MAXPATHL * sizeof(*exe_name)); char *path_end = (char *)path_tail_with_sep((char_u *)exe_name); *path_end = '\0'; // remove the trailing "nvim.exe" path_end = path_tail(exe_name); @@ -940,7 +939,7 @@ char *vim_getenv(const char *name) // - the directory name from 'helpfile' (unless it contains '$') // - the executable name from argv[0] if (vim_path == NULL) { - if (p_hf != NULL && vim_strchr(p_hf, '$') == NULL) { + if (p_hf != NULL && vim_strchr((char *)p_hf, '$') == NULL) { vim_path = (char *)p_hf; } |