0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

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.
This commit is contained in:
Bram Moolenaar
2017-03-12 19:22:36 +01:00
parent 47ffb905f3
commit 91acfffc1e
39 changed files with 207 additions and 194 deletions

View File

@@ -196,7 +196,7 @@ coladvance2(
/* 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 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
/* 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 @@ vim_strrchr(char_u *string, int c)
{
if (*p == c)
retval = p;
mb_ptr_adv(p);
MB_PTR_ADV(p);
}
return retval;
}
@@ -1971,7 +1971,7 @@ vim_strpbrk(char_u *s, char_u *charset)
{
if (vim_strchr(charset, *s) != NULL)
return s;
mb_ptr_adv(s);
MB_PTR_ADV(s);
}
return NULL;
}
@@ -3364,7 +3364,7 @@ vim_chdirfile(char_u *fname)
* 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 @@ illegal_slash(char *name)
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)