summaryrefslogtreecommitdiffstats
path: root/doc/library.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/library.n')
-rw-r--r--doc/library.n34
1 files changed, 32 insertions, 2 deletions
diff --git a/doc/library.n b/doc/library.n
index 215a569..ef1c40d 100644
--- a/doc/library.n
+++ b/doc/library.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) library.n 1.23 96/11/20 14:07:04
+'\" RCS: @(#) $Id: library.n,v 1.1.2.1 1998/09/24 23:58:33 stanton Exp $
.so man.macros
.TH library n "8.0" Tcl "Tcl Built-In Commands"
.BS
@@ -16,7 +16,9 @@ library \- standard library of Tcl procedures
\fBauto_execok \fIcmd\fR
\fBauto_load \fIcmd\fR
\fBauto_mkindex \fIdir pattern pattern ...\fR
+\fBauto_mkindex_old \fIdir pattern pattern ...\fR
\fBauto_reset\fR
+\fBtcl_findLibrary \fIbasename version patch initScript enVarName varName\fR
\fBparray \fIarrayName\fR
.VS
\fBtcl_endOfWord \fIstr start\fR
@@ -121,7 +123,15 @@ For example, the command
will read all the \fB.tcl\fR files in subdirectory \fBfoo\fR
and generate a new index file \fBfoo/tclIndex\fR.
.PP
-\fBAuto_mkindex\fR parses the Tcl scripts in a relatively
+\fBAuto_mkindex\fR parses the Tcl scripts by sourcing them
+into a slave interpreter and monitoring the proc and
+namespace commands that are executed.
+Extensions can use the (undocumented)
+auto_mkindex_parser package to register other commands that
+can contribute to the auto_load index.
+You will have to read through init.tcl to see how this works.
+.PP
+\fBAuto_mkindex_old\fR parses the Tcl scripts in a relatively
unsophisticated way: if any line contains the word \fBproc\fR
as its first characters then it is assumed to be a procedure
definition and the next word of the line is taken as the
@@ -139,6 +149,26 @@ needed.
index, so that fresh copies of them will be loaded the next time
that they're used.
.TP
+\fBtcl_findLibrary \fIbasename version patch initScript enVarName varName\fR
+This is a standard search procedure for use by extensions during
+their initialization. They call this procedure to look for their
+script library in several standard directories.
+The last component of the name of the library directory is
+normally \fIbasenameversion\fP
+(e.g., tk8.0), but it might be "library" when in the build hierarchies.
+The \fIinitScript\fR file will be sourced into the interpreter
+once it is found. The directory in which this file is found is
+stored into the global variable \fIvarName\fP.
+If this variable is already defined (e.g., by C code during
+application initialization) then no searching is done.
+Otherwise the search looks in these directories:
+the directory named by the environment variable \fIenVarName\fP;
+relative to the Tcl library directory;
+relative to the executable file in the standard installation
+bin or bin/\fIarch\fP directory;
+relative to the executable file in the current build tree;
+relative to the executable file in a parallel build tree.
+.TP
\fBparray \fIarrayName\fR
Prints on standard output the names and values of all the elements
in the array \fIarrayName\fR.