mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.h
This commit is contained in:
@@ -358,8 +358,8 @@ pos_T *getmark_buf_fnum(buf_T *buf, int c, int changefile, int *fnum)
|
||||
}
|
||||
} else if (ASCII_ISLOWER(c)) { /* normal named mark */
|
||||
posp = &(buf->b_namedm[c - 'a']);
|
||||
} else if (ASCII_ISUPPER(c) || VIM_ISDIGIT(c)) { /* named file mark */
|
||||
if (VIM_ISDIGIT(c))
|
||||
} else if (ASCII_ISUPPER(c) || ascii_isdigit(c)) { /* named file mark */
|
||||
if (ascii_isdigit(c))
|
||||
c = c - '0' + NMARKS;
|
||||
else
|
||||
c -= 'A';
|
||||
@@ -708,14 +708,14 @@ void ex_delmarks(exarg_T *eap)
|
||||
/* clear specified marks only */
|
||||
for (p = eap->arg; *p != NUL; ++p) {
|
||||
lower = ASCII_ISLOWER(*p);
|
||||
digit = VIM_ISDIGIT(*p);
|
||||
digit = ascii_isdigit(*p);
|
||||
if (lower || digit || ASCII_ISUPPER(*p)) {
|
||||
if (p[1] == '-') {
|
||||
/* clear range of marks */
|
||||
from = *p;
|
||||
to = p[2];
|
||||
if (!(lower ? ASCII_ISLOWER(p[2])
|
||||
: (digit ? VIM_ISDIGIT(p[2])
|
||||
: (digit ? ascii_isdigit(p[2])
|
||||
: ASCII_ISUPPER(p[2])))
|
||||
|| to < from) {
|
||||
EMSG2(_(e_invarg2), p);
|
||||
@@ -1183,7 +1183,7 @@ int read_viminfo_filemark(vir_T *virp, int force)
|
||||
str = virp->vir_line + 1;
|
||||
if (
|
||||
*str <= 127 &&
|
||||
((*virp->vir_line == '\'' && (VIM_ISDIGIT(*str) || isupper(*str)))
|
||||
((*virp->vir_line == '\'' && (ascii_isdigit(*str) || isupper(*str)))
|
||||
|| (*virp->vir_line == '-' && *str == '\''))) {
|
||||
if (*str == '\'') {
|
||||
/* If the jumplist isn't full insert fmark as oldest entry */
|
||||
@@ -1198,7 +1198,7 @@ int read_viminfo_filemark(vir_T *virp, int force)
|
||||
fm->fmark.mark.lnum = 0;
|
||||
fm->fname = NULL;
|
||||
}
|
||||
} else if (VIM_ISDIGIT(*str))
|
||||
} else if (ascii_isdigit(*str))
|
||||
fm = &namedfm[*str - '0' + NMARKS];
|
||||
else { // is uppercase
|
||||
assert(*str >= 'A' && *str <= 'Z');
|
||||
|
Reference in New Issue
Block a user