summaryrefslogtreecommitdiffstats
path: root/compat/strtoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/strtoll.c')
-rw-r--r--compat/strtoll.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/compat/strtoll.c b/compat/strtoll.c
index 1105040..2ae6b0a 100644
--- a/compat/strtoll.c
+++ b/compat/strtoll.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: strtoll.c,v 1.3 2002/02/15 23:42:12 kennykb Exp $
+ * RCS: @(#) $Id: strtoll.c,v 1.4 2002/02/22 09:04:48 dkf Exp $
*/
#include "tcl.h"
@@ -41,7 +41,7 @@
Tcl_WideInt
strtoll(string, endPtr, base)
- char *string; /* String of ASCII digits, possibly
+ CONST char *string; /* String of ASCII digits, possibly
* preceded by white space. For bases
* greater than 10, either lower- or
* upper-case digits may be used.
@@ -55,8 +55,8 @@ strtoll(string, endPtr, base)
* else means decimal.
*/
{
- register char *p;
- Tcl_WideInt result;
+ register CONST char *p;
+ Tcl_WideInt result = Tcl_LongAsWide(0);
Tcl_WideUInt uwResult;
/*
@@ -64,7 +64,7 @@ strtoll(string, endPtr, base)
*/
p = string;
- while (isspace(*p)) {
+ while (isspace(UCHAR(*p))) {
p += 1;
}
@@ -100,7 +100,7 @@ strtoll(string, endPtr, base)
}
}
if ((result == 0) && (endPtr != 0) && (*endPtr == p)) {
- *endPtr = string;
+ *endPtr = (char *) string;
}
return result;
}