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.
diff --git a/src/misc2.c b/src/misc2.c
index cfdfc4c..a6f3c1e 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -196,7 +196,7 @@
/* Count a tab for what it's worth (if list mode not on) */
#ifdef FEAT_LINEBREAK
csize = win_lbr_chartabsize(curwin, line, ptr, col, &head);
- mb_ptr_adv(ptr);
+ MB_PTR_ADV(ptr);
#else
csize = lbr_chartabsize_adv(line, &ptr, col);
#endif
@@ -1418,7 +1418,7 @@
/* First count the number of extra bytes required. */
length = (unsigned)STRLEN(string) + 3; /* two quotes and a trailing NUL */
- for (p = string; *p != NUL; mb_ptr_adv(p))
+ for (p = string; *p != NUL; MB_PTR_ADV(p))
{
# ifdef WIN32
if (!p_ssl)
@@ -1950,7 +1950,7 @@
{
if (*p == c)
retval = p;
- mb_ptr_adv(p);
+ MB_PTR_ADV(p);
}
return retval;
}
@@ -1971,7 +1971,7 @@
{
if (vim_strchr(charset, *s) != NULL)
return s;
- mb_ptr_adv(s);
+ MB_PTR_ADV(s);
}
return NULL;
}
@@ -3364,7 +3364,7 @@
* Used for systems where stat() ignores a trailing slash on a file name.
* The Vim code assumes a trailing slash is only ignored for a directory.
*/
- int
+ static int
illegal_slash(char *name)
{
if (name[0] == NUL)
@@ -3375,6 +3375,17 @@
return FALSE; /* trailing slash for a directory */
return TRUE;
}
+
+/*
+ * Special implementation of mch_stat() for Solaris.
+ */
+ int
+vim_stat(const char *name, stat_T *stp)
+{
+ /* On Solaris stat() accepts "file/" as if it was "file". Return -1 if
+ * the name ends in "/" and it's not a directory. */
+ return illegal_slash(n) ? -1 : stat(n, p);
+}
#endif
#if defined(CURSOR_SHAPE) || defined(PROTO)