aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorFelipe Oliveira Carvalho <felipekde@gmail.com>2015-04-25 13:34:30 -0300
committerFelipe Oliveira Carvalho <felipekde@gmail.com>2015-04-25 13:37:44 -0300
commit0bce4dc54427d05ab320a88f6269a9c1b05ea899 (patch)
tree4a3aff2749eb0b70b7947ecfc7cd56d56ad4e29d /src/nvim/message.c
parentd350d12a00518aa0d9e3a1d49c6815c3398d882f (diff)
parentc96b933acc4d9ec7382d451055e44c85959772b9 (diff)
downloadrneovim-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/message.c')
-rw-r--r--src/nvim/message.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index ae4d0ec230..744f721410 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1387,7 +1387,7 @@ void msg_prt_line(char_u *s, int list)
/* find start of trailing whitespace */
if (list && lcs_trail) {
trail = s + STRLEN(s);
- while (trail > s && vim_iswhite(trail[-1]))
+ while (trail > s && ascii_iswhite(trail[-1]))
--trail;
}
@@ -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;
}