mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
refactor: run IWYU on entire repo
Reference: https://github.com/neovim/neovim/issues/6371.
This commit is contained in:
@@ -1,15 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#include "nvim/ascii_defs.h"
|
||||
#include "nvim/ex_cmds_defs.h" // IWYU pragma: keep
|
||||
#include "nvim/extmark_defs.h" // IWYU pragma: keep
|
||||
#include "nvim/func_attr.h"
|
||||
#include "nvim/macros_defs.h"
|
||||
#include "nvim/mark_defs.h" // IWYU pragma: export
|
||||
#include "nvim/os/time.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "mark.h.generated.h"
|
||||
#endif
|
||||
|
||||
static inline int mark_global_index(char name)
|
||||
REAL_FATTR_CONST;
|
||||
|
||||
/// Convert mark name to the offset
|
||||
static inline int mark_global_index(const char name)
|
||||
{
|
||||
@@ -22,7 +28,6 @@ static inline int mark_global_index(const char name)
|
||||
|
||||
static inline int mark_local_index(char name)
|
||||
REAL_FATTR_CONST;
|
||||
|
||||
/// Convert local mark name to the offset
|
||||
static inline int mark_local_index(const char name)
|
||||
{
|
||||
@@ -40,6 +45,37 @@ static inline int mark_local_index(const char name)
|
||||
/// Global marks (marks with file number or name)
|
||||
EXTERN xfmark_T namedfm[NGLOBALMARKS] INIT( = { 0 });
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "mark.h.generated.h"
|
||||
#endif
|
||||
#define SET_FMARK(fmarkp_, mark_, fnum_, view_) \
|
||||
do { \
|
||||
fmark_T *const fmarkp__ = fmarkp_; \
|
||||
fmarkp__->mark = mark_; \
|
||||
fmarkp__->fnum = fnum_; \
|
||||
fmarkp__->timestamp = os_time(); \
|
||||
fmarkp__->view = view_; \
|
||||
fmarkp__->additional_data = NULL; \
|
||||
} while (0)
|
||||
|
||||
/// Free and set fmark using given value
|
||||
#define RESET_FMARK(fmarkp_, mark_, fnum_, view_) \
|
||||
do { \
|
||||
fmark_T *const fmarkp___ = fmarkp_; \
|
||||
free_fmark(*fmarkp___); \
|
||||
SET_FMARK(fmarkp___, mark_, fnum_, view_); \
|
||||
} while (0)
|
||||
|
||||
/// Set given extended mark (regular mark + file name)
|
||||
#define SET_XFMARK(xfmarkp_, mark_, fnum_, view_, fname_) \
|
||||
do { \
|
||||
xfmark_T *const xfmarkp__ = xfmarkp_; \
|
||||
xfmarkp__->fname = fname_; \
|
||||
SET_FMARK(&(xfmarkp__->fmark), mark_, fnum_, view_); \
|
||||
} while (0)
|
||||
|
||||
/// Free and set given extended mark (regular mark + file name)
|
||||
#define RESET_XFMARK(xfmarkp_, mark_, fnum_, view_, fname_) \
|
||||
do { \
|
||||
xfmark_T *const xfmarkp__ = xfmarkp_; \
|
||||
free_xfmark(*xfmarkp__); \
|
||||
xfmarkp__->fname = fname_; \
|
||||
SET_FMARK(&(xfmarkp__->fmark), mark_, fnum_, view_); \
|
||||
} while (0)
|
||||
|
Reference in New Issue
Block a user