mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.h
This commit is contained in:
@@ -3204,12 +3204,12 @@ int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs)
|
||||
min_field_width = -j;
|
||||
justify_left = 1;
|
||||
}
|
||||
} else if (VIM_ISDIGIT((int)(*p))) {
|
||||
} else if (ascii_isdigit((int)(*p))) {
|
||||
/* size_t could be wider than unsigned int; make sure we treat
|
||||
* argument like common implementations do */
|
||||
unsigned int uj = *p++ - '0';
|
||||
|
||||
while (VIM_ISDIGIT((int)(*p)))
|
||||
while (ascii_isdigit((int)(*p)))
|
||||
uj = 10 * uj + (unsigned int)(*p++ - '0');
|
||||
min_field_width = uj;
|
||||
}
|
||||
@@ -3229,12 +3229,12 @@ int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs)
|
||||
precision_specified = 0;
|
||||
precision = 0;
|
||||
}
|
||||
} else if (VIM_ISDIGIT((int)(*p))) {
|
||||
} else if (ascii_isdigit((int)(*p))) {
|
||||
/* size_t could be wider than unsigned int; make sure we
|
||||
* treat argument like common implementations do */
|
||||
unsigned int uj = *p++ - '0';
|
||||
|
||||
while (VIM_ISDIGIT((int)(*p)))
|
||||
while (ascii_isdigit((int)(*p)))
|
||||
uj = 10 * uj + (unsigned int)(*p++ - '0');
|
||||
precision = uj;
|
||||
}
|
||||
@@ -3643,8 +3643,8 @@ int vim_vsnprintf(char *str, size_t str_m, char *fmt, va_list ap, typval_T *tvs)
|
||||
fmt_spec == 'e' ? 'e' : 'E');
|
||||
if (tp != NULL && (tp[1] == '+' || tp[1] == '-')
|
||||
&& tp[2] == '0'
|
||||
&& vim_isdigit(tp[3])
|
||||
&& vim_isdigit(tp[4])) {
|
||||
&& ascii_isdigit(tp[3])
|
||||
&& ascii_isdigit(tp[4])) {
|
||||
STRMOVE(tp + 2, tp + 3);
|
||||
--str_arg_l;
|
||||
}
|
||||
|
Reference in New Issue
Block a user