diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-04 08:34:32 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-04 08:34:32 (GMT) |
| commit | bb81e3d8bc4e2c0eb6898fdbe724d5643e75d2cc (patch) | |
| tree | 2abb404592d4d77b0c723c809e0682ada734db38 /doc | |
| parent | 6f640f9e5701a60ac0fbde981742fd3a80f59d18 (diff) | |
| parent | 578ce801fa24d938208f1ef2fe164283d686caf9 (diff) | |
| download | tcl-bb81e3d8bc4e2c0eb6898fdbe724d5643e75d2cc.zip tcl-bb81e3d8bc4e2c0eb6898fdbe724d5643e75d2cc.tar.gz tcl-bb81e3d8bc4e2c0eb6898fdbe724d5643e75d2cc.tar.bz2 | |
TIP #414 implementation
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/InitSubSyst.3 | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/doc/InitSubSyst.3 b/doc/InitSubSyst.3 new file mode 100644 index 0000000..08b3154 --- /dev/null +++ b/doc/InitSubSyst.3 @@ -0,0 +1,53 @@ +'\" +'\" Copyright (c) 2013 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.6.1 Tcl "Tcl Library Procedures" +.BS +.SH NAME +Tcl_InitSubsystems \- initialize the Tcl library. +.SH SYNOPSIS +.nf +\fB#include <tcl.h>\fR +.sp +const char * +\fBTcl_InitSubsystems\fR(\fIpanicProc\fR) +.SH ARGUMENTS +.SH ARGUMENTS +.AS Tcl_PanicProc *panicProc +.AP Tcl_PanicProc *panicProc in +Desired panic function, for error reporting. If NULL, the default +panicProc is used, which normally writes the message to stderr. +.BE + +.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. +.PP +The return value is the Tcl version. +.PP +If \fBTcl_InitSubsystems()\fR is called in code where +\fBUSE_TCL_STUBS\fR is set, it does one additional thing: +initialize the Stub table for using Tcl as utility +library, without needing a Tcl interpreter. For example: +.CS +const char *version = Tcl_InitSubSystems(NULL); +/* At this point, Tcl C API calls without interp are ready for use */ +int major, minor, patch; +Tcl_GetVersion(&major, &minor, &patch); +.CE +This will work as expected, both with and without stubs. +.SH KEYWORDS +binary, executable file |
