From d90fb1c0bfc1e64c783c385a79e7de87013dadba Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Wed, 29 Sep 2021 19:48:50 +0200 Subject: 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 --- src/nvim/eval/funcs.c | 10 +++++----- src/nvim/eval/typval.c | 4 ++-- src/nvim/eval/userfunc.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/nvim/eval') diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 9feecadb6f..6a1afafdac 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -80,16 +80,16 @@ KHASH_MAP_INIT_STR(functions, VimLFuncDef) #ifdef INCLUDE_GENERATED_DECLARATIONS # include "eval/funcs.c.generated.h" -#ifdef _MSC_VER +# ifdef _MSC_VER // This prevents MSVC from replacing the functions with intrinsics, // and causing errors when trying to get their addresses in funcs.generated.h -#pragma function(ceil) -#pragma function(floor) -#endif +# pragma function(ceil) +# pragma function(floor) +# endif PRAGMA_DIAG_PUSH_IGNORE_MISSING_PROTOTYPES PRAGMA_DIAG_PUSH_IGNORE_IMPLICIT_FALLTHROUGH -#include "funcs.generated.h" +# include "funcs.generated.h" PRAGMA_DIAG_POP PRAGMA_DIAG_POP #endif diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index 3bc4ec9381..075b50a366 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -100,7 +100,7 @@ void list_write_log(const char *const fname) } } -#ifdef EXITFREE +# ifdef EXITFREE /// Free list log void list_free_log(void) { @@ -110,7 +110,7 @@ void list_free_log(void) chunk = list_log_first; } } -#endif +# endif #endif //{{{2 List item diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 0e4ddffa33..657777d7db 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -39,7 +39,7 @@ #define FC_CFUNC 0x800 // C function extension #ifdef INCLUDE_GENERATED_DECLARATIONS -#include "eval/userfunc.c.generated.h" +# include "eval/userfunc.c.generated.h" #endif hashtab_T func_hashtab; -- cgit