diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2002-02-25 10:36:32 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2002-02-25 10:36:32 (GMT) |
commit | efe59244840c732a49b93ff7aa6c01cb56874954 (patch) | |
tree | 51173dcf6440bab8a4aa0035be9c662f0cba4e8b /compat/strtol.c | |
parent | a0211643722bd3be1a1b6a97595bfc96720edb98 (diff) | |
download | tcl-efe59244840c732a49b93ff7aa6c01cb56874954.zip tcl-efe59244840c732a49b93ff7aa6c01cb56874954.tar.gz tcl-efe59244840c732a49b93ff7aa6c01cb56874954.tar.bz2 |
Minor cleanup of compat functions to get rid of GCC warnings.
Diffstat (limited to 'compat/strtol.c')
-rw-r--r-- | compat/strtol.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/compat/strtol.c b/compat/strtol.c index c2f336b..f384f8a 100644 --- a/compat/strtol.c +++ b/compat/strtol.c @@ -9,10 +9,12 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: strtol.c,v 1.2 1998/09/14 18:39:45 stanton Exp $ + * RCS: @(#) $Id: strtol.c,v 1.3 2002/02/25 10:36:32 dkf Exp $ */ #include <ctype.h> +#include "tclInt.h" +#include "tclPort.h" /* @@ -37,7 +39,7 @@ 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. @@ -51,7 +53,7 @@ strtol(string, endPtr, base) * else means decimal. */ { - register char *p; + register CONST char *p; int result; /* @@ -59,7 +61,7 @@ strtol(string, endPtr, base) */ p = string; - while (isspace(*p)) { + while (isspace(UCHAR(*p))) { p += 1; } @@ -77,7 +79,7 @@ strtol(string, endPtr, base) result = strtoul(p, endPtr, base); } if ((result == 0) && (endPtr != 0) && (*endPtr == p)) { - *endPtr = string; + *endPtr = (char *) string; } return result; } |