From 09a17f91d0d362c6e58bfdbe3ccdeacffb0b44b9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 2 Oct 2023 10:45:33 +0800 Subject: refactor: move cmdline completion types to cmdexpand_defs.h (#25465) --- src/nvim/os/os.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/nvim/os/os.h') diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h index a7496130cc..006dfbfc04 100644 --- a/src/nvim/os/os.h +++ b/src/nvim/os/os.h @@ -4,9 +4,12 @@ #include #include +#include "nvim/buffer_defs.h" +#include "nvim/cmdexpand_defs.h" +#include "nvim/garray.h" #include "nvim/os/fs_defs.h" #include "nvim/os/stdpaths_defs.h" -#include "nvim/vim.h" +#include "nvim/types.h" #ifdef INCLUDE_GENERATED_DECLARATIONS # include "os/env.h.generated.h" -- cgit From 4f8941c1a5f1ef6caa410feeb52e343db22763ce Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 10 Nov 2023 12:23:42 +0100 Subject: refactor: replace manual header guards with #pragma once It is less error-prone than manually defining header guards. Pretty much all compilers support it even if it's not part of the C standard. --- src/nvim/os/os.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/nvim/os/os.h') diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h index 006dfbfc04..54fff5c8e3 100644 --- a/src/nvim/os/os.h +++ b/src/nvim/os/os.h @@ -1,5 +1,4 @@ -#ifndef NVIM_OS_OS_H -#define NVIM_OS_OS_H +#pragma once #include #include @@ -21,5 +20,3 @@ #define ENV_LOGFILE "NVIM_LOG_FILE" #define ENV_NVIM "NVIM" - -#endif // NVIM_OS_OS_H -- cgit From 6361806aa28edca55ad3316a58bc3e936df9c0eb Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 26 Nov 2023 22:58:52 +0800 Subject: refactor: move garray_T to garray_defs.h (#26227) --- src/nvim/os/os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/os/os.h') diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h index 54fff5c8e3..ede9234865 100644 --- a/src/nvim/os/os.h +++ b/src/nvim/os/os.h @@ -5,7 +5,7 @@ #include "nvim/buffer_defs.h" #include "nvim/cmdexpand_defs.h" -#include "nvim/garray.h" +#include "nvim/garray_defs.h" #include "nvim/os/fs_defs.h" #include "nvim/os/stdpaths_defs.h" #include "nvim/types.h" -- cgit From 09541d514dd18bf86f673d3784d406236fcbdad8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 09:51:26 +0800 Subject: build(IWYU): replace public-to-public mappings with pragmas (#26237) --- src/nvim/os/os.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/os/os.h') diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h index ede9234865..84c4e6668e 100644 --- a/src/nvim/os/os.h +++ b/src/nvim/os/os.h @@ -7,6 +7,7 @@ #include "nvim/cmdexpand_defs.h" #include "nvim/garray_defs.h" #include "nvim/os/fs_defs.h" +#include "nvim/os/os_defs.h" // IWYU pragma: export #include "nvim/os/stdpaths_defs.h" #include "nvim/types.h" -- cgit From 38a20dd89f91c45ec8589bf1c50d50732882d38a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 27 Nov 2023 20:58:37 +0800 Subject: build(IWYU): replace most private mappings with pragmas (#26247) --- src/nvim/os/os.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/nvim/os/os.h') diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h index 84c4e6668e..e0c970f20c 100644 --- a/src/nvim/os/os.h +++ b/src/nvim/os/os.h @@ -1,19 +1,17 @@ #pragma once -#include -#include +#include // IWYU pragma: keep +#include // IWYU pragma: keep +#include // IWYU pragma: keep -#include "nvim/buffer_defs.h" -#include "nvim/cmdexpand_defs.h" -#include "nvim/garray_defs.h" -#include "nvim/os/fs_defs.h" +#include "nvim/buffer_defs.h" // IWYU pragma: keep +#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep +#include "nvim/garray_defs.h" // IWYU pragma: keep #include "nvim/os/os_defs.h" // IWYU pragma: export -#include "nvim/os/stdpaths_defs.h" -#include "nvim/types.h" +#include "nvim/os/stdpaths_defs.h" // IWYU pragma: keep #ifdef INCLUDE_GENERATED_DECLARATIONS # include "os/env.h.generated.h" -# include "os/fs.h.generated.h" # include "os/mem.h.generated.h" # include "os/stdpaths.h.generated.h" # include "os/users.h.generated.h" -- cgit From e38a05369293293b5b510b1b0014fcc2e7cb87f4 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 18:46:03 +0100 Subject: build(IWYU): export generated headers --- src/nvim/os/os.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nvim/os/os.h') diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h index e0c970f20c..cbc2be47e0 100644 --- a/src/nvim/os/os.h +++ b/src/nvim/os/os.h @@ -11,10 +11,12 @@ #include "nvim/os/stdpaths_defs.h" // IWYU pragma: keep #ifdef INCLUDE_GENERATED_DECLARATIONS +// IWYU pragma: begin_exports # include "os/env.h.generated.h" # include "os/mem.h.generated.h" # include "os/stdpaths.h.generated.h" # include "os/users.h.generated.h" +// IWYU pragma: end_exports #endif #define ENV_LOGFILE "NVIM_LOG_FILE" -- cgit From 86cc791debba09c8ed1aa0d863be844108866a38 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 29 Nov 2023 23:10:21 +0800 Subject: refactor: move function macros out of vim_defs.h (#26300) --- src/nvim/os/os.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/nvim/os/os.h') diff --git a/src/nvim/os/os.h b/src/nvim/os/os.h index cbc2be47e0..302d84d066 100644 --- a/src/nvim/os/os.h +++ b/src/nvim/os/os.h @@ -10,6 +10,16 @@ #include "nvim/os/os_defs.h" // IWYU pragma: export #include "nvim/os/stdpaths_defs.h" // IWYU pragma: keep +#define HAVE_PATHDEF + +// Some file names are stored in pathdef.c, which is generated from the +// Makefile to make their value depend on the Makefile. +#ifdef HAVE_PATHDEF +extern char *default_vim_dir; +extern char *default_vimruntime_dir; +extern char *default_lib_dir; +#endif + #ifdef INCLUDE_GENERATED_DECLARATIONS // IWYU pragma: begin_exports # include "os/env.h.generated.h" -- cgit