summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tk.h10
-rw-r--r--generic/tkBind.c2
-rw-r--r--generic/tkConsole.c13
-rw-r--r--generic/tkMain.c2
-rw-r--r--generic/tkTest.c4
-rw-r--r--generic/tkTextWind.c4
-rw-r--r--generic/tkWindow.c4
-rw-r--r--generic/ttk/ttkTheme.c2
-rw-r--r--macosx/tkMacOSXHLEvents.c8
-rw-r--r--macosx/tkMacOSXWindowEvent.c2
-rw-r--r--unix/Makefile.in7
-rw-r--r--unix/tkUnixSend.c6
-rw-r--r--unix/tkUnixWm.c2
-rw-r--r--win/Makefile.in8
-rw-r--r--win/tkWinScrlbr.c2
-rw-r--r--win/tkWinWm.c2
16 files changed, 42 insertions, 36 deletions
diff --git a/generic/tk.h b/generic/tk.h
index 8c13df2..f1f81cd 100644
--- a/generic/tk.h
+++ b/generic/tk.h
@@ -17,10 +17,18 @@
#define _TK
#include <tcl.h>
-#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION != 5)
+#if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION < 5)
# error Tk 8.5 must be compiled with tcl.h from Tcl 8.5
#endif
+#ifndef _ANSI_ARGS_
+# ifndef NO_PROTOTYPES
+# define _ANSI_ARGS_(x) x
+# else
+# define _ANSI_ARGS_(x) ()
+# endif
+#endif
+
/*
* For C++ compilers, use extern "C"
*/
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 21bfb5c..8d20fa9 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -4595,7 +4595,7 @@ TkKeysymToString(
*
* TkCopyAndGlobalEval --
*
- * This function makes a copy of a script then calls Tcl_GlobalEval to
+ * This function makes a copy of a script then calls Tcl_EvalEx to
* evaluate it. It's used in situations where the execution of a command
* may cause the original command string to be reallocated.
*
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index b10aaaf..621d125 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -224,7 +224,7 @@ Tk_InitConsoleChannels(
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
return;
}
@@ -436,7 +436,8 @@ Tk_CreateConsoleWindow(
}
Tcl_Preserve((ClientData) consoleInterp);
- result = Tcl_GlobalEval(consoleInterp, "source $tk_library/console.tcl");
+ result = Tcl_EvalEx(consoleInterp, "source $tk_library/console.tcl",
+ -1, TCL_EVAL_GLOBAL);
if (result == TCL_ERROR) {
Tcl_SetReturnOptions(interp,
Tcl_GetReturnOptions(consoleInterp, result));
@@ -528,7 +529,7 @@ ConsoleOutput(
Tcl_DStringFree(&ds);
Tcl_IncrRefCount(cmd);
- Tcl_GlobalEvalObj(consoleInterp, cmd);
+ Tcl_EvalObjEx(consoleInterp, cmd, TCL_EVAL_GLOBAL);
Tcl_DecrRefCount(cmd);
}
}
@@ -732,7 +733,7 @@ ConsoleObjCmd(
Tcl_IncrRefCount(cmd);
if (consoleInterp && !Tcl_InterpDeleted(consoleInterp)) {
Tcl_Preserve((ClientData) consoleInterp);
- result = Tcl_GlobalEvalObj(consoleInterp, cmd);
+ result = Tcl_EvalObjEx(consoleInterp, cmd, TCL_EVAL_GLOBAL);
Tcl_SetReturnOptions(interp,
Tcl_GetReturnOptions(consoleInterp, result));
Tcl_SetObjResult(interp, Tcl_GetObjResult(consoleInterp));
@@ -794,7 +795,7 @@ InterpreterObjCmd(
Tcl_Preserve((ClientData) otherInterp);
switch ((enum option) index) {
case OTHER_EVAL:
- result = Tcl_GlobalEvalObj(otherInterp, objv[2]);
+ result = Tcl_EvalObjEx(otherInterp, objv[2], TCL_EVAL_GLOBAL);
/*
* TODO: Should exceptions be filtered here?
*/
@@ -929,7 +930,7 @@ ConsoleEventProc(
Tcl_Interp *consoleInterp = info->consoleInterp;
if (consoleInterp && !Tcl_InterpDeleted(consoleInterp)) {
- Tcl_GlobalEval(consoleInterp, "tk::ConsoleExit");
+ Tcl_EvalEx(consoleInterp, "tk::ConsoleExit", -1, TCL_EVAL_GLOBAL);
}
if (--info->refCount <= 0) {
diff --git a/generic/tkMain.c b/generic/tkMain.c
index 3be7189..74b8557 100644
--- a/generic/tkMain.c
+++ b/generic/tkMain.c
@@ -136,7 +136,7 @@ Tk_MainEx(
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
abort();
}
diff --git a/generic/tkTest.c b/generic/tkTest.c
index 307ca34..9fe2222 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -400,7 +400,7 @@ CBindingEvalProc(
cbindPtr = (CBinding *) clientData;
- return Tcl_GlobalEval(interp, cbindPtr->command);
+ return Tcl_EvalEx(interp, cbindPtr->command, -1, TCL_EVAL_GLOBAL);
}
static void
@@ -410,7 +410,7 @@ CBindingFreeProc(
CBinding *cbindPtr = (CBinding *) clientData;
if (cbindPtr->delete != NULL) {
- Tcl_GlobalEval(cbindPtr->interp, cbindPtr->delete);
+ Tcl_EvalEx(cbindPtr->interp, cbindPtr->delete, -1, TCL_EVAL_GLOBAL);
ckfree((char *) cbindPtr->delete);
}
ckfree((char *) cbindPtr->command);
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index 5dc8feb..8d1f850 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -902,10 +902,10 @@ EmbWinLayoutProc(
if (dsPtr != NULL) {
Tcl_DStringAppend(dsPtr, before, (int) (string-before));
- code = Tcl_GlobalEval(textPtr->interp, Tcl_DStringValue(dsPtr));
+ code = Tcl_EvalEx(textPtr->interp, Tcl_DStringValue(dsPtr), -1, TCL_EVAL_GLOBAL);
Tcl_DStringFree(dsPtr);
} else {
- code = Tcl_GlobalEval(textPtr->interp, ewPtr->body.ew.create);
+ code = Tcl_EvalEx(textPtr->interp, ewPtr->body.ew.create, -1, TCL_EVAL_GLOBAL);
}
if (code != TCL_OK) {
createError:
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 995f71f..417d16b 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3025,7 +3025,7 @@ Initialize(
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) {
+ if (Tcl_InitStubs(interp, "8.5", 0) == NULL) {
return TCL_ERROR;
}
@@ -3257,7 +3257,7 @@ Initialize(
geometry = NULL;
}
- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 0) == NULL) {
+ if (Tcl_PkgRequire(interp, "Tcl", "8.5", 0) == NULL) {
code = TCL_ERROR;
goto done;
}
diff --git a/generic/ttk/ttkTheme.c b/generic/ttk/ttkTheme.c
index 5095487..a2c51c0 100644
--- a/generic/ttk/ttkTheme.c
+++ b/generic/ttk/ttkTheme.c
@@ -509,7 +509,7 @@ static void ThemeChangedProc(ClientData clientData)
static char ThemeChangedScript[] = "ttk::ThemeChanged";
StylePackageData *pkgPtr = clientData;
- if (Tcl_GlobalEval(pkgPtr->interp, ThemeChangedScript) != TCL_OK) {
+ if (Tcl_EvalEx(pkgPtr->interp, ThemeChangedScript, -1, TCL_EVAL_GLOBAL) != TCL_OK) {
Tcl_BackgroundError(pkgPtr->interp);
}
pkgPtr->themeChangePending = 0;
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c
index 43117a1..9671ab9 100644
--- a/macosx/tkMacOSXHLEvents.c
+++ b/macosx/tkMacOSXHLEvents.c
@@ -222,7 +222,7 @@ OappHandler(
if (interp &&
Tcl_GetCommandInfo(interp, "::tk::mac::OpenApplication", &dummy)){
- int code = Tcl_GlobalEval(interp, "::tk::mac::OpenApplication");
+ int code = Tcl_EvalEx(interp, "::tk::mac::OpenApplication", -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
Tcl_BackgroundError(interp);
}
@@ -259,7 +259,7 @@ RappHandler(
if (interp && Tcl_GetCommandInfo(interp,
"::tk::mac::ReopenApplication", &dummy)) {
- int code = Tcl_GlobalEval(interp, "::tk::mac::ReopenApplication");
+ int code = Tcl_EvalEx(interp, "::tk::mac::ReopenApplication", -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK){
Tcl_BackgroundError(interp);
}
@@ -295,7 +295,7 @@ PrefsHandler(
if (interp &&
Tcl_GetCommandInfo(interp, "::tk::mac::ShowPreferences", &dummy)){
- int code = Tcl_GlobalEval(interp, "::tk::mac::ShowPreferences");
+ int code = Tcl_EvalEx(interp, "::tk::mac::ShowPreferences", -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
Tcl_BackgroundError(interp);
}
@@ -625,7 +625,7 @@ ReallyKillMe(
Tcl_Interp *interp = ((KillEvent *) eventPtr)->interp;
Tcl_CmdInfo dummy;
int quit = Tcl_GetCommandInfo(interp, "::tk::mac::Quit", &dummy);
- int code = Tcl_GlobalEval(interp, quit ? "::tk::mac::Quit" : "exit");
+ int code = Tcl_EvalEx(interp, quit ? "::tk::mac::Quit" : "exit", -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK) {
/*
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c
index 6ced470..87504b3 100644
--- a/macosx/tkMacOSXWindowEvent.c
+++ b/macosx/tkMacOSXWindowEvent.c
@@ -701,7 +701,7 @@ TkWmProtocolEventProc(
Tcl_Preserve(protPtr);
interp = protPtr->interp;
Tcl_Preserve(interp);
- result = Tcl_GlobalEval(interp, protPtr->command);
+ result = Tcl_EvalEx(interp, protPtr->command, -1, TCL_EVAL_GLOBAL);
if (result != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (command for \"");
Tcl_AddErrorInfo(interp,
diff --git a/unix/Makefile.in b/unix/Makefile.in
index c530368..aa4e255 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -8,7 +8,6 @@
# Current Tk version; used in various names.
TCLVERSION = @TCL_VERSION@
-TCLPATCHL = @TCL_PATCH_LEVEL@
VERSION = @TK_VERSION@
MAJOR_VERSION = @TK_MAJOR_VERSION@
MINOR_VERSION = @TK_MINOR_VERSION@
@@ -703,13 +702,13 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) ${WISH_EXE}
echo "if {[catch {package present Tcl 8.5.0}]} return";\
relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\
if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \
- echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\
+ echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}$(TK_LIB_FILE)]] Tk]";\
else \
echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\
echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\
- echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)] Tk]";\
+ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin $(TK_LIB_FILE)]] Tk]";\
echo "} else {";\
- echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll] Tk]";\
+ echo " package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir $${relative}.. bin tk${MAJOR_VERSION}${MINOR_VERSION}.dll]] Tk]";\
echo "}";\
fi \
) > "$(PKG_INDEX)"; \
diff --git a/unix/tkUnixSend.c b/unix/tkUnixSend.c
index fb4cdd4..3fb745e 100644
--- a/unix/tkUnixSend.c
+++ b/unix/tkUnixSend.c
@@ -1022,7 +1022,7 @@ Tk_SendCmd(
localInterp = riPtr->interp;
Tcl_Preserve((ClientData) localInterp);
if (firstArg == (argc-1)) {
- result = Tcl_GlobalEval(localInterp, argv[firstArg]);
+ result = Tcl_EvalEx(localInterp, argv[firstArg], -1, TCL_EVAL_GLOBAL);
} else {
Tcl_DStringInit(&request);
Tcl_DStringAppend(&request, argv[firstArg], -1);
@@ -1030,7 +1030,7 @@ Tk_SendCmd(
Tcl_DStringAppend(&request, " ", 1);
Tcl_DStringAppend(&request, argv[i], -1);
}
- result = Tcl_GlobalEval(localInterp, Tcl_DStringValue(&request));
+ result = Tcl_EvalEx(localInterp, Tcl_DStringValue(&request), -1, TCL_EVAL_GLOBAL);
Tcl_DStringFree(&request);
}
if (interp != localInterp) {
@@ -1556,7 +1556,7 @@ SendEventProc(
remoteInterp = riPtr->interp;
Tcl_Preserve((ClientData) remoteInterp);
- result = Tcl_GlobalEval(remoteInterp, script);
+ result = Tcl_EvalEx(remoteInterp, script, -1, TCL_EVAL_GLOBAL);
/*
* The call to Tcl_Release may have released the interpreter which
diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c
index 940cf73..d230b9f 100644
--- a/unix/tkUnixWm.c
+++ b/unix/tkUnixWm.c
@@ -6206,7 +6206,7 @@ TkWmProtocolEventProc(
Tcl_Preserve((ClientData) protPtr);
interp = protPtr->interp;
Tcl_Preserve((ClientData) interp);
- result = Tcl_GlobalEval(interp, protPtr->command);
+ result = Tcl_EvalEx(interp, protPtr->command, -1, TCL_EVAL_GLOBAL);
if (result != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (command for \"");
Tcl_AddErrorInfo(interp, protocolName);
diff --git a/win/Makefile.in b/win/Makefile.in
index eda2aed..24217be 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -4,8 +4,6 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
-TCLVERSION = @TCL_VERSION@
-TCLPATCHL = @TCL_PATCH_LEVEL@
VERSION = @TK_VERSION@
PATCH_LEVEL = @TK_PATCH_LEVEL@
@@ -484,12 +482,12 @@ install-binaries: binaries
@echo "Creating package index $(PKG_INDEX)";
@$(RM) $(PKG_INDEX);
@(\
- echo "if {[catch {package present Tcl $(TCLVERSION).0}]} return";\
+ echo "if {[catch {package present Tcl 8.5.0}]} return";\
echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\
echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\
- echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin libtk$(VERSION).dll] Tk]";\
+ echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin libtk$(VERSION).dll]] Tk]";\
echo "} else {";\
- echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\
+ echo " package ifneeded Tk $(VERSION)$(PATCH_LEVEL) [list load [file normalize [file join \$$dir .. .. bin $(TK_DLL_FILE)]] Tk]";\
echo "}";\
) > $(PKG_INDEX);
@for i in tkConfig.sh $(TK_LIB_FILE) $(TK_STUB_LIB_FILE); \
diff --git a/win/tkWinScrlbr.c b/win/tkWinScrlbr.c
index 2ec6883..46aad58 100644
--- a/win/tkWinScrlbr.c
+++ b/win/tkWinScrlbr.c
@@ -553,7 +553,7 @@ ScrollbarProc(
}
interp = scrollPtr->info.interp;
- code = Tcl_GlobalEval(interp, cmdString.string);
+ code = Tcl_EvalEx(interp, cmdString.string, -1, TCL_EVAL_GLOBAL);
if (code != TCL_OK && code != TCL_CONTINUE && code != TCL_BREAK) {
Tcl_AddErrorInfo(interp, "\n (scrollbar command)");
Tcl_BackgroundError(interp);
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index e3816ca..f6723e0 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -6590,7 +6590,7 @@ TkWmProtocolEventProc(
Tcl_Preserve((ClientData) protPtr);
interp = protPtr->interp;
Tcl_Preserve((ClientData) interp);
- result = Tcl_GlobalEval(interp, protPtr->command);
+ result = Tcl_EvalEx(interp, protPtr->command, -1, TCL_EVAL_GLOBAL);
if (result != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n (command for \"");
Tcl_AddErrorInfo(interp, name);