summaryrefslogtreecommitdiff
path: root/ext/tcltklib/stubs.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tcltklib/stubs.c')
-rw-r--r--ext/tcltklib/stubs.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/ext/tcltklib/stubs.c b/ext/tcltklib/stubs.c
index 8faa4ca24ec..3913abb570e 100644
--- a/ext/tcltklib/stubs.c
+++ b/ext/tcltklib/stubs.c
@@ -50,20 +50,20 @@ ruby_tcltk_stubs()
#endif
ruby_tk_dll = getenv("RUBY_TK_DLL");
if (ruby_tcl_dll && ruby_tk_dll) {
- tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
- tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
+ tcl_dll = (DL_HANDLE)DL_OPEN(ruby_tcl_dll);
+ tk_dll = (DL_HANDLE)DL_OPEN(ruby_tk_dll);
} else {
- snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT);
- snprintf(tk_name, sizeof tk_name, TK_NAME, DLEXT);
- /* examine from 8.9 to 8.1 */
- for (n = '9'; n > '0'; n--) {
- tcl_name[TCL_INDEX] = n;
- tk_name[TK_INDEX] = n;
- tcl_dll = (DL_HANDLE)DL_OPEN(tcl_name);
- tk_dll = (DL_HANDLE)DL_OPEN(tk_name);
- if (tcl_dll && tk_dll)
- break;
- }
+ snprintf(tcl_name, sizeof tcl_name, TCL_NAME, DLEXT);
+ snprintf(tk_name, sizeof tk_name, TK_NAME, DLEXT);
+ /* examine from 8.9 to 8.1 */
+ for (n = '9'; n > '0'; n--) {
+ tcl_name[TCL_INDEX] = n;
+ tk_name[TK_INDEX] = n;
+ tcl_dll = (DL_HANDLE)DL_OPEN(tcl_name);
+ tk_dll = (DL_HANDLE)DL_OPEN(tk_name);
+ if (tcl_dll && tk_dll)
+ break;
+ }
}
#if defined _WIN32
@@ -71,31 +71,31 @@ ruby_tcltk_stubs()
#endif
if (!tcl_dll || !tk_dll)
- return -1;
+ return -1;
p_Tcl_FindExecutable = (void (*)(const char *))DL_SYM(tcl_dll, "Tcl_FindExecutable");
if (!p_Tcl_FindExecutable)
- return -7;
+ return -7;
p_Tcl_FindExecutable("ruby");
p_Tcl_CreateInterp = (Tcl_Interp *(*)())DL_SYM(tcl_dll, "Tcl_CreateInterp");
if (!p_Tcl_CreateInterp)
- return -2;
+ return -2;
tcl_ip = (*p_Tcl_CreateInterp)();
if (!tcl_ip)
- return -3;
+ return -3;
p_Tk_Init = (int (*)(Tcl_Interp *))DL_SYM(tk_dll, "Tk_Init");
if (!p_Tk_Init)
- return -4;
+ return -4;
(*p_Tk_Init)(tcl_ip);
if (!Tcl_InitStubs(tcl_ip, "8.1", 0))
- return -5;
+ return -5;
if (!Tk_InitStubs(tcl_ip, "8.1", 0))
- return -6;
+ return -6;
Tcl_DeleteInterp(tcl_ip);