diff options
author | Jim Meyering <jim@meyering.net> | 1994-12-11 23:43:21 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1994-12-11 23:43:21 +0000 |
commit | 0e168c7d03101169a696784b8006ef59be9d25ae (patch) | |
tree | 347f45dca6d0f02e84a7fe3d928e517828068d0c /src/csplit.c | |
parent | 9c5d0aa7a6f8e9aa5f7c86d5d62e3d327a3146f4 (diff) | |
download | coreutils-0e168c7d03101169a696784b8006ef59be9d25ae.tar.xz |
(get_format_width, get_format_prec): Use ISDIGIT instead of
comparisons against '0' and '9'.
Diffstat (limited to 'src/csplit.c')
-rw-r--r-- | src/csplit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/csplit.c b/src/csplit.c index fa3dd70c0..725d3c264 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 |