summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/charset.c2
-rw-r--r--src/diff.c16
-rw-r--r--src/edit.c32
-rw-r--r--src/eval.c12
-rw-r--r--src/evalfunc.c2
-rw-r--r--src/ex_cmds.c16
-rw-r--r--src/ex_cmds2.c2
-rw-r--r--src/ex_docmd.c24
-rw-r--r--src/ex_getln.c2
-rw-r--r--src/fileio.c22
-rw-r--r--src/fold.c10
-rw-r--r--src/getchar.c8
-rw-r--r--src/gui.c2
-rw-r--r--src/gui_gtk.c3
-rw-r--r--src/gui_gtk_x11.c3
-rw-r--r--src/gui_w32.c5
-rw-r--r--src/if_cscope.c2
-rw-r--r--src/macros.h6
-rw-r--r--src/mbyte.c2
-rw-r--r--src/menu.c24
-rw-r--r--src/message.c2
-rw-r--r--src/misc1.c76
-rw-r--r--src/misc2.c2
-rw-r--r--src/normal.c14
-rw-r--r--src/ops.c16
-rw-r--r--src/option.c19
-rw-r--r--src/os_unix.c2
-rw-r--r--src/os_win32.c6
-rw-r--r--src/quickfix.c2
-rw-r--r--src/regexp.c4
-rw-r--r--src/regexp_nfa.c4
-rw-r--r--src/screen.c4
-rw-r--r--src/search.c24
-rw-r--r--src/spell.c16
-rw-r--r--src/syntax.c22
-rw-r--r--src/tag.c4
-rw-r--r--src/userfunc.c2
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h11
39 files changed, 213 insertions, 214 deletions
diff --git a/src/charset.c b/src/charset.c
index 18a693547..2091d233b 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 8c70e0cab..246c4e09e 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 45eaf0ff2..35fa23b7d 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 f52de721a..e5e787b5e 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 7e03d4d3e..21b75c108 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 898ad41eb..64d7f6b84 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 2da38b7ca..1b5d45d2a 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 f107ee72e..c270dc897 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 01286ac29..2dd8aa18e 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 25706cc02..00393cf7c 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 9597ab831..a186bef4d 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 3a1760f39..ef3eb5156 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;
diff --git a/src/gui.c b/src/gui.c
index 34f9f2045..a4853dce8 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -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 d22a3ce5f..c175dd31e 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 4bcdc50d1..c00b3d6c4 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 cd9f31e21..fc566abee 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 5b384982e..7a533230f 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -781,7 +781,7 @@ cs_create_cmd(char *csoption, char *pattern)
* they may want to use the leading white space. */
pat = pattern;
if (search != 4 && search != 6)
- while vim_iswhite(*pat)
+ while VIM_ISWHITE(*pat)
++pat;
if ((cmd = (char *)alloc((unsigned)(strlen(pat) + 2))) == NULL)
diff --git a/src/macros.h b/src/macros.h
index 97e7e8322..8ebc8ceb8 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -46,6 +46,12 @@
#define LTOREQ_POS(a, b) (LT_POS(a, b) || EQUAL_POS(a, b))
/*
+ * VIM_ISWHITE() is used for "^" and the like. It differs from isspace()
+ * because it doesn't include <CR> and <LF> and the like.
+ */
+#define VIM_ISWHITE(x) ((x) == ' ' || (x) == '\t')
+
+/*
* LINEEMPTY() - return TRUE if the line is empty
*/
#define LINEEMPTY(p) (*ml_get(p) == NUL)
diff --git a/src/mbyte.c b/src/mbyte.c
index d9bca6b07..7396a7c38 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -886,7 +886,7 @@ mb_get_class_buf(char_u *p, buf_T *buf)
{
if (MB_BYTE2LEN(p[0]) == 1)
{
- if (p[0] == NUL || vim_iswhite(p[0]))
+ if (p[0] == NUL || VIM_ISWHITE(p[0]))
return 0;
if (vim_iswordc_buf(p[0], buf))
return 2;
diff --git a/src/menu.c b/src/menu.c
index b1b4ec7d4..07cf57ec4 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -167,9 +167,9 @@ ex_menu(
for (p = arg; *p; ++p)
if (!VIM_ISDIGIT(*p) && *p != '.')
break;
- if (vim_iswhite(*p))
+ if (VIM_ISWHITE(*p))
{
- for (i = 0; i < MENUDEPTH && !vim_iswhite(*arg); ++i)
+ for (i = 0; i < MENUDEPTH && !VIM_ISWHITE(*arg); ++i)
{
pri_tab[i] = getdigits(&arg);
if (pri_tab[i] == 0)
@@ -193,12 +193,12 @@ ex_menu(
/*
* Check for "disable" or "enable" argument.
*/
- if (STRNCMP(arg, "enable", 6) == 0 && vim_iswhite(arg[6]))
+ if (STRNCMP(arg, "enable", 6) == 0 && VIM_ISWHITE(arg[6]))
{
enable = TRUE;
arg = skipwhite(arg + 6);
}
- else if (STRNCMP(arg, "disable", 7) == 0 && vim_iswhite(arg[7]))
+ else if (STRNCMP(arg, "disable", 7) == 0 && VIM_ISWHITE(arg[7]))
{
enable = FALSE;
arg = skipwhite(arg + 7);
@@ -1219,24 +1219,24 @@ set_context_in_menu_cmd(
if (!VIM_ISDIGIT(*p) && *p != '.')
break;
- if (!vim_iswhite(*p))
+ if (!VIM_ISWHITE(*p))
{
if (STRNCMP(arg, "enable", 6) == 0
- && (arg[6] == NUL || vim_iswhite(arg[6])))
+ && (arg[6] == NUL || VIM_ISWHITE(arg[6])))
p = arg + 6;
else if (STRNCMP(arg, "disable", 7) == 0
- && (arg[7] == NUL || vim_iswhite(arg[7])))
+ && (arg[7] == NUL || VIM_ISWHITE(arg[7])))
p = arg + 7;
else
p = arg;
}
- while (*p != NUL && vim_iswhite(*p))
+ while (*p != NUL && VIM_ISWHITE(*p))
++p;
arg = after_dot = p;
- for (; *p && !vim_iswhite(*p); ++p)
+ for (; *p && !VIM_ISWHITE(*p); ++p)
{
if ((*p == '\\' || *p == Ctrl_V) && p[1] != NUL)
p++;
@@ -1247,7 +1247,7 @@ set_context_in_menu_cmd(
/* ":tearoff" and ":popup" only use menus, not entries */
expand_menus = !((*cmd == 't' && cmd[1] == 'e') || *cmd == 'p');
expand_emenu = (*cmd == 'e');
- if (expand_menus && vim_iswhite(*p))
+ if (expand_menus && VIM_ISWHITE(*p))
return NULL; /* TODO: check for next command? */
if (*p == NUL) /* Complete the menu name */
{
@@ -2432,7 +2432,7 @@ ex_menutranslate(exarg_T *eap UNUSED)
static char_u *
menu_skip_part(char_u *p)
{
- while (*p != NUL && *p != '.' && !vim_iswhite(*p))
+ while (*p != NUL && *p != '.' && !VIM_ISWHITE(*p))
{
if ((*p == '\\' || *p == Ctrl_V) && p[1] != NUL)
++p;
@@ -2500,7 +2500,7 @@ menu_translate_tab_and_shift(char_u *arg_start)
{
char_u *arg = arg_start;
- while (*arg && !vim_iswhite(*arg))
+ while (*arg && !VIM_ISWHITE(*arg))
{
if ((*arg == '\\' || *arg == Ctrl_V) && arg[1] != NUL)
arg++;
diff --git a/src/message.c b/src/message.c
index 06f8cb9f1..5379b5b2e 100644
--- a/src/message.c
+++ b/src/message.c
@@ -1789,7 +1789,7 @@ msg_prt_line(char_u *s, int list)
if (list && lcs_trail)
{
trail = s + STRLEN(s);
- while (trail > s && vim_iswhite(trail[-1]))
+ while (trail > s && VIM_ISWHITE(trail[-1]))
--trail;
}
diff --git a/src/misc1.c b/src/misc1.c
index 97c333af6..3379e757d 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -139,7 +139,7 @@ set_indent(
ind_done = 0;
/* count as many characters as we can use */
- while (todo > 0 && vim_iswhite(*p))
+ while (todo > 0 && VIM_ISWHITE(*p))
{
if (*p == TAB)
{
@@ -202,7 +202,7 @@ set_indent(
}
/* Return if the indent is OK already. */
- if (!doit && !vim_iswhite(*p) && !(flags & SIN_INSERT))
+ if (!doit && !VIM_ISWHITE(*p) && !(flags & SIN_INSERT))
return FALSE;
/* Allocate memory for the new line. */
@@ -234,7 +234,7 @@ set_indent(
/* Skip over any additional white space (useful when newindent is less
* than old) */
- while (vim_iswhite(*p))
+ while (VIM_ISWHITE(*p))
++p;
}
@@ -258,7 +258,7 @@ set_indent(
p = oldline;
ind_done = 0;
- while (todo > 0 && vim_iswhite(*p))
+ while (todo > 0 && VIM_ISWHITE(*p))
{
if (*p == TAB)
{
@@ -357,7 +357,7 @@ copy_indent(int size, char_u *src)
s = src;
/* Count/copy the usable portion of the source line */
- while (todo > 0 && vim_iswhite(*s))
+ while (todo > 0 && VIM_ISWHITE(*s))
{
if (*s == TAB)
{
@@ -820,7 +820,7 @@ open_line(
{
/* Find last non-blank in line */
p = ptr + STRLEN(ptr) - 1;
- while (p > ptr && vim_iswhite(*p))
+ while (p > ptr && VIM_ISWHITE(*p))
--p;
last_char = *p;
@@ -831,7 +831,7 @@ open_line(
{
if (p > ptr)
--p;
- while (p > ptr && vim_iswhite(*p))
+ while (p > ptr && VIM_ISWHITE(*p))
--p;
}
/*
@@ -1020,7 +1020,7 @@ open_line(
* comment leader, then put a space after the middle
* comment leader on the next line.
*/
- if (!vim_iswhite(saved_line[lead_len - 1])
+ if (!VIM_ISWHITE(saved_line[lead_len - 1])
&& ((p_extra != NULL
&& (int)curwin->w_cursor.col == lead_len)
|| (p_extra == NULL
@@ -1124,7 +1124,7 @@ open_line(
{
/* find last non-white in the leader to line up with */
for (p = leader + lead_len - 1; p > leader
- && vim_iswhite(*p); --p)
+ && VIM_ISWHITE(*p); --p)
;
++p;
@@ -1180,7 +1180,7 @@ open_line(
}
else
#endif
- if (!vim_iswhite(*p))
+ if (!VIM_ISWHITE(*p))
*p = ' ';
}
}
@@ -1217,7 +1217,7 @@ open_line(
* leader by spaces. Keep Tabs, the indent must
* remain the same. */
for (p += lead_repl_len; p < leader + lead_len; ++p)
- if (!vim_iswhite(*p))
+ if (!VIM_ISWHITE(*p))
{
/* Don't put a space before a TAB. */
if (p + 1 < leader + lead_len && p[1] == TAB)
@@ -1282,7 +1282,7 @@ open_line(
/* If the leader ends in white space, don't add an
* extra space */
- if (lead_len > 0 && vim_iswhite(leader[lead_len - 1]))
+ if (lead_len > 0 && VIM_ISWHITE(leader[lead_len - 1]))
extra_space = FALSE;
leader[lead_len] = NUL;
}
@@ -1305,7 +1305,7 @@ open_line(
#endif
)
{
- while (lead_len && vim_iswhite(*leader))
+ while (lead_len && VIM_ISWHITE(*leader))
{
--lead_len;
--newcol;
@@ -1680,7 +1680,7 @@ get_leader_len(
char_u *saved_flags = NULL;
result = i = 0;
- while (vim_iswhite(line[i])) /* leading white space is ignored */
+ while (VIM_ISWHITE(line[i])) /* leading white space is ignored */
++i;
/*
@@ -1725,11 +1725,11 @@ get_leader_len(
* When string starts with white space, must have some white space
* (but the amount does not need to match, there might be a mix of
* TABs and spaces). */
- if (vim_iswhite(string[0]))
+ if (VIM_ISWHITE(string[0]))
{
- if (i == 0 || !vim_iswhite(line[i - 1]))
+ if (i == 0 || !VIM_ISWHITE(line[i - 1]))
continue; /* missing white space */
- while (vim_iswhite(string[0]))
+ while (VIM_ISWHITE(string[0]))
++string;
}
for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j)
@@ -1740,7 +1740,7 @@ get_leader_len(
/* When 'b' flag used, there must be white space or an
* end-of-line after the string in the line. */
if (vim_strchr(part_buf, COM_BLANK) != NULL
- && !vim_iswhite(line[i + j]) && line[i + j] != NUL)
+ && !VIM_ISWHITE(line[i + j]) && line[i + j] != NUL)
continue;
/* We have found a match, stop searching unless this is a middle
@@ -1785,7 +1785,7 @@ get_leader_len(
result = i;
/* Include any trailing white space. */
- while (vim_iswhite(line[i]))
+ while (VIM_ISWHITE(line[i]))
++i;
if (include_space)
@@ -1853,11 +1853,11 @@ get_last_leader_offset(char_u *line, char_u **flags)
* (but the amount does not need to match, there might be a mix of
* TABs and spaces).
*/
- if (vim_iswhite(string[0]))
+ if (VIM_ISWHITE(string[0]))
{
- if (i == 0 || !vim_iswhite(line[i - 1]))
+ if (i == 0 || !VIM_ISWHITE(line[i - 1]))
continue;
- while (vim_iswhite(string[0]))
+ while (VIM_ISWHITE(string[0]))
++string;
}
for (j = 0; string[j] != NUL && string[j] == line[i + j]; ++j)
@@ -1870,7 +1870,7 @@ get_last_leader_offset(char_u *line, char_u **flags)
* end-of-line after the string in the line.
*/
if (vim_strchr(part_buf, COM_BLANK) != NULL
- && !vim_iswhite(line[i + j]) && line[i + j] != NUL)
+ && !VIM_ISWHITE(line[i + j]) && line[i + j] != NUL)
{
continue;
}
@@ -1907,7 +1907,7 @@ get_last_leader_offset(char_u *line, char_u **flags)
* the comment leader correctly.
*/
- while (vim_iswhite(*com_leader))
+ while (VIM_ISWHITE(*com_leader))
++com_leader;
len1 = (int)STRLEN(com_leader);
@@ -1920,7 +1920,7 @@ get_last_leader_offset(char_u *line, char_u **flags)
continue;
string = vim_strchr(part_buf2, ':');
++string;
- while (vim_iswhite(*string))
+ while (VIM_ISWHITE(*string))
++string;
len2 = (int)STRLEN(string);
if (len2 == 0)
@@ -2694,7 +2694,7 @@ inindent(int extra)
char_u *ptr;
colnr_T col;
- for (col = 0, ptr = ml_get_curline(); vim_iswhite(*ptr); ++col)
+ for (col = 0, ptr = ml_get_curline(); VIM_ISWHITE(*ptr); ++col)
++ptr;
if (col >= curwin->w_cursor.col + extra)
return TRUE;
@@ -5777,7 +5777,7 @@ cin_is_cpp_namespace(char_u *s)
p = cin_skipcomment(skipwhite(s + 9));
while (*p != NUL)
{
- if (vim_iswhite(*p))
+ if (VIM_ISWHITE(*p))
{
has_name = TRUE; /* found end of a name */
p = cin_skipcomment(skipwhite(p));
@@ -5825,7 +5825,7 @@ cin_is_cpp_extern_c(char_u *s)
p = cin_skipcomment(skipwhite(s + 6));
while (*p != NUL)
{
- if (vim_iswhite(*p))
+ if (VIM_ISWHITE(*p))
{
p = cin_skipcomment(skipwhite(p));
}
@@ -5976,15 +5976,15 @@ cin_first_id_amount(void)
|| (len == 6 && STRNCMP(p, "signed", 6) == 0))
{
s = skipwhite(p + len);
- if ((STRNCMP(s, "int", 3) == 0 && vim_iswhite(s[3]))
- || (STRNCMP(s, "long", 4) == 0 && vim_iswhite(s[4]))
- || (STRNCMP(s, "short", 5) == 0 && vim_iswhite(s[5]))
- || (STRNCMP(s, "char", 4) == 0 && vim_iswhite(s[4])))
+ if ((STRNCMP(s, "int", 3) == 0 && VIM_ISWHITE(s[3]))
+ || (STRNCMP(s, "long", 4) == 0 && VIM_ISWHITE(s[4]))
+ || (STRNCMP(s, "short", 5) == 0 && VIM_ISWHITE(s[5]))
+ || (STRNCMP(s, "char", 4) == 0 && VIM_ISWHITE(s[4])))
p = s;
}
for (len = 0; vim_isIDc(p[len]); ++len)
;
- if (len == 0 || !vim_iswhite(p[len]) || cin_nocode(p))
+ if (len == 0 || !VIM_ISWHITE(p[len]) || cin_nocode(p))
return 0;
p = skipwhite(p + len);
@@ -6356,7 +6356,7 @@ cin_is_if_for_while_before_offset(char_u *line, int *poffset)
if (offset-- < 2)
return 0;
- while (offset > 2 && vim_iswhite(line[offset]))
+ while (offset > 2 && VIM_ISWHITE(line[offset]))
--offset;
offset -= 1;
@@ -7602,7 +7602,7 @@ get_c_indent(void)
else
{
col = our_paren_pos.col + 1;
- while (vim_iswhite(l[col]))
+ while (VIM_ISWHITE(l[col]))
col++;
if (l[col] != NUL) /* In case of trailing space */
our_paren_pos.col = col;
@@ -9449,7 +9449,7 @@ get_lisp_indent(void)
amount++;
firsttry = amount;
- while (vim_iswhite(*that))
+ while (VIM_ISWHITE(*that))
{
amount += lbr_chartabsize(line, that, (colnr_T)amount);
++that;
@@ -9472,7 +9472,7 @@ get_lisp_indent(void)
&& (*that < '0' || *that > '9')))
{
while (*that
- && (!vim_iswhite(*that)
+ && (!VIM_ISWHITE(*that)
|| quotecount
|| parencount)
&& (!((*that == '(' || *that == '[')
@@ -9495,7 +9495,7 @@ get_lisp_indent(void)
line, &that, (colnr_T)amount);
}
}
- while (vim_iswhite(*that))
+ while (VIM_ISWHITE(*that))
{
amount += lbr_chartabsize(
line, that, (colnr_T)amount);
diff --git a/src/misc2.c b/src/misc2.c
index a6f3c1e21..4777129ef 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1702,7 +1702,7 @@ del_trailing_spaces(char_u *ptr)
char_u *q;
q = ptr + STRLEN(ptr);
- while (--q > ptr && vim_iswhite(q[0]) && q[-1] != '\\' && q[-1] != Ctrl_V)
+ while (--q > ptr && VIM_ISWHITE(q[0]) && q[-1] != '\\' && q[-1] != Ctrl_V)
*q = NUL;
}
diff --git a/src/normal.c b/src/normal.c
index 7701fcf5b..6759e8e72 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -3090,7 +3090,7 @@ do_mouse(
* not a word character, try finding a match and select a (),
* {}, [], #if/#endif, etc. block. */
end_visual = curwin->w_cursor;
- while (gc = gchar_pos(&end_visual), vim_iswhite(gc))
+ while (gc = gchar_pos(&end_visual), VIM_ISWHITE(gc))
inc(&end_visual);
if (oap != NULL)
oap->motion_type = MCHAR;
@@ -3467,7 +3467,7 @@ find_ident_at_pos(
else
#endif
while (ptr[col] != NUL
- && (i == 0 ? !vim_iswordc(ptr[col]) : vim_iswhite(ptr[col]))
+ && (i == 0 ? !vim_iswordc(ptr[col]) : VIM_ISWHITE(ptr[col]))
# if defined(FEAT_BEVAL)
&& (!(find_type & FIND_EVAL) || ptr[col] != ']')
# endif
@@ -3524,7 +3524,7 @@ find_ident_at_pos(
while (col > 0
&& ((i == 0
? vim_iswordc(ptr[col - 1])
- : (!vim_iswhite(ptr[col - 1])
+ : (!VIM_ISWHITE(ptr[col - 1])
&& (!(find_type & FIND_IDENT)
|| !vim_iswordc(ptr[col - 1]))))
#if defined(FEAT_BEVAL)
@@ -3588,7 +3588,7 @@ find_ident_at_pos(
else
#endif
while ((i == 0 ? vim_iswordc(ptr[col])
- : (ptr[col] != NUL && !vim_iswhite(ptr[col])))
+ : (ptr[col] != NUL && !VIM_ISWHITE(ptr[col])))
# if defined(FEAT_BEVAL)
|| ((find_type & FIND_EVAL)
&& col <= (int)startcol
@@ -8109,7 +8109,7 @@ nv_g_cmd(cmdarg_T *cap)
{
do
i = gchar_cursor();
- while (vim_iswhite(i) && oneright() == OK);
+ while (VIM_ISWHITE(i) && oneright() == OK);
}
curwin->w_set_curswant = TRUE;
break;
@@ -8133,7 +8133,7 @@ nv_g_cmd(cmdarg_T *cap)
/* Decrease the cursor column until it's on a non-blank. */
while (curwin->w_cursor.col > 0
- && vim_iswhite(ptr[curwin->w_cursor.col]))
+ && VIM_ISWHITE(ptr[curwin->w_cursor.col]))
--curwin->w_cursor.col;
curwin->w_set_curswant = TRUE;
adjust_for_sel(cap);
@@ -8716,7 +8716,7 @@ nv_wordcmd(cmdarg_T *cap)
n = gchar_cursor();
if (n != NUL) /* not an empty line */
{
- if (vim_iswhite(n))
+ if (VIM_ISWHITE(n))
{
/*
* Reproduce a funny Vi behaviour: "cw" on a blank only
diff --git a/src/ops.c b/src/ops.c
index 23856c845..053aeca91 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -429,7 +429,7 @@ shift_block(oparg_T *oap, int amount)
#endif
++bd.textstart;
}
- for ( ; vim_iswhite(*bd.textstart); )
+ for ( ; VIM_ISWHITE(*bd.textstart); )
{
/* TODO: is passing bd.textstart for start of the line OK? */
incr = lbr_chartabsize_adv(bd.textstart, &bd.textstart,
@@ -491,7 +491,7 @@ shift_block(oparg_T *oap, int amount)
/* The character's column is in "bd.start_vcol". */
non_white_col = bd.start_vcol;
- while (vim_iswhite(*non_white))
+ while (VIM_ISWHITE(*non_white))
{
incr = lbr_chartabsize_adv(bd.textstart, &non_white, non_white_col);
non_white_col += incr;
@@ -4655,18 +4655,18 @@ same_leader(
line1 = vim_strsave(ml_get(lnum));
if (line1 != NULL)
{
- for (idx1 = 0; vim_iswhite(line1[idx1]); ++idx1)
+ for (idx1 = 0; VIM_ISWHITE(line1[idx1]); ++idx1)
;
line2 = ml_get(lnum + 1);
for (idx2 = 0; idx2 < leader2_len; ++idx2)
{
- if (!vim_iswhite(line2[idx2]))
+ if (!VIM_ISWHITE(line2[idx2]))
{
if (line1[idx1++] != line2[idx2])
break;
}
else
- while (vim_iswhite(line1[idx1]))
+ while (VIM_ISWHITE(line1[idx1]))
++idx1;
}
vim_free(line1);
@@ -5092,10 +5092,10 @@ ends_in_white(linenr_T lnum)
if (*s == NUL)
return FALSE;
- /* Don't use STRLEN() inside vim_iswhite(), SAS/C complains: "macro
+ /* Don't use STRLEN() inside VIM_ISWHITE(), SAS/C complains: "macro
* invocation may call function multiple times". */
l = STRLEN(s) - 1;
- return vim_iswhite(s[l]);
+ return VIM_ISWHITE(s[l]);
}
/*
@@ -5250,7 +5250,7 @@ block_prep(
incr = lbr_chartabsize(line, pstart, (colnr_T)bdp->start_vcol);
bdp->start_vcol += incr;
#ifdef FEAT_VISUALEXTRA
- if (vim_iswhite(*pstart))
+ if (VIM_ISWHITE(*pstart))
{
bdp->pre_whitesp += incr;
bdp->pre_whitesp_c++;
diff --git a/src/option.c b/src/option.c
index e6c05ec10..f78d48d2a 100644
--- a/src/option.c
+++ b/src/option.c
@@ -4438,7 +4438,7 @@ do_set(
afterchar = arg[len];
/* skip white space, allow ":set ai ?" */
- while (vim_iswhite(arg[len]))
+ while (VIM_ISWHITE(arg[len]))
++len;
adding = FALSE;
@@ -4562,7 +4562,7 @@ do_set(
}
}
if (vim_strchr((char_u *)"?!&<", nextchar) != NULL
- && arg[1] != NUL && !vim_iswhite(arg[1]))
+ && arg[1] != NUL && !VIM_ISWHITE(arg[1]))
{
errmsg = e_trailing;
goto skip;
@@ -4620,7 +4620,7 @@ do_set(
(void)show_one_termcode(key_name, p, TRUE);
}
if (nextchar != '?'
- && nextchar != NUL && !vim_iswhite(afterchar))
+ && nextchar != NUL && !VIM_ISWHITE(afterchar))
errmsg = e_trailing;
}
else
@@ -4660,7 +4660,7 @@ do_set(
* ":set invopt": invert
* ":set opt" or ":set noopt": set or reset
*/
- if (nextchar != NUL && !vim_iswhite(afterchar))
+ if (nextchar != NUL && !VIM_ISWHITE(afterchar))
{
errmsg = e_trailing;
goto skip;
@@ -4714,7 +4714,8 @@ do_set(
|| (long *)varp == &p_wcm)
&& (*arg == '<'
|| *arg == '^'
- || (*arg != NUL && (!arg[1] || vim_iswhite(arg[1]))
+ || (*arg != NUL
+ && (!arg[1] || VIM_ISWHITE(arg[1]))
&& !VIM_ISDIGIT(*arg))))
{
value = string_to_key(arg);
@@ -4730,7 +4731,7 @@ do_set(
* hex numbers. */
vim_str2nr(arg, NULL, &i, STR2NR_ALL,
&value, NULL, 0);
- if (arg[i] != NUL && !vim_iswhite(arg[i]))
+ if (arg[i] != NUL && !VIM_ISWHITE(arg[i]))
{
errmsg = e_invarg;
goto skip;
@@ -4922,7 +4923,7 @@ do_set(
* do remove it for "\\\\machine\\path".
* The reverse is found in ExpandOldSetting().
*/
- while (*arg && !vim_iswhite(*arg))
+ while (*arg && !VIM_ISWHITE(*arg))
{
if (*arg == '\\' && arg[1] != NUL
#ifdef BACKSLASH_IN_FILENAME
@@ -5162,7 +5163,7 @@ do_set(
else
{
++arg; /* jump to after the '=' or ':' */
- for (p = arg; *p && !vim_iswhite(*p); ++p)
+ for (p = arg; *p && !VIM_ISWHITE(*p); ++p)
if (*p == '\\' && p[1] != NUL)
++p;
nextchar = *p;
@@ -5190,7 +5191,7 @@ skip:
*/
for (i = 0; i < 2 ; ++i)
{
- while (*arg != NUL && !vim_iswhite(*arg))
+ while (*arg != NUL && !VIM_ISWHITE(*arg))
if (*arg++ == '\\' && *arg != NUL)
++arg;
arg = skipwhite(arg);
diff --git a/src/os_unix.c b/src/os_unix.c
index 69868aca7..f0a562172 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -6139,7 +6139,7 @@ mch_expand_wildcards(
STRCAT(command, pat[0] + 1); /* exclude first backtick */
p = command + STRLEN(command) - 1;
*p-- = ')'; /* remove last backtick */
- while (p > command && vim_iswhite(*p))
+ while (p > command && VIM_ISWHITE(*p))
--p;
if (*p == '&') /* remove trailing '&' */
{
diff --git a/src/os_win32.c b/src/os_win32.c
index 6016f8631..edd38e3a9 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -4706,7 +4706,7 @@ mch_call_shell(
if (*cmdbase == '(')
++cmdbase;
- if ((STRNICMP(cmdbase, "start", 5) == 0) && vim_iswhite(cmdbase[5]))
+ if ((STRNICMP(cmdbase, "start", 5) == 0) && VIM_ISWHITE(cmdbase[5]))
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
@@ -4724,14 +4724,14 @@ mch_call_shell(
cmdbase = skipwhite(cmdbase + 5);
if ((STRNICMP(cmdbase, "/min", 4) == 0)
- && vim_iswhite(cmdbase[4]))
+ && VIM_ISWHITE(cmdbase[4]))
{
cmdbase = skipwhite(cmdbase + 4);
si.dwFlags = STARTF_USESHOWWINDOW;
si.wShowWindow = SW_SHOWMINNOACTIVE;
}
else if ((STRNICMP(cmdbase, "/b", 2) == 0)
- && vim_iswhite(cmdbase[2]))
+ && VIM_ISWHITE(cmdbase[2]))
{
cmdbase = skipwhite(cmdbase + 2);
flags = CREATE_NO_WINDOW;
diff --git a/src/quickfix.c b/src/quickfix.c
index e4ea401ec..090b046dd 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -2608,7 +2608,7 @@ qf_fmt_text(char_u *text, char_u *buf, int bufsize)
{
buf[i] = ' ';
while (*++p != NUL)
- if (!vim_iswhite(*p) && *p != '\n')
+ if (!VIM_ISWHITE(*p) && *p != '\n')
break;
}
else
diff --git a/src/regexp.c b/src/regexp.c
index 57f3423c5..91b8015bb 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -4523,14 +4523,14 @@ regmatch(
break;
case WHITE:
- if (!vim_iswhite(c))
+ if (!VIM_ISWHITE(c))
status = RA_NOMATCH;
else
ADVANCE_REGINPUT();
break;
case NWHITE:
- if (c == NUL || vim_iswhite(c))
+ if (c == NUL || VIM_ISWHITE(c))
status = RA_NOMATCH;
else
ADVANCE_REGINPUT();
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index 13f5065e8..20ef1869e 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -6351,12 +6351,12 @@ nfa_regmatch(
break;
case NFA_WHITE: /* \s */
- result = vim_iswhite(curc);
+ result = VIM_ISWHITE(curc);
ADD_STATE_IF_MATCH(t->state);
break;
case NFA_NWHITE: /* \S */
- result = curc != NUL && !vim_iswhite(curc);
+ result = curc != NUL && !VIM_ISWHITE(curc);
ADD_STATE_IF_MATCH(t->state);
break;
diff --git a/src/screen.c b/src/screen.c
index a609076f1..b4fff18d9 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3371,7 +3371,7 @@ win_line(
if (lcs_trail)
{
trailcol = (colnr_T)STRLEN(ptr);
- while (trailcol > (colnr_T)0 && vim_iswhite(ptr[trailcol - 1]))
+ while (trailcol > (colnr_T)0 && VIM_ISWHITE(ptr[trailcol - 1]))
--trailcol;
trailcol += (colnr_T) (ptr - line);
}
@@ -4577,7 +4577,7 @@ win_line(
# else
c_extra = ' ';
# endif
- if (vim_iswhite(c))
+ if (VIM_ISWHITE(c))
{
#ifdef FEAT_CONCEAL
if (c == TAB)
diff --git a/src/search.c b/src/search.c
index 51d876019..ae365aec7 100644
--- a/src/search.c
+++ b/src/search.c
@@ -3276,7 +3276,7 @@ find_first_blank(pos_T *posp)
while (decl(posp) != -1)
{
c = gchar_pos(posp);
- if (!vim_iswhite(c))
+ if (!VIM_ISWHITE(c))
{
incl(posp);
break;
@@ -3515,7 +3515,7 @@ extend:
while (LT_POS(pos, curwin->w_cursor))
{
c = gchar_pos(&pos);
- if (!vim_iswhite(c))
+ if (!VIM_ISWHITE(c))
{
at_start_sent = FALSE;
break;
@@ -3538,7 +3538,7 @@ extend:
if (at_start_sent)
find_first_blank(&curwin->w_cursor);
c = gchar_cursor();
- if (!at_start_sent || (!include && !vim_iswhite(c)))
+ if (!at_start_sent || (!include && !VIM_ISWHITE(c)))
findsent(BACKWARD, 1L);
at_start_sent = !at_start_sent;
}
@@ -3561,7 +3561,7 @@ extend:
while (LT_POS(pos, curwin->w_cursor))
{
c = gchar_pos(&pos);
- if (!vim_iswhite(c))
+ if (!VIM_ISWHITE(c))
{
at_start_sent = TRUE;
break;
@@ -3587,7 +3587,7 @@ extend:
* If the cursor started on a blank, check if it is just before the start
* of the next sentence.
*/
- while (c = gchar_pos(&pos), vim_iswhite(c)) /* vim_iswhite() is a macro */
+ while (c = gchar_pos(&pos), VIM_ISWHITE(c)) /* VIM_ISWHITE() is a macro */
incl(&pos);
if (EQUAL_POS(pos, curwin->w_cursor))
{
@@ -3623,11 +3623,11 @@ extend:
if (start_blank)
{
find_first_blank(&curwin->w_cursor);
- c = gchar_pos(&curwin->w_cursor); /* vim_iswhite() is a macro */
- if (vim_iswhite(c))
+ c = gchar_pos(&curwin->w_cursor); /* VIM_ISWHITE() is a macro */
+ if (VIM_ISWHITE(c))
decl(&curwin->w_cursor);
}
- else if (c = gchar_cursor(), !vim_iswhite(c))
+ else if (c = gchar_cursor(), !VIM_ISWHITE(c))
find_first_blank(&start_pos);
}
@@ -3974,7 +3974,7 @@ again:
*/
inc_cursor();
p = ml_get_cursor();
- for (cp = p; *cp != NUL && *cp != '>' && !vim_iswhite(*cp); MB_PTR_ADV(cp))
+ for (cp = p; *cp != NUL && *cp != '>' && !VIM_ISWHITE(*cp); MB_PTR_ADV(cp))
;
len = (int)(cp - p);
if (len == 0)
@@ -4496,11 +4496,11 @@ current_quote(
* the starting quote. */
if (include)
{
- if (vim_iswhite(line[col_end + 1]))
- while (vim_iswhite(line[col_end + 1]))
+ if (VIM_ISWHITE(line[col_end + 1]))
+ while (VIM_ISWHITE(line[col_end + 1]))
++col_end;
else
- while (col_start > 0 && vim_iswhite(line[col_start - 1]))
+ while (col_start > 0 && VIM_ISWHITE(line[col_start - 1]))
--col_start;
}
diff --git a/src/spell.c b/src/spell.c
index 62299dca6..1700bba0e 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -4528,7 +4528,7 @@ suggest_trie_walk(
fword_ends = (fword[sp->ts_fidx] == NUL
|| (soundfold
- ? vim_iswhite(fword[sp->ts_fidx])
+ ? VIM_ISWHITE(fword[sp->ts_fidx])
: !spell_iswordp(fword + sp->ts_fidx, curwin)));
tword[sp->ts_twordlen] = NUL;
@@ -6231,7 +6231,7 @@ stp_sal_score(
* sounds like "t h" while "the" sounds like "@". Avoid that by
* removing the space. Don't do it when the good word also contains a
* space. */
- if (vim_iswhite(su->su_badptr[su->su_badlen])
+ if (VIM_ISWHITE(su->su_badptr[su->su_badlen])
&& *skiptowhite(stp->st_word) == NUL)
for (p = fword; *(p = skiptowhite(p)) != NUL; )
STRMOVE(p, p + 1);
@@ -7106,7 +7106,7 @@ spell_soundfold_sofo(slang_T *slang, char_u *inword, char_u *res)
for (s = inword; *s != NUL; )
{
c = mb_cptr2char_adv(&s);
- if (enc_utf8 ? utf_class(c) == 0 : vim_iswhite(c))
+ if (enc_utf8 ? utf_class(c) == 0 : VIM_ISWHITE(c))
c = ' ';
else if (c < 256)
c = slang->sl_sal_first[c];
@@ -7147,7 +7147,7 @@ spell_soundfold_sofo(slang_T *slang, char_u *inword, char_u *res)
/* The sl_sal_first[] table contains the translation. */
for (s = inword; (c = *s) != NUL; ++s)
{
- if (vim_iswhite(c))
+ if (VIM_ISWHITE(c))
c = ' ';
else
c = slang->sl_sal_first[c];
@@ -7185,7 +7185,7 @@ spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res)
t = word;
while (*s != NUL)
{
- if (vim_iswhite(*s))
+ if (VIM_ISWHITE(*s))
{
*t++ = ' ';
s = skipwhite(s);
@@ -7409,7 +7409,7 @@ spell_soundfold_sal(slang_T *slang, char_u *inword, char_u *res)
}
}
}
- else if (vim_iswhite(c))
+ else if (VIM_ISWHITE(c))
{
c = ' ';
k = 1;
@@ -7474,7 +7474,7 @@ spell_soundfold_wsal(slang_T *slang, char_u *inword, char_u *res)
c = mb_cptr2char_adv(&s);
if (slang->sl_rem_accents)
{
- if (enc_utf8 ? utf_class(c) == 0 : vim_iswhite(c))
+ if (enc_utf8 ? utf_class(c) == 0 : VIM_ISWHITE(c))
{
if (did_white)
continue;
@@ -7715,7 +7715,7 @@ spell_soundfold_wsal(slang_T *slang, char_u *inword, char_u *res)
}
}
}
- else if (vim_iswhite(c))
+ else if (VIM_ISWHITE(c))
{
c = ' ';
k = 1;
diff --git a/src/syntax.c b/src/syntax.c
index 12de24459..d4aff5279 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -2308,7 +2308,7 @@ syn_current_attr(
{
line = syn_getcurline();
if (((current_next_flags & HL_SKIPWHITE)
- && vim_iswhite(line[current_col]))
+ && VIM_ISWHITE(line[current_col]))
|| ((current_next_flags & HL_SKIPEMPTY)
&& *line == NUL))
break;
@@ -4631,7 +4631,7 @@ get_syn_options(
for (i = 0, len = 0; p[i] != NUL; i += 2, ++len)
if (arg[len] != p[i] && arg[len] != p[i + 1])
break;
- if (p[i] == NUL && (vim_iswhite(arg[len])
+ if (p[i] == NUL && (VIM_ISWHITE(arg[len])
|| (flagtab[fidx].argtype > 0
? arg[len] == '='
: ends_excmd(arg[len]))))
@@ -4905,7 +4905,7 @@ syn_cmd_keyword(exarg_T *eap, int syncing UNUSED)
if (rest == NULL || ends_excmd(*rest))
break;
/* Copy the keyword, removing backslashes, and add a NUL. */
- while (*rest != NUL && !vim_iswhite(*rest))
+ while (*rest != NUL && !VIM_ISWHITE(*rest))
{
if (*rest == '\\' && rest[1] != NUL)
++rest;
@@ -5156,7 +5156,7 @@ syn_cmd_region(
/* must be a pattern or matchgroup then */
key_end = rest;
- while (*key_end && !vim_iswhite(*key_end) && *key_end != '=')
+ while (*key_end && !VIM_ISWHITE(*key_end) && *key_end != '=')
++key_end;
vim_free(key);
key = vim_strnsave_up(rest, (int)(key_end - rest));
@@ -5640,19 +5640,19 @@ syn_cmd_cluster(exarg_T *eap, int syncing UNUSED)
for (;;)
{
if (STRNICMP(rest, "add", 3) == 0
- && (vim_iswhite(rest[3]) || rest[3] == '='))
+ && (VIM_ISWHITE(rest[3]) || rest[3] == '='))
{
opt_len = 3;
list_op = CLUSTER_ADD;
}
else if (STRNICMP(rest, "remove", 6) == 0
- && (vim_iswhite(rest[6]) || rest[6] == '='))
+ && (VIM_ISWHITE(rest[6]) || rest[6] == '='))
{
opt_len = 6;
list_op = CLUSTER_SUBTRACT;
}
else if (STRNICMP(rest, "contains", 8) == 0
- && (vim_iswhite(rest[8]) || rest[8] == '='))
+ && (VIM_ISWHITE(rest[8]) || rest[8] == '='))
{
opt_len = 8;
list_op = CLUSTER_REPLACE;
@@ -5793,7 +5793,7 @@ get_syn_pattern(char_u *arg, synpat_T *ci)
}
} while (idx >= 0);
- if (!ends_excmd(*end) && !vim_iswhite(*end))
+ if (!ends_excmd(*end) && !VIM_ISWHITE(*end))
{
EMSG2(_("E402: Garbage after pattern: %s"), arg);
return NULL;
@@ -6014,7 +6014,7 @@ get_id_list(
count = 0;
while (!ends_excmd(*p))
{
- for (end = p; *end && !vim_iswhite(*end) && *end != ','; ++end)
+ for (end = p; *end && !VIM_ISWHITE(*end) && *end != ','; ++end)
;
name = alloc((int)(end - p + 3)); /* leave room for "^$" */
if (name == NULL)
@@ -7466,7 +7466,7 @@ do_highlight(
* Isolate the key ("term", "ctermfg", "ctermbg", "font", "guifg" or
* "guibg").
*/
- while (*linep && !vim_iswhite(*linep) && *linep != '=')
+ while (*linep && !VIM_ISWHITE(*linep) && *linep != '=')
++linep;
vim_free(key);
key = vim_strnsave_up(key_start, (int)(linep - key_start));
@@ -9721,7 +9721,7 @@ highlight_changed(void)
attr = 0;
for ( ; *p && *p != ','; ++p) /* parse upto comma */
{
- if (vim_iswhite(*p)) /* ignore white space */
+ if (VIM_ISWHITE(*p)) /* ignore white space */
continue;
if (attr > HL_ALL) /* Combination with ':' is not allowed. */
diff --git a/src/tag.c b/src/tag.c
index b92ab93bb..af6196182 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -2005,7 +2005,7 @@ parse_line:
#endif
if ( fnamencmp(lbuf, tagp.fname, p - lbuf) == 0
#ifdef FEAT_TAG_ANYWHITE
- && vim_iswhite(tagp.fname[p - lbuf])
+ && VIM_ISWHITE(tagp.fname[p - lbuf])
#else
&& tagp.fname[p - lbuf] == TAB
#endif
@@ -3932,7 +3932,7 @@ get_tags(list_T *list, char_u *pat)
else if (STRNCMP(p, "file:", 5) == 0)
/* skip "file:" (static tag) */
p += 4;
- else if (!vim_iswhite(*p))
+ else if (!VIM_ISWHITE(*p))
{
char_u *s, *n;
int len;
diff --git a/src/userfunc.c b/src/userfunc.c
index 1bf028fa4..07cc47f7c 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -2104,7 +2104,7 @@ ex_function(exarg_T *eap)
else
{
/* skip ':' and blanks*/
- for (p = theline; vim_iswhite(*p) || *p == ':'; ++p)
+ for (p = theline; VIM_ISWHITE(*p) || *p == ':'; ++p)
;
/* Check for "endfunction". */
diff --git a/src/version.c b/src/version.c
index 2c40f30b8..1574f9cbd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 452,
+/**/
451,
/**/
450,
diff --git a/src/vim.h b/src/vim.h
index b1faf234d..faafc3fe2 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -588,7 +588,7 @@ extern int (*dyn_libintl_putenv)(const char *envstring);
#ifdef FEAT_GETTEXT
# ifdef DYNAMIC_GETTEXT
# define _(x) (*dyn_libintl_gettext)((char *)(x))
-# define ngettext(x, xs, n) (*dyn_libintl_ngettext)((char *)(x), (char *)(xs), (n))
+# define NGETTEXT(x, xs, n) (*dyn_libintl_ngettext)((char *)(x), (char *)(xs), (n))
# define N_(x) x
# define bindtextdomain(domain, dir) (*dyn_libintl_bindtextdomain)((domain), (dir))
# define bind_textdomain_codeset(domain, codeset) (*dyn_libintl_bind_textdomain_codeset)((domain), (codeset))
@@ -601,6 +601,7 @@ extern int (*dyn_libintl_putenv)(const char *envstring);
# else
# include <libintl.h>
# define _(x) gettext((char *)(x))
+# define NGETTEXT(x, xs, n) ngettext((x), (xs), (n))
# ifdef gettext_noop
# define N_(x) gettext_noop(x)
# else
@@ -609,7 +610,7 @@ extern int (*dyn_libintl_putenv)(const char *envstring);
# endif
#else
# define _(x) ((char *)(x))
-# define ngettext(x, xs, n) (((n) == 1) ? (char *)(x) : (char *)(xs))
+# define NGETTEXT(x, xs, n) (((n) == 1) ? (char *)(x) : (char *)(xs))
# define N_(x) x
# ifdef bindtextdomain
# undef bindtextdomain
@@ -1764,12 +1765,6 @@ void *vim_memset(void *, int, size_t);
#define term_str(n) term_strings[(int)(n)]
/*
- * vim_iswhite() is used for "^" and the like. It differs from isspace()
- * because it doesn't include <CR> and <LF> and the like.
- */
-#define vim_iswhite(x) ((x) == ' ' || (x) == '\t')
-
-/*
* EXTERN is only defined in main.c. That's where global variables are
* actually defined and initialized.
*/