diff options
| author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-19 15:25:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-19 22:25:56 +0800 |
| commit | 4c531714ff24d82bf1a85decf0e0c63c5785e686 (patch) | |
| tree | aa8497a87a1c248b932cb77ed1f735598299d316 /src/nvim/os | |
| parent | adfad50ac03030abf2533db9f56fa681af6cdc1f (diff) | |
| download | rneovim-4c531714ff24d82bf1a85decf0e0c63c5785e686.tar.gz rneovim-4c531714ff24d82bf1a85decf0e0c63c5785e686.tar.bz2 rneovim-4c531714ff24d82bf1a85decf0e0c63c5785e686.zip | |
refactor: replace char_u with char 25 (#21838)
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 | 4 | ||||
| -rw-r--r-- | src/nvim/os/shell.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c index 7e4710a2f7..0611de14aa 100644 --- a/src/nvim/os/env.c +++ b/src/nvim/os/env.c @@ -689,7 +689,7 @@ void expand_env_esc(char *restrict srcp, char *restrict dst, int dstlen, bool es #else // cannot expand user's home directory, so don't try var = NULL; - tail = (char_u *)""; // for gcc + tail = ""; // for gcc #endif // UNIX } @@ -697,7 +697,7 @@ void expand_env_esc(char *restrict srcp, char *restrict dst, int dstlen, bool es // If 'shellslash' is set change backslashes to forward slashes. // Can't use slash_adjust(), p_ssl may be set temporarily. if (p_ssl && var != NULL && vim_strchr(var, '\\') != NULL) { - char_u *p = xstrdup(var); + char *p = xstrdup(var); if (mustfree) { xfree(var); diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index ac8a141bbe..f1e2c5440f 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -570,7 +570,7 @@ notfound: char **shell_build_argv(const char *cmd, const char *extra_args) FUNC_ATTR_NONNULL_RET { - size_t argc = tokenize(p_sh, NULL) + (cmd ? tokenize((char *)p_shcf, NULL) : 0); + size_t argc = tokenize(p_sh, NULL) + (cmd ? tokenize(p_shcf, NULL) : 0); char **rv = xmalloc((argc + 4) * sizeof(*rv)); // Split 'shell' @@ -581,7 +581,7 @@ char **shell_build_argv(const char *cmd, const char *extra_args) } if (cmd) { - i += tokenize((char *)p_shcf, rv + i); // Split 'shellcmdflag' + i += tokenize(p_shcf, rv + i); // Split 'shellcmdflag' rv[i++] = shell_xescape_xquote(cmd); // Copy (and escape) `cmd`. } @@ -1332,7 +1332,7 @@ static char *shell_xescape_xquote(const char *cmd) const char *ecmd = cmd; if (*p_sxe != NUL && strcmp(p_sxq, "(") == 0) { - ecmd = vim_strsave_escaped_ext(cmd, (char *)p_sxe, '^', false); + ecmd = vim_strsave_escaped_ext(cmd, p_sxe, '^', false); } size_t ncmd_size = strlen(ecmd) + strlen(p_sxq) * 2 + 1; char *ncmd = xmalloc(ncmd_size); |