MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / Tcl_AppInit

Function Tcl_AppInit

SRC/tcl/tkAppInit.cpp:111–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 */
110
111int
112Tcl_AppInit(Tcl_Interp *interp)
113{
114 if (Tcl_Init(interp) == TCL_ERROR) {
115 return TCL_ERROR;
116 }
117 if (Tk_Init(interp) == TCL_ERROR) {
118 return TCL_ERROR;
119 }
120 Tcl_StaticPackage(interp, "Tk", Tk_Init, Tk_SafeInit);
121
122 /*
123 * Call the init procedures for included packages. Each call should
124 * look like this:
125 *
126 * if (Mod_Init(interp) == TCL_ERROR) {
127 * return TCL_ERROR;
128 * }
129 *
130 * where "Mod" is the name of the module.
131 */
132
133 /*
134 * Call Tcl_CreateCommand for application-specific commands, if
135 * they weren't already created by the init procedures called above.
136 */
137
138 if (OpenSeesAppInit(interp) < 0)
139 return TCL_ERROR;
140
141 /*
142 * Specify a user-specific startup file to invoke if the application
143 * is run interactively. Typically the startup file is "~/.apprc"
144 * where "app" is the name of the application. If this line is deleted
145 * then no user-specific startup file will be run under any conditions.
146 */
147
148 Tcl_SetVar(interp, "tcl_rcFileName", "~/.wishrc", TCL_GLOBAL_ONLY);
149 return TCL_OK;
150}

Callers

nothing calls this directly

Calls 1

OpenSeesAppInitFunction · 0.85

Tested by

no test coverage detected