summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgriffin <briang42@easystreet.net>2023-09-01 02:26:56 (GMT)
committergriffin <briang42@easystreet.net>2023-09-01 02:26:56 (GMT)
commit4f5685bc2e489f3cf31579319479a3edd627d54c (patch)
tree90ed25c1621f5e3d9b626e5a9d49ad21f34c528d
parent54a1421d88926a6f3fb29c415c0c86be2fe24eb3 (diff)
downloadtcl-4f5685bc2e489f3cf31579319479a3edd627d54c.zip
tcl-4f5685bc2e489f3cf31579319479a3edd627d54c.tar.gz
tcl-4f5685bc2e489f3cf31579319479a3edd627d54c.tar.bz2
Use system isxdigit.
-rw-r--r--generic/tclStrToD.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index 31f33fc..4912441 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -371,16 +371,6 @@ static double SafeLdExp(double fraction, int exponent);
#ifdef IEEE_FLOATING_POINT
static Tcl_WideUInt Nokia770Twiddle(Tcl_WideUInt w);
#endif
-
-static inline int
-isHexDigit(int u)
-{
- int c = UCHAR(u);
- return (isdigit(c)
- || (c >= 'A' && c <= 'F')
- || (c >= 'a' && c <= 'f'));
-}
-
/*
*----------------------------------------------------------------------
@@ -644,8 +634,8 @@ TclParseNumber(
goto endgame;
case ZERO_X:
case HEXADECIMAL:
- if ( (!before || isHexDigit(*before)) &&
- (!after || isHexDigit(*after))) {
+ if ( (!before || isxdigit(*before)) &&
+ (!after || isxdigit(*after))) {
break;
}
goto endgame;