refactor: replace char_u with char 20 (#21714)

refactor: replace char_u with char

Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
dundargoc
2023-01-13 00:35:39 +01:00
committed by GitHub
parent 2f1fd15554
commit f2141de9e4
39 changed files with 488 additions and 501 deletions

View File

@@ -3964,18 +3964,16 @@ char *vim_strsave_fnameescape(const char *const fname, const int what)
char *p = (char *)vim_strsave_escaped((const char_u *)fname,
(const char_u *)buf);
#else
# define PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<")
# define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&")
# define BUFFER_ESC_CHARS ((char_u *)" \t\n*?[`$\\%#'\"|!<")
char *p =
(char *)vim_strsave_escaped((const char_u *)fname,
what == VSE_SHELL ? SHELL_ESC_CHARS
: what == VSE_BUFFER ? BUFFER_ESC_CHARS : PATH_ESC_CHARS);
# define PATH_ESC_CHARS " \t\n*?[{`$\\%#'\"|!<"
# define SHELL_ESC_CHARS " \t\n*?[{`$\\%#'\"|!<>();&"
# define BUFFER_ESC_CHARS " \t\n*?[`$\\%#'\"|!<"
char *p = vim_strsave_escaped(fname,
what == VSE_SHELL ? SHELL_ESC_CHARS : what ==
VSE_BUFFER ? BUFFER_ESC_CHARS : PATH_ESC_CHARS);
if (what == VSE_SHELL && csh_like_shell()) {
// For csh and similar shells need to put two backslashes before '!'.
// One is taken by Vim, one by the shell.
char *s = (char *)vim_strsave_escaped((const char_u *)p,
(const char_u *)"!");
char *s = vim_strsave_escaped(p, "!");
xfree(p);
p = s;
}