OSDN Git Service
(root)
/
pf3gnuchains
/
pf3gnuchains3x.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated to tcl 8.4.1
[pf3gnuchains/pf3gnuchains3x.git]
/
tcl
/
compat
/
strtol.c
diff --git
a/tcl/compat/strtol.c
b/tcl/compat/strtol.c
index
e1d7de5
..
d0267c9
100644
(file)
--- a/
tcl/compat/strtol.c
+++ b/
tcl/compat/strtol.c
@@
-13,6
+13,8
@@
*/
#include <ctype.h>
*/
#include <ctype.h>
+#include "tclInt.h"
+#include "tclPort.h"
\f
/*
\f
/*
@@
-37,7
+39,7
@@
long int
strtol(string, endPtr, base)
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.
* preceded by white space. For bases
* greater than 10, either lower- or
* upper-case digits may be used.
@@
-51,15
+53,15
@@
strtol(string, endPtr, base)
* else means decimal.
*/
{
* else means decimal.
*/
{
- register char *p;
-
int
result;
+ register
CONST
char *p;
+
long
result;
/*
* Skip any leading blanks.
*/
p = string;
/*
* Skip any leading blanks.
*/
p = string;
- while (isspace(
*p
)) {
+ while (isspace(
UCHAR(*p)
)) {
p += 1;
}
p += 1;
}
@@
-77,7
+79,7
@@
strtol(string, endPtr, base)
result = strtoul(p, endPtr, base);
}
if ((result == 0) && (endPtr != 0) && (*endPtr == p)) {
result = strtoul(p, endPtr, base);
}
if ((result == 0) && (endPtr != 0) && (*endPtr == p)) {
- *endPtr = string;
+ *endPtr =
(char *)
string;
}
return result;
}
}
return result;
}