diff options
| author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-18 14:17:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-18 21:17:11 +0800 |
| commit | 8a4285d5637c146a0ae606918a8e77063c6a5f0d (patch) | |
| tree | 4cf13b388ec19fcded4be0648dd75eeea506baf1 /src/nvim/os | |
| parent | 2c1e7242f9bed345e520e9060e5e13fe48a023eb (diff) | |
| download | rneovim-8a4285d5637c146a0ae606918a8e77063c6a5f0d.tar.gz rneovim-8a4285d5637c146a0ae606918a8e77063c6a5f0d.tar.bz2 rneovim-8a4285d5637c146a0ae606918a8e77063c6a5f0d.zip | |
refactor: replace char_u with char 24 (#21823)
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/os')
| -rw-r--r-- | src/nvim/os/env.c | 8 | ||||
| -rw-r--r-- | src/nvim/os/fs.c | 8 | ||||
| -rw-r--r-- | src/nvim/os/input.c | 3 | ||||
| -rw-r--r-- | src/nvim/os/stdpaths.c | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index ae34a79365..7e4710a2f7 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -543,7 +543,7 @@ void free_homedir(void) /// @see {expand_env} char *expand_env_save(char *src) { - return (char *)expand_env_save_opt(src, false); + return expand_env_save_opt(src, false); } /// Similar to expand_env_save() but when "one" is `true` handle the string as @@ -551,10 +551,10 @@ char *expand_env_save(char *src) /// @param src String containing environment variables to expand /// @param one Should treat as only one file name /// @see {expand_env} -char_u *expand_env_save_opt(char *src, bool one) +char *expand_env_save_opt(char *src, bool one) { - char_u *p = xmalloc(MAXPATHL); - expand_env_esc(src, (char *)p, MAXPATHL, false, one, NULL); + char *p = xmalloc(MAXPATHL); + expand_env_esc(src, p, MAXPATHL, false, one, NULL); return p; } diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index ce1b2d1cf5..302faa8140 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -330,11 +330,11 @@ static bool is_executable_ext(const char *name, char **abspath) const char *ext_end = ext; size_t ext_len = - copy_option_part(&ext_end, (char_u *)buf_end, + copy_option_part((char **)&ext_end, buf_end, sizeof(os_buf) - (size_t)(buf_end - os_buf), ENV_SEPSTR); if (ext_len != 0) { bool in_pathext = nameext_len == ext_len - && 0 == mb_strnicmp((char_u *)nameext, (char_u *)ext, ext_len); + && 0 == mb_strnicmp(nameext, ext, ext_len); if (((in_pathext || is_unix_shell) && is_executable(name, abspath)) || is_executable(os_buf, abspath)) { @@ -791,14 +791,14 @@ int os_setperm(const char *const name, int perm) // Return a pointer to the ACL of file "fname" in allocated memory. // Return NULL if the ACL is not available for whatever reason. -vim_acl_T os_get_acl(const char_u *fname) +vim_acl_T os_get_acl(const char *fname) { vim_acl_T ret = NULL; return ret; } // Set the ACL of file "fname" to "acl" (unless it's NULL). -void os_set_acl(const char_u *fname, vim_acl_T aclent) +void os_set_acl(const char *fname, vim_acl_T aclent) { if (aclent == NULL) { return; diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index 51cabfbcbf..759b3cf83c 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -254,7 +254,8 @@ size_t input_enqueue(String keys) uint8_t buf[19] = { 0 }; // Do not simplify the keys here. Simplification will be done later. unsigned int new_size - = trans_special((const char **)&ptr, (size_t)(end - ptr), buf, FSK_KEYCODE, true, NULL); + = trans_special((const char **)&ptr, (size_t)(end - ptr), (char *)buf, FSK_KEYCODE, true, + NULL); if (new_size) { new_size = handle_mouse_event(&ptr, buf, new_size); diff --git a/src/nvim/os/stdpaths.c b/src/nvim/os/stdpaths.c index a99a8d25ce..6b07b6ef70 100644 --- a/src/nvim/os/stdpaths.c +++ b/src/nvim/os/stdpaths.c @@ -121,7 +121,7 @@ char *get_xdg_home(const XDGVarType idx) #endif #ifdef BACKSLASH_IN_FILENAME - slash_adjust((char_u *)dir); + slash_adjust(dir); #endif } return dir; |