Mercurial > vim
comparison src/ex_docmd.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 | c004e17fa36b |
children | f4ea50924c6d |
comparison
equal
deleted
inserted
replaced
11126:48599a3eae0b | 11127:506f5d8b7d8b |
---|---|
3694 if (*p == '|' || *p == '\n') | 3694 if (*p == '|' || *p == '\n') |
3695 return p + 1; | 3695 return p + 1; |
3696 return NULL; /* It's a comment */ | 3696 return NULL; /* It's a comment */ |
3697 } | 3697 } |
3698 } | 3698 } |
3699 mb_ptr_adv(p); | 3699 MB_PTR_ADV(p); |
3700 } | 3700 } |
3701 } | 3701 } |
3702 | 3702 |
3703 /* no arguments allowed */ | 3703 /* no arguments allowed */ |
3704 if (!(ea.argt & EXTRA) && *arg != NUL && | 3704 if (!(ea.argt & EXTRA) && *arg != NUL && |
3718 } | 3718 } |
3719 else | 3719 else |
3720 { | 3720 { |
3721 if (*p == '\\' && *(p + 1) != NUL) | 3721 if (*p == '\\' && *(p + 1) != NUL) |
3722 ++p; /* skip over escaped character */ | 3722 ++p; /* skip over escaped character */ |
3723 mb_ptr_adv(p); | 3723 MB_PTR_ADV(p); |
3724 } | 3724 } |
3725 } | 3725 } |
3726 | 3726 |
3727 if (ea.argt & XFILE) | 3727 if (ea.argt & XFILE) |
3728 { | 3728 { |
3778 if (has_mbyte) | 3778 if (has_mbyte) |
3779 len = (*mb_ptr2len)(p); | 3779 len = (*mb_ptr2len)(p); |
3780 else | 3780 else |
3781 #endif | 3781 #endif |
3782 len = 1; | 3782 len = 1; |
3783 mb_ptr_adv(p); | 3783 MB_PTR_ADV(p); |
3784 } | 3784 } |
3785 if (in_quote) | 3785 if (in_quote) |
3786 bow = p; | 3786 bow = p; |
3787 else | 3787 else |
3788 xp->xp_pattern = p; | 3788 xp->xp_pattern = p; |
3789 p -= len; | 3789 p -= len; |
3790 } | 3790 } |
3791 mb_ptr_adv(p); | 3791 MB_PTR_ADV(p); |
3792 } | 3792 } |
3793 | 3793 |
3794 /* | 3794 /* |
3795 * If we are still inside the quotes, and we passed a space, just | 3795 * If we are still inside the quotes, and we passed a space, just |
3796 * expand from there. | 3796 * expand from there. |
4202 if (*p == ' ') | 4202 if (*p == ' ') |
4203 /* argument starts after a space */ | 4203 /* argument starts after a space */ |
4204 arg = p + 1; | 4204 arg = p + 1; |
4205 else if (*p == '\\' && *(p + 1) != NUL) | 4205 else if (*p == '\\' && *(p + 1) != NUL) |
4206 ++p; /* skip over escaped character */ | 4206 ++p; /* skip over escaped character */ |
4207 mb_ptr_adv(p); | 4207 MB_PTR_ADV(p); |
4208 } | 4208 } |
4209 xp->xp_pattern = arg; | 4209 xp->xp_pattern = arg; |
4210 } | 4210 } |
4211 xp->xp_context = compl; | 4211 xp->xp_context = compl; |
4212 } | 4212 } |
5278 p = skip_grep_pat(eap); | 5278 p = skip_grep_pat(eap); |
5279 #else | 5279 #else |
5280 p = eap->arg; | 5280 p = eap->arg; |
5281 #endif | 5281 #endif |
5282 | 5282 |
5283 for ( ; *p; mb_ptr_adv(p)) | 5283 for ( ; *p; MB_PTR_ADV(p)) |
5284 { | 5284 { |
5285 if (*p == Ctrl_V) | 5285 if (*p == Ctrl_V) |
5286 { | 5286 { |
5287 if (eap->argt & (USECTRLV | XFILE)) | 5287 if (eap->argt & (USECTRLV | XFILE)) |
5288 ++p; /* skip CTRL-V and next char */ | 5288 ++p; /* skip CTRL-V and next char */ |
5378 if (rembs) | 5378 if (rembs) |
5379 STRMOVE(p, p + 1); | 5379 STRMOVE(p, p + 1); |
5380 else | 5380 else |
5381 ++p; | 5381 ++p; |
5382 } | 5382 } |
5383 mb_ptr_adv(p); | 5383 MB_PTR_ADV(p); |
5384 } | 5384 } |
5385 return p; | 5385 return p; |
5386 } | 5386 } |
5387 | 5387 |
5388 /* | 5388 /* |
11859 return FAIL; | 11859 return FAIL; |
11860 | 11860 |
11861 if (*flagp & SSOP_SLASH) | 11861 if (*flagp & SSOP_SLASH) |
11862 { | 11862 { |
11863 /* change all backslashes to forward slashes */ | 11863 /* change all backslashes to forward slashes */ |
11864 for (p = sname; *p != NUL; mb_ptr_adv(p)) | 11864 for (p = sname; *p != NUL; MB_PTR_ADV(p)) |
11865 if (*p == '\\') | 11865 if (*p == '\\') |
11866 *p = '/'; | 11866 *p = '/'; |
11867 } | 11867 } |
11868 | 11868 |
11869 /* escape special characters */ | 11869 /* escape special characters */ |