comparison src/option.c @ 11129:f4ea50924c6d v8.0.0452

patch 8.0.0452: some macros are in lower case commit https://github.com/vim/vim/commit/1c46544412382db8b3203d6c78e550df885540bd Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 12 20:10:05 2017 +0100 patch 8.0.0452: some macros are in lower case Problem: Some macros are in lower case. Solution: Make a few more macros upper case.
author Christian Brabandt <cb@256bit.org>
date Sun, 12 Mar 2017 20:15:06 +0100
parents 506f5d8b7d8b
children 501f46f7644c
comparison
equal deleted inserted replaced
11128:23154628ab7f 11129:f4ea50924c6d
4436 4436
4437 /* remember character after option name */ 4437 /* remember character after option name */
4438 afterchar = arg[len]; 4438 afterchar = arg[len];
4439 4439
4440 /* skip white space, allow ":set ai ?" */ 4440 /* skip white space, allow ":set ai ?" */
4441 while (vim_iswhite(arg[len])) 4441 while (VIM_ISWHITE(arg[len]))
4442 ++len; 4442 ++len;
4443 4443
4444 adding = FALSE; 4444 adding = FALSE;
4445 prepending = FALSE; 4445 prepending = FALSE;
4446 removing = FALSE; 4446 removing = FALSE;
4560 cp_val = TRUE; 4560 cp_val = TRUE;
4561 arg += 2; 4561 arg += 2;
4562 } 4562 }
4563 } 4563 }
4564 if (vim_strchr((char_u *)"?!&<", nextchar) != NULL 4564 if (vim_strchr((char_u *)"?!&<", nextchar) != NULL
4565 && arg[1] != NUL && !vim_iswhite(arg[1])) 4565 && arg[1] != NUL && !VIM_ISWHITE(arg[1]))
4566 { 4566 {
4567 errmsg = e_trailing; 4567 errmsg = e_trailing;
4568 goto skip; 4568 goto skip;
4569 } 4569 }
4570 } 4570 }
4618 } 4618 }
4619 else 4619 else
4620 (void)show_one_termcode(key_name, p, TRUE); 4620 (void)show_one_termcode(key_name, p, TRUE);
4621 } 4621 }
4622 if (nextchar != '?' 4622 if (nextchar != '?'
4623 && nextchar != NUL && !vim_iswhite(afterchar)) 4623 && nextchar != NUL && !VIM_ISWHITE(afterchar))
4624 errmsg = e_trailing; 4624 errmsg = e_trailing;
4625 } 4625 }
4626 else 4626 else
4627 { 4627 {
4628 if (flags & P_BOOL) /* boolean */ 4628 if (flags & P_BOOL) /* boolean */
4658 { 4658 {
4659 /* 4659 /*
4660 * ":set invopt": invert 4660 * ":set invopt": invert
4661 * ":set opt" or ":set noopt": set or reset 4661 * ":set opt" or ":set noopt": set or reset
4662 */ 4662 */
4663 if (nextchar != NUL && !vim_iswhite(afterchar)) 4663 if (nextchar != NUL && !VIM_ISWHITE(afterchar))
4664 { 4664 {
4665 errmsg = e_trailing; 4665 errmsg = e_trailing;
4666 goto skip; 4666 goto skip;
4667 } 4667 }
4668 if (prefix == 2) /* inv */ 4668 if (prefix == 2) /* inv */
4712 } 4712 }
4713 else if (((long *)varp == &p_wc 4713 else if (((long *)varp == &p_wc
4714 || (long *)varp == &p_wcm) 4714 || (long *)varp == &p_wcm)
4715 && (*arg == '<' 4715 && (*arg == '<'
4716 || *arg == '^' 4716 || *arg == '^'
4717 || (*arg != NUL && (!arg[1] || vim_iswhite(arg[1])) 4717 || (*arg != NUL
4718 && (!arg[1] || VIM_ISWHITE(arg[1]))
4718 && !VIM_ISDIGIT(*arg)))) 4719 && !VIM_ISDIGIT(*arg))))
4719 { 4720 {
4720 value = string_to_key(arg); 4721 value = string_to_key(arg);
4721 if (value == 0 && (long *)varp != &p_wcm) 4722 if (value == 0 && (long *)varp != &p_wcm)
4722 { 4723 {
4728 { 4729 {
4729 /* Allow negative (for 'undolevels'), octal and 4730 /* Allow negative (for 'undolevels'), octal and
4730 * hex numbers. */ 4731 * hex numbers. */
4731 vim_str2nr(arg, NULL, &i, STR2NR_ALL, 4732 vim_str2nr(arg, NULL, &i, STR2NR_ALL,
4732 &value, NULL, 0); 4733 &value, NULL, 0);
4733 if (arg[i] != NUL && !vim_iswhite(arg[i])) 4734 if (arg[i] != NUL && !VIM_ISWHITE(arg[i]))
4734 { 4735 {
4735 errmsg = e_invarg; 4736 errmsg = e_invarg;
4736 goto skip; 4737 goto skip;
4737 } 4738 }
4738 } 4739 }
4920 * file name characters are not removed, and keep 4921 * file name characters are not removed, and keep
4921 * backslash at start, for "\\machine\path", but 4922 * backslash at start, for "\\machine\path", but
4922 * do remove it for "\\\\machine\\path". 4923 * do remove it for "\\\\machine\\path".
4923 * The reverse is found in ExpandOldSetting(). 4924 * The reverse is found in ExpandOldSetting().
4924 */ 4925 */
4925 while (*arg && !vim_iswhite(*arg)) 4926 while (*arg && !VIM_ISWHITE(*arg))
4926 { 4927 {
4927 if (*arg == '\\' && arg[1] != NUL 4928 if (*arg == '\\' && arg[1] != NUL
4928 #ifdef BACKSLASH_IN_FILENAME 4929 #ifdef BACKSLASH_IN_FILENAME
4929 && !((flags & P_EXPAND) 4930 && !((flags & P_EXPAND)
4930 && vim_isfilec(arg[1]) 4931 && vim_isfilec(arg[1])
5160 errmsg = (char_u *)N_("E522: Not found in termcap"); 5161 errmsg = (char_u *)N_("E522: Not found in termcap");
5161 } 5162 }
5162 else 5163 else
5163 { 5164 {
5164 ++arg; /* jump to after the '=' or ':' */ 5165 ++arg; /* jump to after the '=' or ':' */
5165 for (p = arg; *p && !vim_iswhite(*p); ++p) 5166 for (p = arg; *p && !VIM_ISWHITE(*p); ++p)
5166 if (*p == '\\' && p[1] != NUL) 5167 if (*p == '\\' && p[1] != NUL)
5167 ++p; 5168 ++p;
5168 nextchar = *p; 5169 nextchar = *p;
5169 *p = NUL; 5170 *p = NUL;
5170 add_termcode(key_name, arg, FALSE); 5171 add_termcode(key_name, arg, FALSE);
5188 * - skip blanks 5189 * - skip blanks
5189 * - skip one "=val" argument (for hidden options ":set gfn =xx") 5190 * - skip one "=val" argument (for hidden options ":set gfn =xx")
5190 */ 5191 */
5191 for (i = 0; i < 2 ; ++i) 5192 for (i = 0; i < 2 ; ++i)
5192 { 5193 {
5193 while (*arg != NUL && !vim_iswhite(*arg)) 5194 while (*arg != NUL && !VIM_ISWHITE(*arg))
5194 if (*arg++ == '\\' && *arg != NUL) 5195 if (*arg++ == '\\' && *arg != NUL)
5195 ++arg; 5196 ++arg;
5196 arg = skipwhite(arg); 5197 arg = skipwhite(arg);
5197 if (*arg != '=') 5198 if (*arg != '=')
5198 break; 5199 break;