From: Jim Meyering Date: Sun, 11 Dec 1994 23:43:21 +0000 (+0000) Subject: (get_format_width, get_format_prec): Use ISDIGIT instead of X-Git-Tag: textutils-1_12_1~396 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e168c7d03101169a696784b8006ef59be9d25ae;p=thirdparty%2Fcoreutils.git (get_format_width, get_format_prec): Use ISDIGIT instead of comparisons against '0' and '9'. --- diff --git a/src/csplit.c b/src/csplit.c index fa3dd70c04..725d3c2646 100644 --- a/src/csplit.c +++ b/src/csplit.c @@ -1115,6 +1115,7 @@ new_control_record () /* Convert string NUM to an integer and put the value in *RESULT. Return a TRUE if the string consists entirely of digits, FALSE if not. */ +/* FIXME: use xstrtoul in place of this function. */ static boolean string_to_number (result, num) @@ -1307,7 +1308,7 @@ get_format_width (format_ptr) start = *format_ptr; for (; **format_ptr; (*format_ptr)++) - if (**format_ptr < '0' || **format_ptr > '9') + if (!ISDIGIT (**format_ptr)) break; ch_save = **format_ptr; @@ -1346,7 +1347,7 @@ get_format_prec (format_ptr) start = *format_ptr; for (; **format_ptr; (*format_ptr)++) - if (**format_ptr < '0' || **format_ptr > '9') + if (!ISDIGIT (**format_ptr)) break; /* ANSI 4.9.6.1 says that if the precision is negative, it's as good as