diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-03-12 20:10:05 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-03-12 20:10:05 +0100 |
commit | 1c46544412382db8b3203d6c78e550df885540bd (patch) | |
tree | d4dc51020d3ebdbee4548b0d5628221f921af2f3 | |
parent | 91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f (diff) |
patch 8.0.0452: some macros are in lower casev8.0.0452
Problem: Some macros are in lower case.
Solution: Make a few more macros upper case.
-rw-r--r-- | src/charset.c | 2 | ||||
-rw-r--r-- | src/diff.c | 16 | ||||
-rw-r--r-- | src/edit.c | 32 | ||||
-rw-r--r-- | src/eval.c | 12 | ||||
-rw-r--r-- | src/evalfunc.c | 2 | ||||
-rw-r--r-- | src/ex_cmds.c | 16 | ||||
-rw-r--r-- | src/ex_cmds2.c | 2 | ||||
-rw-r--r-- | src/ex_docmd.c | 24 | ||||
-rw-r--r-- | src/ex_getln.c | 2 | ||||
-rw-r--r-- | src/fileio.c | 22 | ||||
-rw-r--r-- | src/fold.c | 10 | ||||
-rw-r--r-- | src/getchar.c | 8 | ||||
-rw-r--r-- | src/gui.c | 2 | ||||
-rw-r--r-- | src/gui_gtk.c | 3 | ||||
-rw-r--r-- | src/gui_gtk_x11.c | 3 | ||||
-rw-r--r-- | src/gui_w32.c | 5 | ||||
-rw-r--r-- | src/if_cscope.c | 2 | ||||
-rw-r--r-- | src/macros.h | 6 | ||||
-rw-r--r-- | src/mbyte.c | 2 | ||||
-rw-r--r-- | src/menu.c | 24 | ||||
-rw-r--r-- | src/message.c | 2 | ||||
-rw-r--r-- | src/misc1.c | 76 | ||||
-rw-r--r-- | src/misc2.c | 2 | ||||
-rw-r--r-- | src/normal.c | 14 | ||||
-rw-r--r-- | src/ops.c | 16 | ||||
-rw-r--r-- | src/option.c | 19 | ||||
-rw-r--r-- | src/os_unix.c | 2 | ||||
-rw-r--r-- | src/os_win32.c | 6 | ||||
-rw-r--r-- | src/quickfix.c | 2 | ||||
-rw-r--r-- | src/regexp.c | 4 | ||||
-rw-r--r-- | src/regexp_nfa.c | 4 | ||||
-rw-r--r-- | src/screen.c | 4 | ||||
-rw-r--r-- | src/search.c | 24 | ||||
-rw-r--r-- | src/spell.c | 16 | ||||
-rw-r--r-- | src/syntax.c | 22 | ||||
-rw-r--r-- | src/tag.c | 4 | ||||
-rw-r--r-- | src/userfunc.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim.h | 11 |
39 files changed, 213 insertions, 214 deletions
diff --git a/src/charset.c b/src/charset.c index 18a693547d..2091d233bc 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1530,7 +1530,7 @@ skipwhite(char_u *q) { char_u *p = q; - while (vim_iswhite(*p)) /* skip to next non-white */ + while (VIM_ISWHITE(*p)) /* skip to next non-white */ ++p; return p; } diff --git a/src/diff.c b/src/diff.c index 8c70e0cab1..246c4e09ec 100644 --- a/src/diff.c +++ b/src/diff.c @@ -1667,7 +1667,7 @@ diff_cmp(char_u *s1, char_u *s2) p2 = s2; while (*p1 != NUL && *p2 != NUL) { - if (vim_iswhite(*p1) && vim_iswhite(*p2)) + if (VIM_ISWHITE(*p1) && VIM_ISWHITE(*p2)) { p1 = skipwhite(p1); p2 = skipwhite(p2); @@ -1994,8 +1994,8 @@ diff_find_change( while (line_org[si_org] != NUL) { if ((diff_flags & DIFF_IWHITE) - && vim_iswhite(line_org[si_org]) - && vim_iswhite(line_new[si_new])) + && VIM_ISWHITE(line_org[si_org]) + && VIM_ISWHITE(line_new[si_new])) { si_org = (int)(skipwhite(line_org + si_org) - line_org); si_new = (int)(skipwhite(line_new + si_new) - line_new); @@ -2029,14 +2029,14 @@ diff_find_change( && ei_org >= 0 && ei_new >= 0) { if ((diff_flags & DIFF_IWHITE) - && vim_iswhite(line_org[ei_org]) - && vim_iswhite(line_new[ei_new])) + && VIM_ISWHITE(line_org[ei_org]) + && VIM_ISWHITE(line_new[ei_new])) { while (ei_org >= *startp - && vim_iswhite(line_org[ei_org])) + && VIM_ISWHITE(line_org[ei_org])) --ei_org; while (ei_new >= si_new - && vim_iswhite(line_new[ei_new])) + && VIM_ISWHITE(line_new[ei_new])) --ei_new; } else @@ -2202,7 +2202,7 @@ ex_diffgetput(exarg_T *eap) { /* Buffer number or pattern given. Ignore trailing white space. */ p = eap->arg + STRLEN(eap->arg); - while (p > eap->arg && vim_iswhite(p[-1])) + while (p > eap->arg && VIM_ISWHITE(p[-1])) --p; for (i = 0; vim_isdigit(eap->arg[i]) && eap->arg + i < p; ++i) ; diff --git a/src/edit.c b/src/edit.c index 45eaf0ff23..35fa23b7d9 100644 --- a/src/edit.c +++ b/src/edit.c @@ -2149,7 +2149,7 @@ truncate_spaces(char_u *line) int i; /* find start of trailing white space */ - for (i = (int)STRLEN(line) - 1; i >= 0 && vim_iswhite(line[i]); i--) + for (i = (int)STRLEN(line) - 1; i >= 0 && VIM_ISWHITE(line[i]); i--) { if (State & REPLACE_FLAG) replace_join(0); /* remove a NUL from the replace stack */ @@ -2358,7 +2358,7 @@ ins_compl_accept_char(int c) case CTRL_X_OMNI: /* Command line and Omni completion can work with just about any * printable character, but do stop at white space. */ - return vim_isprintc(c) && !vim_iswhite(c); + return vim_isprintc(c) && !VIM_ISWHITE(c); case CTRL_X_WHOLE_LINE: /* For while line completion a space can be part of the line. */ @@ -5989,9 +5989,9 @@ insert_special( #endif #ifdef FEAT_MBYTE -# define WHITECHAR(cc) (vim_iswhite(cc) && (!enc_utf8 || !utf_iscomposing(utf_ptr2char(ml_get_cursor() + 1)))) +# define WHITECHAR(cc) (VIM_ISWHITE(cc) && (!enc_utf8 || !utf_iscomposing(utf_ptr2char(ml_get_cursor() + 1)))) #else -# define WHITECHAR(cc) vim_iswhite(cc) +# define WHITECHAR(cc) VIM_ISWHITE(cc) #endif /* @@ -6037,7 +6037,7 @@ insertchar( */ if (textwidth > 0 && (force_format - || (!vim_iswhite(c) + || (!VIM_ISWHITE(c) && !((State & REPLACE_FLAG) #ifdef FEAT_VREPLACE && !(State & VREPLACE_FLAG) @@ -6094,7 +6094,7 @@ insertchar( ++p; middle_len = copy_option_part(&p, lead_end, COM_MAX_LEN, ","); /* Don't count trailing white space for middle_len */ - while (middle_len > 0 && vim_iswhite(lead_end[middle_len - 1])) + while (middle_len > 0 && VIM_ISWHITE(lead_end[middle_len - 1])) --middle_len; /* Find the end-comment string */ @@ -6104,7 +6104,7 @@ insertchar( /* Skip white space before the cursor */ i = curwin->w_cursor.col; - while (--i >= 0 && vim_iswhite(line[i])) + while (--i >= 0 && VIM_ISWHITE(line[i])) ; i++; @@ -6293,7 +6293,7 @@ internal_format( ) { cc = gchar_cursor(); - if (vim_iswhite(cc)) + if (VIM_ISWHITE(cc)) { save_char = cc; pchar_cursor('x'); @@ -7031,13 +7031,13 @@ stop_insert( { dec_cursor(); cc = gchar_cursor(); - if (!vim_iswhite(cc)) + if (!VIM_ISWHITE(cc)) curwin->w_cursor = tpos; } auto_format(TRUE, FALSE); - if (vim_iswhite(cc)) + if (VIM_ISWHITE(cc)) { if (gchar_cursor() != NUL) inc_cursor(); @@ -7073,7 +7073,7 @@ stop_insert( if (gchar_cursor() == NUL && curwin->w_cursor.col > 0) --curwin->w_cursor.col; cc = gchar_cursor(); - if (!vim_iswhite(cc)) + if (!VIM_ISWHITE(cc)) break; if (del_char(TRUE) == FAIL) break; /* should not happen */ @@ -7223,7 +7223,7 @@ beginline(int flags) { char_u *ptr; - for (ptr = ml_get_curline(); vim_iswhite(*ptr) + for (ptr = ml_get_curline(); VIM_ISWHITE(*ptr) && !((flags & BL_FIX) && ptr[1] == NUL); ++ptr) ++curwin->w_cursor.col; } @@ -9169,7 +9169,7 @@ ins_bs( /* delete characters until we are at or before want_vcol */ while (vcol > want_vcol - && (cc = *(ml_get_cursor() - 1), vim_iswhite(cc))) + && (cc = *(ml_get_cursor() - 1), VIM_ISWHITE(cc))) ins_bs_one(&vcol); /* insert extra spaces until we are at want_vcol */ @@ -10056,7 +10056,7 @@ ins_tab(void) /* Find first white before the cursor */ fpos = curwin->w_cursor; - while (fpos.col > 0 && vim_iswhite(ptr[-1])) + while (fpos.col > 0 && VIM_ISWHITE(ptr[-1])) { --fpos.col; --ptr; @@ -10077,7 +10077,7 @@ ins_tab(void) /* Use as many TABs as possible. Beware of 'breakindent', 'showbreak' * and 'linebreak' adding extra virtual columns. */ - while (vim_iswhite(*ptr)) + while (VIM_ISWHITE(*ptr)) { i = lbr_chartabsize(NULL, (char_u *)"\t", vcol); if (vcol + i > want_vcol) @@ -10456,7 +10456,7 @@ ins_try_si(int c) ptr = ml_get(pos->lnum); i = pos->col; if (i > 0) /* skip blanks before '{' */ - while (--i > 0 && vim_iswhite(ptr[i])) + while (--i > 0 && VIM_ISWHITE(ptr[i])) ; curwin->w_cursor.lnum = pos->lnum; curwin->w_cursor.col = i; diff --git a/src/eval.c b/src/eval.c index f52de721aa..e5e787b5e0 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1516,7 +1516,7 @@ list_arg_vars(exarg_T *eap, char_u *arg, int *first) if (error || eap->skip) { arg = find_name_end(arg, NULL, NULL, FNE_INCL_BR | FNE_CHECK_START); - if (!vim_iswhite(*arg) && !ends_excmd(*arg)) + if (!VIM_ISWHITE(*arg) && !ends_excmd(*arg)) { emsg_severe = TRUE; EMSG(_(e_trailing)); @@ -1856,7 +1856,7 @@ get_lval( if (expr_start != NULL) { /* Don't expand the name when we already know there is an error. */ - if (unlet && !vim_iswhite(*p) && !ends_excmd(*p) + if (unlet && !VIM_ISWHITE(*p) && !ends_excmd(*p) && *p != '[' && *p != '.') { EMSG(_(e_trailing)); @@ -2449,7 +2449,7 @@ eval_for_line( return fi; expr = skipwhite(expr); - if (expr[0] != 'i' || expr[1] != 'n' || !vim_iswhite(expr[2])) + if (expr[0] != 'i' || expr[1] != 'n' || !VIM_ISWHITE(expr[2])) { EMSG(_("E690: Missing \"in\" after :for")); return fi; @@ -2552,7 +2552,7 @@ set_context_for_expression( { xp->xp_pattern = p; MB_PTR_BACK(arg, p); - if (vim_iswhite(*p)) + if (VIM_ISWHITE(*p)) break; } return; @@ -2698,7 +2698,7 @@ ex_unletlock( FNE_CHECK_START); if (lv.ll_name == NULL) error = TRUE; /* error but continue parsing */ - if (name_end == NULL || (!vim_iswhite(*name_end) + if (name_end == NULL || (!VIM_ISWHITE(*name_end) && !ends_excmd(*name_end))) { if (name_end != NULL) @@ -6866,7 +6866,7 @@ handle_subscript( || (**arg == '.' && rettv->v_type == VAR_DICT) || (**arg == '(' && (!evaluate || rettv->v_type == VAR_FUNC || rettv->v_type == VAR_PARTIAL))) - && !vim_iswhite(*(*arg - 1))) + && !VIM_ISWHITE(*(*arg - 1))) { if (**arg == '(') { diff --git a/src/evalfunc.c b/src/evalfunc.c index 7e03d4d3eb..21b75c1082 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -3534,7 +3534,7 @@ f_foldtext(typval_T *argvars UNUSED, typval_T *rettv) } } count = (long)(foldend - foldstart + 1); - txt = ngettext("+-%s%3ld line: ", "+-%s%3ld lines: ", count); + txt = NGETTEXT("+-%s%3ld line: ", "+-%s%3ld lines: ", count); r = alloc((unsigned)(STRLEN(txt) + STRLEN(dashes) /* for %s */ + 20 /* for %3ld */ diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 898ad41eb3..64d7f6b847 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -256,7 +256,7 @@ linelen(int *has_tab) /* find the character after the last non-blank character */ for (last = first + STRLEN(first); - last > first && vim_iswhite(last[-1]); --last) + last > first && VIM_ISWHITE(last[-1]); --last) ; save = *last; *last = NUL; @@ -400,7 +400,7 @@ ex_sort(exarg_T *eap) for (p = eap->arg; *p != NUL; ++p) { - if (vim_iswhite(*p)) + if (VIM_ISWHITE(*p)) ; else if (*p == 'i') sort_ic = TRUE; @@ -683,7 +683,7 @@ ex_retab(exarg_T *eap) did_undo = FALSE; for (;;) { - if (vim_iswhite(ptr[col])) + if (VIM_ISWHITE(ptr[col])) { if (!got_tab && num_spaces == 0) { @@ -4807,7 +4807,7 @@ do_sub(exarg_T *eap) which_pat = RE_SUBST; /* use last substitute regexp */ /* new pattern and substitution */ - if (eap->cmd[0] == 's' && *cmd != NUL && !vim_iswhite(*cmd) + if (eap->cmd[0] == 's' && *cmd != NUL && !VIM_ISWHITE(*cmd) && vim_strchr((char_u *)"0123456789cegriIp|\"", *cmd) == NULL) { /* don't accept alphanumeric for separator */ @@ -6225,7 +6225,7 @@ ex_help(exarg_T *eap) /* remove trailing blanks */ p = arg + STRLEN(arg) - 1; - while (p > arg && vim_iswhite(*p) && p[-1] != '\\') + while (p > arg && VIM_ISWHITE(*p) && p[-1] != '\\') *p-- = NUL; #ifdef FEAT_MULTI_LANG @@ -6809,7 +6809,7 @@ fix_help_buffer(void) { line = ml_get_buf(curbuf, lnum, FALSE); len = (int)STRLEN(line); - if (in_example && len > 0 && !vim_iswhite(line[0])) + if (in_example && len > 0 && !VIM_ISWHITE(line[0])) { /* End of example: non-white or '<' in first column. */ if (line[0] == '<') @@ -7421,7 +7421,7 @@ ex_helptags(exarg_T *eap) int add_help_tags = FALSE; /* Check for ":helptags ++t {dir}". */ - if (STRNCMP(eap->arg, "++t", 3) == 0 && vim_iswhite(eap->arg[3])) + if (STRNCMP(eap->arg, "++t", 3) == 0 && VIM_ISWHITE(eap->arg[3])) { add_help_tags = TRUE; eap->arg = skipwhite(eap->arg + 3); @@ -7754,7 +7754,7 @@ ex_sign(exarg_T *eap) if (VIM_ISDIGIT(*arg)) { id = getdigits(&arg); - if (!vim_iswhite(*arg) && *arg != NUL) + if (!VIM_ISWHITE(*arg) && *arg != NUL) { id = -1; arg = arg1; diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 2da38b7ca9..1b5d45d2a8 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -5183,7 +5183,7 @@ ex_language(exarg_T *eap) * Allow abbreviation, but require at least 3 characters to avoid * confusion with a two letter language name "me" or "ct". */ p = skiptowhite(eap->arg); - if ((*p == NUL || vim_iswhite(*p)) && p - eap->arg >= 3) + if ((*p == NUL || VIM_ISWHITE(*p)) && p - eap->arg >= 3) { if (STRNICMP(eap->arg, "messages", p - eap->arg) == 0) { diff --git a/src/ex_docmd.c b/src/ex_docmd.c index f107ee72e6..c270dc8970 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2013,7 +2013,7 @@ do_one_cmd( if (save_msg_silent == -1) save_msg_silent = msg_silent; ++msg_silent; - if (*ea.cmd == '!' && !vim_iswhite(ea.cmd[-1])) + if (*ea.cmd == '!' && !VIM_ISWHITE(ea.cmd[-1])) { /* ":silent!", but not "silent !cmd" */ ea.cmd = skipwhite(ea.cmd + 1); @@ -2771,7 +2771,7 @@ do_one_cmd( */ if ((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg) && (!(ea.argt & BUFNAME) || *(p = skipdigits(ea.arg)) == NUL - || vim_iswhite(*p))) + || VIM_ISWHITE(*p))) { n = getdigits(&ea.arg); ea.arg = skipwhite(ea.arg); @@ -2939,7 +2939,7 @@ do_one_cmd( else { p = ea.arg + STRLEN(ea.arg); - while (p > ea.arg && vim_iswhite(p[-1])) + while (p > ea.arg && VIM_ISWHITE(p[-1])) --p; } ea.line2 = buflist_findpat(ea.arg, p, (ea.argt & BUFUNL) != 0, @@ -3757,7 +3757,7 @@ set_one_cmd_context( } /* An argument can contain just about everything, except * characters that end the command and white space. */ - else if (c == '|' || c == '\n' || c == '"' || (vim_iswhite(c) + else if (c == '|' || c == '\n' || c == '"' || (VIM_ISWHITE(c) #ifdef SPACE_IN_FILENAME && (!(ea.argt & NOSPC) || usefilter) #endif @@ -5136,7 +5136,7 @@ expand_filename( /* skip escaped characters */ if (p[1] && (*p == '\\' || *p == Ctrl_V)) ++p; - else if (vim_iswhite(*p)) + else if (VIM_ISWHITE(*p)) { *errormsgp = (char_u *)_("E172: Only one file name allowed"); return FAIL; @@ -6336,7 +6336,7 @@ ex_command(exarg_T *eap) if (ASCII_ISALPHA(*p)) while (ASCII_ISALNUM(*p)) ++p; - if (!ends_excmd(*p) && !vim_iswhite(*p)) + if (!ends_excmd(*p) && !VIM_ISWHITE(*p)) { EMSG(_("E182: Invalid command name")); return; @@ -6464,7 +6464,7 @@ uc_split_args(char_u *arg, size_t *lenp) len += 2; p += 2; } - else if (p[0] == '\\' && vim_iswhite(p[1])) + else if (p[0] == '\\' && VIM_ISWHITE(p[1])) { len += 1; p += 2; @@ -6474,7 +6474,7 @@ uc_split_args(char_u *arg, size_t *lenp) len += 2; p += 1; } - else if (vim_iswhite(*p)) + else if (VIM_ISWHITE(*p)) { p = skipwhite(p); if (*p == NUL) @@ -6512,7 +6512,7 @@ uc_split_args(char_u *arg, size_t *lenp) *q++ = '\\'; p += 2; } - else if (p[0] == '\\' && vim_iswhite(p[1])) + else if (p[0] == '\\' && VIM_ISWHITE(p[1])) { *q++ = p[1]; p += 2; @@ -6522,7 +6522,7 @@ uc_split_args(char_u *arg, size_t *lenp) *q++ = '\\'; *q++ = *p++; } - else if (vim_iswhite(*p)) + else if (VIM_ISWHITE(*p)) { p = skipwhite(p); if (*p == NUL) @@ -7078,7 +7078,7 @@ parse_addr_type_arg( { char_u *err = value; - for (i = 0; err[i] != NUL && !vim_iswhite(err[i]); i++) + for (i = 0; err[i] != NUL && !VIM_ISWHITE(err[i]); i++) ; err[i] = NUL; EMSG2(_("E180: Invalid address type value: %s"), err); @@ -12264,7 +12264,7 @@ ex_match(exarg_T *eap) if (ends_excmd(*eap->arg)) end = eap->arg; else if ((STRNICMP(eap->arg, "none", 4) == 0 - && (vim_iswhite(eap->arg[4]) || ends_excmd(eap->arg[4])))) + && (VIM_ISWHITE(eap->arg[4]) || ends_excmd(eap->arg[4])))) end = eap->arg + 4; else { diff --git a/src/ex_getln.c b/src/ex_getln.c index 01286ac297..2dd8aa18e9 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -6027,7 +6027,7 @@ remove_key_from_history(void) if (p == NULL) break; ++p; - for (i = 0; p[i] && !vim_iswhite(p[i]); ++i) + for (i = 0; p[i] && !VIM_ISWHITE(p[i]); ++i) if (p[i] == '\\' && p[i + 1]) ++i; STRMOVE(p, p + i); diff --git a/src/fileio.c b/src/fileio.c index 25706cc022..00393cf7c5 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -8163,7 +8163,7 @@ event_name2nr(char_u *start, char_u **end) int len; /* the event name ends with end of line, '|', a blank or a comma */ - for (p = start; *p && !vim_iswhite(*p) && *p != ',' && *p != '|'; ++p) + for (p = start; *p && !VIM_ISWHITE(*p) && *p != ',' && *p != '|'; ++p) ; for (i = 0; event_names[i].name != NULL; ++i) { @@ -8206,7 +8206,7 @@ find_end_event( if (*arg == '*') { - if (arg[1] && !vim_iswhite(arg[1])) + if (arg[1] && !VIM_ISWHITE(arg[1])) { EMSG2(_("E215: Illegal character after *: %s"), arg); return NULL; @@ -8215,7 +8215,7 @@ find_end_event( } else { - for (pat = arg; *pat && *pat != '|' && !vim_iswhite(*pat); pat = p) + for (pat = arg; *pat && *pat != '|' && !VIM_ISWHITE(*pat); pat = p) { if ((int)event_name2nr(pat, &p) >= (int)NUM_EVENTS) { @@ -8394,7 +8394,7 @@ do_autocmd(char_u *arg_in, int forceit) * Scan over the pattern. Put a NUL at the end. */ cmd = pat; - while (*cmd && (!vim_iswhite(*cmd) || cmd[-1] == '\\')) + while (*cmd && (!VIM_ISWHITE(*cmd) || cmd[-1] == '\\')) cmd++; if (*cmd) *cmd++ = NUL; @@ -8420,7 +8420,7 @@ do_autocmd(char_u *arg_in, int forceit) * Check for "nested" flag. */ cmd = skipwhite(cmd); - if (*cmd != NUL && STRNCMP(cmd, "nested", 6) == 0 && vim_iswhite(cmd[6])) + if (*cmd != NUL && STRNCMP(cmd, "nested", 6) == 0 && VIM_ISWHITE(cmd[6])) { nested = TRUE; cmd = skipwhite(cmd + 6); @@ -8463,7 +8463,7 @@ do_autocmd(char_u *arg_in, int forceit) } else { - while (*arg && *arg != '|' && !vim_iswhite(*arg)) + while (*arg && *arg != '|' && !VIM_ISWHITE(*arg)) if (do_autocmd_event(event_name2nr(arg, &arg), pat, nested, cmd, forceit, group) == FAIL) break; @@ -8488,7 +8488,7 @@ au_get_grouparg(char_u **argp) char_u *arg = *argp; int group = AUGROUP_ALL; - for (p = arg; *p && !vim_iswhite(*p) && *p != '|'; ++p) + for (p = arg; *p && !VIM_ISWHITE(*p) && *p != '|'; ++p) ; if (p > arg) { @@ -8800,7 +8800,7 @@ do_doautocmd( /* * Loop over the events. */ - while (*arg && !vim_iswhite(*arg)) + while (*arg && !VIM_ISWHITE(*arg)) if (apply_autocmds_group(event_name2nr(arg, &arg), fname, NULL, TRUE, group, curbuf, NULL)) nothing_done = FALSE; @@ -9916,14 +9916,14 @@ set_context_in_autocmd( if (group == AUGROUP_ERROR) return NULL; /* If there only is a group name that's what we expand. */ - if (*arg == NUL && group != AUGROUP_ALL && !vim_iswhite(arg[-1])) + if (*arg == NUL && group != AUGROUP_ALL && !VIM_ISWHITE(arg[-1])) { arg = p; group = AUGROUP_ALL; } /* skip over event name */ - for (p = arg; *p != NUL && !vim_iswhite(*p); ++p) + for (p = arg; *p != NUL && !VIM_ISWHITE(*p); ++p) if (*p == ',') arg = p + 1; if (*p == NUL) @@ -9937,7 +9937,7 @@ set_context_in_autocmd( /* skip over pattern */ arg = skipwhite(p); - while (*arg && (!vim_iswhite(*arg) || arg[-1] == '\\')) + while (*arg && (!VIM_ISWHITE(*arg) || arg[-1] == '\\')) arg++; if (*arg) return arg; /* expand (next) command */ diff --git a/src/fold.c b/src/fold.c index 9597ab8317..a186bef4d7 100644 --- a/src/fold.c +++ b/src/fold.c @@ -1970,7 +1970,7 @@ get_foldtext( long count = (long)(lnume - lnum + 1); vim_snprintf((char *)buf, FOLD_TEXT_LEN, - ngettext("+--%3ld line folded ", + NGETTEXT("+--%3ld line folded ", "+--%3ld lines folded ", count), count); text = buf; @@ -1998,7 +1998,7 @@ foldtext_cleanup(char_u *str) /* Ignore leading and trailing white space in 'commentstring'. */ cms_start = skipwhite(curbuf->b_p_cms); cms_slen = (int)STRLEN(cms_start); - while (cms_slen > 0 && vim_iswhite(cms_start[cms_slen - 1])) + while (cms_slen > 0 && VIM_ISWHITE(cms_start[cms_slen - 1])) --cms_slen; /* locate "%s" in 'commentstring', use the part before and after it. */ @@ -2009,7 +2009,7 @@ foldtext_cleanup(char_u *str) cms_slen = (int)(cms_end - cms_start); /* exclude white space before "%s" */ - while (cms_slen > 0 && vim_iswhite(cms_start[cms_slen - 1])) + while (cms_slen > 0 && VIM_ISWHITE(cms_start[cms_slen - 1])) --cms_slen; /* skip "%s" and white space after it */ @@ -2033,7 +2033,7 @@ 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 && vim_iswhite(p[-1]); --p) + for (p = s; p > str && VIM_ISWHITE(p[-1]); --p) ; if (p >= str + cms_slen && STRNCMP(p - cms_slen, cms_start, cms_slen) == 0) @@ -2058,7 +2058,7 @@ foldtext_cleanup(char_u *str) } if (len != 0) { - while (vim_iswhite(s[len])) + while (VIM_ISWHITE(s[len])) ++len; STRMOVE(s, s + len); } diff --git a/src/getchar.c b/src/getchar.c index 3a1760f398..ef3eb51568 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -2651,7 +2651,7 @@ vgetorpeek(int advance) ptr = ml_get_curline(); while (col < curwin->w_cursor.col) { - if (!vim_iswhite(ptr[col])) + if (!VIM_ISWHITE(ptr[col])) curwin->w_wcol = vcol; vcol += lbr_chartabsize(ptr, ptr + col, (colnr_T)vcol); @@ -3324,7 +3324,7 @@ do_map( */ p = keys; do_backslash = (vim_strchr(p_cpo, CPO_BSLASH) == NULL); - while (*p && (maptype == 1 || !vim_iswhite(*p))) + while (*p && (maptype == 1 || !VIM_ISWHITE(*p))) { if ((p[0] == Ctrl_V || (do_backslash && p[0] == '\\')) && p[1] != NUL) @@ -3429,7 +3429,7 @@ do_map( } /* An abbreviation cannot contain white space. */ for (n = 0; n < len; ++n) - if (vim_iswhite(keys[n])) + if (VIM_ISWHITE(keys[n])) { retval = 1; goto theend; @@ -5043,7 +5043,7 @@ put_escstr(FILE *fd, char_u *strstart, int what) * interpreted as the start of a special key name. * A space in the lhs of a :map needs a CTRL-V. */ - if (what == 2 && (vim_iswhite(c) || c == '"' || c == '\\')) + if (what == 2 && (VIM_ISWHITE(c) || c == '"' || c == '\\')) { if (putc('\\', fd) < 0) return FAIL; @@ -4967,7 +4967,7 @@ ex_gui(exarg_T *eap) */ if (arg[0] == '-' && (arg[1] == 'f' || arg[1] == 'b') - && (arg[2] == NUL || vim_iswhite(arg[2]))) + && (arg[2] == NUL || VIM_ISWHITE(arg[2]))) { gui.dofork = (arg[1] == 'b'); eap->arg = skipwhite(eap->arg + 2); diff --git a/src/gui_gtk.c b/src/gui_gtk.c index d22a3ce5f8..c175dd31e9 100644 --- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -51,9 +51,6 @@ # ifdef _ # undef _ # endif -# ifdef ngettext -# undef ngettext -# endif # ifdef N_ # undef N_ # endif diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 4bcdc50d19..c00b3d6c49 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -35,9 +35,6 @@ # ifdef _ # undef _ # endif -# ifdef ngettext -# undef ngettext -# endif # ifdef N_ # undef N_ # endif diff --git a/src/gui_w32.c b/src/gui_w32.c index cd9f31e215..fc566abee9 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -7112,7 +7112,7 @@ gui_mch_dialog( #else l = 1; #endif - if (l == 1 && vim_iswhite(*pend) + if (l == 1 && VIM_ISWHITE(*pend) && textWidth > maxDialogWidth * 3 / 4) last_white = pend; textWidth += GetTextWidthEnc(hdc, pend, l); @@ -8581,6 +8581,7 @@ gui_mch_enable_beval_area(BalloonEval *beval) gui_mch_post_balloon(BalloonEval *beval, char_u *mesg) { POINT pt; + // TRACE0("gui_mch_post_balloon {{{"); if (beval->showState == ShS_SHOWING) return; @@ -8588,8 +8589,8 @@ gui_mch_post_balloon(BalloonEval *beval, char_u *mesg) ScreenToClient(s_textArea, &pt); if (abs(beval->x - pt.x) < 3 && abs(beval->y - pt.y) < 3) - /* cursor is still here */ { + /* cursor is still here */ gui_mch_disable_beval_area(cur_beval); beval->showState = ShS_SHOWING; make_tooltip(beval, (char *)mesg, pt); diff --git a/src/if_cscope.c b/src/if_cscope.c index 5b384982e3..7a533230f3 100644 --- a/src/if_cscope.c +++ b/ |