Permalink
Browse files

patch 8.0.0451: some macros are in lower case

Problem:    Some macros are in lower case.
Solution:   Make a few more macros upper case. Avoid lower case macros use an
            argument twice.
  • Loading branch information...
brammool committed Mar 12, 2017
1 parent 47ffb90 commit 91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
Showing with 207 additions and 194 deletions.
  1. +10 −10 src/charset.c
  2. +10 −10 src/edit.c
  3. +11 −11 src/eval.c
  4. +1 −1 src/ex_cmds.c
  5. +1 −1 src/ex_cmds2.c
  6. +8 −8 src/ex_docmd.c
  7. +2 −2 src/ex_getln.c
  8. +1 −1 src/fileio.c
  9. +2 −2 src/fold.c
  10. +1 −1 src/gui.c
  11. +1 −1 src/gui_gtk.c
  12. +16 −15 src/macros.h
  13. +1 −1 src/mark.c
  14. +1 −2 src/mbyte.c
  15. +3 −3 src/memline.c
  16. +4 −4 src/menu.c
  17. +1 −1 src/message.c
  18. +10 −10 src/misc1.c
  19. +16 −5 src/misc2.c
  20. +7 −7 src/ops.c
  21. +6 −6 src/option.c
  22. +2 −2 src/os_amiga.c
  23. +4 −4 src/os_mswin.c
  24. +2 −2 src/os_unix.c
  25. +1 −1 src/os_win32.c
  26. +2 −2 src/popupmnu.c
  27. +1 −1 src/proto/misc2.pro
  28. +14 −14 src/regexp.c
  29. +10 −10 src/regexp_nfa.c
  30. +4 −4 src/screen.c
  31. +4 −4 src/search.c
  32. +31 −31 src/spell.c
  33. +7 −7 src/spellfile.c
  34. +4 −4 src/syntax.c
  35. +3 −3 src/tag.c
  36. +1 −1 src/ui.c
  37. +1 −1 src/undo.c
  38. +2 −0 src/version.c
  39. +1 −1 src/window.c
View
@@ -870,7 +870,7 @@ win_linetabsize(win_T *wp, char_u *line, colnr_T len)
char_u *s;
for (s = line; *s != NUL && (len == MAXCOL || s < line + len);
- mb_ptr_adv(s))
+ MB_PTR_ADV(s))
col += win_lbr_chartabsize(wp, line, s, col, NULL);
return (int)col;
}
@@ -1026,7 +1026,7 @@ lbr_chartabsize_adv(
int retval;
retval = lbr_chartabsize(line, *s, col);
- mb_ptr_adv(*s);
+ MB_PTR_ADV(*s);
return retval;
}
@@ -1089,8 +1089,8 @@ win_lbr_chartabsize(
* needs a break here
*/
if (wp->w_p_lbr
- && vim_isbreak(c)
- && !vim_isbreak(s[1])
+ && VIM_ISBREAK(c)
+ && !VIM_ISBREAK(s[1])
&& wp->w_p_wrap
# ifdef FEAT_WINDOWS
&& wp->w_width != 0
@@ -1115,12 +1115,12 @@ win_lbr_chartabsize(
for (;;)
{
ps = s;
- mb_ptr_adv(s);
+ MB_PTR_ADV(s);
c = *s;
if (!(c != NUL
- && (vim_isbreak(c)
- || (!vim_isbreak(c)
- && (col2 == col || !vim_isbreak(*ps))))))
+ && (VIM_ISBREAK(c)
+ || (!VIM_ISBREAK(c)
+ && (col2 == col || !VIM_ISBREAK(*ps))))))
break;
col2 += win_chartabsize(wp, s, col2);
@@ -1369,7 +1369,7 @@ getvcol(
break;
vcol += incr;
- mb_ptr_adv(ptr);
+ MB_PTR_ADV(ptr);
}
}
else
@@ -1390,7 +1390,7 @@ getvcol(
break;
vcol += incr;
- mb_ptr_adv(ptr);
+ MB_PTR_ADV(ptr);
}
}
if (start != NULL)
View
@@ -857,7 +857,7 @@ edit(
if (str != NULL)
{
- for (p = str; *p != NUL; mb_ptr_adv(p))
+ for (p = str; *p != NUL; MB_PTR_ADV(p))
ins_compl_addleader(PTR2CHAR(p));
vim_free(str);
}
@@ -1492,7 +1492,7 @@ edit(
if (*str != NUL && stop_arrow() != FAIL)
{
/* Insert the new value of v:char literally. */
- for (p = str; *p != NUL; mb_ptr_adv(p))
+ for (p = str; *p != NUL; MB_PTR_ADV(p))
{
c = PTR2CHAR(p);
if (c == CAR || c == K_KENTER || c == NL)
@@ -2403,7 +2403,7 @@ ins_compl_add_infercase(
actual_len = 0;
while (*p != NUL)
{
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
++actual_len;
}
}
@@ -2419,7 +2419,7 @@ ins_compl_add_infercase(
actual_compl_length = 0;
while (*p != NUL)
{
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
++actual_compl_length;
}
}
@@ -2722,8 +2722,8 @@ ins_compl_longest_match(compl_T *match)
#ifdef FEAT_MBYTE
if (has_mbyte)
{
- mb_ptr_adv(p);
- mb_ptr_adv(s);
+ MB_PTR_ADV(p);
+ MB_PTR_ADV(s);
}
else
#endif
@@ -3474,7 +3474,7 @@ ins_compl_bs(void)
line = ml_get_curline();
p = line + curwin->w_cursor.col;
- mb_ptr_back(line, p);
+ MB_PTR_BACK(line, p);
/* Stop completion when the whole word was deleted. For Omni completion
* allow the word to be deleted, we won't match everything.
@@ -4023,7 +4023,7 @@ ins_compl_fixRedoBufForLeader(char_u *ptr_arg)
if (len > 0)
len -= (*mb_head_off)(p, p + len);
#endif
- for (p += len; *p != NUL; mb_ptr_adv(p))
+ for (p += len; *p != NUL; MB_PTR_ADV(p))
AppendCharToRedobuff(K_BS);
}
else
@@ -5336,9 +5336,9 @@ ins_complete(int c, int enable_pum)
{
char_u *p = line + startcol;
- mb_ptr_back(line, p);
+ MB_PTR_BACK(line, p);
while (p > line && vim_isfilec(PTR2CHAR(p)))
- mb_ptr_back(line, p);
+ MB_PTR_BACK(line, p);
if (p == line && vim_isfilec(PTR2CHAR(p)))
startcol = 0;
else
View
@@ -2551,7 +2551,7 @@ set_context_for_expression(
for (p = arg + STRLEN(arg); p >= arg; )
{
xp->xp_pattern = p;
- mb_ptr_back(arg, p);
+ MB_PTR_BACK(arg, p);
if (vim_iswhite(*p))
break;
}
@@ -4814,7 +4814,7 @@ get_string_tv(char_u **arg, typval_T *rettv, int evaluate)
/*
* Find the end of the string, skipping backslashed characters.
*/
- for (p = *arg + 1; *p != NUL && *p != '"'; mb_ptr_adv(p))
+ for (p = *arg + 1; *p != NUL && *p != '"'; MB_PTR_ADV(p))
{
if (*p == '\\' && p[1] != NUL)
{
@@ -4952,7 +4952,7 @@ get_lit_string_tv(char_u **arg, typval_T *rettv, int evaluate)
/*
* Find the end of the string, skipping ''.
*/
- for (p = *arg + 1; *p != NUL; mb_ptr_adv(p))
+ for (p = *arg + 1; *p != NUL; MB_PTR_ADV(p))
{
if (*p == '\'')
{
@@ -5910,7 +5910,7 @@ string_quote(char_u *str, int function)
if (str != NULL)
{
len += (unsigned)STRLEN(str);
- for (p = str; *p != NUL; mb_ptr_adv(p))
+ for (p = str; *p != NUL; MB_PTR_ADV(p))
if (*p == '\'')
++len;
}
@@ -6369,20 +6369,20 @@ find_name_end(
|| *p == '{'
|| ((flags & FNE_INCL_BR) && (*p == '[' || *p == '.'))
|| mb_nest != 0
- || br_nest != 0); mb_ptr_adv(p))
+ || 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;
}
else if (*p == '"')
{
/* skip over "str\"ing" 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 == '\\' && p[1] != NUL)
++p;
if (*p == NUL)
@@ -9410,7 +9410,7 @@ shortpath_for_partial(
/* Count up the path separators from the RHS.. so we know which part
* of the path to return. */
sepcount = 0;
- for (p = *fnamep; p < *fnamep + *fnamelen; mb_ptr_adv(p))
+ for (p = *fnamep; p < *fnamep + *fnamelen; MB_PTR_ADV(p))
if (vim_ispathsep(*p))
++sepcount;
@@ -9528,7 +9528,7 @@ modify_fname(
}
/* When "/." or "/.." is used: force expansion to get rid of it. */
- for (p = *fnamep; *p != NUL; mb_ptr_adv(p))
+ for (p = *fnamep; *p != NUL; MB_PTR_ADV(p))
{
if (vim_ispathsep(*p)
&& p[1] == '.'
@@ -9658,7 +9658,7 @@ modify_fname(
*usedlen += 2;
s = get_past_head(*fnamep);
while (tail > s && after_pathsep(s, tail))
- mb_ptr_back(*fnamep, tail);
+ MB_PTR_BACK(*fnamep, tail);
*fnamelen = (int)(tail - *fnamep);
#ifdef VMS
if (*fnamelen > 0)
@@ -9677,7 +9677,7 @@ modify_fname(
else
{
while (tail > s && !after_pathsep(s, tail))
- mb_ptr_back(*fnamep, tail);
+ MB_PTR_BACK(*fnamep, tail);
}
}
View
@@ -4863,7 +4863,7 @@ do_sub(exarg_T *eap)
}
if (cmd[0] == '\\' && cmd[1] != 0) /* skip escaped characters */
++cmd;
- mb_ptr_adv(cmd);
+ MB_PTR_ADV(cmd);
}
if (!eap->skip)
View
@@ -3526,7 +3526,7 @@ add_pack_plugin(char_u *fname, void *cookie)
{
/* directory is not yet in 'runtimepath', add it */
p4 = p3 = p2 = p1 = get_past_head(ffname);
- for (p = p1; *p; mb_ptr_adv(p))
+ for (p = p1; *p; MB_PTR_ADV(p))
if (vim_ispathsep_nocolon(*p))
{
p4 = p3; p3 = p2; p2 = p1; p1 = p;
View
@@ -3696,7 +3696,7 @@ set_one_cmd_context(
return NULL; /* It's a comment */
}
}
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
}
@@ -3720,7 +3720,7 @@ set_one_cmd_context(
{
if (*p == '\\' && *(p + 1) != NUL)
++p; /* skip over escaped character */
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
}
@@ -3780,15 +3780,15 @@ set_one_cmd_context(
else
#endif
len = 1;
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
if (in_quote)
bow = p;
else
xp->xp_pattern = p;
p -= len;
}
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
/*
@@ -4204,7 +4204,7 @@ set_one_cmd_context(
arg = p + 1;
else if (*p == '\\' && *(p + 1) != NUL)
++p; /* skip over escaped character */
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
xp->xp_pattern = arg;
}
@@ -5280,7 +5280,7 @@ separate_nextcmd(exarg_T *eap)
p = eap->arg;
#endif
- for ( ; *p; mb_ptr_adv(p))
+ for ( ; *p; MB_PTR_ADV(p))
{
if (*p == Ctrl_V)
{
@@ -5380,7 +5380,7 @@ skip_cmd_arg(
else
++p;
}
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
return p;
}
@@ -11861,7 +11861,7 @@ ses_put_fname(FILE *fd, char_u *name, unsigned *flagp)
if (*flagp & SSOP_SLASH)
{
/* change all backslashes to forward slashes */
- for (p = sname; *p != NUL; mb_ptr_adv(p))
+ for (p = sname; *p != NUL; MB_PTR_ADV(p))
if (*p == '\\')
*p = '/';
}
View
@@ -4296,7 +4296,7 @@ sm_gettail(char_u *s)
t = p;
had_sep = FALSE;
}
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
return t;
}
@@ -5370,7 +5370,7 @@ ExpandRTDir(
if (e - 4 > s && STRNICMP(e - 4, ".vim", 4) == 0)
{
e -= 4;
- for (s = e; s > match; mb_ptr_back(match, s))
+ for (s = e; s > match; MB_PTR_BACK(match, s))
if (s < match || vim_ispathsep(*s))
break;
++s;
View
@@ -6247,7 +6247,7 @@ buf_modname(
* Then truncate what is after the '/', '\' or ':' to 8 characters for
* MSDOS and 26 characters for AMIGA, a lot more for UNIX.
*/
- for (ptr = retval + fnamelen; ptr > retval; mb_ptr_back(retval, ptr))
+ for (ptr = retval + fnamelen; ptr > retval; MB_PTR_BACK(retval, ptr))
{
if (*ext == '.'
#ifdef USE_LONG_FNAME
View
@@ -2064,7 +2064,7 @@ foldtext_cleanup(char_u *str)
}
else
{
- mb_ptr_adv(s);
+ MB_PTR_ADV(s);
}
}
}
@@ -3249,7 +3249,7 @@ foldlevelMarker(fline_T *flp)
--flp->lvl_next;
}
else
- mb_ptr_adv(s);
+ MB_PTR_ADV(s);
}
/* The level can't go negative, must be missing a start marker. */
View
@@ -4500,7 +4500,7 @@ scroll_line_len(linenr_T lnum)
for (;;)
{
w = chartabsize(p, col);
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
if (*p == NUL) /* don't count the last character */
break;
col += w;
View
@@ -1522,7 +1522,7 @@ split_button_string(char_u *button_string, int *n_buttons)
else if (*p == DLG_HOTKEY_CHAR)
*p++ = '_';
else
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
array[count] = NULL; /* currently not relied upon, but doesn't hurt */
}
Oops, something went wrong.

0 comments on commit 91acfff

Please sign in to comment.