Skip to content

Commit 1c46544

Browse files
committed
patch 8.0.0452: some macros are in lower case
Problem: Some macros are in lower case. Solution: Make a few more macros upper case.
1 parent 91acfff commit 1c46544

39 files changed

Lines changed: 213 additions & 214 deletions

src/charset.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,7 @@ skipwhite(char_u *q)
15301530
{
15311531
char_u *p = q;
15321532

1533-
while (vim_iswhite(*p)) /* skip to next non-white */
1533+
while (VIM_ISWHITE(*p)) /* skip to next non-white */
15341534
++p;
15351535
return p;
15361536
}

src/diff.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,7 @@ diff_cmp(char_u *s1, char_u *s2)
16671667
p2 = s2;
16681668
while (*p1 != NUL && *p2 != NUL)
16691669
{
1670-
if (vim_iswhite(*p1) && vim_iswhite(*p2))
1670+
if (VIM_ISWHITE(*p1) && VIM_ISWHITE(*p2))
16711671
{
16721672
p1 = skipwhite(p1);
16731673
p2 = skipwhite(p2);
@@ -1994,8 +1994,8 @@ diff_find_change(
19941994
while (line_org[si_org] != NUL)
19951995
{
19961996
if ((diff_flags & DIFF_IWHITE)
1997-
&& vim_iswhite(line_org[si_org])
1998-
&& vim_iswhite(line_new[si_new]))
1997+
&& VIM_ISWHITE(line_org[si_org])
1998+
&& VIM_ISWHITE(line_new[si_new]))
19991999
{
20002000
si_org = (int)(skipwhite(line_org + si_org) - line_org);
20012001
si_new = (int)(skipwhite(line_new + si_new) - line_new);
@@ -2029,14 +2029,14 @@ diff_find_change(
20292029
&& ei_org >= 0 && ei_new >= 0)
20302030
{
20312031
if ((diff_flags & DIFF_IWHITE)
2032-
&& vim_iswhite(line_org[ei_org])
2033-
&& vim_iswhite(line_new[ei_new]))
2032+
&& VIM_ISWHITE(line_org[ei_org])
2033+
&& VIM_ISWHITE(line_new[ei_new]))
20342034
{
20352035
while (ei_org >= *startp
2036-
&& vim_iswhite(line_org[ei_org]))
2036+
&& VIM_ISWHITE(line_org[ei_org]))
20372037
--ei_org;
20382038
while (ei_new >= si_new
2039-
&& vim_iswhite(line_new[ei_new]))
2039+
&& VIM_ISWHITE(line_new[ei_new]))
20402040
--ei_new;
20412041
}
20422042
else
@@ -2202,7 +2202,7 @@ ex_diffgetput(exarg_T *eap)
22022202
{
22032203
/* Buffer number or pattern given. Ignore trailing white space. */
22042204
p = eap->arg + STRLEN(eap->arg);
2205-
while (p > eap->arg && vim_iswhite(p[-1]))
2205+
while (p > eap->arg && VIM_ISWHITE(p[-1]))
22062206
--p;
22072207
for (i = 0; vim_isdigit(eap->arg[i]) && eap->arg + i < p; ++i)
22082208
;

src/edit.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,7 +2149,7 @@ truncate_spaces(char_u *line)
21492149
int i;
21502150

21512151
/* find start of trailing white space */
2152-
for (i = (int)STRLEN(line) - 1; i >= 0 && vim_iswhite(line[i]); i--)
2152+
for (i = (int)STRLEN(line) - 1; i >= 0 && VIM_ISWHITE(line[i]); i--)
21532153
{
21542154
if (State & REPLACE_FLAG)
21552155
replace_join(0); /* remove a NUL from the replace stack */
@@ -2358,7 +2358,7 @@ ins_compl_accept_char(int c)
23582358
case CTRL_X_OMNI:
23592359
/* Command line and Omni completion can work with just about any
23602360
* printable character, but do stop at white space. */
2361-
return vim_isprintc(c) && !vim_iswhite(c);
2361+
return vim_isprintc(c) && !VIM_ISWHITE(c);
23622362

23632363
case CTRL_X_WHOLE_LINE:
23642364
/* For while line completion a space can be part of the line. */
@@ -5989,9 +5989,9 @@ insert_special(
59895989
#endif
59905990

59915991
#ifdef FEAT_MBYTE
5992-
# define WHITECHAR(cc) (vim_iswhite(cc) && (!enc_utf8 || !utf_iscomposing(utf_ptr2char(ml_get_cursor() + 1))))
5992+
# define WHITECHAR(cc) (VIM_ISWHITE(cc) && (!enc_utf8 || !utf_iscomposing(utf_ptr2char(ml_get_cursor() + 1))))
59935993
#else
5994-
# define WHITECHAR(cc) vim_iswhite(cc)
5994+
# define WHITECHAR(cc) VIM_ISWHITE(cc)
59955995
#endif
59965996

59975997
/*
@@ -6037,7 +6037,7 @@ insertchar(
60376037
*/
60386038
if (textwidth > 0
60396039
&& (force_format
6040-
|| (!vim_iswhite(c)
6040+
|| (!VIM_ISWHITE(c)
60416041
&& !((State & REPLACE_FLAG)
60426042
#ifdef FEAT_VREPLACE
60436043
&& !(State & VREPLACE_FLAG)
@@ -6094,7 +6094,7 @@ insertchar(
60946094
++p;
60956095
middle_len = copy_option_part(&p, lead_end, COM_MAX_LEN, ",");
60966096
/* Don't count trailing white space for middle_len */
6097-
while (middle_len > 0 && vim_iswhite(lead_end[middle_len - 1]))
6097+
while (middle_len > 0 && VIM_ISWHITE(lead_end[middle_len - 1]))
60986098
--middle_len;
60996099

61006100
/* Find the end-comment string */
@@ -6104,7 +6104,7 @@ insertchar(
61046104

61056105
/* Skip white space before the cursor */
61066106
i = curwin->w_cursor.col;
6107-
while (--i >= 0 && vim_iswhite(line[i]))
6107+
while (--i >= 0 && VIM_ISWHITE(line[i]))
61086108
;
61096109
i++;
61106110

@@ -6293,7 +6293,7 @@ internal_format(
62936293
)
62946294
{
62956295
cc = gchar_cursor();
6296-
if (vim_iswhite(cc))
6296+
if (VIM_ISWHITE(cc))
62976297
{
62986298
save_char = cc;
62996299
pchar_cursor('x');
@@ -7031,13 +7031,13 @@ stop_insert(
70317031
{
70327032
dec_cursor();
70337033
cc = gchar_cursor();
7034-
if (!vim_iswhite(cc))
7034+
if (!VIM_ISWHITE(cc))
70357035
curwin->w_cursor = tpos;
70367036
}
70377037

70387038
auto_format(TRUE, FALSE);
70397039

7040-
if (vim_iswhite(cc))
7040+
if (VIM_ISWHITE(cc))
70417041
{
70427042
if (gchar_cursor() != NUL)
70437043
inc_cursor();
@@ -7073,7 +7073,7 @@ stop_insert(
70737073
if (gchar_cursor() == NUL && curwin->w_cursor.col > 0)
70747074
--curwin->w_cursor.col;
70757075
cc = gchar_cursor();
7076-
if (!vim_iswhite(cc))
7076+
if (!VIM_ISWHITE(cc))
70777077
break;
70787078
if (del_char(TRUE) == FAIL)
70797079
break; /* should not happen */
@@ -7223,7 +7223,7 @@ beginline(int flags)
72237223
{
72247224
char_u *ptr;
72257225

7226-
for (ptr = ml_get_curline(); vim_iswhite(*ptr)
7226+
for (ptr = ml_get_curline(); VIM_ISWHITE(*ptr)
72277227
&& !((flags & BL_FIX) && ptr[1] == NUL); ++ptr)
72287228
++curwin->w_cursor.col;
72297229
}
@@ -9169,7 +9169,7 @@ ins_bs(
91699169

91709170
/* delete characters until we are at or before want_vcol */
91719171
while (vcol > want_vcol
9172-
&& (cc = *(ml_get_cursor() - 1), vim_iswhite(cc)))
9172+
&& (cc = *(ml_get_cursor() - 1), VIM_ISWHITE(cc)))
91739173
ins_bs_one(&vcol);
91749174

91759175
/* insert extra spaces until we are at want_vcol */
@@ -10056,7 +10056,7 @@ ins_tab(void)
1005610056

1005710057
/* Find first white before the cursor */
1005810058
fpos = curwin->w_cursor;
10059-
while (fpos.col > 0 && vim_iswhite(ptr[-1]))
10059+
while (fpos.col > 0 && VIM_ISWHITE(ptr[-1]))
1006010060
{
1006110061
--fpos.col;
1006210062
--ptr;
@@ -10077,7 +10077,7 @@ ins_tab(void)
1007710077

1007810078
/* Use as many TABs as possible. Beware of 'breakindent', 'showbreak'
1007910079
* and 'linebreak' adding extra virtual columns. */
10080-
while (vim_iswhite(*ptr))
10080+
while (VIM_ISWHITE(*ptr))
1008110081
{
1008210082
i = lbr_chartabsize(NULL, (char_u *)"\t", vcol);
1008310083
if (vcol + i > want_vcol)
@@ -10456,7 +10456,7 @@ ins_try_si(int c)
1045610456
ptr = ml_get(pos->lnum);
1045710457
i = pos->col;
1045810458
if (i > 0) /* skip blanks before '{' */
10459-
while (--i > 0 && vim_iswhite(ptr[i]))
10459+
while (--i > 0 && VIM_ISWHITE(ptr[i]))
1046010460
;
1046110461
curwin->w_cursor.lnum = pos->lnum;
1046210462
curwin->w_cursor.col = i;

src/eval.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ list_arg_vars(exarg_T *eap, char_u *arg, int *first)
15161516
if (error || eap->skip)
15171517
{
15181518
arg = find_name_end(arg, NULL, NULL, FNE_INCL_BR | FNE_CHECK_START);
1519-
if (!vim_iswhite(*arg) && !ends_excmd(*arg))
1519+
if (!VIM_ISWHITE(*arg) && !ends_excmd(*arg))
15201520
{
15211521
emsg_severe = TRUE;
15221522
EMSG(_(e_trailing));
@@ -1856,7 +1856,7 @@ get_lval(
18561856
if (expr_start != NULL)
18571857
{
18581858
/* Don't expand the name when we already know there is an error. */
1859-
if (unlet && !vim_iswhite(*p) && !ends_excmd(*p)
1859+
if (unlet && !VIM_ISWHITE(*p) && !ends_excmd(*p)
18601860
&& *p != '[' && *p != '.')
18611861
{
18621862
EMSG(_(e_trailing));
@@ -2449,7 +2449,7 @@ eval_for_line(
24492449
return fi;
24502450

24512451
expr = skipwhite(expr);
2452-
if (expr[0] != 'i' || expr[1] != 'n' || !vim_iswhite(expr[2]))
2452+
if (expr[0] != 'i' || expr[1] != 'n' || !VIM_ISWHITE(expr[2]))
24532453
{
24542454
EMSG(_("E690: Missing \"in\" after :for"));
24552455
return fi;
@@ -2552,7 +2552,7 @@ set_context_for_expression(
25522552
{
25532553
xp->xp_pattern = p;
25542554
MB_PTR_BACK(arg, p);
2555-
if (vim_iswhite(*p))
2555+
if (VIM_ISWHITE(*p))
25562556
break;
25572557
}
25582558
return;
@@ -2698,7 +2698,7 @@ ex_unletlock(
26982698
FNE_CHECK_START);
26992699
if (lv.ll_name == NULL)
27002700
error = TRUE; /* error but continue parsing */
2701-
if (name_end == NULL || (!vim_iswhite(*name_end)
2701+
if (name_end == NULL || (!VIM_ISWHITE(*name_end)
27022702
&& !ends_excmd(*name_end)))
27032703
{
27042704
if (name_end != NULL)
@@ -6866,7 +6866,7 @@ handle_subscript(
68666866
|| (**arg == '.' && rettv->v_type == VAR_DICT)
68676867
|| (**arg == '(' && (!evaluate || rettv->v_type == VAR_FUNC
68686868
|| rettv->v_type == VAR_PARTIAL)))
6869-
&& !vim_iswhite(*(*arg - 1)))
6869+
&& !VIM_ISWHITE(*(*arg - 1)))
68706870
{
68716871
if (**arg == '(')
68726872
{

src/evalfunc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3534,7 +3534,7 @@ f_foldtext(typval_T *argvars UNUSED, typval_T *rettv)
35343534
}
35353535
}
35363536
count = (long)(foldend - foldstart + 1);
3537-
txt = ngettext("+-%s%3ld line: ", "+-%s%3ld lines: ", count);
3537+
txt = NGETTEXT("+-%s%3ld line: ", "+-%s%3ld lines: ", count);
35383538
r = alloc((unsigned)(STRLEN(txt)
35393539
+ STRLEN(dashes) /* for %s */
35403540
+ 20 /* for %3ld */

src/ex_cmds.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ linelen(int *has_tab)
256256

257257
/* find the character after the last non-blank character */
258258
for (last = first + STRLEN(first);
259-
last > first && vim_iswhite(last[-1]); --last)
259+
last > first && VIM_ISWHITE(last[-1]); --last)
260260
;
261261
save = *last;
262262
*last = NUL;
@@ -400,7 +400,7 @@ ex_sort(exarg_T *eap)
400400

401401
for (p = eap->arg; *p != NUL; ++p)
402402
{
403-
if (vim_iswhite(*p))
403+
if (VIM_ISWHITE(*p))
404404
;
405405
else if (*p == 'i')
406406
sort_ic = TRUE;
@@ -683,7 +683,7 @@ ex_retab(exarg_T *eap)
683683
did_undo = FALSE;
684684
for (;;)
685685
{
686-
if (vim_iswhite(ptr[col]))
686+
if (VIM_ISWHITE(ptr[col]))
687687
{
688688
if (!got_tab && num_spaces == 0)
689689
{
@@ -4807,7 +4807,7 @@ do_sub(exarg_T *eap)
48074807
which_pat = RE_SUBST; /* use last substitute regexp */
48084808

48094809
/* new pattern and substitution */
4810-
if (eap->cmd[0] == 's' && *cmd != NUL && !vim_iswhite(*cmd)
4810+
if (eap->cmd[0] == 's' && *cmd != NUL && !VIM_ISWHITE(*cmd)
48114811
&& vim_strchr((char_u *)"0123456789cegriIp|\"", *cmd) == NULL)
48124812
{
48134813
/* don't accept alphanumeric for separator */
@@ -6225,7 +6225,7 @@ ex_help(exarg_T *eap)
62256225

62266226
/* remove trailing blanks */
62276227
p = arg + STRLEN(arg) - 1;
6228-
while (p > arg && vim_iswhite(*p) && p[-1] != '\\')
6228+
while (p > arg && VIM_ISWHITE(*p) && p[-1] != '\\')
62296229
*p-- = NUL;
62306230

62316231
#ifdef FEAT_MULTI_LANG
@@ -6809,7 +6809,7 @@ fix_help_buffer(void)
68096809
{
68106810
line = ml_get_buf(curbuf, lnum, FALSE);
68116811
len = (int)STRLEN(line);
6812-
if (in_example && len > 0 && !vim_iswhite(line[0]))
6812+
if (in_example && len > 0 && !VIM_ISWHITE(line[0]))
68136813
{
68146814
/* End of example: non-white or '<' in first column. */
68156815
if (line[0] == '<')
@@ -7421,7 +7421,7 @@ ex_helptags(exarg_T *eap)
74217421
int add_help_tags = FALSE;
74227422

74237423
/* Check for ":helptags ++t {dir}". */
7424-
if (STRNCMP(eap->arg, "++t", 3) == 0 && vim_iswhite(eap->arg[3]))
7424+
if (STRNCMP(eap->arg, "++t", 3) == 0 && VIM_ISWHITE(eap->arg[3]))
74257425
{
74267426
add_help_tags = TRUE;
74277427
eap->arg = skipwhite(eap->arg + 3);
@@ -7754,7 +7754,7 @@ ex_sign(exarg_T *eap)
77547754
if (VIM_ISDIGIT(*arg))
77557755
{
77567756
id = getdigits(&arg);
7757-
if (!vim_iswhite(*arg) && *arg != NUL)
7757+
if (!VIM_ISWHITE(*arg) && *arg != NUL)
77587758
{
77597759
id = -1;
77607760
arg = arg1;

src/ex_cmds2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5183,7 +5183,7 @@ ex_language(exarg_T *eap)
51835183
* Allow abbreviation, but require at least 3 characters to avoid
51845184
* confusion with a two letter language name "me" or "ct". */
51855185
p = skiptowhite(eap->arg);
5186-
if ((*p == NUL || vim_iswhite(*p)) && p - eap->arg >= 3)
5186+
if ((*p == NUL || VIM_ISWHITE(*p)) && p - eap->arg >= 3)
51875187
{
51885188
if (STRNICMP(eap->arg, "messages", p - eap->arg) == 0)
51895189
{

0 commit comments

Comments
 (0)