136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
+
|
Tcl_Obj *const *savedobjv = objv;
static const char *const options[] = {
"-global", "-lazy", "--", NULL
};
enum options {
LOAD_GLOBAL, LOAD_LAZY, LOAD_LAST
};
(void)dummy;
while (objc > 2) {
if (TclGetString(objv[1])[0] != '-') {
break;
}
if (Tcl_GetIndexFromObj(interp, objv[1], options, "option", 0,
&index) != TCL_OK) {
|
558
559
560
561
562
563
564
565
566
567
568
569
570
571
|
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
|
+
|
const char *packageName;
static const char *const options[] = {
"-nocomplain", "-keeplibrary", "--", NULL
};
enum options {
UNLOAD_NOCOMPLAIN, UNLOAD_KEEPLIB, UNLOAD_LAST
};
(void)dummy;
for (i = 1; i < objc; i++) {
if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", 0,
&index) != TCL_OK) {
fullFileName = Tcl_GetString(objv[i]);
if (fullFileName[0] == '-') {
/*
|
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
|
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
|
-
+
+
|
*----------------------------------------------------------------------
*/
static void
LoadCleanupProc(
ClientData clientData, /* Pointer to first InterpPackage structure
* for interp. */
Tcl_Interp *interp) /* Interpreter that is being deleted. */
Tcl_Interp *dummy) /* Interpreter that is being deleted. */
{
InterpPackage *ipPtr, *nextPtr;
(void)dummy;
ipPtr = (InterpPackage *)clientData;
while (ipPtr != NULL) {
nextPtr = ipPtr->nextPtr;
ckfree(ipPtr);
ipPtr = nextPtr;
}
|