summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-14 12:37:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-09-14 12:37:13 (GMT)
commit4396d37f6f0fc2dc3b776872b73ff9717ea26e43 (patch)
tree5f2caf523448854c5e54436a85538bfd43f63247
parent3f40916f38cf0dea71aedef71ea340507267e01e (diff)
parent5406b207723fa1acec5df7441387d1c9229a88ac (diff)
downloadtcl-4396d37f6f0fc2dc3b776872b73ff9717ea26e43.zip
tcl-4396d37f6f0fc2dc3b776872b73ff9717ea26e43.tar.gz
tcl-4396d37f6f0fc2dc3b776872b73ff9717ea26e43.tar.bz2
Merge 8.7
-rw-r--r--doc/InitSubSyst.331
-rw-r--r--generic/tcl.decls3
-rw-r--r--generic/tcl.h1
-rw-r--r--generic/tclBasic.c2
-rw-r--r--generic/tclCkalloc.c2
-rw-r--r--generic/tclEncoding.c2
-rw-r--r--generic/tclEvent.c6
-rw-r--r--generic/tclInt.h1
-rw-r--r--generic/tclPanic.c2
-rw-r--r--generic/tclThreadAlloc.c2
10 files changed, 43 insertions, 9 deletions
diff --git a/doc/InitSubSyst.3 b/doc/InitSubSyst.3
new file mode 100644
index 0000000..eef801f
--- /dev/null
+++ b/doc/InitSubSyst.3
@@ -0,0 +1,31 @@
+'\"
+'\" Copyright (c) 2018 Tcl Core Team
+'\"
+'\" See the file "license.terms" for information on usage and redistribution
+'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+'\"
+.so man.macros
+.TH Tcl_InitSubsystems 3 8.7 Tcl "Tcl Library Procedures"
+.BS
+.SH NAME
+Tcl_InitSubsystems \- initialize the Tcl library.
+.SH SYNOPSIS
+.nf
+\fB#include <tcl.h>\fR
+.sp
+void
+\fBTcl_InitSubsystems\fR(\fIvoid\fR)
+.SH DESCRIPTION
+.PP
+The \fBTcl_InitSubsystems\fR procedure initializes the Tcl
+library. This procedure is typically invoked as the very
+first thing in the application's main program.
+.PP
+\fBTcl_InitSubsystems\fR is very similar in use to
+\fBTcl_FindExecutable\fR. It can be used when Tcl is
+used as utility library, no other encodings than utf8,
+iso8859-1 or unicode are used, and no interest exists in the
+value of \fBinfo nameofexecutable\fR. The system encoding will not
+be extracted from the environment, but falls back to iso8859-1.
+.SH KEYWORDS
+binary, executable file
diff --git a/generic/tcl.decls b/generic/tcl.decls
index 6cf7e36..f72d57e 100644
--- a/generic/tcl.decls
+++ b/generic/tcl.decls
@@ -2519,6 +2519,9 @@ export {
export {
void Tcl_GetMemoryInfo(Tcl_DString *dsPtr)
}
+export {
+ void Tcl_InitSubsystems(void)
+}
# Local Variables:
# mode: tcl
diff --git a/generic/tcl.h b/generic/tcl.h
index 37895b8..8017dd0 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -2229,6 +2229,7 @@ EXTERN TCL_NORETURN void Tcl_MainEx(int argc, char **argv,
Tcl_AppInitProc *appInitProc, Tcl_Interp *interp);
EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
const char *version, int exact);
+EXTERN void Tcl_InitSubsystems(void);
EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
EXTERN void Tcl_FindExecutable(const char *argv0);
EXTERN void Tcl_SetPanicProc(
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 9d4e424..b4f9d2b 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -626,7 +626,7 @@ Tcl_CreateInterp(void)
char mathFuncName[32];
CallFrame *framePtr;
- TclInitSubsystems();
+ Tcl_InitSubsystems();
/*
* Panic if someone updated the CallFrame structure without also updating
diff --git a/generic/tclCkalloc.c b/generic/tclCkalloc.c
index 3c6e615..22ffdbe 100644
--- a/generic/tclCkalloc.c
+++ b/generic/tclCkalloc.c
@@ -143,7 +143,7 @@ static void ValidateMemory(struct mem_header *memHeaderP,
*
* Initialize the locks used by the allocator. This is only appropriate
* to call in a single threaded environment, such as during
- * TclInitSubsystems.
+ * Tcl_InitSubsystems.
*
*----------------------------------------------------------------------
*/
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 5699e8b..2d4001d 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -1453,7 +1453,7 @@ Tcl_FindExecutable(
const char *argv0) /* The value of the application's argv[0]
* (native). */
{
- TclInitSubsystems();
+ Tcl_InitSubsystems();
TclpSetInitialEncodings();
TclpFindExecutable(argv0);
}
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index b224349..03ab642 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -991,7 +991,7 @@ Tcl_Exit(
/*
*-------------------------------------------------------------------------
*
- * TclInitSubsystems --
+ * Tcl_InitSubsystems --
*
* Initialize various subsytems in Tcl. This should be called the first
* time an interp is created, or before any of the subsystems are used.
@@ -1014,10 +1014,10 @@ Tcl_Exit(
*/
void
-TclInitSubsystems(void)
+Tcl_InitSubsystems(void)
{
if (inExit != 0) {
- Tcl_Panic("TclInitSubsystems called while exiting");
+ Tcl_Panic("Tcl_InitSubsystems called while exiting");
}
if (subsystemsInitialized == 0) {
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 9c58405..8afd63e 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3003,7 +3003,6 @@ MODULE_SCOPE void TclInitLimitSupport(Tcl_Interp *interp);
MODULE_SCOPE void TclInitNamespaceSubsystem(void);
MODULE_SCOPE void TclInitNotifier(void);
MODULE_SCOPE void TclInitObjSubsystem(void);
-MODULE_SCOPE void TclInitSubsystems(void);
MODULE_SCOPE int TclInterpReady(Tcl_Interp *interp);
MODULE_SCOPE int TclIsSpaceProc(int byte);
MODULE_SCOPE int TclIsDigitProc(int byte);
diff --git a/generic/tclPanic.c b/generic/tclPanic.c
index 277f7ad..7c21de2 100644
--- a/generic/tclPanic.c
+++ b/generic/tclPanic.c
@@ -46,7 +46,7 @@ Tcl_SetPanicProc(
TCL_NORETURN1 Tcl_PanicProc *proc)
{
panicProc = proc;
- TclInitSubsystems();
+ Tcl_InitSubsystems();
}
/*
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 5d4dbbc..c2a94f6 100644
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -1036,7 +1036,7 @@ GetBlocks(
* TclInitThreadAlloc --
*
* Initializes the allocator cache-maintenance structures.
- * It is done early and protected during the TclInitSubsystems().
+ * It is done early and protected during the Tcl_InitSubsystems().
*
* Results:
* None.