diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-14 08:58:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-14 15:58:28 +0800 |
commit | e89c39d6f016a4140293755250e968e839009617 (patch) | |
tree | f5dc79208bd54132ea364511c559f83bc9cd1e95 /src/nvim/ex_cmds.c | |
parent | 9220755302317e8030c5bbf334357c0d64df9fa4 (diff) | |
download | rneovim-e89c39d6f016a4140293755250e968e839009617.tar.gz rneovim-e89c39d6f016a4140293755250e968e839009617.tar.bz2 rneovim-e89c39d6f016a4140293755250e968e839009617.zip |
refactor: replace char_u with char 21 (#21779)
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 413a488283..c2af0e6986 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -347,7 +347,7 @@ static int linelen(int *has_tab) char save = *last; *last = NUL; // Get line length. - len = linetabsize((char_u *)line); + len = linetabsize(line); // Check for embedded TAB. if (has_tab != NULL) { *has_tab = vim_strchr(first, TAB) != NULL; @@ -1179,7 +1179,7 @@ static void do_filter(linenr_T line1, linenr_T line2, exarg_T *eap, char *cmd, b read_linecount = curbuf->b_ml.ml_line_count; // Pass on the kShellOptDoOut flag when the output is being redirected. - call_shell((char_u *)cmd_buf, (ShellOpts)(kShellOptFilter | shell_flags), NULL); + call_shell(cmd_buf, (ShellOpts)(kShellOptFilter | shell_flags), NULL); xfree(cmd_buf); did_check_timestamps = false; @@ -1324,7 +1324,7 @@ void do_shell(char *cmd, int flags) // This ui_cursor_goto is required for when the '\n' resulted in a "delete line // 1" command to the terminal. ui_cursor_goto(msg_row, msg_col); - (void)call_shell((char_u *)cmd, (ShellOpts)flags, NULL); + (void)call_shell(cmd, (ShellOpts)flags, NULL); msg_didout = true; did_check_timestamps = false; need_check_timestamps = true; @@ -1367,12 +1367,12 @@ char *make_filter_cmd(char *cmd, char *itmp, char *otmp) { bool is_fish_shell = #if defined(UNIX) - strncmp((char *)invocation_path_tail((char_u *)p_sh, NULL), "fish", 4) == 0; + strncmp((char *)invocation_path_tail(p_sh, NULL), "fish", 4) == 0; #else false; #endif - bool is_pwsh = strncmp((char *)invocation_path_tail((char_u *)p_sh, NULL), "pwsh", 4) == 0 - || strncmp((char *)invocation_path_tail((char_u *)p_sh, NULL), "powershell", + bool is_pwsh = strncmp((char *)invocation_path_tail(p_sh, NULL), "pwsh", 4) == 0 + || strncmp((char *)invocation_path_tail(p_sh, NULL), "powershell", 10) == 0; size_t len = strlen(cmd) + 1; // At least enough space for cmd + NULL. |