summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2007-09-19 10:54:19 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2007-09-19 10:54:19 (GMT)
commitfe764adad787ef9a5363f10f7eda7fc634e2fc47 (patch)
treeacac58e6ad8b71e32db3676982410796be555cb0
parentba0783fdaa33959a87c4ca3d29b588745c87794a (diff)
downloadtk-fe764adad787ef9a5363f10f7eda7fc634e2fc47.zip
tk-fe764adad787ef9a5363f10f7eda7fc634e2fc47.tar.gz
tk-fe764adad787ef9a5363f10f7eda7fc634e2fc47.tar.bz2
Replace isdigit call with an internal implementation to avoid libc linkage on windows
-rw-r--r--ChangeLog4
-rw-r--r--generic/tkStubLib.c13
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c8acd5..80b2db2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-09-19 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * generic/tkStubLib.: Replaced isdigit with internal implementation.
+
2007-09-18 Don Porter <dgp@users.sourceforge.net>
* generic/tkStubLib.c: Remove C library calls from Tk_InitStubs()
diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c
index aaeba9f..cfcaffd 100644
--- a/generic/tkStubLib.c
+++ b/generic/tkStubLib.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkStubLib.c,v 1.17 2007/09/18 16:12:19 dgp Exp $
+ * RCS: @(#) $Id: tkStubLib.c,v 1.18 2007/09/19 10:54:20 patthoyts Exp $
*/
/*
@@ -55,6 +55,15 @@ TkIntPlatStubs *tkIntPlatStubsPtr;
TkIntXlibStubs *tkIntXlibStubsPtr;
/*
+ * Use our own isdigit to avoid linking to libc on windows
+ */
+
+static int isDigit(const int c)
+{
+ return (c >= '0' && c <= '9');
+}
+
+/*
*----------------------------------------------------------------------
*
* Tk_InitStubs --
@@ -95,7 +104,7 @@ Tk_InitStubs(
int count = 0;
while (*p) {
- count += !isdigit(*p++);
+ count += !isDigit(*p++);
}
if (count == 1) {
CONST char *q = actualVersion;