summaryrefslogtreecommitdiffstats
path: root/generic/tkStubLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkStubLib.c')
-rw-r--r--generic/tkStubLib.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/generic/tkStubLib.c b/generic/tkStubLib.c
index f803e49..f605b5d 100644
--- a/generic/tkStubLib.c
+++ b/generic/tkStubLib.c
@@ -11,7 +11,6 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#include "tkPort.h"
#include "tkInt.h"
#ifdef __WIN32__
@@ -22,10 +21,12 @@
#include "tkMacOSXInt.h"
#endif
-#include "tkDecls.h"
-#include "tkIntDecls.h"
+#if !(defined(__WIN32__) || defined(MAC_OSX_TK))
+#include "tkUnixInt.h"
+#endif
+
+/* TODO: These ought to come in some other way */
#include "tkPlatDecls.h"
-#include "tkIntPlatDecls.h"
#include "tkIntXlibDecls.h"
TkStubs *tkStubsPtr = NULL;
@@ -39,8 +40,7 @@ TkIntXlibStubs *tkIntXlibStubsPtr = NULL;
*/
static int
-isDigit(c)
- CONST int c;
+isDigit(const int c)
{
return (c >= '0' && c <= '9');
}
@@ -64,13 +64,13 @@ isDigit(c)
*/
#undef Tk_InitStubs
CONST char *
-Tk_InitStubs(interp, version, exact)
- Tcl_Interp *interp;
- char *version;
- int exact;
+Tk_InitStubs(
+ Tcl_Interp *interp,
+ CONST char *version,
+ int exact)
{
- CONST char *packageName = "Tk";
- CONST char *errMsg = NULL;
+ const char *packageName = "Tk";
+ const char *errMsg = NULL;
ClientData clientData = NULL;
CONST char *actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp,
packageName, version, 0, &clientData);
@@ -96,11 +96,11 @@ Tk_InitStubs(interp, version, exact)
}
if (*p || isDigit(*q)) {
/* Construct error message */
- tclStubsPtr->tcl_PkgRequireEx(interp, packageName, version, 1, NULL);
+ tclStubsPtr->tcl_PkgRequireEx(interp, "Tk", version, 1, NULL);
return NULL;
}
} else {
- actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp, packageName,
+ actualVersion = tclStubsPtr->tcl_PkgRequireEx(interp, "Tk",
version, 1, NULL);
if (actualVersion == NULL) {
return NULL;