mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
shada: Fix all linter errors in src/nvim/shada.*
This commit is an example of fixing incorrect code which previously passed through linter.
This commit is contained in:
111
src/nvim/shada.c
111
src/nvim/shada.c
@@ -207,9 +207,9 @@ enum SRNIFlags {
|
|||||||
kSDReadUndisableableData = (
|
kSDReadUndisableableData = (
|
||||||
(1 << kSDItemSearchPattern)
|
(1 << kSDItemSearchPattern)
|
||||||
| (1 << kSDItemSubString)
|
| (1 << kSDItemSubString)
|
||||||
| (1 << kSDItemJump)), ///< Data reading which cannot be disabled by &shada
|
| (1 << kSDItemJump)), ///< Data reading which cannot be disabled by
|
||||||
///< or other options except for disabling reading
|
///< &shada or other options except for disabling
|
||||||
///< ShaDa as a whole.
|
///< reading ShaDa as a whole.
|
||||||
kSDReadRegisters = (1 << kSDItemRegister), ///< Determines whether registers
|
kSDReadRegisters = (1 << kSDItemRegister), ///< Determines whether registers
|
||||||
///< should be read (may only be
|
///< should be read (may only be
|
||||||
///< disabled when writing, but
|
///< disabled when writing, but
|
||||||
@@ -533,11 +533,14 @@ static inline void hmll_init(HMLList *const hmll, const size_t size)
|
|||||||
///
|
///
|
||||||
/// @param hmll Pointer to the list.
|
/// @param hmll Pointer to the list.
|
||||||
/// @param cur_entry Name of the variable to iterate over.
|
/// @param cur_entry Name of the variable to iterate over.
|
||||||
|
/// @param code Code to execute on each iteration.
|
||||||
///
|
///
|
||||||
/// @return `for` cycle header (use `HMLL_FORALL(hmll, cur_entry) {body}`).
|
/// @return `for` cycle header (use `HMLL_FORALL(hmll, cur_entry) {body}`).
|
||||||
#define HMLL_FORALL(hmll, cur_entry) \
|
#define HMLL_FORALL(hmll, cur_entry, code) \
|
||||||
for (HMLListEntry *cur_entry = (hmll)->first; cur_entry != NULL; \
|
for (HMLListEntry *cur_entry = (hmll)->first; cur_entry != NULL; \
|
||||||
cur_entry = cur_entry->next)
|
cur_entry = cur_entry->next) { \
|
||||||
|
code \
|
||||||
|
} \
|
||||||
|
|
||||||
/// Remove entry from the linked list
|
/// Remove entry from the linked list
|
||||||
///
|
///
|
||||||
@@ -633,11 +636,14 @@ static inline void hmll_insert(HMLList *const hmll,
|
|||||||
/// @param hmll Pointer to the list.
|
/// @param hmll Pointer to the list.
|
||||||
/// @param cur_entry Name of the variable to iterate over, must be already
|
/// @param cur_entry Name of the variable to iterate over, must be already
|
||||||
/// defined.
|
/// defined.
|
||||||
|
/// @param code Code to execute on each iteration.
|
||||||
///
|
///
|
||||||
/// @return `for` cycle header (use `HMLL_FORALL(hmll, cur_entry) {body}`).
|
/// @return `for` cycle header (use `HMLL_FORALL(hmll, cur_entry) {body}`).
|
||||||
#define HMLL_ITER_BACK(hmll, cur_entry) \
|
#define HMLL_ITER_BACK(hmll, cur_entry, code) \
|
||||||
for (cur_entry = (hmll)->last; cur_entry != NULL; \
|
for (cur_entry = (hmll)->last; cur_entry != NULL; \
|
||||||
cur_entry = cur_entry->prev)
|
cur_entry = cur_entry->prev) { \
|
||||||
|
code \
|
||||||
|
}
|
||||||
|
|
||||||
/// Free linked list
|
/// Free linked list
|
||||||
///
|
///
|
||||||
@@ -1074,11 +1080,11 @@ static void hms_insert(HistoryMergerState *const hms_p, const ShadaEntry entry,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
HMLListEntry *insert_after;
|
HMLListEntry *insert_after;
|
||||||
HMLL_ITER_BACK(hmll, insert_after) {
|
HMLL_ITER_BACK(hmll, insert_after, {
|
||||||
if (insert_after->data.timestamp <= entry.timestamp) {
|
if (insert_after->data.timestamp <= entry.timestamp) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
hmll_insert(hmll, insert_after, entry, can_free_entry);
|
hmll_insert(hmll, insert_after, entry, can_free_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1136,14 +1142,14 @@ static inline void hms_to_he_array(const HistoryMergerState *const hms_p,
|
|||||||
FUNC_ATTR_NONNULL_ALL
|
FUNC_ATTR_NONNULL_ALL
|
||||||
{
|
{
|
||||||
histentry_T *hist = hist_array;
|
histentry_T *hist = hist_array;
|
||||||
HMLL_FORALL(&hms_p->hmll, cur_entry) {
|
HMLL_FORALL(&hms_p->hmll, cur_entry, {
|
||||||
hist->timestamp = cur_entry->data.timestamp;
|
hist->timestamp = cur_entry->data.timestamp;
|
||||||
hist->hisnum = (int) (hist - hist_array) + 1;
|
hist->hisnum = (int) (hist - hist_array) + 1;
|
||||||
hist->hisstr = (char_u *) cur_entry->data.data.history_item.string;
|
hist->hisstr = (char_u *) cur_entry->data.data.history_item.string;
|
||||||
hist->additional_elements =
|
hist->additional_elements =
|
||||||
cur_entry->data.data.history_item.additional_elements;
|
cur_entry->data.data.history_item.additional_elements;
|
||||||
hist++;
|
hist++;
|
||||||
}
|
})
|
||||||
*new_hisnum = (int) (hist - hist_array);
|
*new_hisnum = (int) (hist - hist_array);
|
||||||
*new_hisidx = *new_hisnum - 1;
|
*new_hisidx = *new_hisnum - 1;
|
||||||
}
|
}
|
||||||
@@ -1161,10 +1167,11 @@ static inline void hms_dealloc(HistoryMergerState *const hms_p)
|
|||||||
///
|
///
|
||||||
/// @param[in] hms_p Merger structure to iterate over.
|
/// @param[in] hms_p Merger structure to iterate over.
|
||||||
/// @param[out] cur_entry Name of the iterator variable.
|
/// @param[out] cur_entry Name of the iterator variable.
|
||||||
|
/// @param code Code to execute on each iteration.
|
||||||
///
|
///
|
||||||
/// @return for cycle header. Use `HMS_ITER(hms_p, cur_entry) {body}`.
|
/// @return for cycle header. Use `HMS_ITER(hms_p, cur_entry) {body}`.
|
||||||
#define HMS_ITER(hms_p, cur_entry) \
|
#define HMS_ITER(hms_p, cur_entry, code) \
|
||||||
HMLL_FORALL(&((hms_p)->hmll), cur_entry)
|
HMLL_FORALL(&((hms_p)->hmll), cur_entry, code)
|
||||||
|
|
||||||
/// Find buffer for given buffer name (cached)
|
/// Find buffer for given buffer name (cached)
|
||||||
///
|
///
|
||||||
@@ -2895,7 +2902,7 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
|
|||||||
for (size_t i = 0; i < HIST_COUNT; i++) {
|
for (size_t i = 0; i < HIST_COUNT; i++) {
|
||||||
if (dump_one_history[i]) {
|
if (dump_one_history[i]) {
|
||||||
hms_insert_whole_neovim_history(&wms->hms[i]);
|
hms_insert_whole_neovim_history(&wms->hms[i]);
|
||||||
HMS_ITER(&wms->hms[i], cur_entry) {
|
HMS_ITER(&wms->hms[i], cur_entry, {
|
||||||
if (!shada_pack_encoded_entry(
|
if (!shada_pack_encoded_entry(
|
||||||
packer, &sd_writer->sd_conv, (PossiblyFreedShadaEntry) {
|
packer, &sd_writer->sd_conv, (PossiblyFreedShadaEntry) {
|
||||||
.data = cur_entry->data,
|
.data = cur_entry->data,
|
||||||
@@ -2904,7 +2911,7 @@ static ShaDaWriteResult shada_write(ShaDaWriteDef *const sd_writer,
|
|||||||
ret = kSDWriteFailed;
|
ret = kSDWriteFailed;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
hms_dealloc(&wms->hms[i]);
|
hms_dealloc(&wms->hms[i]);
|
||||||
if (ret == kSDWriteFailed) {
|
if (ret == kSDWriteFailed) {
|
||||||
goto shada_write_exit;
|
goto shada_write_exit;
|
||||||
@@ -3379,7 +3386,6 @@ static inline char *get_converted_string(const vimconv_T *const sd_conv,
|
|||||||
tgt = proc(obj.via.attr); \
|
tgt = proc(obj.via.attr); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#define CHECK_KEY_IS_STR(entry_name) \
|
#define CHECK_KEY_IS_STR(entry_name) \
|
||||||
do { \
|
|
||||||
if (unpacked.data.via.map.ptr[i].key.type != MSGPACK_OBJECT_STR) { \
|
if (unpacked.data.via.map.ptr[i].key.type != MSGPACK_OBJECT_STR) { \
|
||||||
emsgu(_(READERR(entry_name, "has key which is not a string")), \
|
emsgu(_(READERR(entry_name, "has key which is not a string")), \
|
||||||
initial_fpos); \
|
initial_fpos); \
|
||||||
@@ -3387,10 +3393,10 @@ static inline char *get_converted_string(const vimconv_T *const sd_conv,
|
|||||||
} else if (unpacked.data.via.map.ptr[i].key.via.str.size == 0) { \
|
} else if (unpacked.data.via.map.ptr[i].key.via.str.size == 0) { \
|
||||||
emsgu(_(READERR(entry_name, "has empty key")), initial_fpos); \
|
emsgu(_(READERR(entry_name, "has empty key")), initial_fpos); \
|
||||||
CLEAR_GA_AND_ERROR_OUT(ad_ga); \
|
CLEAR_GA_AND_ERROR_OUT(ad_ga); \
|
||||||
} \
|
}
|
||||||
} while (0)
|
|
||||||
#define CHECKED_KEY(entry_name, name, error_desc, tgt, condition, attr, proc) \
|
#define CHECKED_KEY(entry_name, name, error_desc, tgt, condition, attr, proc) \
|
||||||
if (CHECK_KEY(unpacked.data.via.map.ptr[i].key, name)) { \
|
else if (CHECK_KEY( /* NOLINT(readability/braces) */ \
|
||||||
|
unpacked.data.via.map.ptr[i].key, name)) { \
|
||||||
CHECKED_ENTRY( \
|
CHECKED_ENTRY( \
|
||||||
condition, "has " name " key value " error_desc, \
|
condition, "has " name " key value " error_desc, \
|
||||||
entry_name, unpacked.data.via.map.ptr[i].val, \
|
entry_name, unpacked.data.via.map.ptr[i].val, \
|
||||||
@@ -3410,17 +3416,17 @@ static inline char *get_converted_string(const vimconv_T *const sd_conv,
|
|||||||
#define INT_KEY(entry_name, name, tgt, proc) \
|
#define INT_KEY(entry_name, name, tgt, proc) \
|
||||||
CHECKED_KEY( \
|
CHECKED_KEY( \
|
||||||
entry_name, name, "which is not an integer", tgt, \
|
entry_name, name, "which is not an integer", tgt, \
|
||||||
(unpacked.data.via.map.ptr[i].val.type \
|
((unpacked.data.via.map.ptr[i].val.type \
|
||||||
== MSGPACK_OBJECT_POSITIVE_INTEGER \
|
== MSGPACK_OBJECT_POSITIVE_INTEGER) \
|
||||||
|| unpacked.data.via.map.ptr[i].val.type \
|
|| (unpacked.data.via.map.ptr[i].val.type \
|
||||||
== MSGPACK_OBJECT_NEGATIVE_INTEGER), \
|
== MSGPACK_OBJECT_NEGATIVE_INTEGER)), \
|
||||||
i64, proc)
|
i64, proc)
|
||||||
#define INTEGER_KEY(entry_name, name, tgt) \
|
#define INTEGER_KEY(entry_name, name, tgt) \
|
||||||
INT_KEY(entry_name, name, tgt, TOINT)
|
INT_KEY(entry_name, name, tgt, TOINT)
|
||||||
#define LONG_KEY(entry_name, name, tgt) \
|
#define LONG_KEY(entry_name, name, tgt) \
|
||||||
INT_KEY(entry_name, name, tgt, TOLONG)
|
INT_KEY(entry_name, name, tgt, TOLONG)
|
||||||
#define ADDITIONAL_KEY \
|
#define ADDITIONAL_KEY \
|
||||||
{ \
|
else { /* NOLINT(readability/braces) */ \
|
||||||
ga_grow(&ad_ga, 1); \
|
ga_grow(&ad_ga, 1); \
|
||||||
memcpy(((char *)ad_ga.ga_data) + ((size_t) ad_ga.ga_len \
|
memcpy(((char *)ad_ga.ga_data) + ((size_t) ad_ga.ga_len \
|
||||||
* sizeof(*unpacked.data.via.map.ptr)), \
|
* sizeof(*unpacked.data.via.map.ptr)), \
|
||||||
@@ -3625,37 +3631,27 @@ shada_read_next_item_start:
|
|||||||
garray_T ad_ga;
|
garray_T ad_ga;
|
||||||
ga_init(&ad_ga, sizeof(*(unpacked.data.via.map.ptr)), 1);
|
ga_init(&ad_ga, sizeof(*(unpacked.data.via.map.ptr)), 1);
|
||||||
for (size_t i = 0; i < unpacked.data.via.map.size; i++) {
|
for (size_t i = 0; i < unpacked.data.via.map.size; i++) {
|
||||||
CHECK_KEY_IS_STR("search pattern");
|
CHECK_KEY_IS_STR("search pattern")
|
||||||
BOOLEAN_KEY("search pattern", SEARCH_KEY_MAGIC,
|
BOOLEAN_KEY("search pattern", SEARCH_KEY_MAGIC,
|
||||||
entry->data.search_pattern.magic)
|
entry->data.search_pattern.magic)
|
||||||
else
|
|
||||||
BOOLEAN_KEY("search pattern", SEARCH_KEY_SMARTCASE,
|
BOOLEAN_KEY("search pattern", SEARCH_KEY_SMARTCASE,
|
||||||
entry->data.search_pattern.smartcase)
|
entry->data.search_pattern.smartcase)
|
||||||
else
|
|
||||||
BOOLEAN_KEY("search pattern", SEARCH_KEY_HAS_LINE_OFFSET,
|
BOOLEAN_KEY("search pattern", SEARCH_KEY_HAS_LINE_OFFSET,
|
||||||
entry->data.search_pattern.has_line_offset)
|
entry->data.search_pattern.has_line_offset)
|
||||||
else
|
|
||||||
BOOLEAN_KEY("search pattern", SEARCH_KEY_PLACE_CURSOR_AT_END,
|
BOOLEAN_KEY("search pattern", SEARCH_KEY_PLACE_CURSOR_AT_END,
|
||||||
entry->data.search_pattern.place_cursor_at_end)
|
entry->data.search_pattern.place_cursor_at_end)
|
||||||
else
|
|
||||||
BOOLEAN_KEY("search pattern", SEARCH_KEY_IS_LAST_USED,
|
BOOLEAN_KEY("search pattern", SEARCH_KEY_IS_LAST_USED,
|
||||||
entry->data.search_pattern.is_last_used)
|
entry->data.search_pattern.is_last_used)
|
||||||
else
|
|
||||||
BOOLEAN_KEY("search pattern", SEARCH_KEY_IS_SUBSTITUTE_PATTERN,
|
BOOLEAN_KEY("search pattern", SEARCH_KEY_IS_SUBSTITUTE_PATTERN,
|
||||||
entry->data.search_pattern.is_substitute_pattern)
|
entry->data.search_pattern.is_substitute_pattern)
|
||||||
else
|
|
||||||
BOOLEAN_KEY("search pattern", SEARCH_KEY_HIGHLIGHTED,
|
BOOLEAN_KEY("search pattern", SEARCH_KEY_HIGHLIGHTED,
|
||||||
entry->data.search_pattern.highlighted)
|
entry->data.search_pattern.highlighted)
|
||||||
else
|
|
||||||
BOOLEAN_KEY("search pattern", SEARCH_KEY_BACKWARD,
|
BOOLEAN_KEY("search pattern", SEARCH_KEY_BACKWARD,
|
||||||
entry->data.search_pattern.search_backward)
|
entry->data.search_pattern.search_backward)
|
||||||
else
|
|
||||||
INTEGER_KEY("search pattern", SEARCH_KEY_OFFSET,
|
INTEGER_KEY("search pattern", SEARCH_KEY_OFFSET,
|
||||||
entry->data.search_pattern.offset)
|
entry->data.search_pattern.offset)
|
||||||
else
|
|
||||||
CONVERTED_STRING_KEY("search pattern", SEARCH_KEY_PAT,
|
CONVERTED_STRING_KEY("search pattern", SEARCH_KEY_PAT,
|
||||||
entry->data.search_pattern.pat)
|
entry->data.search_pattern.pat)
|
||||||
else
|
|
||||||
ADDITIONAL_KEY
|
ADDITIONAL_KEY
|
||||||
}
|
}
|
||||||
if (entry->data.search_pattern.pat == NULL) {
|
if (entry->data.search_pattern.pat == NULL) {
|
||||||
@@ -3677,7 +3673,7 @@ shada_read_next_item_start:
|
|||||||
garray_T ad_ga;
|
garray_T ad_ga;
|
||||||
ga_init(&ad_ga, sizeof(*(unpacked.data.via.map.ptr)), 1);
|
ga_init(&ad_ga, sizeof(*(unpacked.data.via.map.ptr)), 1);
|
||||||
for (size_t i = 0; i < unpacked.data.via.map.size; i++) {
|
for (size_t i = 0; i < unpacked.data.via.map.size; i++) {
|
||||||
CHECK_KEY_IS_STR("mark");
|
CHECK_KEY_IS_STR("mark")
|
||||||
if (CHECK_KEY(unpacked.data.via.map.ptr[i].key, KEY_NAME_CHAR)) {
|
if (CHECK_KEY(unpacked.data.via.map.ptr[i].key, KEY_NAME_CHAR)) {
|
||||||
if (type_u64 == kSDItemJump || type_u64 == kSDItemChange) {
|
if (type_u64 == kSDItemJump || type_u64 == kSDItemChange) {
|
||||||
emsgu(_(READERR("mark", "has n key which is only valid for "
|
emsgu(_(READERR("mark", "has n key which is only valid for "
|
||||||
@@ -3690,15 +3686,11 @@ shada_read_next_item_start:
|
|||||||
"has n key value which is not an unsigned integer",
|
"has n key value which is not an unsigned integer",
|
||||||
"mark", unpacked.data.via.map.ptr[i].val,
|
"mark", unpacked.data.via.map.ptr[i].val,
|
||||||
entry->data.filemark.name, u64, TOCHAR);
|
entry->data.filemark.name, u64, TOCHAR);
|
||||||
} else {
|
|
||||||
LONG_KEY("mark", KEY_LNUM, entry->data.filemark.mark.lnum)
|
|
||||||
else
|
|
||||||
INTEGER_KEY("mark", KEY_COL, entry->data.filemark.mark.col)
|
|
||||||
else
|
|
||||||
STRING_KEY("mark", KEY_FILE, entry->data.filemark.fname)
|
|
||||||
else
|
|
||||||
ADDITIONAL_KEY
|
|
||||||
}
|
}
|
||||||
|
LONG_KEY("mark", KEY_LNUM, entry->data.filemark.mark.lnum)
|
||||||
|
INTEGER_KEY("mark", KEY_COL, entry->data.filemark.mark.col)
|
||||||
|
STRING_KEY("mark", KEY_FILE, entry->data.filemark.fname)
|
||||||
|
ADDITIONAL_KEY
|
||||||
}
|
}
|
||||||
if (entry->data.filemark.fname == NULL) {
|
if (entry->data.filemark.fname == NULL) {
|
||||||
emsgu(_(READERR("mark", "is missing file name")), initial_fpos);
|
emsgu(_(READERR("mark", "is missing file name")), initial_fpos);
|
||||||
@@ -3723,22 +3715,13 @@ shada_read_next_item_start:
|
|||||||
garray_T ad_ga;
|
garray_T ad_ga;
|
||||||
ga_init(&ad_ga, sizeof(*(unpacked.data.via.map.ptr)), 1);
|
ga_init(&ad_ga, sizeof(*(unpacked.data.via.map.ptr)), 1);
|
||||||
for (size_t i = 0; i < unpacked.data.via.map.size; i++) {
|
for (size_t i = 0; i < unpacked.data.via.map.size; i++) {
|
||||||
CHECK_KEY_IS_STR("register");
|
CHECK_KEY_IS_STR("register")
|
||||||
TYPED_KEY("register", REG_KEY_TYPE, "an unsigned integer",
|
|
||||||
entry->data.reg.type, POSITIVE_INTEGER, u64, TOU8)
|
|
||||||
else
|
|
||||||
TYPED_KEY("register", KEY_NAME_CHAR, "an unsigned integer",
|
|
||||||
entry->data.reg.name, POSITIVE_INTEGER, u64, TOCHAR)
|
|
||||||
else
|
|
||||||
TYPED_KEY("register", REG_KEY_WIDTH, "an unsigned integer",
|
|
||||||
entry->data.reg.width, POSITIVE_INTEGER, u64, TOSIZE)
|
|
||||||
else
|
|
||||||
if (CHECK_KEY(unpacked.data.via.map.ptr[i].key,
|
if (CHECK_KEY(unpacked.data.via.map.ptr[i].key,
|
||||||
REG_KEY_CONTENTS)) {
|
REG_KEY_CONTENTS)) {
|
||||||
if (unpacked.data.via.map.ptr[i].val.type != MSGPACK_OBJECT_ARRAY) {
|
if (unpacked.data.via.map.ptr[i].val.type != MSGPACK_OBJECT_ARRAY) {
|
||||||
emsgu(_(READERR(
|
emsgu(_(READERR("register",
|
||||||
"register",
|
"has " REG_KEY_CONTENTS
|
||||||
"has " REG_KEY_CONTENTS " key with non-array value")),
|
" key with non-array value")),
|
||||||
initial_fpos);
|
initial_fpos);
|
||||||
CLEAR_GA_AND_ERROR_OUT(ad_ga);
|
CLEAR_GA_AND_ERROR_OUT(ad_ga);
|
||||||
}
|
}
|
||||||
@@ -3762,9 +3745,14 @@ shada_read_next_item_start:
|
|||||||
for (size_t i = 0; i < arr.size; i++) {
|
for (size_t i = 0; i < arr.size; i++) {
|
||||||
entry->data.reg.contents[i] = BIN_CONVERTED(arr.ptr[i].via.bin);
|
entry->data.reg.contents[i] = BIN_CONVERTED(arr.ptr[i].via.bin);
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
ADDITIONAL_KEY
|
|
||||||
}
|
}
|
||||||
|
TYPED_KEY("register", REG_KEY_TYPE, "an unsigned integer",
|
||||||
|
entry->data.reg.type, POSITIVE_INTEGER, u64, TOU8)
|
||||||
|
TYPED_KEY("register", KEY_NAME_CHAR, "an unsigned integer",
|
||||||
|
entry->data.reg.name, POSITIVE_INTEGER, u64, TOCHAR)
|
||||||
|
TYPED_KEY("register", REG_KEY_WIDTH, "an unsigned integer",
|
||||||
|
entry->data.reg.width, POSITIVE_INTEGER, u64, TOSIZE)
|
||||||
|
ADDITIONAL_KEY
|
||||||
}
|
}
|
||||||
if (entry->data.reg.contents == NULL) {
|
if (entry->data.reg.contents == NULL) {
|
||||||
emsgu(_(READERR("register", "has missing " REG_KEY_CONTENTS " array")),
|
emsgu(_(READERR("register", "has missing " REG_KEY_CONTENTS " array")),
|
||||||
@@ -3953,16 +3941,13 @@ shada_read_next_item_hist_no_conv:
|
|||||||
const size_t j = i;
|
const size_t j = i;
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < unpacked.data.via.map.size; i++) {
|
for (size_t i = 0; i < unpacked.data.via.map.size; i++) {
|
||||||
CHECK_KEY_IS_STR("buffer list entry");
|
CHECK_KEY_IS_STR("buffer list entry")
|
||||||
LONG_KEY("buffer list entry", KEY_LNUM,
|
LONG_KEY("buffer list entry", KEY_LNUM,
|
||||||
entry->data.buffer_list.buffers[j].pos.lnum)
|
entry->data.buffer_list.buffers[j].pos.lnum)
|
||||||
else
|
|
||||||
INTEGER_KEY("buffer list entry", KEY_COL,
|
INTEGER_KEY("buffer list entry", KEY_COL,
|
||||||
entry->data.buffer_list.buffers[j].pos.col)
|
entry->data.buffer_list.buffers[j].pos.col)
|
||||||
else
|
|
||||||
STRING_KEY("buffer list entry", KEY_FILE,
|
STRING_KEY("buffer list entry", KEY_FILE,
|
||||||
entry->data.buffer_list.buffers[j].fname)
|
entry->data.buffer_list.buffers[j].fname)
|
||||||
else
|
|
||||||
ADDITIONAL_KEY
|
ADDITIONAL_KEY
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user