From: Jim Meyering Date: Mon, 7 Dec 1992 05:32:19 +0000 (+0000) Subject: (print_formatted, print_esc): Define ISXDIGIT and ISXDIGIT and use X-Git-Tag: ISDIGIT-bug-fix~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d6b0403a1dadac10387b50205901b2a4ead82ad9;p=thirdparty%2Fcoreutils.git (print_formatted, print_esc): Define ISXDIGIT and ISXDIGIT and use them instead of isdigit and isxdigit. --- diff --git a/src/printf.c b/src/printf.c index a9979a6d85..1c43c07739 100644 --- a/src/printf.c +++ b/src/printf.c @@ -48,6 +48,13 @@ #include #include "system.h" +#ifndef isascii +#define isascii(c) 1 +#endif + +#define ISDIGIT(c) (isascii (c) && isdigit (c)) +#define ISXDIGIT(c) (isascii (c) && isxdigit (c)) + #ifndef STDC_HEADERS double strtod (); long strtol (); @@ -168,7 +175,7 @@ print_formatted (format, argc, argv) field_width = 0; } else - while (isdigit (*f)) + while (ISDIGIT (*f)) { ++f; ++direc_length; @@ -191,7 +198,7 @@ print_formatted (format, argc, argv) precision = 0; } else - while (isdigit (*f)) + while (ISDIGIT (*f)) { ++f; ++direc_length; @@ -245,7 +252,7 @@ print_esc (escstart) if (*p == 'x') { for (esc_length = 0, ++p; - esc_length < 3 && isxdigit (*p); + esc_length < 3 && ISXDIGIT (*p); ++esc_length, ++p) esc_value = esc_value * 16 + hextobin (*p); if (esc_length == 0)