*/
#include <ctype.h>
+#include "tclInt.h"
+#include "tclPort.h"
\f
/*
long int
strtol(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.
* else means decimal.
*/
{
- register char *p;
- int result;
+ register CONST char *p;
+ long result;
/*
* Skip any leading blanks.
*/
p = string;
- while (isspace(*p)) {
+ while (isspace(UCHAR(*p))) {
p += 1;
}
result = strtoul(p, endPtr, base);
}
if ((result == 0) && (endPtr != 0) && (*endPtr == p)) {
- *endPtr = string;
+ *endPtr = (char *) string;
}
return result;
}