Refactor/uncrustify (#15790)

* refactor: format with uncrustify

* fixup(dundar): fix functions comments

* fixup(dundar): remove space between variable and ++/--

* fixup(dundar): better workaround for macro attributes

This is done to be able to better use uncrustify rules for macros

* fixup(justin): make preprocessors follow neovim style guide
This commit is contained in:
dundargoc
2021-09-29 19:48:50 +02:00
committed by GitHub
parent ec4731d982
commit d90fb1c0bf
37 changed files with 2366 additions and 1940 deletions

View File

@@ -2570,13 +2570,13 @@ static void realloc_cmdbuff(int len)
static char_u *arshape_buf = NULL;
# if defined(EXITFREE)
#if defined(EXITFREE)
void free_arshape_buf(void)
{
xfree(arshape_buf);
}
# endif
#endif
enum { MAX_CB_ERRORS = 1 };
@@ -4111,7 +4111,7 @@ char *vim_strsave_fnameescape(const char *const fname, const bool shell FUNC_ATT
FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_ALL
{
#ifdef BACKSLASH_IN_FILENAME
#define PATH_ESC_CHARS " \t\n*?[{`%#'\"|!<"
# define PATH_ESC_CHARS " \t\n*?[{`%#'\"|!<"
char_u buf[sizeof(PATH_ESC_CHARS)];
int j = 0;
@@ -4125,8 +4125,8 @@ char *vim_strsave_fnameescape(const char *const fname, const bool shell FUNC_ATT
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 PATH_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<")
# define SHELL_ESC_CHARS ((char_u *)" \t\n*?[{`$\\%#'\"|!<>();&")
char *p =
(char *)vim_strsave_escaped((const char_u *)fname, (shell ? SHELL_ESC_CHARS : PATH_ESC_CHARS));
if (shell && csh_like_shell()) {