summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-03-04 22:29:04 (GMT)
committernijtmans <nijtmans>2010-03-04 22:29:04 (GMT)
commitead00d5d7d7afa8be16eacf5a93a931c84b6749a (patch)
tree20424fb33bacac14f3240a09effbc1b2e5476576 /compat
parent4a7184ccc431e5e65151b8bccee62179269d099e (diff)
downloadtcl-ead00d5d7d7afa8be16eacf5a93a931c84b6749a.zip
tcl-ead00d5d7d7afa8be16eacf5a93a931c84b6749a.tar.gz
tcl-ead00d5d7d7afa8be16eacf5a93a931c84b6749a.tar.bz2
Split tommath stub lib source file
in separate file. Don't use -fvisibility=hidden for cygwin
Diffstat (limited to 'compat')
-rw-r--r--compat/strncasecmp.c4
-rw-r--r--compat/strtod.c11
-rw-r--r--compat/strtoul.c4
3 files changed, 10 insertions, 9 deletions
diff --git a/compat/strncasecmp.c b/compat/strncasecmp.c
index f944aaa..6a17b32 100644
--- a/compat/strncasecmp.c
+++ b/compat/strncasecmp.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: strncasecmp.c,v 1.4 2008/04/27 22:21:28 dkf Exp $
+ * RCS: @(#) $Id: strncasecmp.c,v 1.5 2010/03/04 22:29:05 nijtmans Exp $
*/
#include "tclPort.h"
@@ -20,7 +20,7 @@
* sequences.
*/
-static unsigned char charmap[] = {
+static const unsigned char charmap[] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
diff --git a/compat/strtod.c b/compat/strtod.c
index aa73ab0..7171101 100644
--- a/compat/strtod.c
+++ b/compat/strtod.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: strtod.c,v 1.9 2008/04/27 22:21:28 dkf Exp $
+ * RCS: @(#) $Id: strtod.c,v 1.10 2010/03/04 22:29:05 nijtmans Exp $
*/
#include "tclInt.h"
@@ -23,12 +23,12 @@
#define NULL 0
#endif
-static int maxExponent = 511; /* Largest possible base 10 exponent. Any
+static const int maxExponent = 511; /* Largest possible base 10 exponent. Any
* exponent larger than this will already
* produce underflow or overflow, so there's
* no need to worry about additional digits.
*/
-static double powersOf10[] = { /* Table giving binary powers of 10. Entry */
+static const double powersOf10[] = { /* Table giving binary powers of 10. Entry */
10., /* is 10^2^i. Used to convert decimal */
100., /* exponents into floating-point numbers. */
1.0e4,
@@ -78,7 +78,8 @@ strtod(
* address here. */
{
int sign, expSign = FALSE;
- double fraction, dblExp, *d;
+ double fraction, dblExp;
+ const double *d;
register const char *p;
register int c;
int exp = 0; /* Exponent read from "EX" field. */
@@ -231,7 +232,7 @@ strtod(
errno = ERANGE;
}
dblExp = 1.0;
- for (d = powersOf10; exp != 0; exp >>= 1, d += 1) {
+ for (d = powersOf10; exp != 0; exp >>= 1, ++d) {
if (exp & 01) {
dblExp *= *d;
}
diff --git a/compat/strtoul.c b/compat/strtoul.c
index 21ee445..0b2b625 100644
--- a/compat/strtoul.c
+++ b/compat/strtoul.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: strtoul.c,v 1.8 2008/04/27 22:21:28 dkf Exp $
+ * RCS: @(#) $Id: strtoul.c,v 1.9 2010/03/04 22:29:05 nijtmans Exp $
*/
#include "tclInt.h"
@@ -20,7 +20,7 @@
* characters).
*/
-static char cvtIn[] = {
+static const char cvtIn[] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /* '0' - '9' */
100, 100, 100, 100, 100, 100, 100, /* punctuation */
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'A' - 'Z' */