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"
This commit is contained in:
dundargoc
2021-10-09 14:20:16 +02:00
committed by GitHub
parent a36c6e5df9
commit 0fc8597f01
34 changed files with 585 additions and 610 deletions

View File

@@ -1,15 +1,15 @@
#ifndef NVIM_API_PRIVATE_DEFS_H
#define NVIM_API_PRIVATE_DEFS_H
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "nvim/func_attr.h"
#include "nvim/types.h"
#define ARRAY_DICT_INIT {.size = 0, .capacity = 0, .items = NULL}
#define STRING_INIT {.data = NULL, .size = 0}
#define ARRAY_DICT_INIT { .size = 0, .capacity = 0, .items = NULL }
#define STRING_INIT { .data = NULL, .size = 0 }
#define OBJECT_INIT { .type = kObjectTypeNil }
#define ERROR_INIT { .type = kErrorTypeNone, .msg = NULL }
#define REMOTE_TYPE(type) typedef handle_T type

View File

@@ -4,12 +4,12 @@
#include <stdbool.h>
#include "nvim/api/private/defs.h"
#include "nvim/vim.h"
#include "nvim/getchar.h"
#include "nvim/memory.h"
#include "nvim/decoration.h"
#include "nvim/ex_eval.h"
#include "nvim/getchar.h"
#include "nvim/lib/kvec.h"
#include "nvim/memory.h"
#include "nvim/vim.h"
#define OBJECT_OBJ(o) o
@@ -76,7 +76,7 @@
name.size = fixsize; \
name.items = name##__items; \
#define STATIC_CSTR_AS_STRING(s) ((String) {.data = s, .size = sizeof(s) - 1})
#define STATIC_CSTR_AS_STRING(s) ((String) { .data = s, .size = sizeof(s) - 1 })
/// Create a new String instance, putting data in allocated memory
///

View File

@@ -1,9 +1,8 @@
#ifndef NVIM_EVAL_DECODE_H
#define NVIM_EVAL_DECODE_H
#include <stddef.h>
#include <msgpack.h>
#include <stddef.h>
#include "nvim/eval/typval.h"
#include "nvim/globals.h"

View File

@@ -1,9 +1,8 @@
#ifndef NVIM_EVAL_ENCODE_H
#define NVIM_EVAL_ENCODE_H
#include <stddef.h>
#include <msgpack.h>
#include <stddef.h>
#include "nvim/eval.h"
#include "nvim/garray.h"
@@ -49,8 +48,7 @@ static inline ListReaderState encode_init_lrstate(const list_T *const list)
.offset = 0,
.li_length = (TV_LIST_ITEM_TV(tv_list_first(list))->vval.v_string == NULL
? 0
: STRLEN(TV_LIST_ITEM_TV(
tv_list_first(list))->vval.v_string)),
: STRLEN(TV_LIST_ITEM_TV(tv_list_first(list))->vval.v_string)),
};
}

View File

@@ -1,23 +1,23 @@
#ifndef NVIM_EVAL_TYPVAL_H
#define NVIM_EVAL_TYPVAL_H
#include <assert.h>
#include <inttypes.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
#include <stdbool.h>
#include <assert.h>
#include "nvim/types.h"
#include "nvim/hashtab.h"
#include "nvim/garray.h"
#include "nvim/mbyte.h"
#include "nvim/func_attr.h"
#include "nvim/lib/queue.h"
#include "nvim/profile.h" // for proftime_T
#include "nvim/pos.h" // for linenr_T
#include "nvim/garray.h"
#include "nvim/gettext.h"
#include "nvim/message.h"
#include "nvim/hashtab.h"
#include "nvim/lib/queue.h"
#include "nvim/macros.h"
#include "nvim/mbyte.h"
#include "nvim/message.h"
#include "nvim/pos.h" // for linenr_T
#include "nvim/profile.h" // for proftime_T
#include "nvim/types.h"
#ifdef LOG_LIST_ACTIONS
# include "nvim/memory.h"
#endif
@@ -206,7 +206,7 @@ typedef struct {
.lv_used_next = NULL, \
.lv_used_prev = NULL, \
}, \
}
}
#define TV_DICTITEM_STRUCT(...) \
struct { \
@@ -452,10 +452,8 @@ static inline void list_log(const list_T *const l,
/// @param[in] li1 List item 1.
/// @param[in] li2 List item 2, often used for integers and not list items.
/// @param[in] action Logged action.
static inline void list_log(const list_T *const l,
const listitem_T *const li1,
const listitem_T *const li2,
const char *const action)
static inline void list_log(const list_T *const l, const listitem_T *const li1,
const listitem_T *const li2, const char *const action)
{
ListLog *tgt;
if (list_log_first == NULL) {
@@ -538,8 +536,7 @@ static inline VarLockStatus tv_list_locked(const list_T *const l)
///
/// @param[out] l List to modify.
/// @param[in] lock New lock status.
static inline void tv_list_set_lock(list_T *const l,
const VarLockStatus lock)
static inline void tv_list_set_lock(list_T *const l, const VarLockStatus lock)
{
if (l == NULL) {
assert(lock == VAR_FIXED);
@@ -554,8 +551,7 @@ static inline void tv_list_set_lock(list_T *const l,
///
/// @param[out] l List to modify.
/// @param[in] copyid New copyID.
static inline void tv_list_set_copyid(list_T *const l,
const int copyid)
static inline void tv_list_set_copyid(list_T *const l, const int copyid)
FUNC_ATTR_NONNULL_ALL
{
l->lv_copyID = copyid;
@@ -907,8 +903,7 @@ bool emsgf(const char *const fmt, ...);
/// @param[out] ret_f Location where resulting float is stored.
///
/// @return true in case of success, false if tv is not a number or float.
static inline bool tv_get_float_chk(const typval_T *const tv,
float_T *const ret_f)
static inline bool tv_get_float_chk(const typval_T *const tv, float_T *const ret_f)
{
if (tv->v_type == VAR_FLOAT) {
*ret_f = tv->vval.v_float;

View File

@@ -240,15 +240,15 @@
///
/// This name will only be used by one of the above macros which are defined by
/// the caller. Functions defined here do not use first argument directly.
#include <stddef.h>
#include <inttypes.h>
#include <assert.h>
#include <inttypes.h>
#include <stddef.h>
#include "nvim/lib/kvec.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/encode.h"
#include "nvim/func_attr.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/typval_encode.h"
#include "nvim/func_attr.h"
#include "nvim/lib/kvec.h"
/// Dummy variable used because some macros need lvalue
///
@@ -262,7 +262,7 @@ static inline int _TYPVAL_ENCODE_CHECK_SELF_REFERENCE(
const MPConvStack *const mpstack, const int copyID,
const MPConvStackValType conv_type,
const char *const objname)
REAL_FATTR_NONNULL_ARG(2, 3, 4, 7) REAL_FATTR_WARN_UNUSED_RESULT
REAL_FATTR_NONNULL_ARG(2, 3, 4, 7) REAL_FATTR_WARN_UNUSED_RESULT
REAL_FATTR_ALWAYS_INLINE;
/// Function for checking whether container references itself
@@ -280,10 +280,8 @@ static inline int _TYPVAL_ENCODE_CHECK_SELF_REFERENCE(
///
/// @return NOTDONE in case of success, what to return in case of failure.
static inline int _TYPVAL_ENCODE_CHECK_SELF_REFERENCE(
TYPVAL_ENCODE_FIRST_ARG_TYPE TYPVAL_ENCODE_FIRST_ARG_NAME,
void *const val, int *const val_copyID,
const MPConvStack *const mpstack, const int copyID,
const MPConvStackValType conv_type,
TYPVAL_ENCODE_FIRST_ARG_TYPE TYPVAL_ENCODE_FIRST_ARG_NAME, void *const val, int *const val_copyID,
const MPConvStack *const mpstack, const int copyID, const MPConvStackValType conv_type,
const char *const objname)
{
if (*val_copyID == copyID) {
@@ -299,7 +297,7 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
MPConvStack *const mpstack, MPConvStackVal *const cur_mpsv,
typval_T *const tv, const int copyID,
const char *const objname)
REAL_FATTR_NONNULL_ARG(2, 4, 6) REAL_FATTR_WARN_UNUSED_RESULT;
REAL_FATTR_NONNULL_ARG(2, 4, 6) REAL_FATTR_WARN_UNUSED_RESULT;
/// Convert single value
///
@@ -319,36 +317,29 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
///
/// @return OK in case of success, FAIL in case of failure.
static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
TYPVAL_ENCODE_FIRST_ARG_TYPE TYPVAL_ENCODE_FIRST_ARG_NAME,
MPConvStack *const mpstack, MPConvStackVal *const cur_mpsv,
typval_T *const tv, const int copyID,
const char *const objname)
TYPVAL_ENCODE_FIRST_ARG_TYPE TYPVAL_ENCODE_FIRST_ARG_NAME, MPConvStack *const mpstack,
MPConvStackVal *const cur_mpsv, typval_T *const tv, const int copyID, const char *const objname)
{
switch (tv->v_type) {
case VAR_STRING: {
case VAR_STRING:
TYPVAL_ENCODE_CONV_STRING(tv, tv->vval.v_string, tv_strlen(tv));
break;
}
case VAR_NUMBER: {
case VAR_NUMBER:
TYPVAL_ENCODE_CONV_NUMBER(tv, tv->vval.v_number);
break;
}
case VAR_FLOAT: {
case VAR_FLOAT:
TYPVAL_ENCODE_CONV_FLOAT(tv, tv->vval.v_float);
break;
}
case VAR_BLOB: {
case VAR_BLOB:
TYPVAL_ENCODE_CONV_BLOB(tv, tv->vval.v_blob,
tv_blob_len(tv->vval.v_blob));
break;
}
case VAR_FUNC: {
case VAR_FUNC:
TYPVAL_ENCODE_CONV_FUNC_START(tv, tv->vval.v_string);
TYPVAL_ENCODE_CONV_FUNC_BEFORE_ARGS(tv, 0);
TYPVAL_ENCODE_CONV_FUNC_BEFORE_SELF(tv, -1);
TYPVAL_ENCODE_CONV_FUNC_END(tv);
break;
}
case VAR_PARTIAL: {
partial_T *const pt = tv->vval.v_partial;
(void)pt;
@@ -391,25 +382,21 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
TYPVAL_ENCODE_CONV_REAL_LIST_AFTER_START(tv, _mp_last(*mpstack));
break;
}
case VAR_BOOL: {
case VAR_BOOL:
switch (tv->vval.v_bool) {
case kBoolVarTrue:
case kBoolVarFalse: {
case kBoolVarFalse:
TYPVAL_ENCODE_CONV_BOOL(tv, tv->vval.v_bool == kBoolVarTrue);
break;
}
}
break;
}
case VAR_SPECIAL: {
case VAR_SPECIAL:
switch (tv->vval.v_special) {
case kSpecialVarNull: {
case kSpecialVarNull:
TYPVAL_ENCODE_CONV_NIL(tv); // -V1037
break;
}
}
break;
}
case VAR_DICT: {
if (tv->vval.v_dict == NULL
|| tv->vval.v_dict->dv_hashtab.ht_used == 0) {
@@ -435,17 +422,15 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
goto _convert_one_value_regular_dict;
}
switch ((MessagePackType)i) {
case kMPNil: {
case kMPNil:
TYPVAL_ENCODE_CONV_NIL(tv);
break;
}
case kMPBoolean: {
case kMPBoolean:
if (val_di->di_tv.v_type != VAR_NUMBER) {
goto _convert_one_value_regular_dict;
}
TYPVAL_ENCODE_CONV_BOOL(tv, val_di->di_tv.vval.v_number);
break;
}
case kMPInteger: {
const list_T *val_list;
varnumber_T sign;
@@ -502,13 +487,12 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
}
break;
}
case kMPFloat: {
case kMPFloat:
if (val_di->di_tv.v_type != VAR_FLOAT) {
goto _convert_one_value_regular_dict;
}
TYPVAL_ENCODE_CONV_FLOAT(tv, val_di->di_tv.vval.v_float);
break;
}
case kMPString:
case kMPBinary: {
const bool is_string = ((MessagePackType)i == kMPString);
@@ -537,8 +521,7 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
_TYPVAL_ENCODE_DO_CHECK_SELF_REFERENCE(val_di->di_tv.vval.v_list,
lv_copyID, copyID,
kMPConvList);
TYPVAL_ENCODE_CONV_LIST_START(
tv, tv_list_len(val_di->di_tv.vval.v_list));
TYPVAL_ENCODE_CONV_LIST_START(tv, tv_list_len(val_di->di_tv.vval.v_list));
assert(saved_copyID != copyID && saved_copyID != copyID - 1);
_mp_push(*mpstack, ((MPConvStackVal) {
.tv = tv,
@@ -606,8 +589,7 @@ static int _TYPVAL_ENCODE_CONVERT_ONE_VALUE(
size_t len;
char *buf;
if (!(
encode_vim_list_to_buf(
TV_LIST_ITEM_TV(tv_list_last(val_list))->vval.v_list, &len,
encode_vim_list_to_buf(TV_LIST_ITEM_TV(tv_list_last(val_list))->vval.v_list, &len,
&buf))) {
goto _convert_one_value_regular_dict;
}
@@ -642,11 +624,10 @@ _convert_one_value_regular_dict: {}
_mp_last(*mpstack));
break;
}
case VAR_UNKNOWN: {
case VAR_UNKNOWN:
internal_error(STR(_TYPVAL_ENCODE_CONVERT_ONE_VALUE) "()");
return FAIL;
}
}
typval_encode_stop_converting_one_item:
return OK;
// Prevent “unused label” warnings.
@@ -656,7 +637,7 @@ typval_encode_stop_converting_one_item:
TYPVAL_ENCODE_SCOPE int _TYPVAL_ENCODE_ENCODE(
TYPVAL_ENCODE_FIRST_ARG_TYPE TYPVAL_ENCODE_FIRST_ARG_NAME,
typval_T *const tv, const char *const objname)
REAL_FATTR_NONNULL_ARG(2, 3) REAL_FATTR_WARN_UNUSED_RESULT;
REAL_FATTR_NONNULL_ARG(2, 3) REAL_FATTR_WARN_UNUSED_RESULT;
/// Convert the whole typval
///
@@ -668,8 +649,8 @@ TYPVAL_ENCODE_SCOPE int _TYPVAL_ENCODE_ENCODE(
///
/// @return OK in case of success, FAIL in case of failure.
TYPVAL_ENCODE_SCOPE int _TYPVAL_ENCODE_ENCODE(
TYPVAL_ENCODE_FIRST_ARG_TYPE TYPVAL_ENCODE_FIRST_ARG_NAME,
typval_T *const top_tv, const char *const objname)
TYPVAL_ENCODE_FIRST_ARG_TYPE TYPVAL_ENCODE_FIRST_ARG_NAME, typval_T *const top_tv,
const char *const objname)
{
const int copyID = get_copyID();
MPConvStack mpstack;
@@ -711,7 +692,7 @@ typval_encode_stop_converting_one_item:
tv = &di->di_tv;
break;
}
case kMPConvList: {
case kMPConvList:
if (cur_mpsv->data.l.li == NULL) {
(void)_mp_pop(mpstack);
tv_list_set_copyid(cur_mpsv->data.l.list, cur_mpsv->saved_copyID);
@@ -725,7 +706,6 @@ typval_encode_stop_converting_one_item:
cur_mpsv->data.l.li = TV_LIST_ITEM_NEXT(cur_mpsv->data.l.list,
cur_mpsv->data.l.li);
break;
}
case kMPConvPairs: {
if (cur_mpsv->data.l.li == NULL) {
(void)_mp_pop(mpstack);
@@ -734,16 +714,14 @@ typval_encode_stop_converting_one_item:
continue;
} else if (cur_mpsv->data.l.li
!= tv_list_first(cur_mpsv->data.l.list)) {
TYPVAL_ENCODE_CONV_DICT_BETWEEN_ITEMS(
cur_mpsv->tv, TYPVAL_ENCODE_NODICT_VAR);
TYPVAL_ENCODE_CONV_DICT_BETWEEN_ITEMS(cur_mpsv->tv, TYPVAL_ENCODE_NODICT_VAR);
}
const list_T *const kv_pair = (
TV_LIST_ITEM_TV(cur_mpsv->data.l.li)->vval.v_list);
TYPVAL_ENCODE_SPECIAL_DICT_KEY_CHECK(
encode_vim_to__error_ret, *TV_LIST_ITEM_TV(tv_list_first(kv_pair)));
TYPVAL_ENCODE_SPECIAL_DICT_KEY_CHECK(encode_vim_to__error_ret,
*TV_LIST_ITEM_TV(tv_list_first(kv_pair)));
if (
_TYPVAL_ENCODE_CONVERT_ONE_VALUE(
TYPVAL_ENCODE_FIRST_ARG_NAME, &mpstack, cur_mpsv,
_TYPVAL_ENCODE_CONVERT_ONE_VALUE(TYPVAL_ENCODE_FIRST_ARG_NAME, &mpstack, cur_mpsv,
TV_LIST_ITEM_TV(tv_list_first(kv_pair)), copyID, objname)
== FAIL) {
goto encode_vim_to__error_ret;
@@ -760,7 +738,7 @@ typval_encode_stop_converting_one_item:
tv = cur_mpsv->tv;
(void)tv;
switch (cur_mpsv->data.p.stage) {
case kMPConvPartialArgs: {
case kMPConvPartialArgs:
TYPVAL_ENCODE_CONV_FUNC_BEFORE_ARGS(tv,
pt == NULL ? 0 : pt->pt_argc);
cur_mpsv->data.p.stage = kMPConvPartialSelf;
@@ -780,7 +758,6 @@ typval_encode_stop_converting_one_item:
}));
}
break;
}
case kMPConvPartialSelf: {
cur_mpsv->data.p.stage = kMPConvPartialEnd;
dict_T *const dict = pt == NULL ? NULL : pt->pt_dict;
@@ -791,9 +768,9 @@ typval_encode_stop_converting_one_item:
continue;
}
const int saved_copyID = dict->dv_copyID;
const int te_csr_ret = _TYPVAL_ENCODE_CHECK_SELF_REFERENCE(
TYPVAL_ENCODE_FIRST_ARG_NAME,
dict, &dict->dv_copyID, &mpstack, copyID, kMPConvDict,
const int te_csr_ret = _TYPVAL_ENCODE_CHECK_SELF_REFERENCE(TYPVAL_ENCODE_FIRST_ARG_NAME,
dict, &dict->dv_copyID,
&mpstack, copyID, kMPConvDict,
objname);
if (te_csr_ret != NOTDONE) {
if (te_csr_ret == FAIL) {
@@ -825,15 +802,14 @@ typval_encode_stop_converting_one_item:
}
break;
}
case kMPConvPartialEnd: {
case kMPConvPartialEnd:
TYPVAL_ENCODE_CONV_FUNC_END(tv);
(void)_mp_pop(mpstack);
break;
}
}
continue;
}
case kMPConvPartialList: {
case kMPConvPartialList:
if (!cur_mpsv->data.a.todo) {
(void)_mp_pop(mpstack);
TYPVAL_ENCODE_CONV_LIST_END(NULL);
@@ -845,7 +821,6 @@ typval_encode_stop_converting_one_item:
cur_mpsv->data.a.todo--;
break;
}
}
assert(tv != NULL);
if (_TYPVAL_ENCODE_CONVERT_ONE_VALUE(TYPVAL_ENCODE_FIRST_ARG_NAME, &mpstack,
cur_mpsv, tv, copyID, objname)

View File

@@ -5,14 +5,14 @@
#ifndef NVIM_EVAL_TYPVAL_ENCODE_H
#define NVIM_EVAL_TYPVAL_ENCODE_H
#include <stddef.h>
#include <inttypes.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#include <stddef.h>
#include <string.h>
#include "nvim/lib/kvec.h"
#include "nvim/eval/typval.h"
#include "nvim/func_attr.h"
#include "nvim/lib/kvec.h"
/// Type of the stack entry
typedef enum {
@@ -87,7 +87,7 @@ static inline size_t tv_strlen(const typval_T *const tv)
assert(tv->v_type == VAR_STRING);
return (tv->vval.v_string == NULL
? 0
: strlen((char *) tv->vval.v_string));
: strlen((char *)tv->vval.v_string));
}
/// Code for checking whether container references itself
@@ -101,9 +101,9 @@ static inline size_t tv_strlen(const typval_T *const tv)
#define _TYPVAL_ENCODE_DO_CHECK_SELF_REFERENCE(val, copyID_attr, copyID, \
conv_type) \
do { \
const int te_csr_ret = _TYPVAL_ENCODE_CHECK_SELF_REFERENCE( \
TYPVAL_ENCODE_FIRST_ARG_NAME, \
(val), &(val)->copyID_attr, mpstack, copyID, conv_type, objname); \
const int te_csr_ret = _TYPVAL_ENCODE_CHECK_SELF_REFERENCE(TYPVAL_ENCODE_FIRST_ARG_NAME, \
(val), &(val)->copyID_attr, mpstack, \
copyID, conv_type, objname); \
if (te_csr_ret != NOTDONE) { \
return te_csr_ret; \
} \

View File

@@ -11,7 +11,7 @@ typedef struct message {
argv_callback handler;
void *argv[EVENT_HANDLER_MAX_ARGC];
} Event;
typedef void(*event_scheduler)(Event event, void *data);
typedef void (*event_scheduler)(Event event, void *data);
#define VA_EVENT_INIT(event, h, a) \
do { \

View File

@@ -2,12 +2,11 @@
#define NVIM_EVENT_LOOP_H
#include <stdint.h>
#include <uv.h>
#include "nvim/event/multiqueue.h"
#include "nvim/lib/klist.h"
#include "nvim/os/time.h"
#include "nvim/event/multiqueue.h"
typedef void * WatcherPtr;
@@ -65,7 +64,7 @@ typedef struct loop {
break; \
} else if (remaining > 0) { \
uint64_t now = os_hrtime(); \
remaining -= (int) ((now - before) / 1000000); \
remaining -= (int)((now - before) / 1000000); \
before = now; \
if (remaining <= 0) { \
break; \

View File

@@ -1,10 +1,10 @@
#ifndef NVIM_EVENT_PROCESS_H
#define NVIM_EVENT_PROCESS_H
#include "nvim/eval/typval.h"
#include "nvim/event/loop.h"
#include "nvim/event/rstream.h"
#include "nvim/event/wstream.h"
#include "nvim/eval/typval.h"
typedef enum {
kProcessTypeUv,

View File

@@ -3,7 +3,6 @@
#include <stdbool.h>
#include <stddef.h>
#include <uv.h>
#include "nvim/event/loop.h"

View File

@@ -3,7 +3,6 @@
#include <stdbool.h>
#include <stddef.h>
#include <uv.h>
#include "nvim/event/loop.h"

View File

@@ -1,9 +1,8 @@
#ifndef NVIM_EVENT_WSTREAM_H
#define NVIM_EVENT_WSTREAM_H
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include <uv.h>
#include "nvim/event/loop.h"

View File

@@ -6,8 +6,8 @@
#include <stdint.h>
#include "nvim/api/private/defs.h"
#include "nvim/func_attr.h"
#include "nvim/eval.h"
#include "nvim/func_attr.h"
typedef struct {
LuaRef func_ref;

View File

@@ -1,13 +1,13 @@
#ifndef NVIM_LUA_EXECUTOR_H
#define NVIM_LUA_EXECUTOR_H
#include <lua.h>
#include <lauxlib.h>
#include <lua.h>
#include "nvim/api/private/defs.h"
#include "nvim/func_attr.h"
#include "nvim/eval/typval.h"
#include "nvim/ex_cmds_defs.h"
#include "nvim/func_attr.h"
#include "nvim/lua/converter.h"
// Generated by msgpack-gen.lua

View File

@@ -1,9 +1,9 @@
#ifndef NVIM_LUA_TREESITTER_H
#define NVIM_LUA_TREESITTER_H
#include <lauxlib.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#include "tree_sitter/api.h"

View File

@@ -1,9 +1,9 @@
#ifndef NVIM_LUA_XDIFF_H
#define NVIM_LUA_XDIFF_H
#include <lauxlib.h>
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "lua/xdiff.h.generated.h"

View File

@@ -5,10 +5,10 @@
#include <uv.h>
#include "nvim/api/private/defs.h"
#include "nvim/event/socket.h"
#include "nvim/event/process.h"
#include "nvim/vim.h"
#include "nvim/channel.h"
#include "nvim/event/process.h"
#include "nvim/event/socket.h"
#include "nvim/vim.h"
#define METHOD_MAXLEN 512

View File

@@ -1,13 +1,13 @@
#ifndef NVIM_MSGPACK_RPC_CHANNEL_DEFS_H
#define NVIM_MSGPACK_RPC_CHANNEL_DEFS_H
#include <msgpack.h>
#include <stdbool.h>
#include <uv.h>
#include <msgpack.h>
#include "nvim/api/private/defs.h"
#include "nvim/event/socket.h"
#include "nvim/event/process.h"
#include "nvim/event/socket.h"
#include "nvim/vim.h"
typedef struct Channel Channel;

View File

@@ -1,13 +1,12 @@
#ifndef NVIM_MSGPACK_RPC_HELPERS_H
#define NVIM_MSGPACK_RPC_HELPERS_H
#include <stdint.h>
#include <stdbool.h>
#include <msgpack.h>
#include <stdbool.h>
#include <stdint.h>
#include "nvim/event/wstream.h"
#include "nvim/api/private/defs.h"
#include "nvim/event/wstream.h"
/// Value by which objects represented as EXT type are shifted
///

View File

@@ -1,8 +1,8 @@
#ifndef NVIM_OS_INPUT_H
#define NVIM_OS_INPUT_H
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include "nvim/api/private/defs.h"
#include "nvim/event/multiqueue.h"

View File

@@ -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

View File

@@ -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

View File

@@ -2,6 +2,7 @@
#define NVIM_OS_PROCESS_H
#include <stddef.h>
#include "nvim/api/private/defs.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS

View File

@@ -1,8 +1,8 @@
#ifndef NVIM_OS_TIME_H
#define NVIM_OS_TIME_H
#include <stdint.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
typedef uint64_t Timestamp;

View File

@@ -1,8 +1,8 @@
#ifndef NVIM_OS_UNIX_DEFS_H
#define NVIM_OS_UNIX_DEFS_H
#include <unistd.h>
#include <sys/param.h>
#include <unistd.h>
// POSIX.1-2008 says that NAME_MAX should be in here
#include <limits.h>

View File

@@ -7,11 +7,14 @@
// winsock2.h must be first to avoid incompatibilities
// with winsock.h (included by windows.h)
// uncrustify:off
#include <winsock2.h>
#include <windows.h>
#include <sys/stat.h>
// uncrustify:on
#include <io.h>
#include <stdio.h>
#include <sys/stat.h>
#include <windows.h>
// Windows does not have S_IFLNK but libuv defines it
// and sets the flag for us when calling uv_fs_stat.

View File

@@ -332,8 +332,8 @@ int do_in_path_and_pp(char_u *path, char_u *name, int flags, DoInRuntimepathCB c
return done;
}
static void push_path(RuntimeSearchPath *search_path, Map(String, handle_T) *rtp_used,
char *entry, bool after)
static void push_path(RuntimeSearchPath *search_path, Map(String, handle_T) *rtp_used, char *entry,
bool after)
{
handle_T h = map_get(String, handle_T)(rtp_used, cstr_as_string(entry));
if (h == 0) {

View File

@@ -2,8 +2,8 @@
#define NVIM_TUI_INPUT_H
#include <stdbool.h>
#include <termkey.h>
#include "nvim/event/stream.h"
#include "nvim/event/time.h"

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +1,13 @@
#ifndef NVIM_VIML_PARSER_EXPRESSIONS_H
#define NVIM_VIML_PARSER_EXPRESSIONS_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "nvim/eval/typval.h"
#include "nvim/types.h"
#include "nvim/viml/parser/parser.h"
#include "nvim/eval/typval.h"
// Defines whether to ignore case:
// == kCCStrategyUseOption

View File

@@ -1,12 +1,12 @@
#ifndef NVIM_VIML_PARSER_PARSER_H
#define NVIM_VIML_PARSER_PARSER_H
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <assert.h>
#include "nvim/lib/kvec.h"
#include "nvim/func_attr.h"
#include "nvim/lib/kvec.h"
#include "nvim/mbyte.h"
#include "nvim/memory.h"
@@ -94,10 +94,8 @@ static inline void viml_parser_init(
/// @param[in] cookie Argument for the get_line function.
/// @param[in] colors Where to save highlighting. May be NULL if it is not
/// needed.
static inline void viml_parser_init(
ParserState *const ret_pstate,
const ParserLineGetter get_line, void *const cookie,
ParserHighlight *const colors)
static inline void viml_parser_init(ParserState *const ret_pstate, const ParserLineGetter get_line,
void *const cookie, ParserHighlight *const colors)
{
*ret_pstate = (ParserState) {
.reader = {
@@ -194,8 +192,7 @@ static inline void viml_parser_advance(ParserState *const pstate,
///
/// @param pstate Parser state to advance.
/// @param[in] len Number of bytes to advance.
static inline void viml_parser_advance(ParserState *const pstate,
const size_t len)
static inline void viml_parser_advance(ParserState *const pstate, const size_t len)
{
assert(pstate->pos.line == kv_size(pstate->reader.lines) - 1);
const ParserLine pline = kv_last(pstate->reader.lines);
@@ -219,10 +216,8 @@ static inline void viml_parser_highlight(ParserState *const pstate,
/// @param[in] start Start position of the highlight.
/// @param[in] len Highlighting chunk length.
/// @param[in] group Highlight group.
static inline void viml_parser_highlight(ParserState *const pstate,
const ParserPosition start,
const size_t len,
const char *const group)
static inline void viml_parser_highlight(ParserState *const pstate, const ParserPosition start,
const size_t len, const char *const group)
{
if (pstate->colors == NULL || len == 0) {
return;

View File

@@ -1,4 +1,4 @@
# Uncrustify-0.73.0-195-1f883c691
# Uncrustify-0.73.0-199-0dfafb273
#
# General options
@@ -44,12 +44,12 @@ disable_processing_nl_cont = false # true/false
# file.
#
# Default: *INDENT-OFF*
disable_processing_cmt = "uncrustify:indent-off" # string
disable_processing_cmt = "uncrustify:off" # string
# Specify the marker used in comments to (re)enable processing in a file.
#
# Default: *INDENT-ON*
enable_processing_cmt = "uncrustify:indent-on" # string
enable_processing_cmt = "uncrustify:on" # string
# Enable parsing of digraphs.
enable_digraphs = false # true/false
@@ -472,9 +472,13 @@ sp_after_class_colon = ignore # ignore/add/remove/force/not_defined
sp_before_class_colon = ignore # ignore/add/remove/force/not_defined
# Add or remove space after class constructor ':'.
#
# Default: add
sp_after_constr_colon = ignore # ignore/add/remove/force/not_defined
# Add or remove space before class constructor ':'.
#
# Default: add
sp_before_constr_colon = ignore # ignore/add/remove/force/not_defined
# Add or remove space before case ':'.
@@ -1103,11 +1107,16 @@ indent_class_on_colon = false # true/false
# Whether to indent the stuff after a leading class initializer colon.
indent_constr_colon = false # true/false
# Virtual indent from the ':' for member initializers.
# Virtual indent from the ':' for leading member initializers.
#
# Default: 2
indent_ctor_init_leading = 2 # unsigned number
# Virtual indent from the ':' for following member initializers.
#
# Default: 2
indent_ctor_init_following = 2 # unsigned number
# Additional indent for constructor initializer list.
# Negative values decrease indent down to the first column.
indent_ctor_init = 0 # number
@@ -3298,5 +3307,5 @@ set QUESTION REAL_FATTR_CONST
set QUESTION REAL_FATTR_NONNULL_ALL
set QUESTION REAL_FATTR_PURE
set QUESTION REAL_FATTR_WARN_UNUSED_RESULT
# option(s) with 'not default' value: 62
# option(s) with 'not default' value: 64
#