Alejandro Colomar 8f134c0bea Use isdigit(3) instead of a reimplementation of it
C89 defined isdigit as a function that tests for any decimal-digit
character, defining the decimal digits as 0 1 2 3 4 5 6 7 8 9.

I don't own a copy of C89 to check, but check in C17:

7.4.1.5
5.2.1

More specifically:

> In both the source and execution basic character sets, the value
> of each character after 0 in the above list of decimal digits
> shall be one greater than the value of the previous.

And since in ascii(7), the character after '9' is ':', it's highly
unlikely that any implementation will ever accept any
_decimal digit_ other than 0..9.

POSIX simply defers to the ISO C standard.

This is exactly what we wanted from ISDIGIT(c), so just use it.
Non-standard implementations might have been slower or considered
other characters as digits in the past, but let's assume
implementations available today conform to ISO C89.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
2021-12-29 02:41:09 +01:00
..
2011-09-18 21:02:43 +00:00
2020-01-12 07:31:26 -06:00
2021-12-23 15:18:07 -06:00
2021-12-27 20:50:13 +01:00
2017-10-22 18:33:13 +00:00
2021-04-16 21:02:37 -05:00
2021-12-23 15:18:07 -06:00
2021-07-14 12:13:25 +02:00
2021-08-18 18:06:02 +00:00
2021-08-18 18:06:02 +00:00
2021-06-24 09:18:35 +02:00
2021-02-01 22:11:10 +01:00
2021-12-23 15:18:07 -06:00
2017-10-22 18:33:13 +00:00
2013-08-04 15:56:32 +02:00
2021-06-16 09:50:53 +02:00