diff src/eval.c @ 11127:506f5d8b7d8b v8.0.0451

patch 8.0.0451: some macros are in lower case commit https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 12 19:22:36 2017 +0100 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.
author Christian Brabandt <cb@256bit.org>
date Sun, 12 Mar 2017 19:30:05 +0100
parents bcbda8ae5549
children f4ea50924c6d
line wrap: on
line diff
--- a/src/eval.c
+++ b/src/eval.c
@@ -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 *re
     /*
      * 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
     /*
      * 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,12 +6369,12 @@ 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;
@@ -6382,7 +6382,7 @@ find_name_end(
 	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 @@ repeat:
 	}
 
 	/* 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 @@ repeat:
 	*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 @@ repeat:
 	else
 	{
 	    while (tail > s && !after_pathsep(s, tail))
-		mb_ptr_back(*fnamep, tail);
+		MB_PTR_BACK(*fnamep, tail);
 	}
     }