diff options
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 057937f60e..12118cdebc 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2461,7 +2461,7 @@ do_set ( afterchar = arg[len]; /* skip white space, allow ":set ai ?" */ - while (vim_iswhite(arg[len])) + while (ascii_iswhite(arg[len])) ++len; adding = FALSE; @@ -2549,7 +2549,7 @@ do_set ( } } if (vim_strchr((char_u *)"?!&<", nextchar) != NULL - && arg[1] != NUL && !vim_iswhite(arg[1])) { + && arg[1] != NUL && !ascii_iswhite(arg[1])) { errmsg = e_trailing; goto skip; } @@ -2590,7 +2590,7 @@ do_set ( goto skip; } if (nextchar != '?' - && nextchar != NUL && !vim_iswhite(afterchar)) + && nextchar != NUL && !ascii_iswhite(afterchar)) errmsg = e_trailing; } else { if (flags & P_BOOL) { /* boolean */ @@ -2623,7 +2623,7 @@ do_set ( * ":set invopt": invert * ":set opt" or ":set noopt": set or reset */ - if (nextchar != NUL && !vim_iswhite(afterchar)) { + if (nextchar != NUL && !ascii_iswhite(afterchar)) { errmsg = e_trailing; goto skip; } @@ -2670,8 +2670,8 @@ do_set ( || (long *)varp == &p_wcm) && (*arg == '<' || *arg == '^' - || ((!arg[1] || vim_iswhite(arg[1])) - && !VIM_ISDIGIT(*arg)))) { + || ((!arg[1] || ascii_iswhite(arg[1])) + && !ascii_isdigit(*arg)))) { value = string_to_key(arg); if (value == 0 && (long *)varp != &p_wcm) { errmsg = e_invarg; @@ -2679,16 +2679,16 @@ do_set ( } } /* allow negative numbers (for 'undolevels') */ - else if (*arg == '-' || VIM_ISDIGIT(*arg)) { + else if (*arg == '-' || ascii_isdigit(*arg)) { i = 0; if (*arg == '-') i = 1; value = strtol((char *)arg, NULL, 0); if (arg[i] == '0' && TOLOWER_ASC(arg[i + 1]) == 'x') i += 2; - while (VIM_ISDIGIT(arg[i])) + while (ascii_isdigit(arg[i])) ++i; - if (arg[i] != NUL && !vim_iswhite(arg[i])) { + if (arg[i] != NUL && !ascii_iswhite(arg[i])) { errmsg = e_invarg; goto skip; } @@ -2767,7 +2767,7 @@ do_set ( * adding, prepending and removing string. */ else if (varp == (char_u *)&p_bs - && VIM_ISDIGIT(**(char_u **)varp)) { + && ascii_isdigit(**(char_u **)varp)) { i = getdigits_int((char_u **)varp); switch (i) { case 0: @@ -2791,7 +2791,7 @@ do_set ( * Misuse errbuf[] for the resulting string. */ else if (varp == (char_u *)&p_ww - && VIM_ISDIGIT(*arg)) { + && ascii_isdigit(*arg)) { *errbuf = NUL; i = getdigits_int(&arg); if (i & 1) @@ -2848,7 +2848,7 @@ do_set ( * do remove it for "\\\\machine\\path". * The reverse is found in ExpandOldSetting(). */ - while (*arg && !vim_iswhite(*arg)) { + while (*arg && !ascii_iswhite(*arg)) { if (*arg == '\\' && arg[1] != NUL #ifdef BACKSLASH_IN_FILENAME && !((flags & P_EXPAND) @@ -3004,7 +3004,7 @@ skip: * - skip one "=val" argument (for hidden options ":set gfn =xx") */ for (i = 0; i < 2; ++i) { - while (*arg != NUL && !vim_iswhite(*arg)) + while (*arg != NUL && !ascii_iswhite(*arg)) if (*arg++ == '\\' && *arg != NUL) ++arg; arg = skipwhite(arg); @@ -3212,7 +3212,7 @@ int get_viminfo_parameter(int type) char_u *p; p = find_viminfo_parameter(type); - if (p != NULL && VIM_ISDIGIT(*p)) + if (p != NULL && ascii_isdigit(*p)) return atoi((char *)p); return -1; } @@ -3883,7 +3883,7 @@ did_set_string_option ( for (s = *varp; *s; ) { while (*s && *s != ':') { if (vim_strchr((char_u *)COM_ALL, *s) == NULL - && !VIM_ISDIGIT(*s) && *s != '-') { + && !ascii_isdigit(*s) && *s != '-') { errmsg = illegal_char(errbuf, *s); break; } @@ -3936,15 +3936,15 @@ did_set_string_option ( ; } else if (*s == '%') { /* optional number */ - while (vim_isdigit(*++s)) + while (ascii_isdigit(*++s)) ; } else if (*s == '!' || *s == 'h' || *s == 'c') ++s; /* no extra chars */ else { /* must have a number */ - while (vim_isdigit(*++s)) + while (ascii_isdigit(*++s)) ; - if (!VIM_ISDIGIT(*(s - 1))) { + if (!ascii_isdigit(*(s - 1))) { if (errbuf != NULL) { sprintf((char *)errbuf, _("E526: Missing number after <%s>"), @@ -4188,7 +4188,7 @@ did_set_string_option ( } /* 'backspace' */ else if (varp == &p_bs) { - if (VIM_ISDIGIT(*p_bs)) { + if (ascii_isdigit(*p_bs)) { if (*p_bs >'2' || p_bs[1] != NUL) errmsg = e_invarg; } else if (check_opt_strings(p_bs, p_bs_values, TRUE) != OK) @@ -4428,7 +4428,7 @@ char_u *check_colorcolumn(win_T *wp) /* -N and +N: add to 'textwidth' */ col = (*s == '-') ? -1 : 1; ++s; - if (!VIM_ISDIGIT(*s)) + if (!ascii_isdigit(*s)) return e_invarg; col = col * getdigits_int(&s); if (wp->w_buffer->b_p_tw == 0) @@ -4442,7 +4442,7 @@ char_u *check_colorcolumn(win_T *wp) col += (int)wp->w_buffer->b_p_tw; if (col < 0) goto skip; - } else if (VIM_ISDIGIT(*s)) + } else if (ascii_isdigit(*s)) col = getdigits_int(&s); else return e_invarg; @@ -4603,13 +4603,13 @@ char_u *check_stl_option(char_u *s) } if (*s == '-') s++; - while (VIM_ISDIGIT(*s)) + while (ascii_isdigit(*s)) s++; if (*s == STL_USER_HL) continue; if (*s == '.') { s++; - while (*s && VIM_ISDIGIT(*s)) + while (*s && ascii_isdigit(*s)) s++; } if (*s == '(') { @@ -7755,12 +7755,12 @@ static bool briopt_check(win_T *wp) while (*p != NUL) { if (STRNCMP(p, "shift:", 6) == 0 - && ((p[6] == '-' && VIM_ISDIGIT(p[7])) || VIM_ISDIGIT(p[6]))) + && ((p[6] == '-' && ascii_isdigit(p[7])) || ascii_isdigit(p[6]))) { p += 6; bri_shift = getdigits_int(&p); } - else if (STRNCMP(p, "min:", 4) == 0 && VIM_ISDIGIT(p[4])) + else if (STRNCMP(p, "min:", 4) == 0 && ascii_isdigit(p[4])) { p += 4; bri_min = getdigits_int(&p); |