From 0fc8597f011e0927e529abd11bf0ddd8d0d1eaab Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sat, 9 Oct 2021 14:20:16 +0200 Subject: refactor: format header files with uncrustify #15877 * refactor: format header files with uncrustify * fixup(justin): skip formatting of terminfo_defs.h * fixup: force winsock2 to be included first * fixup: simplify disable/enable directive to "uncrustify:off/on" --- src/nvim/os/input.h | 2 +- src/nvim/os/os.h | 4 ++-- src/nvim/os/os_defs.h | 2 +- src/nvim/os/process.h | 1 + src/nvim/os/time.h | 2 +- src/nvim/os/unix_defs.h | 2 +- src/nvim/os/win_defs.h | 7 +++++-- 7 files changed, 12 insertions(+), 8 deletions(-) (limited to 'src/nvim/os') diff --git a/src/nvim/os/input.h b/src/nvim/os/input.h index d571965408..7026781407 100644 --- a/src/nvim/os/input.h +++ b/src/nvim/os/input.h @@ -1,8 +1,8 @@ #ifndef NVIM_OS_INPUT_H #define NVIM_OS_INPUT_H -#include #include +#include #include "nvim/api/private/defs.h" #include "nvim/event/multiqueue.h" diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h index 3e89e5a94a..bff2936f8e 100644 --- a/src/nvim/os/os.h +++ b/src/nvim/os/os.h @@ -9,11 +9,11 @@ #include "nvim/vim.h" #ifdef INCLUDE_GENERATED_DECLARATIONS +# include "os/env.h.generated.h" # include "os/fs.h.generated.h" # include "os/mem.h.generated.h" -# include "os/env.h.generated.h" -# include "os/users.h.generated.h" # include "os/stdpaths.h.generated.h" +# include "os/users.h.generated.h" #endif #endif // NVIM_OS_OS_H diff --git a/src/nvim/os/os_defs.h b/src/nvim/os/os_defs.h index 1b7859b0d3..8049b3b80e 100644 --- a/src/nvim/os/os_defs.h +++ b/src/nvim/os/os_defs.h @@ -16,7 +16,7 @@ #define BASENAMELEN (NAME_MAX - 5) // Use the system path length if it makes sense. -# define DEFAULT_MAXPATHL 4096 +#define DEFAULT_MAXPATHL 4096 #if defined(PATH_MAX) && (PATH_MAX > DEFAULT_MAXPATHL) # define MAXPATHL PATH_MAX #else diff --git a/src/nvim/os/process.h b/src/nvim/os/process.h index 1722d56bd3..faa4762cf1 100644 --- a/src/nvim/os/process.h +++ b/src/nvim/os/process.h @@ -2,6 +2,7 @@ #define NVIM_OS_PROCESS_H #include + #include "nvim/api/private/defs.h" #ifdef INCLUDE_GENERATED_DECLARATIONS diff --git a/src/nvim/os/time.h b/src/nvim/os/time.h index ad4886446a..1b6c667dbb 100644 --- a/src/nvim/os/time.h +++ b/src/nvim/os/time.h @@ -1,8 +1,8 @@ #ifndef NVIM_OS_TIME_H #define NVIM_OS_TIME_H -#include #include +#include #include typedef uint64_t Timestamp; diff --git a/src/nvim/os/unix_defs.h b/src/nvim/os/unix_defs.h index 60a2dfa882..4ed3b51694 100644 --- a/src/nvim/os/unix_defs.h +++ b/src/nvim/os/unix_defs.h @@ -1,8 +1,8 @@ #ifndef NVIM_OS_UNIX_DEFS_H #define NVIM_OS_UNIX_DEFS_H -#include #include +#include // POSIX.1-2008 says that NAME_MAX should be in here #include diff --git a/src/nvim/os/win_defs.h b/src/nvim/os/win_defs.h index 66d72de08d..efef77be7b 100644 --- a/src/nvim/os/win_defs.h +++ b/src/nvim/os/win_defs.h @@ -7,11 +7,14 @@ // winsock2.h must be first to avoid incompatibilities // with winsock.h (included by windows.h) + +// uncrustify:off #include -#include -#include +// uncrustify:on #include #include +#include +#include // Windows does not have S_IFLNK but libuv defines it // and sets the flag for us when calling uv_fs_stat. -- cgit