summaryrefslogtreecommitdiffstats
path: root/doc/Init.3
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2021-04-16 11:48:02 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2021-04-16 11:48:02 (GMT)
commit8ba69750a3d5b3706fb03205f59a64e6c7539663 (patch)
treec42db59de4d866450f8acb55223941914cbec599 /doc/Init.3
parenta6a4abe085d5550416716aed452c318d35f9a2d3 (diff)
downloadtcl-8ba69750a3d5b3706fb03205f59a64e6c7539663.zip
tcl-8ba69750a3d5b3706fb03205f59a64e6c7539663.tar.gz
tcl-8ba69750a3d5b3706fb03205f59a64e6c7539663.tar.bz2
TIP596: Document Tcl_MainEx, Tcl_MainExW, Tcl_GetMemoryInfo, Tcl_SetPreInitScript
Diffstat (limited to 'doc/Init.3')
-rw-r--r--doc/Init.314
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/Init.3 b/doc/Init.3
index d9fc2e1..fa87892 100644
--- a/doc/Init.3
+++ b/doc/Init.3
@@ -2,7 +2,7 @@
'\" Copyright (c) 1998-2000 Scriptics Corporation.
'\" All rights reserved.
'\"
-.TH Tcl_Init 3 8.0 Tcl "Tcl Library Procedures"
+.TH Tcl_Init 3 9.0 Tcl "Tcl Library Procedures"
.so man.macros
.BS
.SH NAME
@@ -13,10 +13,15 @@ Tcl_Init \- find and source initialization script
.sp
int
\fBTcl_Init\fR(\fIinterp\fR)
+.sp
+const char *
+\fBTcl_SetPreInitScript\fR(\fIscriptPtr\fR)
.SH ARGUMENTS
.AS Tcl_Interp *interp
.AP Tcl_Interp *interp in
Interpreter to initialize.
+.AP "const char" *scriptPtr in
+Address of the initialization script.
.BE
.SH DESCRIPTION
@@ -26,6 +31,13 @@ Interpreter to initialize.
path.
.PP
\fBTcl_Init\fR is typically called from \fBTcl_AppInit\fR procedures.
+.PP
+\fBTcl_SetPreInitScript\fR registeres the pre-initialization script and returns the former (now replaced) script pointer.
+A value of \fINULL\fR may be passed to not register any script.
+The pre-initialization script is executed by \fBTcl_Init\fR before accessing the file system.
+The purpose is to typically prepare a custom file system (like an embedded zip-file) to be activated before the search.
+
+When the TCL library is loaded within an embedded application, the stubs table must be first initialized using one of \fBTcl_InitSubsystems\fR, \fBTcl_SetPanicProc\fR, \fBTcl_FindExecutable\fR or \fBTclZipfs_AppHook\fR before \fBTcl_SetPreInitScript\fR may be called.
.SH "SEE ALSO"
Tcl_AppInit, Tcl_Main