summaryrefslogtreecommitdiff
path: root/src/printf.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-07-09 17:06:35 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-07-09 17:06:35 +0000
commitb35b31b0f88f89c4afd23b79946263926317e087 (patch)
tree01350f7c98e2a71574670f38946efc72f0537107 /src/printf.c
parent20c336e6d294559fc420e8bf38f9dd5ada5b7226 (diff)
downloadcoreutils-b35b31b0f88f89c4afd23b79946263926317e087.tar.xz
(print_esc): Don't assume char is unsigned.
Diffstat (limited to 'src/printf.c')
-rw-r--r--src/printf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/printf.c b/src/printf.c
index 8707f3e4d..2f29bc080 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -1,5 +1,5 @@
/* printf - format and print data
- Copyright (C) 1990-2005 Free Software Foundation, Inc.
+ Copyright (C) 1990-2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -250,7 +250,7 @@ print_esc (const char *escstart, bool octal_0)
{
/* A hexadecimal \xhh escape sequence must have 1 or 2 hex. digits. */
for (esc_length = 0, ++p;
- esc_length < 2 && ISXDIGIT (*p);
+ esc_length < 2 && isxdigit (to_uchar (*p));
++esc_length, ++p)
esc_value = esc_value * 16 + hextobin (*p);
if (esc_length == 0)
@@ -280,7 +280,7 @@ print_esc (const char *escstart, bool octal_0)
esc_length > 0;
--esc_length, ++p)
{
- if (!ISXDIGIT (*p))
+ if (! isxdigit (to_uchar (*p)))
error (EXIT_FAILURE, 0, _("missing hexadecimal number in escape"));
uni_value = uni_value * 16 + hextobin (*p);
}