Replace VIM_ISDIGIT() and vim_isdigit() with ascii_isdigit() defined in ascii.h

This commit is contained in:
Felipe Oliveira Carvalho
2015-04-22 19:47:53 -03:00
parent 93bf201119
commit caabcae0b7
37 changed files with 168 additions and 176 deletions

View File

@@ -806,9 +806,9 @@ void getout(int exitval)
/// @return argument's numeric value otherwise
static int get_number_arg(const char *p, int *idx, int def)
{
if (vim_isdigit(p[*idx])) {
if (ascii_isdigit(p[*idx])) {
def = atoi(&(p[*idx]));
while (vim_isdigit(p[*idx])) {
while (ascii_isdigit(p[*idx])) {
*idx = *idx + 1;
}
}
@@ -1096,7 +1096,7 @@ static void command_line_scan(mparm_T *parmp)
case 'w': /* "-w{number}" set window height */
/* "-w {scriptout}" write to script */
if (vim_isdigit(((char_u *)argv[0])[argv_idx])) {
if (ascii_isdigit(((char_u *)argv[0])[argv_idx])) {
n = get_number_arg(argv[0], &argv_idx, 10);
set_option_value((char_u *)"window", n, NULL, 0);
break;
@@ -1240,7 +1240,7 @@ scripterror:
case 'w': /* "-w {nr}" 'window' value */
/* "-w {scriptout}" append to script file */
if (vim_isdigit(*((char_u *)argv[0]))) {
if (ascii_isdigit(*((char_u *)argv[0]))) {
argv_idx = 0;
n = get_number_arg(argv[0], &argv_idx, 10);
set_option_value((char_u *)"window", n, NULL, 0);