40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
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
68
69
70
71
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
|
* [Initialization, Library, Autoloader]
* [Pathname Management]
* [Object System and Fundamental Object Types]
* [Parsing and Evaluation]
* [Allocation]
* [Environment Variables]
<h1>Discussion</h1>
This has been considered a single module, but tclPanic.c is essentially a self contained
bit without dependencies, while tclMain.c depends on nearly everything. Most other parts
of Tcl that claim a dependence on this module are really just callers of <b>Tcl_Panic</b>.
One wrinkle is the routine <b>tclWinDebugPanic</b> which is in multiple places,
tclWinError.c and tclWinFile.c. There's also a great deal of <b>#ifdef</b> in tclPanic.c.
A restructuring into a generic caller of <b>TclpPanic</b> might be a path to increasing
simplicity and conventionality.
The routine <b>TclGetMainLoop</b> is another to note. It appears in no header file.
It gets declared with <b>MODULE_SCOPE</b> but there doesn't appear to be any reason
it could not be a static function.
The routine <b>TclFullFinalizationRequested</b> probably should move into [Event Loops].
<h1>The core_zip_vfs Patch</h1>
<h2>The core_zip_vfs Patch</h2>
The [/timeline?r=core_zip_vfs|core_zip_vfs] branch adds the ability to mount a zip archive concatenated to the current executable as a virtual file system, capable of hosting both env(TCL_LIBRARY) and kick off
a bootloader (if a file called <i>main.tcl</i> is present).
This patch:
* Adds [/finfo?name=generic/tclZipVfs.c|tclZipVfs.c]
* Modifies [/finfo?name=unix/tclAppInit.c|tclAppInit.c]
* Modifies [/finfo?name=win/tclAppInit.c|tclAppInit.c]
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
90
91
92
93
94
95
96
|
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
an embedded TCL_LIBRARY.
The tk Makefile has a "make tkkit" which provides a similar service for wish-based kits.
If the shells are compiled with --enable-shared=no, the Tcl/Tk libraries will be statically
bound with the shells, and thus truly self-contained. Otherwise they will need access to the
tcl/tk shared libraries. Either in the same directory as the executable, or tucked somewhere in your operating's systems library search path.
<h1>Discussion</h1>
This has been considered a single module, but tclPanic.c is essentially a self contained
bit without dependencies, while tclMain.c depends on nearly everything. Most other parts
of Tcl that claim a dependence on this module are really just callers of <b>Tcl_Panic</b>.
One wrinkle is the routine <b>tclWinDebugPanic</b> which is in multiple places,
tclWinError.c and tclWinFile.c. There's also a great deal of <b>#ifdef</b> in tclPanic.c.
A restructuring into a generic caller of <b>TclpPanic</b> might be a path to increasing
simplicity and conventionality.
The routine <b>TclGetMainLoop</b> is another to note. It appears in no header file.
It gets declared with <b>MODULE_SCOPE</b> but there doesn't appear to be any reason
it could not be a static function.
The routine <b>TclFullFinalizationRequested</b> probably should move into [Event Loops].
|