30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
+
+
+
+
+
+
|
#endif
#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 85
# define KIT_INCLUDES_PWB 1
#endif
Tcl_AppInitProc Vfs_Init, Rechan_Init;
Tcl_AppInitProc Vfs_kitdll_data_tcl_Init;
#ifdef KIT_INCLUDES_MK4TCL
Tcl_AppInitProc Mk4tcl_Init;
#endif
#ifdef KIT_INCLUDES_PWB
Tcl_AppInitProc Pwb_Init;
#endif
#ifdef TCL_THREADS
Tcl_AppInitProc Thread_Init;
#endif
#ifdef _WIN32
Tcl_AppInitProc Dde_Init, Registry_Init;
#endif
/*
* This Tcl code is invoked whenever Tcl_Init() is called on an
* interpreter. It should mount up the VFS and make everything ready for
* that interpreter to do its job.
*/
static char *preInitCmd =
"proc tclKitInit {} {\n"
"rename tclKitInit {}\n"
#ifdef KIT_INCLUDES_MK4TCL
"catch { load {} Mk4tcl }\n"
#endif
"load {} tclkit::init\n"
"load {} rechan\n"
"load {} vfs\n"
"load {} vfs_kitdll_data_tcl\n"
#include "vfs_kitdll.tcl.h"
"if {![file exists \"/.KITDLL_TCL/boot.tcl\"]} {\n"
"vfs::kitdll::Mount tcl /.KITDLL_TCL\n"
|
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
+
+
+
|
* are ready to be used when invoked.
*/
void __attribute__((constructor)) _Tclkit_Init(void) {
Tcl_StaticPackage(0, "tclkit::init", Tclkit_init_Init, NULL);
Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL);
Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL);
Tcl_StaticPackage(0, "vfs_kitdll_data_tcl", Vfs_kitdll_data_tcl_Init, NULL);
#ifdef KIT_INCLUDES_MK4TCL
Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL);
#endif
#ifdef KIT_INCLUDES_PWB
Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL);
#endif
#ifdef TCL_THREADS
Tcl_StaticPackage(0, "Thread", Thread_Init, NULL);
#endif
#ifdef _WIN32
|