From 6a273af10517d1f7e4ea85635f1d25a9158adeb5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 13 May 2023 10:40:53 +0800 Subject: refactor: remove typval.h from most header files (#23601) Because typval_defs.h is enough for most of them. --- src/nvim/eval/funcs.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/nvim/eval/funcs.h') diff --git a/src/nvim/eval/funcs.h b/src/nvim/eval/funcs.h index 1ae031a952..65a95196de 100644 --- a/src/nvim/eval/funcs.h +++ b/src/nvim/eval/funcs.h @@ -6,7 +6,6 @@ #include "nvim/api/private/dispatch.h" #include "nvim/buffer_defs.h" -#include "nvim/eval/typval.h" #include "nvim/eval/typval_defs.h" #include "nvim/types.h" -- cgit From 2f17ef1fc4b96cf1106fd95ba090d34a2e4b977b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 22 Jun 2023 04:09:14 -0700 Subject: fix(messages): use "Vimscript" instead of "VimL" #24111 followup to #24109 fix #16150 --- src/nvim/eval/funcs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/eval/funcs.h') diff --git a/src/nvim/eval/funcs.h b/src/nvim/eval/funcs.h index 65a95196de..5dab12787b 100644 --- a/src/nvim/eval/funcs.h +++ b/src/nvim/eval/funcs.h @@ -9,14 +9,14 @@ #include "nvim/eval/typval_defs.h" #include "nvim/types.h" -/// Prototype of C function that implements VimL function +/// Prototype of C function that implements Vimscript function typedef void (*VimLFunc)(typval_T *args, typval_T *rvar, EvalFuncData data); /// Special flags for base_arg @see EvalFuncDef #define BASE_NONE 0 ///< Not a method (no base argument). #define BASE_LAST UINT8_MAX ///< Use the last argument as the method base. -/// Structure holding VimL function definition +/// Structure holding Vimscript function definition typedef struct { char *name; ///< Name of the function. uint8_t min_argc; ///< Minimal number of arguments. -- cgit 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/eval/funcs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/eval/funcs.h') diff --git a/src/nvim/eval/funcs.h b/src/nvim/eval/funcs.h index 5dab12787b..5f6132f68c 100644 --- a/src/nvim/eval/funcs.h +++ b/src/nvim/eval/funcs.h @@ -6,6 +6,7 @@ #include "nvim/api/private/dispatch.h" #include "nvim/buffer_defs.h" +#include "nvim/cmdexpand_defs.h" #include "nvim/eval/typval_defs.h" #include "nvim/types.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/eval/funcs.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/nvim/eval/funcs.h') diff --git a/src/nvim/eval/funcs.h b/src/nvim/eval/funcs.h index 5f6132f68c..858da53e13 100644 --- a/src/nvim/eval/funcs.h +++ b/src/nvim/eval/funcs.h @@ -1,5 +1,4 @@ -#ifndef NVIM_EVAL_FUNCS_H -#define NVIM_EVAL_FUNCS_H +#pragma once #include #include @@ -31,4 +30,3 @@ typedef struct { #ifdef INCLUDE_GENERATED_DECLARATIONS # include "eval/funcs.h.generated.h" #endif -#endif // NVIM_EVAL_FUNCS_H -- cgit From 6c14ae6bfaf51415b555e9a6b85d1d280976358d Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 27 Nov 2023 20:27:32 +0100 Subject: refactor: rename types.h to types_defs.h --- src/nvim/eval/funcs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/eval/funcs.h') diff --git a/src/nvim/eval/funcs.h b/src/nvim/eval/funcs.h index 858da53e13..09f709be06 100644 --- a/src/nvim/eval/funcs.h +++ b/src/nvim/eval/funcs.h @@ -7,7 +7,7 @@ #include "nvim/buffer_defs.h" #include "nvim/cmdexpand_defs.h" #include "nvim/eval/typval_defs.h" -#include "nvim/types.h" +#include "nvim/types_defs.h" /// Prototype of C function that implements Vimscript function typedef void (*VimLFunc)(typval_T *args, typval_T *rvar, EvalFuncData data); -- cgit From 718053b7a97c4e2fbaa6077d3c9f4dc7012c8aad Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 28 Nov 2023 07:47:36 +0800 Subject: refactor: fix runtime_defs.h (#26259) --- src/nvim/eval/funcs.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/nvim/eval/funcs.h') diff --git a/src/nvim/eval/funcs.h b/src/nvim/eval/funcs.h index 09f709be06..0c345dacb4 100644 --- a/src/nvim/eval/funcs.h +++ b/src/nvim/eval/funcs.h @@ -3,18 +3,20 @@ #include #include -#include "nvim/api/private/dispatch.h" -#include "nvim/buffer_defs.h" -#include "nvim/cmdexpand_defs.h" +#include "nvim/buffer_defs.h" // IWYU pragma: keep +#include "nvim/cmdexpand_defs.h" // IWYU pragma: keep #include "nvim/eval/typval_defs.h" +#include "nvim/pos_defs.h" // IWYU pragma: keep #include "nvim/types_defs.h" /// Prototype of C function that implements Vimscript function typedef void (*VimLFunc)(typval_T *args, typval_T *rvar, EvalFuncData data); /// Special flags for base_arg @see EvalFuncDef -#define BASE_NONE 0 ///< Not a method (no base argument). -#define BASE_LAST UINT8_MAX ///< Use the last argument as the method base. +enum { + BASE_NONE = 0, ///< Not a method (no base argument). + BASE_LAST = UINT8_MAX, ///< Use the last argument as the method base. +}; /// Structure holding Vimscript function definition typedef struct { -- cgit