mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor(uncrustify): change rules to better align with the style guide
Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
This commit is contained in:
parent
0b3ae64480
commit
eef8de4df0
@ -150,4 +150,3 @@ Boolean nvim_tabpage_is_valid(Tabpage tabpage)
|
||||
api_clear_error(&stub);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -624,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) {
|
||||
@ -2608,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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -228,4 +228,3 @@ void decor_free_all_mem(void)
|
||||
}
|
||||
kv_destroy(decor_providers);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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')) {}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4536,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;
|
||||
}
|
||||
@ -5710,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);
|
||||
|
||||
@ -7948,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;
|
||||
}
|
||||
@ -8091,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;
|
||||
}
|
||||
|
@ -235,8 +235,7 @@ typedef struct {
|
||||
} timer_T;
|
||||
|
||||
/// Type of assert_* check being performed
|
||||
typedef enum
|
||||
{
|
||||
typedef enum {
|
||||
ASSERT_EQUAL,
|
||||
ASSERT_NOTEQUAL,
|
||||
ASSERT_MATCH,
|
||||
|
@ -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)
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -10,4 +10,3 @@
|
||||
#endif
|
||||
|
||||
#endif // NVIM_EX_SESSION_H
|
||||
|
||||
|
@ -1698,4 +1698,3 @@ int vim_chdir(char_u *new_dir)
|
||||
xfree(dir_name);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
@ -1528,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) {
|
||||
|
@ -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;
|
||||
|
@ -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) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3195,4 +3195,3 @@ void mch_print_set_fg(uint32_t fgcol)
|
||||
prt_need_fgcol = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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++;
|
||||
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1216,4 +1216,3 @@ void mt_inspect_node(MarkTree *b, garray_T *ga, mtnode_t *n, mtpos_t off)
|
||||
}
|
||||
ga_concat(ga, "]");
|
||||
}
|
||||
|
||||
|
@ -1215,4 +1215,3 @@ void ex_match(exarg_T *eap)
|
||||
}
|
||||
eap->nextcmd = find_nextcmd(end);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -709,4 +709,3 @@ void free_all_mem(void)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
|
@ -2300,4 +2300,3 @@ void do_check_cursorbind(void)
|
||||
curwin = old_curwin;
|
||||
curbuf = old_curbuf;
|
||||
}
|
||||
|
||||
|
@ -21,4 +21,3 @@
|
||||
#endif
|
||||
|
||||
#endif // NVIM_MSGPACK_RPC_HELPERS_H
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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])) {
|
||||
|
@ -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
|
||||
|
@ -1331,4 +1331,3 @@ static char *shell_xescape_xquote(const char *cmd)
|
||||
|
||||
return ncmd;
|
||||
}
|
||||
|
||||
|
@ -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 "///"
|
||||
|
||||
|
@ -507,4 +507,3 @@ static int win_nolbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp)
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,4 +224,3 @@ int rbuffer_cmp(RBuffer *buf, const char *str, size_t count)
|
||||
|
||||
return memcmp(str + n, buf->start_ptr, count);
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -1698,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
|
||||
|
@ -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);
|
||||
|
@ -5887,4 +5887,3 @@ static void set_map_str(slang_T *lp, char_u *map)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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++;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -559,4 +559,3 @@ void f_test_write_list_log(typval_T *const argvars, typval_T *const rettv, FunPt
|
||||
}
|
||||
list_write_log(fname);
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -99,4 +99,3 @@ static void destroy_cells(UGrid *grid)
|
||||
XFREE_CLEAR(grid->cells);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -665,4 +665,3 @@ static void ui_comp_grid_resize(UI *ui, Integer grid, Integer width, Integer hei
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2329,4 +2329,3 @@ void ex_intro(exarg_T *eap)
|
||||
intro_message(TRUE);
|
||||
wait_return(TRUE);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user