summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2005-05-11 15:39:39 (GMT)
committerKevin B Kenny <kennykb@acm.org>2005-05-11 15:39:39 (GMT)
commit1074a7edd4a19b0debb5bbf5fe02ba157c3dc5c9 (patch)
tree9129feba18528804f4803f0f67c7f5e6f19be14f /generic
parent8bf46ba0a03990bad5d4491ab94fd3eaba6c43a6 (diff)
downloadtcl-1074a7edd4a19b0debb5bbf5fe02ba157c3dc5c9.zip
tcl-1074a7edd4a19b0debb5bbf5fe02ba157c3dc5c9.tar.gz
tcl-1074a7edd4a19b0debb5bbf5fe02ba157c3dc5c9.tar.bz2
Added UCHAR's to ctype macros in tclStrToD.c
Diffstat (limited to 'generic')
-rwxr-xr-xgeneric/tclStrToD.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index feb0278..ab18ef7 100755
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStrToD.c,v 1.3 2005/05/10 20:17:42 kennykb Exp $
+ * RCS: @(#) $Id: tclStrToD.c,v 1.4 2005/05/11 15:39:50 kennykb Exp $
*
*----------------------------------------------------------------------
*/
@@ -241,7 +241,7 @@ TclStrToD( CONST char* s,
if ( c == '.' && !seenDp ) {
seenDp = 1;
++p;
- } else if ( isdigit(c) ) {
+ } else if ( isdigit( UCHAR(c) ) ) {
if ( c == '0' ) {
if ( startOfSignificand != NULL ) {
++nTrailZero;
@@ -292,7 +292,7 @@ TclStrToD( CONST char* s,
CONST char* stringSave = p;
++p;
c = *p;
- if ( isdigit( c ) || c == '+' || c == '-' ) {
+ if ( isdigit( UCHAR( c ) ) || c == '+' || c == '-' ) {
errno = 0;
exponent = strtol( p, (char**)&p, 10 );
if ( errno == ERANGE ) {
@@ -651,7 +651,7 @@ RefineResult( double approxResult,
i = nSigDigs;
for ( p = sigStart ; ; ++p ) {
char c = *p;
- if ( isdigit( c ) ) {
+ if ( isdigit( UCHAR( c ) ) ) {
mp_mul_d( &twoMd, (unsigned) 10, &twoMd );
mp_add_d( &twoMd, (unsigned) (c - '0'), &twoMd );
--i;
@@ -763,12 +763,12 @@ ParseNaN( int signum, /* Flag == 1 if minus sign has been
++p;
for ( ; ; ) {
c = *p++;
- if ( isspace(c) ) {
+ if ( isspace( UCHAR(c) ) ) {
continue;
} else if ( c == ')' ) {
*endPtr = p;
break;
- } else if ( isdigit(c) ) {
+ } else if ( isdigit( UCHAR(c) ) ) {
c -= '0';
} else if ( c >= 'A' && c <= 'F' ) {
c = c - 'A' + 10;