Merge pull request #18162 from dundargoc/refactor/unctustify

refactor/uncrustify
This commit is contained in:
bfredl 2022-04-29 19:33:05 +02:00 committed by GitHub
commit 6d4180a0d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
104 changed files with 672 additions and 755 deletions

View File

@ -546,6 +546,8 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
goto error;
}
// uncrustify:off
struct {
const char *name;
Object *opt;
@ -559,6 +561,8 @@ Integer nvim_buf_set_extmark(Buffer buffer, Integer ns_id, Integer line, Integer
{ NULL, NULL, NULL },
};
// uncrustify:on
for (int j = 0; hls[j].name && hls[j].dest; j++) {
if (HAS_KEY(*hls[j].opt)) {
*hls[j].dest = object_to_hl_id(*hls[j].opt, hls[j].name, err);

View File

@ -150,4 +150,3 @@ Boolean nvim_tabpage_is_valid(Tabpage tabpage)
api_clear_error(&stub);
return ret;
}

View File

@ -1,5 +1,3 @@
// uncrustify:off
#ifndef NVIM_ASSERT_H
#define NVIM_ASSERT_H
@ -110,6 +108,8 @@
# define STATIC_ASSERT_STATEMENT STATIC_ASSERT_EXPR
#endif
// uncrustify:off
#define ASSERT_CONCAT_(a, b) a##b
#define ASSERT_CONCAT(a, b) ASSERT_CONCAT_(a, b)
// These can't be used after statements in c89.
@ -125,6 +125,8 @@
((enum { ASSERT_CONCAT(assert_line_, __LINE__) = 1/(!!(e)), }) 0)
#endif
// uncrustify:on
/// @def STRICT_ADD
/// @brief Adds (a + b) and stores result in `c`. Aborts on overflow.
///

View File

@ -4,6 +4,7 @@
// autocmd.c: Autocommand related functions
#include <signal.h>
#include "lauxlib.h"
#include "nvim/api/private/helpers.h"
#include "nvim/ascii.h"
#include "nvim/autocmd.h"
@ -28,8 +29,6 @@
#include "nvim/vim.h"
#include "nvim/window.h"
#include "lauxlib.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "auevents_name_map.generated.h"
# include "autocmd.c.generated.h"
@ -625,8 +624,7 @@ event_T event_name2nr(const char_u *start, char_u **end)
int i;
// the event name ends with end of line, '|', a blank or a comma
for (p = start; *p && !ascii_iswhite(*p) && *p != ',' && *p != '|'; p++) {
}
for (p = start; *p && !ascii_iswhite(*p) && *p != ',' && *p != '|'; p++) {}
for (i = 0; event_names[i].name != NULL; i++) {
int len = (int)event_names[i].len;
if (len == p - start && STRNICMP(event_names[i].name, start, len) == 0) {
@ -2609,8 +2607,7 @@ static int arg_augroup_get(char_u **argp)
char_u *arg = *argp;
int group = AUGROUP_ALL;
for (p = arg; *p && !ascii_iswhite(*p) && *p != '|'; p++) {
}
for (p = arg; *p && !ascii_iswhite(*p) && *p != '|'; p++) {}
if (p > arg) {
char_u *group_name = vim_strnsave(arg, (size_t)(p - arg));
group = augroup_find((char *)group_name);

View File

@ -5429,7 +5429,8 @@ static int buf_signcols_inner(buf_T *buf, int maximum)
}
if (curline > 0) {
linesum += decor_signcols(buf, &decor_state, (int)curline-1, (int)curline-1, maximum-linesum);
linesum += decor_signcols(buf, &decor_state, (int)curline - 1, (int)curline - 1,
maximum - linesum);
}
if (linesum > signcols) {
signcols = linesum;

View File

@ -1306,8 +1306,7 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment)
p--;
}
for (lead_repl = p; lead_repl > curbuf->b_p_com
&& lead_repl[-1] != ':'; lead_repl--) {
}
&& lead_repl[-1] != ':'; lead_repl--) {}
lead_repl_len = (int)(p - lead_repl);
// We can probably always add an extra space when doing "O" on
@ -1379,8 +1378,7 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment)
if (c == COM_RIGHT) { // right adjusted leader
// find last non-white in the leader to line up with
for (p = leader + lead_len - 1; p > leader
&& ascii_iswhite(*p); p--) {
}
&& ascii_iswhite(*p); p--) {}
p++;
// Compute the length of the replaced characters in
@ -1942,8 +1940,7 @@ int get_leader_len(char_u *line, char_u **flags, bool backward, bool include_spa
string++;
}
}
for (j = 0; string[j] != NUL && string[j] == line[i + j]; j++) {
}
for (j = 0; string[j] != NUL && string[j] == line[i + j]; j++) {}
if (string[j] != NUL) {
continue; // string doesn't match
}
@ -2081,8 +2078,7 @@ int get_last_leader_offset(char_u *line, char_u **flags)
// whitespace. Otherwise we would think we are inside a
// comment if the middle part appears somewhere in the middle
// of the line. E.g. for C the "*" appears often.
for (j = 0; j <= i && ascii_iswhite(line[j]); j++) {
}
for (j = 0; j <= i && ascii_iswhite(line[j]); j++) {}
if (j < i) {
continue;
}

View File

@ -538,7 +538,6 @@ void decor_add_ephemeral(int start_row, int start_col, int end_row, int end_col,
}
int decor_virt_lines(win_T *wp, linenr_T lnum, VirtLines *lines)
{
buf_T *buf = wp->w_buffer;

View File

@ -16,8 +16,8 @@ static kvec_t(DecorProvider) decor_providers = KV_INITIAL_VALUE;
LUA_NOREF, LUA_NOREF, LUA_NOREF, \
LUA_NOREF, -1 }
static bool decor_provider_invoke(NS ns_id, const char *name, LuaRef ref,
Array args, bool default_true, char **perr)
static bool decor_provider_invoke(NS ns_id, const char *name, LuaRef ref, Array args,
bool default_true, char **perr)
{
Error err = ERROR_INIT;
@ -228,4 +228,3 @@ void decor_free_all_mem(void)
}
kv_destroy(decor_providers);
}

View File

@ -2558,8 +2558,7 @@ void ex_diffgetput(exarg_T *eap)
p--;
}
for (i = 0; ascii_isdigit(eap->arg[i]) && eap->arg + i < p; i++) {
}
for (i = 0; ascii_isdigit(eap->arg[i]) && eap->arg + i < p; i++) {}
if (eap->arg + i == p) {
// digits only

View File

@ -1,8 +1,8 @@
#ifndef NVIM_DIGRAPH_H
#define NVIM_DIGRAPH_H
#include "nvim/ex_cmds_defs.h"
#include "nvim/eval/funcs.h"
#include "nvim/ex_cmds_defs.h"
#include "nvim/types.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS

View File

@ -3962,8 +3962,7 @@ static buf_T *ins_compl_next_buf(buf_T *buf, int flag)
}
assert(wp);
while ((wp = (wp->w_next != NULL ? wp->w_next : firstwin)) != curwin
&& wp->w_buffer->b_scanned) {
}
&& wp->w_buffer->b_scanned) {}
buf = wp->w_buffer;
} else {
/* 'b' (just loaded buffers), 'u' (just non-loaded buffers) or 'U'
@ -3974,8 +3973,7 @@ static buf_T *ins_compl_next_buf(buf_T *buf, int flag)
? buf->b_p_bl
: (!buf->b_p_bl
|| (buf->b_ml.ml_mfp == NULL) != (flag == 'u')))
|| buf->b_scanned)) {
}
|| buf->b_scanned)) {}
}
return buf;
}
@ -5178,8 +5176,7 @@ static int ins_complete(int c, bool enable_pum)
if ((compl_cont_status & CONT_SOL)
|| ctrl_x_mode == CTRL_X_PATH_DEFINES) {
if (!(compl_cont_status & CONT_ADDING)) {
while (--startcol >= 0 && vim_isIDc(line[startcol])) {
}
while (--startcol >= 0 && vim_isIDc(line[startcol])) {}
compl_col += ++startcol;
compl_length = curs_col - startcol;
}
@ -5870,8 +5867,7 @@ void insertchar(int c, int flags, int second_indent)
// Skip white space before the cursor
i = curwin->w_cursor.col;
while (--i >= 0 && ascii_iswhite(line[i])) {
}
while (--i >= 0 && ascii_iswhite(line[i])) {}
i++;
// Skip to before the middle leader
@ -6459,7 +6455,7 @@ void auto_format(bool trailblank, bool prev_line)
* be adjusted for the text formatting.
*/
saved_cursor = pos;
format_lines((linenr_T)-1, FALSE);
format_lines((linenr_T) - 1, false);
curwin->w_cursor = saved_cursor;
saved_cursor.lnum = 0;
@ -9393,8 +9389,7 @@ static void ins_try_si(int c)
ptr = ml_get(pos->lnum);
i = pos->col;
if (i > 0) { // skip blanks before '{'
while (--i > 0 && ascii_iswhite(ptr[i])) {
}
while (--i > 0 && ascii_iswhite(ptr[i])) {}
}
curwin->w_cursor.lnum = pos->lnum;
curwin->w_cursor.col = i;

View File

@ -2095,8 +2095,7 @@ char_u *get_lval(char_u *const name, typval_T *const rettv, lval_T *const lp, co
char_u *key = NULL;
if (*p == '.') {
key = p + 1;
for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; len++) {
}
for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; len++) {}
if (len == 0) {
if (!quiet) {
emsg(_("E713: Cannot use empty key after ."));
@ -2444,6 +2443,7 @@ static void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv, int copy, co
? lp->ll_tv->v_lock
: lp->ll_tv->vval.v_dict->dv_lock,
lp->ll_name, TV_CSTRING)) {
// Skip
} else if (lp->ll_range) {
listitem_T *ll_li = lp->ll_li;
int ll_n1 = lp->ll_n1;
@ -2774,8 +2774,7 @@ void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx)
xp->xp_context = EXPAND_NOTHING;
} else if (c == '\'') { // literal string
// Trick: '' is like stopping and starting a literal string.
while ((c = *++xp->xp_pattern) != NUL && c != '\'') {
}
while ((c = *++xp->xp_pattern) != NUL && c != '\'') {}
xp->xp_context = EXPAND_NOTHING;
} else if (c == '|') {
if (xp->xp_pattern[1] == '|') {
@ -2794,8 +2793,7 @@ void set_context_for_expression(expand_T *xp, char_u *arg, cmdidx_T cmdidx)
}
arg = xp->xp_pattern;
if (*arg != NUL) {
while ((c = *++arg) != NUL && (c == ' ' || c == '\t')) {
}
while ((c = *++arg) != NUL && (c == ' ' || c == '\t')) {}
}
}
@ -3972,12 +3970,16 @@ static int eval6(char_u **arg, typval_T *rettv, int evaluate, int want_string)
if (op == '*') {
f1 = f1 * f2;
} else if (op == '/') {
// uncrustify:off
// Division by zero triggers error from AddressSanitizer
f1 = (f2 == 0 ? (
#ifdef NAN
f1 == 0 ? (float_T)NAN :
#endif
(f1 > 0 ? (float_T)INFINITY : (float_T)-INFINITY)) : f1 / f2);
// uncrustify:on
} else {
emsg(_("E804: Cannot use '%' with Float"));
return FAIL;
@ -4532,8 +4534,7 @@ static int eval_index(char_u **arg, typval_T *rettv, int evaluate, int verbose)
* dict.name
*/
key = *arg + 1;
for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; len++) {
}
for (len = 0; ASCII_ISALNUM(key[len]) || key[len] == '_'; len++) {}
if (len == 0) {
return FAIL;
}
@ -5706,8 +5707,7 @@ static int get_literal_key(char_u **arg, typval_T *tv)
if (!ASCII_ISALNUM(**arg) && **arg != '_' && **arg != '-') {
return FAIL;
}
for (p = *arg; ASCII_ISALNUM(*p) || *p == '_' || *p == '-'; p++) {
}
for (p = *arg; ASCII_ISALNUM(*p) || *p == '_' || *p == '-'; p++) {}
tv->v_type = VAR_STRING;
tv->vval.v_string = vim_strnsave(*arg, p - *arg);
@ -7944,8 +7944,7 @@ static int get_env_len(const char_u **arg)
int len;
const char_u *p;
for (p = *arg; vim_isIDc(*p); p++) {
}
for (p = *arg; vim_isIDc(*p); p++) {}
if (p == *arg) { // No name found.
return 0;
}
@ -8087,8 +8086,7 @@ const char_u *find_name_end(const char_u *arg, const char_u **expr_start, const
|| br_nest != 0); MB_PTR_ADV(p)) {
if (*p == '\'') {
// skip over 'string' to avoid counting [ and ] inside it.
for (p = p + 1; *p != NUL && *p != '\''; MB_PTR_ADV(p)) {
}
for (p = p + 1; *p != NUL && *p != '\''; MB_PTR_ADV(p)) {}
if (*p == NUL) {
break;
}

View File

@ -235,8 +235,7 @@ typedef struct {
} timer_T;
/// Type of assert_* check being performed
typedef enum
{
typedef enum {
ASSERT_EQUAL,
ASSERT_NOTEQUAL,
ASSERT_MATCH,

View File

@ -15,8 +15,8 @@
#include "nvim/charset.h"
#include "nvim/context.h"
#include "nvim/cursor.h"
#include "nvim/digraph.h"
#include "nvim/diff.h"
#include "nvim/digraph.h"
#include "nvim/edit.h"
#include "nvim/eval.h"
#include "nvim/eval/decode.h"
@ -135,8 +135,7 @@ char_u *get_function_name(expand_T *xp, int idx)
}
}
while ((size_t)++intidx < ARRAY_SIZE(functions)
&& functions[intidx].name[0] == '\0') {
}
&& functions[intidx].name[0] == '\0') {}
if ((size_t)intidx >= ARRAY_SIZE(functions)) {
return NULL;
@ -2631,8 +2630,7 @@ static void f_foldtextresult(typval_T *argvars, typval_T *rettv, FunPtr fptr)
/// "foreground()" function
static void f_foreground(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
}
{}
static void f_funcref(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{
@ -3857,8 +3855,7 @@ static void f_getwininfo(typval_T *argvars, typval_T *rettv, FunPtr fptr)
/// Dummy timer callback. Used by f_wait().
static void dummy_timer_due_cb(TimeWatcher *tw, void *data)
{
}
{}
/// Dummy timer close callback. Used by f_wait().
static void dummy_timer_close_cb(TimeWatcher *tw, void *data)

View File

@ -2269,8 +2269,7 @@ void ex_function(exarg_T *eap)
}
} else {
// skip ':' and blanks
for (p = theline; ascii_iswhite(*p) || *p == ':'; p++) {
}
for (p = theline; ascii_iswhite(*p) || *p == ':'; p++) {}
// Check for "endfunction".
if (checkforcmd(&p, "endfunction", 4) && nesting-- == 0) {

View File

@ -343,8 +343,7 @@ static int linelen(int *has_tab)
// find the character after the last non-blank character
for (last = first + STRLEN(first);
last > first && ascii_iswhite(last[-1]); last--) {
}
last > first && ascii_iswhite(last[-1]); last--) {}
save = *last;
*last = NUL;
// Get line length.
@ -487,6 +486,7 @@ void ex_sort(exarg_T *eap)
for (p = eap->arg; *p != NUL; ++p) {
if (ascii_iswhite(*p)) {
// Skip
} else if (*p == 'i') {
sort_ic = true;
} else if (*p == 'l') {
@ -3139,8 +3139,7 @@ void ex_z(exarg_T *eap)
// the number of '-' and '+' multiplies the distance
if (*kind == '-' || *kind == '+') {
for (x = kind + 1; *x == *kind; x++) {
}
for (x = kind + 1; *x == *kind; x++) {}
}
switch (*kind) {
@ -4317,6 +4316,8 @@ skip:
lnum -= regmatch.startpos[0].lnum;
}
// uncrustify:off
#define PUSH_PREVIEW_LINES() \
do { \
if (preview) { \
@ -4336,6 +4337,8 @@ skip:
} \
} while (0)
// uncrustify:on
// Push the match to preview_lines.
PUSH_PREVIEW_LINES();

View File

@ -2955,8 +2955,7 @@ const char *set_one_cmd_context(expand_T *xp, const char *buff)
// 2. skip comment lines and leading space, colons or bars
const char *cmd;
for (cmd = buff; vim_strchr((const char_u *)" \t:|", *cmd) != NULL; cmd++) {
}
for (cmd = buff; vim_strchr((const char_u *)" \t:|", *cmd) != NULL; cmd++) {}
xp->xp_pattern = (char_u *)cmd;
if (*cmd == NUL) {
@ -3268,8 +3267,7 @@ const char *set_one_cmd_context(expand_T *xp, const char *buff)
}
// Check for user names.
if (*xp->xp_pattern == '~') {
for (p = (const char *)xp->xp_pattern + 1; *p != NUL && *p != '/'; p++) {
}
for (p = (const char *)xp->xp_pattern + 1; *p != NUL && *p != '/'; p++) {}
// Complete ~user only if it partially matches a user name.
// A full match ~user<Tab> will be replaced by user's home
// directory i.e. something like ~user<Tab> -> /home/user/
@ -6248,8 +6246,7 @@ static void do_ucmd(exarg_T *eap)
end = vim_strchr(start + 1, '>');
}
if (buf != NULL) {
for (ksp = p; *ksp != NUL && *ksp != K_SPECIAL; ksp++) {
}
for (ksp = p; *ksp != NUL && *ksp != K_SPECIAL; ksp++) {}
if (*ksp == K_SPECIAL
&& (start == NULL || ksp < start || end == NULL)
&& (ksp[1] == KS_SPECIAL && ksp[2] == KE_FILLER)) {
@ -7415,8 +7412,7 @@ static void ex_resize(exarg_T *eap)
if (eap->addr_count > 0) {
n = (int)eap->line2;
for (wp = firstwin; wp->w_next != NULL && --n > 0; wp = wp->w_next) {
}
for (wp = firstwin; wp->w_next != NULL && --n > 0; wp = wp->w_next) {}
}
n = (int)atol((char *)eap->arg);
@ -8254,8 +8250,7 @@ static void ex_undo(exarg_T *eap)
for (uhp = curbuf->b_u_curhead ? curbuf->b_u_curhead : curbuf->b_u_newhead;
uhp != NULL && uhp->uh_seq > step;
uhp = uhp->uh_next.ptr, ++count) {
}
uhp = uhp->uh_next.ptr, ++count) {}
if (step != 0 && (uhp == NULL || uhp->uh_seq < step)) {
emsg(_(e_undobang_cannot_redo_or_move_branch));
return;

View File

@ -47,8 +47,7 @@ struct msglist {
};
// The exception types.
typedef enum
{
typedef enum {
ET_USER, // exception caused by ":throw" command
ET_ERROR, // error exception
ET_INTERRUPT, // interrupt exception triggered by Ctrl-C

View File

@ -10,4 +10,3 @@
#endif
#endif // NVIM_EX_SESSION_H

View File

@ -1698,4 +1698,3 @@ int vim_chdir(char_u *new_dir)
xfree(dir_name);
return r;
}

View File

@ -3,8 +3,6 @@
// fileio.c: read from and write to a file
// uncrustify:off
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
@ -21,8 +19,8 @@
#include "nvim/cursor.h"
#include "nvim/diff.h"
#include "nvim/edit.h"
#include "nvim/eval/userfunc.h"
#include "nvim/eval/typval.h"
#include "nvim/eval/userfunc.h"
#include "nvim/ex_cmds.h"
#include "nvim/ex_docmd.h"
#include "nvim/ex_eval.h"
@ -1530,8 +1528,7 @@ rewind_retry:
// Need to reset the counters when retrying fenc.
try_mac = 1;
try_unix = 1;
for (; p >= ptr && *p != CAR; p--) {
}
for (; p >= ptr && *p != CAR; p--) {}
if (p >= ptr) {
for (p = ptr; p < ptr + size; ++p) {
if (*p == NL) {
@ -4912,11 +4909,15 @@ int buf_check_timestamp(buf_T *buf)
char *mesg = NULL;
char *mesg2 = "";
bool helpmesg = false;
// uncrustify:off
enum {
RELOAD_NONE,
RELOAD_NORMAL,
RELOAD_DETECT
} reload = RELOAD_NONE;
// uncrustify:on
bool can_reload = false;
uint64_t orig_size = buf->b_orig_size;
int orig_mode = buf->b_orig_mode;

View File

@ -1877,8 +1877,7 @@ void foldtext_cleanup(char_u *str)
// May remove 'commentstring' start. Useful when it's a double
// quote and we already removed a double quote.
for (p = s; p > str && ascii_iswhite(p[-1]); p--) {
}
for (p = s; p > str && ascii_iswhite(p[-1]); p--) {}
if (p >= str + cms_slen
&& STRNCMP(p - cms_slen, cms_start, cms_slen) == 0) {
len += (size_t)(s - p) + cms_slen;

View File

@ -430,8 +430,7 @@ void flush_buffers(flush_buffers_T flush_typeahead)
init_typebuf();
start_stuff();
while (read_readbuffers(TRUE) != NUL) {
}
while (read_readbuffers(true) != NUL) {}
if (flush_typeahead == FLUSH_MINIMAL) {
// remove mapped characters at the start only
@ -443,8 +442,7 @@ void flush_buffers(flush_buffers_T flush_typeahead)
// We have to get all characters, because we may delete the first
// part of an escape sequence. In an xterm we get one char at a
// time and we have to get them all.
while (inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 10L) != 0) {
}
while (inchar(typebuf.tb_buf, typebuf.tb_buflen - 1, 10L) != 0) {}
}
typebuf.tb_off = MAXMAPLEN;
typebuf.tb_len = 0;
@ -494,8 +492,7 @@ void CancelRedo(void)
redobuff = old_redobuff;
old_redobuff.bh_first.b_next = NULL;
start_stuff();
while (read_readbuffers(TRUE) != NUL) {
}
while (read_readbuffers(true) != NUL) {}
}
}

View File

@ -3195,4 +3195,3 @@ void mch_print_set_fg(uint32_t fgcol)
prt_need_fgcol = true;
}
}

View File

@ -4,8 +4,9 @@
// highlight_group.c: code for managing highlight groups
#include <stdbool.h>
#include "nvim/autocmd.h"
#include "nvim/api/private/helpers.h"
#include "nvim/autocmd.h"
#include "nvim/charset.h"
#include "nvim/cursor_shape.h"
#include "nvim/fold.h"
@ -1572,8 +1573,7 @@ const char *highlight_color(const int id, const char *const what, const int mode
/// @param id highlight group id
/// @param force_newline always start a new line
/// @return true when started a new line.
bool syn_list_header(const bool did_header, const int outlen, const int id,
bool force_newline)
bool syn_list_header(const bool did_header, const int outlen, const int id, bool force_newline)
{
int endcol = 19;
bool newline = true;

View File

@ -1,8 +1,8 @@
#ifndef NVIM_HIGHLIGHT_GROUP_H
#define NVIM_HIGHLIGHT_GROUP_H
#include "nvim/types.h"
#include "nvim/eval.h"
#include "nvim/types.h"
#define MAX_HL_ID 20000 // maximum value for a highlight ID.

View File

@ -1444,8 +1444,7 @@ retry:
// If the line's too long for the buffer, discard it.
if ((p = strchr(buf, '\n')) == NULL) {
while ((ch = getc(csinfo[cnumber].fr_fp)) != EOF && ch != '\n') {
}
while ((ch = getc(csinfo[cnumber].fr_fp)) != EOF && ch != '\n') {}
return NULL;
}
*p = '\0';
@ -1594,8 +1593,7 @@ static char *cs_pathcomponents(char *path)
char *s = path + strlen(path) - 1;
for (int i = 0; i < p_cspc; i++) {
while (s > path && *--s != '/') {
}
while (s > path && *--s != '/') {}
}
if ((s > path && *s == '/')) {
s++;

View File

@ -332,8 +332,7 @@ static int nlua_schedule(lua_State *const lstate)
// Dummy timer callback. Used by f_wait().
static void dummy_timer_due_cb(TimeWatcher *tw, void *data)
{
}
{}
// Dummy timer close callback. Used by f_wait().
static void dummy_timer_close_cb(TimeWatcher *tw, void *data)
@ -1912,4 +1911,3 @@ void nlua_do_ucmd(ucmd_T *cmd, exarg_T *eap)
nlua_error(lstate, _("Error executing Lua callback: %.*s"));
}
}

View File

@ -835,8 +835,8 @@ static uint64_t server_connect(char *server_addr, const char **errmsg)
}
/// Handle remote subcommands
static void remote_request(mparm_T *params, int remote_args,
char *server_addr, int argc, char **argv)
static void remote_request(mparm_T *params, int remote_args, char *server_addr, int argc,
char **argv)
{
const char *connect_error = NULL;
uint64_t chan = server_connect(server_addr, &connect_error);

View File

@ -1216,4 +1216,3 @@ void mt_inspect_node(MarkTree *b, garray_T *ga, mtnode_t *n, mtpos_t off)
}
ga_concat(ga, "]");
}

View File

@ -4,6 +4,7 @@
// match.c: functions for highlighting matches
#include <stdbool.h>
#include "nvim/buffer_defs.h"
#include "nvim/charset.h"
#include "nvim/fold.h"
@ -1214,4 +1215,3 @@ void ex_match(exarg_T *eap)
}
eap->nextcmd = find_nextcmd(end);
}

View File

@ -972,8 +972,7 @@ void ml_recover(bool checkext)
if (b0p->b0_flags & B0_HAS_FENC) {
int fnsize = B0_FNAME_SIZE_NOCRYPT;
for (p = b0p->b0_fname + fnsize; p > b0p->b0_fname && p[-1] != NUL; p--) {
}
for (p = b0p->b0_fname + fnsize; p > b0p->b0_fname && p[-1] != NUL; p--) {}
b0_fenc = vim_strnsave(p, b0p->b0_fname + fnsize - p);
}

View File

@ -709,4 +709,3 @@ void free_all_mem(void)
}
#endif

View File

@ -486,8 +486,7 @@ erret:
} else {
menup = &parent->parent->children;
}
for (; *menup != NULL && *menup != parent; menup = &((*menup)->next)) {
}
for (; *menup != NULL && *menup != parent; menup = &((*menup)->next)) {}
if (*menup == NULL) { // safety check
break;
}
@ -1656,4 +1655,3 @@ static char *menu_translate_tab_and_shift(char *arg_start)
return arg;
}

View File

@ -1022,8 +1022,7 @@ void ex_messages(void *const eap_p)
c -= eap->line2;
// Skip without number of messages specified
for (p = first_msg_hist; p != NULL && !got_int && c > 0; p = p->next, c--) {
}
for (p = first_msg_hist; p != NULL && !got_int && c > 0; p = p->next, c--) {}
}
// Display what was not skipped.

View File

@ -2300,4 +2300,3 @@ void do_check_cursorbind(void)
curwin = old_curwin;
curbuf = old_curbuf;
}

View File

@ -21,4 +21,3 @@
#endif
#endif // NVIM_MSGPACK_RPC_HELPERS_H

View File

@ -2887,8 +2887,7 @@ static void nv_ignore(cmdarg_T *cap)
/// Command character that doesn't do anything, but unlike nv_ignore() does
/// start edit(). Used for "startinsert" executed while starting up.
static void nv_nop(cmdarg_T *cap)
{
}
{}
/// Command character doesn't exist.
static void nv_error(cmdarg_T *cap)

View File

@ -4313,8 +4313,7 @@ static int same_leader(linenr_T lnum, int leader1_len, char_u *leader1_flags, in
* The first line has to be saved, only one line can be locked at a time.
*/
line1 = vim_strsave(ml_get(lnum));
for (idx1 = 0; ascii_iswhite(line1[idx1]); ++idx1) {
}
for (idx1 = 0; ascii_iswhite(line1[idx1]); idx1++) {}
line2 = ml_get(lnum + 1);
for (idx2 = 0; idx2 < leader2_len; ++idx2) {
if (!ascii_iswhite(line2[idx2])) {

View File

@ -47,9 +47,9 @@ int pty_process_spawn(PtyProcess *ptyproc)
assert(proc->err.closed);
if (!os_has_conpty_working()
|| (conpty_object =
os_conpty_init(&in_name, &out_name, ptyproc->width, ptyproc->height)) == NULL) {
if (!os_has_conpty_working() || (conpty_object = os_conpty_init(&in_name,
&out_name, ptyproc->width,
ptyproc->height)) == NULL) {
status = UV_ENOSYS;
goto cleanup;
}
@ -172,13 +172,11 @@ void pty_process_close(PtyProcess *ptyproc)
void pty_process_close_master(PtyProcess *ptyproc)
FUNC_ATTR_NONNULL_ALL
{
}
{}
void pty_process_teardown(Loop *loop)
FUNC_ATTR_NONNULL_ALL
{
}
{}
static void pty_process_connect_cb(uv_connect_t *req, int status)
FUNC_ATTR_NONNULL_ALL

View File

@ -1331,4 +1331,3 @@ static char *shell_xescape_xquote(const char *cmd)
return ncmd;
}

View File

@ -1528,9 +1528,8 @@ void simplify_filename(char_u *filename)
if (vim_ispathsep(*p)) {
relative = false;
do {
++p;
}
while (vim_ispathsep(*p));
p++;
} while (vim_ispathsep(*p));
}
start = p; // remember start after "c:/" or "/" or "///"

View File

@ -507,4 +507,3 @@ static int win_nolbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp)
}
return n;
}

View File

@ -78,8 +78,7 @@ struct qfline_S {
#define INVALID_QFBUFNR (0)
/// Quickfix list type.
typedef enum
{
typedef enum {
QFLT_QUICKFIX, ///< Quickfix list - global list
QFLT_LOCATION, ///< Location list - per window list
QFLT_INTERNAL, ///< Internal - Temporary list used by
@ -429,8 +428,7 @@ static char *scanf_fmt_to_regpat(const char **pefmp, const char *efm, int len, c
}
if (efmp < efm + len) {
*regpat++ = *++efmp; // could be ']'
while (efmp < efm + len && (*regpat++ = *++efmp) != ']') {
}
while (efmp < efm + len && (*regpat++ = *++efmp) != ']') {}
if (efmp == efm + len) {
emsg(_("E374: Missing ] in format string"));
return NULL;
@ -7300,4 +7298,3 @@ void ex_helpgrep(exarg_T *eap)
}
}
}

View File

@ -224,4 +224,3 @@ int rbuffer_cmp(RBuffer *buf, const char *str, size_t count)
return memcmp(str + n, buf->start_ptr, count);
}

View File

@ -19,6 +19,7 @@
// regexp.c
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "regexp.h.generated.h"
# include "regexp_bt.h.generated.h"
#endif

View File

@ -24,7 +24,7 @@ typedef enum {
WC_TOP_LEFT = 0,
WC_TOP_RIGHT,
WC_BOTTOM_LEFT,
WC_BOTTOM_RIGHT
WC_BOTTOM_RIGHT,
} WindowCorner;
/// By default, all windows are drawn on a single rectangular grid, represented by

View File

@ -2543,8 +2543,7 @@ int findsent(Direction dir, long count)
if ((c = inc(&tpos)) == -1) {
break;
}
}
while (vim_strchr((char_u *)")]\"'", c = gchar_pos(&tpos))
} while (vim_strchr((char_u *)")]\"'", c = gchar_pos(&tpos))
!= NULL);
if (c == -1 || (!cpo_J && (c == ' ' || c == '\t')) || c == NUL
|| (cpo_J && (c == ' ' && inc(&tpos) >= 0
@ -3673,8 +3672,7 @@ again:
p = get_cursor_pos_ptr();
for (cp = p;
*cp != NUL && *cp != '>' && !ascii_iswhite(*cp);
MB_PTR_ADV(cp)) {
}
MB_PTR_ADV(cp)) {}
len = (int)(cp - p);
if (len == 0) {
curwin->w_cursor = old_pos;
@ -5497,10 +5495,8 @@ void find_pattern_in_path(char_u *ptr, Direction dir, size_t len, bool whole, bo
} else {
// find the file name after the end of the match
for (p = incl_regmatch.endp[0];
*p && !vim_isfilec(*p); p++) {
}
for (i = 0; vim_isfilec(p[i]); i++) {
}
*p && !vim_isfilec(*p); p++) {}
for (i = 0; vim_isfilec(p[i]); i++) {}
}
if (i == 0) {

View File

@ -5,8 +5,6 @@
// sign.c: functions for managing with signs
//
#include "nvim/sign.h"
#include "nvim/ascii.h"
#include "nvim/buffer.h"
#include "nvim/charset.h"
@ -18,6 +16,7 @@
#include "nvim/move.h"
#include "nvim/option.h"
#include "nvim/screen.h"
#include "nvim/sign.h"
#include "nvim/syntax.h"
#include "nvim/vim.h"
#include "nvim/window.h"
@ -1699,8 +1698,7 @@ void free_signs(void)
}
}
static enum
{
static enum {
EXP_SUBCMD, // expand :sign sub-commands
EXP_DEFINE, // expand :sign define {name} args
EXP_PLACE, // expand :sign place {id} args

View File

@ -3420,8 +3420,7 @@ static void spell_suggest_file(suginfo_T *su, char_u *fname)
*p++ = NUL;
if (STRICMP(su->su_badword, line) == 0) {
// Match! Isolate the good word, until CR or NL.
for (len = 0; p[len] >= ' '; ++len) {
}
for (len = 0; p[len] >= ' '; len++) {}
p[len] = NUL;
// If the suggestion doesn't have specific case duplicate the case
@ -3816,8 +3815,7 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so
if (sp->ts_prefixdepth == PFD_PREFIXTREE) {
// Skip over the NUL bytes, we use them later.
for (n = 0; n < len && byts[arridx + n] == 0; ++n) {
}
for (n = 0; n < len && byts[arridx + n] == 0; n++) {}
sp->ts_curi += n;
// Always past NUL bytes now.
@ -3890,8 +3888,7 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so
// none this must be the first try without a prefix.
n = stack[sp->ts_prefixdepth].ts_arridx;
len = pbyts[n++];
for (c = 0; c < len && pbyts[n + c] == 0; ++c) {
}
for (c = 0; c < len && pbyts[n + c] == 0; c++) {}
if (c > 0) {
c = valid_word_prefix(c, n, flags,
tword + sp->ts_splitoff, slang, false);

View File

@ -5887,4 +5887,3 @@ static void set_map_str(slang_T *lp, char_u *map)
}
}
}

View File

@ -1019,8 +1019,7 @@ static void syn_stack_alloc(void)
// When shrinking the array, cleanup the existing stack.
// Make sure that all valid entries fit in the new array.
while (syn_block->b_sst_len - syn_block->b_sst_freecount + 2 > len
&& syn_stack_cleanup()) {
}
&& syn_stack_cleanup()) {}
if (len < syn_block->b_sst_len - syn_block->b_sst_freecount + 2) {
len = syn_block->b_sst_len - syn_block->b_sst_freecount + 2;
}
@ -2699,8 +2698,7 @@ static void find_endpos(int idx, lpos_T *startpos, lpos_T *m_endpos, lpos_T *hl_
// Be careful not to jump over the NUL at the end-of-line
for (matchcol = regmatch.endpos[0].col;
matchcol < line_len && matchcol < pos.col;
matchcol++) {
}
matchcol++) {}
}
// if the skip pattern includes end-of-line, break here
@ -5334,8 +5332,7 @@ static int get_id_list(char_u **const arg, const int keylen, int16_t **const lis
// parse the arguments after "contains"
int count = 0;
do {
for (end = p; *end && !ascii_iswhite(*end) && *end != ','; end++) {
}
for (end = p; *end && !ascii_iswhite(*end) && *end != ','; end++) {}
char_u *const name = xmalloc(end - p + 3); // leave room for "^$"
STRLCPY(name + 1, p, end - p + 1);
if (STRCMP(name + 1, "ALLBUT") == 0
@ -5470,8 +5467,7 @@ static int16_t *copy_id_list(const int16_t *const list)
}
int count;
for (count = 0; list[count]; count++) {
}
for (count = 0; list[count]; count++) {}
const size_t len = (count + 1) * sizeof(int16_t);
int16_t *const retval = xmalloc(len);
memmove(retval, list, len);
@ -5624,8 +5620,7 @@ void ex_syntax(exarg_T *eap)
syn_cmdlinep = eap->cmdlinep;
// isolate subcommand name
for (subcmd_end = arg; ASCII_ISALPHA(*subcmd_end); subcmd_end++) {
}
for (subcmd_end = arg; ASCII_ISALPHA(*subcmd_end); subcmd_end++) {}
char_u *const subcmd_name = vim_strnsave(arg, subcmd_end - arg);
if (eap->skip) { // skip error messages for all subcommands
emsg_skip++;

View File

@ -813,8 +813,7 @@ static void print_tag_list(int new_tag, int use_tagstack, int num_matches, char_
} else {
for (p = tagp.command;
*p && *p != '\r' && *p != '\n';
p++) {
}
p++) {}
command_end = p;
}
@ -933,8 +932,7 @@ static int add_llist_tags(char_u *tag, int num_matches, char_u **matches)
cmd_end = tagp.command_end;
if (cmd_end == NULL) {
for (p = tagp.command;
*p && *p != '\r' && *p != '\n'; p++) {
}
*p && *p != '\r' && *p != '\n'; p++) {}
cmd_end = p;
}
@ -1780,8 +1778,7 @@ line_read_in:
if (STRNCMP(lbuf, "!_TAG_FILE_ENCODING\t", 20) == 0) {
// Prepare to convert every line from the specified
// encoding to 'encoding'.
for (p = lbuf + 20; *p > ' ' && *p < 127; p++) {
}
for (p = lbuf + 20; *p > ' ' && *p < 127; p++) {}
*p = NUL;
convert_setup(&vimconv, lbuf + 20, p_enc);
}
@ -2614,15 +2611,13 @@ static int parse_match(char_u *lbuf, tagptrs_T *tagp)
if (tagp->tagkind != NULL) {
for (p = tagp->tagkind;
*p && *p != '\t' && *p != '\r' && *p != '\n';
MB_PTR_ADV(p)) {
}
MB_PTR_ADV(p)) {}
tagp->tagkind_end = p;
}
if (tagp->user_data != NULL) {
for (p = tagp->user_data;
*p && *p != '\t' && *p != '\r' && *p != '\n';
MB_PTR_ADV(p)) {
}
MB_PTR_ADV(p)) {}
tagp->user_data_end = p;
}
}

View File

@ -3,9 +3,9 @@
// testing.c: Support for tests
#include "nvim/eval.h"
#include "nvim/eval/encode.h"
#include "nvim/ex_docmd.h"
#include "nvim/eval.h"
#include "nvim/os/os.h"
#include "nvim/testing.h"
@ -559,4 +559,3 @@ void f_test_write_list_log(typval_T *const argvars, typval_T *const rettv, FunPt
}
list_write_log(fname);
}

View File

@ -1,8 +1,8 @@
#ifndef NVIM_TESTING_H
#define NVIM_TESTING_H
#include "nvim/eval/typval.h"
#include "nvim/eval/funcs.h"
#include "nvim/eval/typval.h"
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "testing.h.generated.h"

View File

@ -13,8 +13,8 @@
#include "nvim/option.h"
#include "nvim/os/input.h"
#include "nvim/os/os.h"
#include "nvim/tui/tui.h"
#include "nvim/tui/input.h"
#include "nvim/tui/tui.h"
#include "nvim/vim.h"
#ifdef WIN32
# include "nvim/os/os_win_console.h"

View File

@ -1389,8 +1389,7 @@ static void tui_set_title(UI *ui, String title)
}
static void tui_set_icon(UI *ui, String icon)
{
}
{}
static void tui_screenshot(UI *ui, String path)
{

View File

@ -99,4 +99,3 @@ static void destroy_cells(UGrid *grid)
XFREE_CLEAR(grid->cells);
}
}

View File

@ -12,7 +12,6 @@
#include "nvim/charset.h"
#include "nvim/cursor.h"
#include "nvim/cursor_shape.h"
#include "nvim/msgpack_rpc/channel.h"
#include "nvim/diff.h"
#include "nvim/event/loop.h"
#include "nvim/ex_cmds2.h"
@ -25,6 +24,7 @@
#include "nvim/mbyte.h"
#include "nvim/memory.h"
#include "nvim/move.h"
#include "nvim/msgpack_rpc/channel.h"
#include "nvim/normal.h"
#include "nvim/option.h"
#include "nvim/os/input.h"

View File

@ -1,20 +1,20 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <assert.h>
#include "nvim/vim.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/api/private/helpers.h"
#include "nvim/highlight.h"
#include "nvim/log.h"
#include "nvim/map.h"
#include "nvim/ui_client.h"
#include "nvim/api/private/helpers.h"
#include "nvim/msgpack_rpc/channel.h"
#include "nvim/api/private/dispatch.h"
#include "nvim/ui.h"
#include "nvim/highlight.h"
#include "nvim/screen.h"
#include "nvim/ui.h"
#include "nvim/ui_client.h"
#include "nvim/vim.h"
static Map(String, UIClientHandler) ui_client_handlers = MAP_INIT;

View File

@ -7,6 +7,7 @@ typedef void (*UIClientHandler)(Array args);
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "ui_client.h.generated.h"
# include "ui_events_client.h.generated.h"
#endif

View File

@ -665,4 +665,3 @@ static void ui_comp_grid_resize(UI *ui, Integer grid, Integer width, Integer hei
}
}
}

View File

@ -2329,4 +2329,3 @@ void ex_intro(exarg_T *eap)
intro_message(TRUE);
wait_return(TRUE);
}

View File

@ -541,8 +541,7 @@ LexExprToken viml_pexpr_next_token(ParserState *const pstate, const int flags)
ret.data.opt.len = 4;
ret.len += 4;
} else {
for (; p < e && ASCII_ISALPHA(*p); p++) {
}
for (; p < e && ASCII_ISALPHA(*p); p++) {}
ret.data.opt.len = (size_t)(p - ret.data.opt.name);
if (ret.data.opt.len == 0) {
OPTNAMEMISS(ret);

View File

@ -1877,8 +1877,7 @@ static void win_rotate(bool upwards, int count)
assert(frp->fr_parent->fr_child);
// find last frame and append removed window/frame after it
for (; frp->fr_next != NULL; frp = frp->fr_next) {
}
for (; frp->fr_next != NULL; frp = frp->fr_next) {}
win_append(frp->fr_win, wp1);
frame_append(frp, wp1->w_frame);
@ -1886,8 +1885,7 @@ static void win_rotate(bool upwards, int count)
} else { // last window becomes first window
// find last window/frame in the list and remove it
for (frp = curwin->w_frame; frp->fr_next != NULL;
frp = frp->fr_next) {
}
frp = frp->fr_next) {}
wp1 = frp->fr_win;
wp2 = wp1->w_prev; // will become last window
win_remove(wp1, NULL);
@ -2957,8 +2955,7 @@ void win_close_othertab(win_T *win, int free_buf, tabpage_T *tp)
// Careful: Autocommands may have closed the tab page or made it the
// current tab page.
for (ptp = first_tabpage; ptp != NULL && ptp != tp; ptp = ptp->tp_next) {
}
for (ptp = first_tabpage; ptp != NULL && ptp != tp; ptp = ptp->tp_next) {}
if (ptp == NULL || tp == curtab) {
// If the buffer was removed from the window we have to give it any
// buffer.
@ -3316,8 +3313,7 @@ static tabpage_T *alt_tabpage(void)
}
// Find the last but one tab page.
for (tp = first_tabpage; tp->tp_next != curtab; tp = tp->tp_next) {
}
for (tp = first_tabpage; tp->tp_next != curtab; tp = tp->tp_next) {}
return tp;
}
@ -3440,13 +3436,11 @@ void frame_new_height(frame_T *topfrp, int height, bool topfirst, bool wfh)
if (topfirst) {
do {
frp = frp->fr_next;
}
while (wfh && frp != NULL && frame_fixed_height(frp));
} while (wfh && frp != NULL && frame_fixed_height(frp));
} else {
do {
frp = frp->fr_prev;
}
while (wfh && frp != NULL && frame_fixed_height(frp));
} while (wfh && frp != NULL && frame_fixed_height(frp));
}
// Increase "height" if we could not reduce enough frames.
if (frp == NULL) {
@ -3553,8 +3547,7 @@ static void frame_add_statusline(frame_T *frp)
} else {
assert(frp->fr_layout == FR_COL);
// Only need to handle the last frame in the column.
for (frp = frp->fr_child; frp->fr_next != NULL; frp = frp->fr_next) {
}
for (frp = frp->fr_child; frp->fr_next != NULL; frp = frp->fr_next) {}
frame_add_statusline(frp);
}
}
@ -3640,13 +3633,11 @@ static void frame_new_width(frame_T *topfrp, int width, bool leftfirst, bool wfw
if (leftfirst) {
do {
frp = frp->fr_next;
}
while (wfw && frp != NULL && frame_fixed_width(frp));
} while (wfw && frp != NULL && frame_fixed_width(frp));
} else {
do {
frp = frp->fr_prev;
}
while (wfw && frp != NULL && frame_fixed_width(frp));
} while (wfw && frp != NULL && frame_fixed_width(frp));
}
// Increase "width" if we could not reduce enough frames.
if (frp == NULL) {
@ -4424,14 +4415,12 @@ void goto_tabpage(int n)
ttp = curtab;
for (i = n; i < 0; ++i) {
for (tp = first_tabpage; tp->tp_next != ttp && tp->tp_next != NULL;
tp = tp->tp_next) {
}
tp = tp->tp_next) {}
ttp = tp;
}
} else if (n == 9999) {
// Go to last tab page.
for (tp = first_tabpage; tp->tp_next != NULL; tp = tp->tp_next) {
}
for (tp = first_tabpage; tp->tp_next != NULL; tp = tp->tp_next) {}
} else {
// Go to tab page "n".
tp = find_tabpage(n);

View File

@ -1,4 +1,4 @@
# Uncrustify-0.74.0
# Uncrustify-0.74.0_f
#
# General options
@ -81,7 +81,7 @@ sp_arith = ignore # ignore/add/remove/force/not_defined
# Add or remove space around arithmetic operators '+' and '-'.
#
# Overrides sp_arith.
sp_arith_additive = ignore # ignore/add/remove/force/not_defined
sp_arith_additive = force # ignore/add/remove/force/not_defined
# Add or remove space around assignment operator '=', '+=', etc.
sp_assign = ignore # ignore/add/remove/force/not_defined
@ -172,7 +172,7 @@ sp_inside_paren = remove # ignore/add/remove/force/not_defined
sp_paren_paren = remove # ignore/add/remove/force/not_defined
# Add or remove space between back-to-back parentheses, i.e. ')(' vs. ') ('.
sp_cparen_oparen = ignore # ignore/add/remove/force/not_defined
sp_cparen_oparen = remove # ignore/add/remove/force/not_defined
# Whether to balance spaces inside nested parentheses.
sp_balance_nested_parens = false # true/false
@ -343,13 +343,13 @@ sp_inside_for_open = ignore # ignore/add/remove/force/not_defined
sp_inside_for_close = ignore # ignore/add/remove/force/not_defined
# Add or remove space between '((' or '))' of control statements.
sp_sparen_paren = ignore # ignore/add/remove/force/not_defined
sp_sparen_paren = remove # ignore/add/remove/force/not_defined
# Add or remove space after ')' of control statements.
sp_after_sparen = ignore # ignore/add/remove/force/not_defined
# Add or remove space between ')' and '{' of control statements.
sp_sparen_brace = ignore # ignore/add/remove/force/not_defined
sp_sparen_brace = force # ignore/add/remove/force/not_defined
# Add or remove space between 'do' and '{'.
sp_do_brace_open = force # ignore/add/remove/force/not_defined
@ -592,7 +592,7 @@ sp_type_func = ignore # ignore/add/remove/force/not_defined
sp_type_brace_init_lst = ignore # ignore/add/remove/force/not_defined
# Add or remove space between function name and '(' on function declaration.
sp_func_proto_paren = ignore # ignore/add/remove/force/not_defined
sp_func_proto_paren = remove # ignore/add/remove/force/not_defined
# Add or remove space between function name and '()' on function declaration
# without parameters.
@ -1507,7 +1507,7 @@ donot_indent_func_def_close_paren = false # true/false
# Whether to collapse empty blocks between '{' and '}'.
# If true, overrides nl_inside_empty_func
nl_collapse_empty_body = false # true/false
nl_collapse_empty_body = true # true/false
# Don't split one-line braced assignments, as in 'foo_t f = { 1, 2 };'.
nl_assign_leave_one_liners = false # true/false
@ -1575,11 +1575,11 @@ nl_start_of_file = ignore # ignore/add/remove/force/not_defined
nl_start_of_file_min = 0 # unsigned number
# Add or remove newline at the end of the file.
nl_end_of_file = ignore # ignore/add/remove/force/not_defined
nl_end_of_file = force # ignore/add/remove/force/not_defined
# The minimum number of newlines at the end of the file (only used if
# nl_end_of_file is 'add' or 'force').
nl_end_of_file_min = 0 # unsigned number
nl_end_of_file_min = 1 # unsigned number
# Add or remove newline between '=' and '{'.
nl_assign_brace = ignore # ignore/add/remove/force/not_defined
@ -1599,7 +1599,7 @@ nl_after_square_assign = ignore # ignore/add/remove/force/not_defined
nl_fcall_brace = ignore # ignore/add/remove/force/not_defined
# Add or remove newline between 'enum' and '{'.
nl_enum_brace = ignore # ignore/add/remove/force/not_defined
nl_enum_brace = remove # ignore/add/remove/force/not_defined
# Add or remove newline between 'enum' and 'class'.
nl_enum_class = ignore # ignore/add/remove/force/not_defined
@ -1675,7 +1675,7 @@ nl_oc_brace_catch = ignore # ignore/add/remove/force/not_defined
nl_brace_square = ignore # ignore/add/remove/force/not_defined
# Add or remove newline between '}' and ')' in a function invocation.
nl_brace_fparen = ignore # ignore/add/remove/force/not_defined
nl_brace_fparen = remove # ignore/add/remove/force/not_defined
# Add or remove newline between 'while' and '{'.
nl_while_brace = ignore # ignore/add/remove/force/not_defined
@ -1700,7 +1700,7 @@ nl_brace_brace = ignore # ignore/add/remove/force/not_defined
nl_do_brace = remove # ignore/add/remove/force/not_defined
# Add or remove newline between '}' and 'while' of 'do' statement.
nl_brace_while = ignore # ignore/add/remove/force/not_defined
nl_brace_while = remove # ignore/add/remove/force/not_defined
# Add or remove newline between 'switch' and '{'.
nl_switch_brace = ignore # ignore/add/remove/force/not_defined
@ -3391,5 +3391,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: 86
# option(s) with 'not default' value: 97
#