Artifacts Associated With Ticket 218563
Ticket change [13f0da0427] (rid 124309) by nobody on 2000-10-26 01:02:20:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1128 Bug Version: 8.1b1 SubmitDate: '1999-01-29' LastModified: '1999-04-05' Severity: SER Status: Released Submitter: welch ChangedBy: stanton OS: Windows NT Machine: X86 FixedDate: '1999-04-05' FixedInVersion: 8.1b3 ClosedDate: '2000-10-25' Name: Jan Nijtmans DesiredBehavior: The 'secret' TclSetPreInitScript() function from Tcl8.0.4, which is a key function for TclPro wrapper, is not implemented yet in Tcl8.1b1. Patch: *** generic/tclInitScript.h.origTue Jan 19 23:03:24 1999 --- generic/tclInitScript.hTue Jan 19 23:05:58 1999 *************** *** 45,47 **** --- 45,81 ---- }\n\ tclInit"; + /* + * A pointer to a string that holds an initialization script that if non-NULL + * is evaluated in Tcl_Init() prior to the the built-in initialization script + * above. This variable can be modified by the procedure below. + */ + + static char * tclPreInitScript = NULL; + + + /* + *---------------------------------------------------------------------- + * + * TclSetPreInitScript -- + * + *This routine is used to change the value of the internal + *variable, tclPreInitScript. + * + * Results: + *Returns the current value of tclPreInitScript. + * + * Side effects: + *Changes the way Tcl_Init() routine behaves. + * + *---------------------------------------------------------------------- + */ + + char * + TclSetPreInitScript (string) + char *string;/* Pointer to a script. */ + { + char *prevString = tclPreInitScript; + tclPreInitScript = string; + return(prevString); + } *** unix/tclUnixInit.c.origTue Jan 19 23:08:15 1999 --- unix/tclUnixInit.cTue Jan 19 23:12:25 1999 *************** *** 515,521 **** pathPtr = Tcl_NewObj(); } Tcl_SetObjVar2(interp, "tcl_libPath", NULL, pathPtr, TCL_GLOBAL_ONLY); ! return Tcl_Eval(interp, initScript); } /* --- 515,530 ---- pathPtr = Tcl_NewObj(); } Tcl_SetObjVar2(interp, "tcl_libPath", NULL, pathPtr, TCL_GLOBAL_ONLY); ! ! if (tclPreInitScript != NULL) { ! if (Tcl_Eval(interp, tclPreInitScript) == TCL_ERROR) { ! return (TCL_ERROR); ! }; ! } ! if (Tcl_Eval(interp, initScript) == TCL_ERROR) { ! return TCL_ERROR; ! } ! return TCL_OK; } /* *** win/tclWinInit.c.origTue Jan 19 23:12:47 1999 --- win/tclWinInit.cTue Jan 19 23:15:20 1999 *************** *** 586,592 **** pathPtr = Tcl_NewObj(); } Tcl_SetObjVar2(interp, "tcl_libPath", NULL, pathPtr, TCL_GLOBAL_ONLY); ! return Tcl_Eval(interp, initScript); } /* --- 586,600 ---- pathPtr = Tcl_NewObj(); } Tcl_SetObjVar2(interp, "tcl_libPath", NULL, pathPtr, TCL_GLOBAL_ONLY); ! if (tclPreInitScript != NULL) { ! if (Tcl_Eval(interp, tclPreInitScript) == TCL_ERROR) { ! return (TCL_ERROR); ! }; ! } ! if (Tcl_Eval(interp, initScript) == TCL_ERROR) { ! return TCL_ERROR; ! } ! return TCL_OK; } /* PatchFiles: tclInitScript.h tclUnixInit.c tclWinInit.c The above implementation of TclSetPreInitScript() is copied from Tcl8.0.4 - foundin initialized to: "obsolete: 8.1b1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "TclSetPreInitScript function missing"
- type initialized to: "Bug"
Ticket change [cb74c5ade5] (rid 95519) by welch on 2000-10-26 08:24:15:
- closedate changed to: "2000-10-26T01:24:15"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [56f688d9f4] (rid 94412) by dgp on 2001-04-17 04:45:55:
- closedate changed to: "2001-04-16T21:45:55"
- closer changed to: "dgp"
- subsystem changed to: "38. Init - Library - Autoload"