diff options
| author | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2015-04-25 13:34:30 -0300 | 
|---|---|---|
| committer | Felipe Oliveira Carvalho <felipekde@gmail.com> | 2015-04-25 13:37:44 -0300 | 
| commit | 0bce4dc54427d05ab320a88f6269a9c1b05ea899 (patch) | |
| tree | 4a3aff2749eb0b70b7947ecfc7cd56d56ad4e29d /src/nvim/diff.c | |
| parent | d350d12a00518aa0d9e3a1d49c6815c3398d882f (diff) | |
| parent | c96b933acc4d9ec7382d451055e44c85959772b9 (diff) | |
| download | rneovim-0bce4dc54427d05ab320a88f6269a9c1b05ea899.tar.gz rneovim-0bce4dc54427d05ab320a88f6269a9c1b05ea899.tar.bz2 rneovim-0bce4dc54427d05ab320a88f6269a9c1b05ea899.zip | |
Merge #2486: Replacements for vim_iswhite, VIM_ISDIGIT, vim_isdigit, vim_isxdigit, and vim_isspace
Reviewed-by: Michael Reed <m.reed@mykolab.com>
Diffstat (limited to 'src/nvim/diff.c')
| -rw-r--r-- | src/nvim/diff.c | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 88d63b3383..d4fbb290c1 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -1590,7 +1590,7 @@ static int diff_cmp(char_u *s1, char_u *s2)    char_u *p2 = s2;    while (*p1 != NUL && *p2 != NUL) { -    if (vim_iswhite(*p1) && vim_iswhite(*p2)) { +    if (ascii_iswhite(*p1) && ascii_iswhite(*p2)) {        p1 = skipwhite(p1);        p2 = skipwhite(p2);      } else { @@ -1781,7 +1781,7 @@ int diffopt_changed(void)      if (STRNCMP(p, "filler", 6) == 0) {        p += 6;        diff_flags_new |= DIFF_FILLER; -    } else if ((STRNCMP(p, "context:", 8) == 0) && VIM_ISDIGIT(p[8])) { +    } else if ((STRNCMP(p, "context:", 8) == 0) && ascii_isdigit(p[8])) {        p += 8;        diff_context_new = getdigits_int(&p);      } else if (STRNCMP(p, "icase", 5) == 0) { @@ -1796,7 +1796,7 @@ int diffopt_changed(void)      } else if (STRNCMP(p, "vertical", 8) == 0) {        p += 8;        diff_flags_new |= DIFF_VERTICAL; -    } else if ((STRNCMP(p, "foldcolumn:", 11) == 0) && VIM_ISDIGIT(p[11])) { +    } else if ((STRNCMP(p, "foldcolumn:", 11) == 0) && ascii_isdigit(p[11])) {        p += 11;        diff_foldcolumn_new = getdigits_int(&p);      } @@ -1897,8 +1897,8 @@ int diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp)        while (line_org[si_org] != NUL) {          if ((diff_flags & DIFF_IWHITE) -            && vim_iswhite(line_org[si_org]) -            && vim_iswhite(line_new[si_new])) { +            && ascii_iswhite(line_org[si_org]) +            && ascii_iswhite(line_new[si_new])) {            si_org = (int)(skipwhite(line_org + si_org) - line_org);            si_new = (int)(skipwhite(line_new + si_new) - line_new);          } else { @@ -1931,13 +1931,13 @@ int diff_find_change(win_T *wp, linenr_T lnum, int *startp, int *endp)                 && ei_org >= 0                 && ei_new >= 0) {            if ((diff_flags & DIFF_IWHITE) -              && vim_iswhite(line_org[ei_org]) -              && vim_iswhite(line_new[ei_new])) { -            while (ei_org >= *startp && vim_iswhite(line_org[ei_org])) { +              && ascii_iswhite(line_org[ei_org]) +              && ascii_iswhite(line_new[ei_new])) { +            while (ei_org >= *startp && ascii_iswhite(line_org[ei_org])) {                ei_org--;              } -            while (ei_new >= si_new && vim_iswhite(line_new[ei_new])) { +            while (ei_new >= si_new && ascii_iswhite(line_new[ei_new])) {                ei_new--;              }            } else { @@ -2108,11 +2108,11 @@ void ex_diffgetput(exarg_T *eap)    } else {      // Buffer number or pattern given. Ignore trailing white space.      p = eap->arg + STRLEN(eap->arg); -    while (p > eap->arg && vim_iswhite(p[-1])) { +    while (p > eap->arg && ascii_iswhite(p[-1])) {        p--;      } -    for (i = 0; vim_isdigit(eap->arg[i]) && eap->arg + i < p; ++i) { +    for (i = 0; ascii_isdigit(eap->arg[i]) && eap->arg + i < p; ++i) {      }      if (eap->arg + i == p) { | 
