From 0c2addad83d4e772edd16bb6aaea7b585bca9506 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 29 Nov 2001 03:03:55 +0000 Subject: Back out national digits support, POSIX explicetely disallows it: The definition of character class digit requires that only ten characters -the ones defining digits- can be specified; alternate digits (for example, Hindi or Kanji) cannot be specified here. However, the encoding may vary if an implementation supports more than one encoding. The definition of character class xdigit requires that the characters included in character class digit are included here also and allows for different symbols for the hexadecimal digits 10 through 15. --- lib/libc/stdlib/strtoumax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/stdlib/strtoumax.c') diff --git a/lib/libc/stdlib/strtoumax.c b/lib/libc/stdlib/strtoumax.c index bdcfbd7..ea59245 100644 --- a/lib/libc/stdlib/strtoumax.c +++ b/lib/libc/stdlib/strtoumax.c @@ -90,7 +90,7 @@ strtoumax(nptr, endptr, base) cutoff = UINTMAX_MAX / base; cutlim = UINTMAX_MAX % base; for ( ; ; c = *s++) { - if (isdigit(c) || (base == 16 && isxdigit(c))) + if (isxdigit(c)) c = digittoint(c); else if (isascii(c) && isalpha(c)) c -= isupper(c) ? 'A' - 10 : 'a' - 10; -- cgit v1.1