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/fileio.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/fileio.c')
| -rw-r--r-- | src/nvim/fileio.c | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 4a0a9da768..bb4b7a140b 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -2006,7 +2006,7 @@ failed:  static int is_dev_fd_file(char_u *fname)  {    return STRNCMP(fname, "/dev/fd/", 8) == 0 -         && VIM_ISDIGIT(fname[8]) +         && ascii_isdigit(fname[8])           && *skipdigits(fname + 9) == NUL           && (fname[9] != NUL               || (fname[8] != '0' && fname[8] != '1' && fname[8] != '2')); @@ -5524,7 +5524,7 @@ static event_T event_name2nr(char_u *start, char_u **end)    int len;    /* the event name ends with end of line, a blank or a comma */ -  for (p = start; *p && !vim_iswhite(*p) && *p != ','; ++p) +  for (p = start; *p && !ascii_iswhite(*p) && *p != ','; ++p)      ;    for (i = 0; event_names[i].name != NULL; ++i) {      len = (int)STRLEN(event_names[i].name); @@ -5565,13 +5565,13 @@ find_end_event (    char_u  *p;    if (*arg == '*') { -    if (arg[1] && !vim_iswhite(arg[1])) { +    if (arg[1] && !ascii_iswhite(arg[1])) {        EMSG2(_("E215: Illegal character after *: %s"), arg);        return NULL;      }      pat = arg + 1;    } else { -    for (pat = arg; *pat && !vim_iswhite(*pat); pat = p) { +    for (pat = arg; *pat && !ascii_iswhite(*pat); pat = p) {        if ((int)event_name2nr(pat, &p) >= (int)NUM_EVENTS) {          if (have_group)            EMSG2(_("E216: No such event: %s"), pat); @@ -5711,7 +5711,7 @@ void do_autocmd(char_u *arg, int forceit)     */    pat = skipwhite(pat);    cmd = pat; -  while (*cmd && (!vim_iswhite(*cmd) || cmd[-1] == '\\')) +  while (*cmd && (!ascii_iswhite(*cmd) || cmd[-1] == '\\'))      cmd++;    if (*cmd)      *cmd++ = NUL; @@ -5736,7 +5736,7 @@ void do_autocmd(char_u *arg, int forceit)     * Check for "nested" flag.     */    cmd = skipwhite(cmd); -  if (*cmd != NUL && STRNCMP(cmd, "nested", 6) == 0 && vim_iswhite(cmd[6])) { +  if (*cmd != NUL && STRNCMP(cmd, "nested", 6) == 0 && ascii_iswhite(cmd[6])) {      nested = TRUE;      cmd = skipwhite(cmd + 6);    } @@ -5772,7 +5772,7 @@ void do_autocmd(char_u *arg, int forceit)                nested, cmd, forceit, group) == FAIL)          break;    } else { -    while (*arg && !vim_iswhite(*arg)) { +    while (*arg && !ascii_iswhite(*arg)) {        event_T event = event_name2nr(arg, &arg);        assert(event < NUM_EVENTS);        if (do_autocmd_event(event, pat, nested, cmd, forceit, group) == FAIL) { @@ -6056,7 +6056,7 @@ do_doautocmd (    /*     * Loop over the events.     */ -  while (*arg && !vim_iswhite(*arg)) +  while (*arg && !ascii_iswhite(*arg))      if (apply_autocmds_group(event_name2nr(arg, &arg),              fname, NULL, TRUE, group, curbuf, NULL))        nothing_done = FALSE; @@ -6983,13 +6983,13 @@ set_context_in_autocmd (    group = au_get_grouparg(&arg);    /* If there only is a group name that's what we expand. */ -  if (*arg == NUL && group != AUGROUP_ALL && !vim_iswhite(arg[-1])) { +  if (*arg == NUL && group != AUGROUP_ALL && !ascii_iswhite(arg[-1])) {      arg = p;      group = AUGROUP_ALL;    }    /* skip over event name */ -  for (p = arg; *p != NUL && !vim_iswhite(*p); ++p) +  for (p = arg; *p != NUL && !ascii_iswhite(*p); ++p)      if (*p == ',')        arg = p + 1;    if (*p == NUL) { @@ -7002,7 +7002,7 @@ set_context_in_autocmd (    /* skip over pattern */    arg = skipwhite(p); -  while (*arg && (!vim_iswhite(*arg) || arg[-1] == '\\')) +  while (*arg && (!ascii_iswhite(*arg) || arg[-1] == '\\'))      arg++;    if (*arg)      return arg;                             /* expand (next) command */ | 
