Lines 413-419
Blt_Init(interp)
Link Here
|
413 |
* Check that the versions of Tcl that have been loaded are |
413 |
* Check that the versions of Tcl that have been loaded are |
414 |
* the same ones that BLT was compiled against. |
414 |
* the same ones that BLT was compiled against. |
415 |
*/ |
415 |
*/ |
416 |
if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, EXACT) == NULL) { |
416 |
if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) { |
417 |
return TCL_ERROR; |
417 |
return TCL_ERROR; |
418 |
} |
418 |
} |
419 |
/* Set the "blt_version", "blt_patchLevel", and "blt_libPath" Tcl |
419 |
/* Set the "blt_version", "blt_patchLevel", and "blt_libPath" Tcl |
Lines 458-473
Blt_Init(interp)
Link Here
|
458 |
register Tcl_AppInitProc **p; |
458 |
register Tcl_AppInitProc **p; |
459 |
Tcl_Namespace *nsPtr; |
459 |
Tcl_Namespace *nsPtr; |
460 |
|
460 |
|
|
|
461 |
if (Tk_InitStubs(interp, TK_VERSION, 1) == NULL) { |
462 |
return TCL_OK; |
463 |
} |
464 |
|
465 |
#if 0 |
461 |
#if (TCL_VERSION_NUMBER >= _VERSION(8,1,0)) |
466 |
#if (TCL_VERSION_NUMBER >= _VERSION(8,1,0)) |
462 |
if (Tcl_PkgPresent(interp, "Tk", TK_VERSION, EXACT) == NULL) { |
467 |
if (Tcl_PkgPresent(interp, "Tk", TK_VERSION, EXACT) == NULL) { |
463 |
return TCL_OK; |
468 |
return TCL_OK; |
464 |
} |
469 |
} |
465 |
#else |
470 |
#else |
466 |
if (Tcl_PkgRequire(interp, "Tk", TK_VERSION, EXACT) == NULL) { |
471 |
if (Tcl_PkgRequire(interp, "Tk", TK_VERSION, EXACT) == NULL) { |
467 |
Tcl_ResetResult(interp); |
472 |
Tcl_ResetResult(interp); |
468 |
return TCL_OK; |
473 |
return TCL_OK; |
469 |
} |
474 |
} |
470 |
#endif |
475 |
#endif |
|
|
476 |
#endif |
477 |
|
471 |
nsPtr = Tcl_CreateNamespace(interp, "blt::tile", NULL, |
478 |
nsPtr = Tcl_CreateNamespace(interp, "blt::tile", NULL, |
472 |
(Tcl_NamespaceDeleteProc *) NULL); |
479 |
(Tcl_NamespaceDeleteProc *) NULL); |
473 |
if (nsPtr == NULL) { |
480 |
if (nsPtr == NULL) { |
Lines 507-513
Blt_Init(interp)
Link Here
|
507 |
* Check that the versions of Tcl that have been loaded are |
514 |
* Check that the versions of Tcl that have been loaded are |
508 |
* the same ones that BLT was compiled against. |
515 |
* the same ones that BLT was compiled against. |
509 |
*/ |
516 |
*/ |
510 |
if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, EXACT) == NULL) { |
517 |
if (Tcl_InitStubs(interp, TCL_VERSION, EXACT) == NULL) { |
511 |
return TCL_ERROR; |
518 |
return TCL_ERROR; |
512 |
} |
519 |
} |
513 |
/* Set the "blt_version", "blt_patchLevel", and "blt_libPath" Tcl |
520 |
/* Set the "blt_version", "blt_patchLevel", and "blt_libPath" Tcl |
Lines 543-548
Blt_Init(interp)
Link Here
|
543 |
if (!tkLoaded) { |
550 |
if (!tkLoaded) { |
544 |
register Tcl_AppInitProc **p; |
551 |
register Tcl_AppInitProc **p; |
545 |
|
552 |
|
|
|
553 |
if (Tk_InitStubs(interp, TK_VERSION, 1) == NULL) { |
554 |
return TCL_OK; |
555 |
} |
556 |
|
557 |
#if 0 |
546 |
#if (TCL_VERSION_NUMBER >= _VERSION(8,1,0)) |
558 |
#if (TCL_VERSION_NUMBER >= _VERSION(8,1,0)) |
547 |
if (Tcl_PkgPresent(interp, "Tk", TK_VERSION, EXACT) == NULL) { |
559 |
if (Tcl_PkgPresent(interp, "Tk", TK_VERSION, EXACT) == NULL) { |
548 |
return TCL_OK; |
560 |
return TCL_OK; |
Lines 553-558
Blt_Init(interp)
Link Here
|
553 |
return TCL_OK; |
565 |
return TCL_OK; |
554 |
} |
566 |
} |
555 |
#endif |
567 |
#endif |
|
|
568 |
#endif |
569 |
|
556 |
/* Initialize the BLT commands that use Tk too. */ |
570 |
/* Initialize the BLT commands that use Tk too. */ |
557 |
for (p = tkCmds; *p != NULL; p++) { |
571 |
for (p = tkCmds; *p != NULL; p++) { |
558 |
if ((**p) (interp) != TCL_OK) { |
572 |
if ((**p) (interp) != TCL_OK) { |