aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tcl/doc
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1997-11-27 19:49:05 +0000
committerPaul Traina <pst@FreeBSD.org>1997-11-27 19:49:05 +0000
commitf25b19db8d50748d4f75272ae324cad27788d9b3 (patch)
treecef0bba69f1833802f43364a0cde6945601e665a /contrib/tcl/doc
parent539e1e66ff6f99c987c8e03872ddaea5260db8f7 (diff)
downloadsrc-vendor/tcl.tar.gz
src-vendor/tcl.zip
Import TCL v8.0 PL2.vendor/tcl
Notes
Notes: svn path=/vendor/tcl/dist/; revision=31434
Diffstat (limited to 'contrib/tcl/doc')
-rw-r--r--contrib/tcl/doc/CrtInterp.34
-rw-r--r--contrib/tcl/doc/ListObj.36
-rw-r--r--contrib/tcl/doc/OpenFileChnl.34
-rw-r--r--contrib/tcl/doc/PrintDbl.35
-rw-r--r--contrib/tcl/doc/SetVar.323
-rw-r--r--contrib/tcl/doc/TraceVar.321
-rw-r--r--contrib/tcl/doc/array.n5
-rw-r--r--contrib/tcl/doc/binary.n6
-rw-r--r--contrib/tcl/doc/clock.n11
-rw-r--r--contrib/tcl/doc/close.n6
-rw-r--r--contrib/tcl/doc/expr.n9
-rw-r--r--contrib/tcl/doc/interp.n48
-rw-r--r--contrib/tcl/doc/load.n4
-rw-r--r--contrib/tcl/doc/lsort.n6
-rw-r--r--contrib/tcl/doc/man.macros12
-rw-r--r--contrib/tcl/doc/pkgMkIndex.n6
-rw-r--r--contrib/tcl/doc/resource.n41
-rw-r--r--contrib/tcl/doc/safe.n285
-rw-r--r--contrib/tcl/doc/socket.n4
-rw-r--r--contrib/tcl/doc/source.n6
-rw-r--r--contrib/tcl/doc/switch.n8
-rw-r--r--contrib/tcl/doc/tclvars.n8
-rw-r--r--contrib/tcl/doc/vwait.n4
23 files changed, 324 insertions, 208 deletions
diff --git a/contrib/tcl/doc/CrtInterp.3 b/contrib/tcl/doc/CrtInterp.3
index bcca39d5def5..7a3aeda896d7 100644
--- a/contrib/tcl/doc/CrtInterp.3
+++ b/contrib/tcl/doc/CrtInterp.3
@@ -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: @(#) CrtInterp.3 1.15 97/07/09 14:53:31
+'\" SCCS: @(#) CrtInterp.3 1.17 97/10/31 13:05:51
'\"
.so man.macros
.TH Tcl_CreateInterp 3 7.5 Tcl "Tcl Library Procedures"
@@ -102,7 +102,7 @@ Remember that it is unsafe to use the interpreter once \fBTcl_Release\fR
has been called. To ensure that the interpreter is properly deleted when
it is no longer needed, call \fBTcl_InterpDeleted\fR to test if some other
code already called \fBTcl_DeleteInterp\fR; if not, call
-\fBTcl_DeleteInterp\fR before calling \fBTcl_Release\fB in your own code.
+\fBTcl_DeleteInterp\fR before calling \fBTcl_Release\fR in your own code.
Do not call \fBTcl_DeleteInterp\fR on an interpreter for which
\fBTcl_InterpDeleted\fR returns nonzero.
.TP
diff --git a/contrib/tcl/doc/ListObj.3 b/contrib/tcl/doc/ListObj.3
index 1e304297633c..c19e2344ba09 100644
--- a/contrib/tcl/doc/ListObj.3
+++ b/contrib/tcl/doc/ListObj.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) @(#) ListObj.3 1.9 97/06/03 13:51:42
+'\" SCCS: @(#) @(#) ListObj.3 1.10 97/10/08 11:36:58
'\"
.so man.macros
.TH Tcl_ListObj 3 8.0 Tcl "Tcl Library Procedures"
@@ -96,8 +96,8 @@ a pointer to the resulting list element object.
Index of the starting list element that \fBTcl_ListObjReplace\fR
is to replace.
The list's first element has index 0.
-.AP int last in
-Index of the final list element that \fBTcl_ListObjReplace\fR
+.AP int count in
+The number of elements that \fBTcl_ListObjReplace\fR
is to replace.
.BE
diff --git a/contrib/tcl/doc/OpenFileChnl.3 b/contrib/tcl/doc/OpenFileChnl.3
index 09768d931223..6cf9b803b375 100644
--- a/contrib/tcl/doc/OpenFileChnl.3
+++ b/contrib/tcl/doc/OpenFileChnl.3
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) OpenFileChnl.3 1.39 97/05/09 18:14:49
+'\" SCCS: @(#) OpenFileChnl.3 1.40 97/09/29 11:22:49
.so man.macros
.TH Tcl_OpenFileChannel 3 8.0 Tcl "Tcl Library Procedures"
.BS
@@ -62,7 +62,7 @@ int
\fBTcl_Tell\fR(\fIchannel\fR)
.sp
int
-\fBTcl_GetChannelOption\fR(\fIchannel, optionName, optionValue\fR)
+\fBTcl_GetChannelOption\fR(\fIinterp, channel, optionName, optionValue\fR)
.sp
int
\fBTcl_SetChannelOption\fR(\fIinterp, channel, optionName, newValue\fR)
diff --git a/contrib/tcl/doc/PrintDbl.3 b/contrib/tcl/doc/PrintDbl.3
index e4a4c7eba050..a77b1b990bdb 100644
--- a/contrib/tcl/doc/PrintDbl.3
+++ b/contrib/tcl/doc/PrintDbl.3
@@ -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: @(#) PrintDbl.3 1.8 97/02/18 16:34:51
+'\" SCCS: @(#) PrintDbl.3 1.9 97/08/22 13:30:22
'\"
.so man.macros
.TH Tcl_PrintDouble 3 8.0 Tcl "Tcl Library Procedures"
@@ -23,7 +23,8 @@ Tcl_PrintDouble \- Convert floating value to string
.VS
Before Tcl 8.0, the \fBtcl_precision\fR variable in this interpreter
controlled the conversion. As of Tcl 8.0, this argument is ignored and
-17 digits of precision are always used for conversion.
+the conversion is controlled by the \fBtcl_precision\fR variable
+that is now shared by all interpreters.
.VE
.AP double value in
Floating-point value to be converted.
diff --git a/contrib/tcl/doc/SetVar.3 b/contrib/tcl/doc/SetVar.3
index 10850ae4d29d..32e7a4c64e5a 100644
--- a/contrib/tcl/doc/SetVar.3
+++ b/contrib/tcl/doc/SetVar.3
@@ -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: @(#) SetVar.3 1.29 97/05/19 17:35:05
+'\" SCCS: @(#) SetVar.3 1.30 97/10/10 16:10:36
'\"
.so man.macros
.TH Tcl_SetVar 3 7.4 Tcl "Tcl Library Procedures"
@@ -107,8 +107,9 @@ zero it means that a scalar variable is being referenced.
.PP
The \fIflags\fR argument may be used to specify any of several
options to the procedures.
-It consists of an OR-ed combination of any of the following
-bits:
+It consists of an OR-ed combination of the following bits.
+Note that the flag bit TCL_PARSE_PART1 is only meaningful
+for the procedures Tcl_SetVar2 and Tcl_GetVar2.
.TP
\fBTCL_GLOBAL_ONLY\fR
Under normal circumstances the procedures look up variables as follows:
@@ -152,6 +153,18 @@ A separator space is appended before the new list element unless
the list element is going to be the first element in a list or
sublist (i.e. the variable's current value is empty, or contains
the single character ``{'', or ends in `` }'').
+.TP
+\fBTCL_PARSE_PART1\fR
+If this bit is set when calling \fITcl_SetVar2\fR and \fITcl_GetVar2\fR,
+\fIname1\fR may contain both an array and an element name:
+if the name contains an open parenthesis and ends with a
+close parenthesis, then the value between the parentheses is
+treated as an element name (which can have any string value) and
+the characters before the first open
+parenthesis are treated as the name of an array variable.
+If the flag TCL_PARSE_PART1 is given,
+\fIname2\fR should be NULL since the array and element names
+are taken from \fIname1\fR.
.PP
\fBTcl_GetVar\fR and \fBTcl_GetVar2\fR
return the current value of a variable.
@@ -161,10 +174,12 @@ Under normal circumstances, the return value is a pointer
to the variable's value (which is stored in Tcl's variable
structure and will not change before the next call to \fBTcl_SetVar\fR
or \fBTcl_SetVar2\fR).
-The only bits of \fIflags\fR that are used are TCL_GLOBAL_ONLY
+\fBTcl_GetVar\fR and \fBTcl_GetVar2\fR use the flag bits TCL_GLOBAL_ONLY
and TCL_LEAVE_ERR_MSG, both of
which have
the same meaning as for \fBTcl_SetVar\fR.
+In addition, \fBTcl_GetVar2\fR uses the bit TCL_PARSE_PART1,
+which has the same meaning as for \fBTcl_SetVar2\fR.
If an error occurs in reading the variable (e.g. the variable
doesn't exist or an array element is specified for a scalar
variable), then NULL is returned.
diff --git a/contrib/tcl/doc/TraceVar.3 b/contrib/tcl/doc/TraceVar.3
index 665a3a7d2b2e..976be4f212de 100644
--- a/contrib/tcl/doc/TraceVar.3
+++ b/contrib/tcl/doc/TraceVar.3
@@ -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: @(#) TraceVar.3 1.26 96/08/26 12:59:52
+'\" SCCS: @(#) TraceVar.3 1.27 97/10/10 15:05:37
'\"
.so man.macros
.TH Tcl_TraceVar 3 7.4 Tcl "Tcl Library Procedures"
@@ -44,7 +44,8 @@ must be in writable memory: Tcl will make temporary modifications
to it while looking up the name.
.AP int flags in
OR-ed combination of the values TCL_TRACE_READS, TCL_TRACE_WRITES, and
-TCL_TRACE_UNSETS, and TCL_GLOBAL_ONLY. Not all flags are used by all
+TCL_TRACE_UNSETS, TCL_PARSE_PART1, and TCL_GLOBAL_ONLY.
+Not all flags are used by all
procedures. See below for more information.
.AP Tcl_VarTraceProc *proc in
Procedure to invoke whenever one of the traced operations occurs.
@@ -171,15 +172,23 @@ traces for a given variable that have the same \fIproc\fR.
The procedures \fBTcl_TraceVar2\fR, \fBTcl_UntraceVar2\fR, and
\fBTcl_VarTraceInfo2\fR are identical to \fBTcl_TraceVar\fR,
\fBTcl_UntraceVar\fR, and \fBTcl_VarTraceInfo\fR, respectively,
-except that the name of the variable has already been
-separated by the caller into two parts.
+except that the name of the variable consists of two parts.
\fIName1\fR gives the name of a scalar variable or array,
-and \fIname2\fR gives the name of an element within an
-array.
+and \fIname2\fR gives the name of an element within an array.
If \fIname2\fR is NULL it means that either the variable is
a scalar or the trace is to be set on the entire array rather
than an individual element (see WHOLE-ARRAY TRACES below for
more information).
+As a special case, if the flag TCL_PARSE_PART1 is specified,
+\fIname1\fR may contain both an array and an element name:
+if the name contains an open parenthesis and ends with a
+close parenthesis, then the value between the parentheses is
+treated as an element name (which can have any string value) and
+the characters before the first open
+parenthesis are treated as the name of an array variable.
+If the flag TCL_PARSE_PART1 is given,
+\fIname2\fR should be NULL since the array and element names
+are taken from \fIname1\fR.
.SH "ACCESSING VARIABLES DURING TRACES"
.PP
diff --git a/contrib/tcl/doc/array.n b/contrib/tcl/doc/array.n
index a6e88172b7ca..0de8aa710b13 100644
--- a/contrib/tcl/doc/array.n
+++ b/contrib/tcl/doc/array.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: @(#) array.n 1.8 96/08/26 12:59:53
+'\" SCCS: @(#) array.n 1.9 97/10/29 14:10:13
'\"
.so man.macros
.TH array n 7.4 Tcl "Tcl Built-In Commands"
@@ -91,6 +91,9 @@ consisting of an even number of elements.
Each odd-numbered element in \fIlist\fR is treated as an element
name within \fIarrayName\fR, and the following element in \fIlist\fR
is used as a new value for that array element.
+If the variable \fIarrayName\fR does not already exist
+and \fIlist\fR is empty,
+\fIarrayName\fR is created with an empty array value.
.TP
\fBarray size \fIarrayName\fR
Returns a decimal string giving the number of elements in the
diff --git a/contrib/tcl/doc/binary.n b/contrib/tcl/doc/binary.n
index 17d938071b83..067c52e3346d 100644
--- a/contrib/tcl/doc/binary.n
+++ b/contrib/tcl/doc/binary.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) binary.n 1.5 97/06/10 17:52:46
+'\" SCCS: @(#) binary.n 1.7 97/11/11 19:08:47
'\"
.so man.macros
.TH binary n 8.0 Tcl "Tcl Built-In Commands"
@@ -206,8 +206,8 @@ representation in the output string. This representation is not
portable across architectures, so it should not be used to communicate
floating point numbers across the network. The size of a floating
point number may vary across architectures, so the number of bytes
-that are generated may vary. If the value is out of range for the
-machine's native representation, then the value of FLT_MIN or FLT_MAX
+that are generated may vary. If the value overflows the
+machine's native representation, then the value of FLT_MAX
as defined by the system will be used instead. Because Tcl uses
double-precision floating-point numbers internally, there may be some
loss of precision in the conversion to single-precision. For example,
diff --git a/contrib/tcl/doc/clock.n b/contrib/tcl/doc/clock.n
index c7777a63cd7f..2f2786121420 100644
--- a/contrib/tcl/doc/clock.n
+++ b/contrib/tcl/doc/clock.n
@@ -8,7 +8,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) clock.n 1.17 97/02/03 16:34:17
+'\" SCCS: @(#) clock.n 1.18 97/09/10 13:31:23
'\"
.so man.macros
.TH clock n 7.4 Tcl "Tcl Built-In Commands"
@@ -150,10 +150,11 @@ A specific month and day with optional year. The
acceptable formats are \fImm/dd\fR?\fI/yy\fR?, \fImonthname dd\fR
?, \fIyy\fR?, \fIdd monthname \fR?\fIyy\fR? and \fIday, dd monthname
yy\fR. The default year is the current year. If the year is less
-then 100, we treat the years 00-38 as 2000-2038 and the years 70-99
-as 1970-1999. The years 39-70 are undefined and may not be valid on
-certain platforms. (For thos platforms where it is defined then the
-years 69-99 match to 1969-1999.)
+.VS
+than 100, we treat the years 00-68 as 2000-2068 and the years 69-99
+as 1969-1999. Not all platforms can represent the years 38-70, so
+an error may result if these years are used.
+.VE
.TP
\fIrelative time\fR
A specification relative to the current time. The format is \fInumber
diff --git a/contrib/tcl/doc/close.n b/contrib/tcl/doc/close.n
index 0ed5a1f89c35..4ee53eade8bc 100644
--- a/contrib/tcl/doc/close.n
+++ b/contrib/tcl/doc/close.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: @(#) close.n 1.10 96/02/15 20:01:34
+'\" SCCS: @(#) close.n 1.11 97/08/22 18:50:48
'\"
.so man.macros
.TH close n 7.5 Tcl "Tcl Built-In Commands"
@@ -25,7 +25,7 @@ or \fBsocket\fR command.
All buffered output is flushed to the channel's output device,
any buffered input is discarded, the underlying file or device is closed,
and \fIchannelId\fR becomes unavailable for use.
-.VS br
+.VS "" br
.PP
If the channel is blocking, the command does not return until all output
is flushed.
@@ -37,7 +37,7 @@ channel will be closed when all the flushing is complete.
.PP
If \fIchannelId\fR is a blocking channel for a command pipeline then
\fBclose\fR waits for the child processes to complete.
-.VS br
+.VS "" br
.PP
If the channel is shared between interpreters, then \fBclose\fR
makes \fIchannelId\fR unavailable in the invoking interpreter but has no
diff --git a/contrib/tcl/doc/expr.n b/contrib/tcl/doc/expr.n
index f4532cc18a7a..f0969ceda161 100644
--- a/contrib/tcl/doc/expr.n
+++ b/contrib/tcl/doc/expr.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: @(#) expr.n 1.27 97/08/12 11:31:30
+'\" SCCS: @(#) expr.n 1.28 97/09/18 18:21:30
'\"
.so man.macros
.TH expr n 8.0 Tcl "Tcl Built-In Commands"
@@ -144,12 +144,13 @@ Bit-wise exclusive OR. Valid for integer operands only.
Bit-wise OR. Valid for integer operands only.
.TP 20
\fB&&\fR
-Logical AND. Produces a 1 result if both operands are non-zero, 0 otherwise.
-Valid for numeric operands only (integers or floating-point).
+Logical AND. Produces a 1 result if both operands are non-zero,
+0 otherwise.
+Valid for boolean and numeric (integers or floating-point) operands only.
.TP 20
\fB||\fR
Logical OR. Produces a 0 result if both operands are zero, 1 otherwise.
-Valid for numeric operands only (integers or floating-point).
+Valid for boolean and numeric (integers or floating-point) operands only.
.TP 20
\fIx\fB?\fIy\fB:\fIz\fR
If-then-else, as in C. If \fIx\fR
diff --git a/contrib/tcl/doc/interp.n b/contrib/tcl/doc/interp.n
index 023681833e0d..6229623364d3 100644
--- a/contrib/tcl/doc/interp.n
+++ b/contrib/tcl/doc/interp.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) interp.n 1.35 97/07/31 18:04:06
+'\" SCCS: @(#) interp.n 1.37 97/10/31 12:51:11
'\"
.so man.macros
.TH interp n 7.6 Tcl "Tcl Built-In Commands"
@@ -84,21 +84,21 @@ slave interpreters, and to share or transfer
channels between interpreters. It can have any of several forms, depending
on the \fIoption\fR argument:
.TP
-\fBinterp \fBalias \fIsrcPath \fIsrcCmd\fR
+\fBinterp\fR \fBalias\fR \fIsrcPath\fR \fIsrcCmd\fR
Returns a Tcl list whose elements are the \fItargetCmd\fR and
\fIarg\fRs associated with the alias named \fIsrcCmd\fR
(all of these are the values specified when the alias was
created; it is possible that the actual source command in the
slave is different from \fIsrcCmd\fR if it was renamed).
.TP
-\fBinterp \fBalias \fIsrcPath \fIsrcCmd\fR \fB{}\fR
+\fBinterp\fR \fBalias\fR \fIsrcPath\fR \fIsrcCmd\fR \fB{}\fR
Deletes the alias for \fIsrcCmd\fR in the slave interpreter identified by
\fIsrcPath\fR.
\fIsrcCmd\fR refers to the name under which the alias
was created; if the source command has been renamed, the renamed
command will be deleted.
.TP
-\fBinterp \fBalias \fIsrcPath \fIsrcCmd\fR \fItargetPath \fItargetCmd \fR?\fIarg arg ...\fR?
+\fBinterp\fR \fBalias\fR \fIsrcPath\fR \fIsrcCmd\fR \fItargetPath\fR \fItargetCmd \fR?\fIarg arg ...\fR?
This command creates an alias between one slave and another (see the
\fBalias\fR slave command below for creating aliases between a slave
and its master). In this command, either of the slave interpreters
@@ -122,11 +122,11 @@ in the target interpreter whenever the given source command is
invoked in the source interpreter. See ALIAS INVOCATION below for
more details.
.TP
-\fBinterp \fBaliases \fR?\fIpath\fR?
+\fBinterp\fR \fBaliases \fR?\fIpath\fR?
This command returns a Tcl list of the names of all the source commands for
aliases defined in the interpreter identified by \fIpath\fR.
.TP
-\fBinterp \fBcreate \fR?\fB\-safe\fR? ?\fB\-\|\-\fR? ?\fIpath\fR?
+\fBinterp\fR \fBcreate \fR?\fB\-safe\fR? ?\fB\-\|\-\fR? ?\fIpath\fR?
Creates a slave interpreter identified by \fIpath\fR and a new command,
called a \fIslave command\fR. The name of the slave command is the last
component of \fIpath\fR. The new slave interpreter and the slave command
@@ -148,14 +148,14 @@ new interpreter. The name of a slave interpreter must be unique among all
the slaves for its master; an error occurs if a slave interpreter by the
given name already exists in this master.
.TP
-\fBinterp \fBdelete \fR?\fIpath ...?\fR
+\fBinterp\fR \fBdelete \fR?\fIpath ...?\fR
Deletes zero or more interpreters given by the optional \fIpath\fR
arguments, and for each interpreter, it also deletes its slaves. The
command also deletes the slave command for each interpreter deleted.
For each \fIpath\fR argument, if no interpreter by that name
exists, the command raises an error.
.TP
-\fBinterp \fBeval \fIpath arg \fR?\fIarg ...\fR?
+\fBinterp\fR \fBeval\fR \fIpath arg \fR?\fIarg ...\fR?
This command concatenates all of the \fIarg\fR arguments in the same
fashion as the \fBconcat\fR command, then evaluates the resulting string as
a Tcl script in the slave interpreter identified by \fIpath\fR. The result
@@ -163,13 +163,13 @@ of this evaluation (including error information such as the \fBerrorInfo\fR
and \fBerrorCode\fR variables, if an error occurs) is returned to the
invoking interpreter.
.TP
-\fBinterp \fBexists \fIpath\fR
+\fBinterp exists \fIpath\fR
Returns \fB1\fR if a slave interpreter by the specified \fIpath\fR
exists in this master, \fB0\fR otherwise. If \fIpath\fR is omitted, the
invoking interpreter is used.
-.VS BR
+.VS "" BR
.TP
-\fBinterp \fBexpose \fIpath\fR \fIhiddenName\fR ?\fIexposedCmdName\fR?
+\fBinterp expose \fIpath\fR \fIhiddenName\fR ?\fIexposedCmdName\fR?
Makes the hidden command \fIhiddenName\fR exposed, eventually bringing
it back under a new \fIexposedCmdName\fR name (this name is currently
accepted only if it is a valid global name space name without any ::),
@@ -179,7 +179,7 @@ If an exposed command with the targetted name already exists, this command
fails.
Hidden commands are explained in more detail in HIDDEN COMMANDS, below.
.TP
-\fBinterp \fBhide \fIpath\fR \fIexposedCmdName\fR ?\fIhiddenCmdName\fR?
+\fBinterp\fR \fBhide\fR \fIpath\fR \fIexposedCmdName\fR ?\fIhiddenCmdName\fR?
Makes the exposed command \fIexposedCmdName\fR hidden, renaming
it to the hidden command \fIhiddenCmdName\fR, or keeping the same name if
\fIhiddenCmdName\fR is not given, in the interpreter denoted
@@ -194,11 +194,11 @@ prevents slaves from fooling a master interpreter into hiding the wrong
command, by making the current namespace be different from the global one.
Hidden commands are explained in more detail in HIDDEN COMMANDS, below.
.TP
-\fBinterp \fBhidden \fIpath\fR
+\fBinterp\fR \fBhidden\fR \fIpath\fR
Returns a list of the names of all hidden commands in the interpreter
identified by \fIpath\fR.
.TP
-\fBinterp \fBinvokehidden\fR \fIpath\fR ?\fB-global\fR \fIhiddenCmdName\fR ?\fIarg ...\fR?
+\fBinterp\fR \fBinvokehidden\fR \fIpath\fR ?\fB-global\fR \fIhiddenCmdName\fR ?\fIarg ...\fR?
Invokes the hidden command \fIhiddenCmdName\fR with the arguments supplied
in the interpreter denoted by \fIpath\fR. No substitutions or evaluation
are applied to the arguments.
@@ -209,12 +209,12 @@ frames.
Hidden commands are explained in more detail in HIDDEN COMMANDS, below.
.VE
.TP
-\fBinterp \fBissafe\fR ?\fIpath\fR?
+\fBinterp issafe\fR ?\fIpath\fR?
Returns \fB1\fR if the interpreter identified by the specified \fIpath\fR
is safe, \fB0\fR otherwise.
-.VS BR
+.VS "" BR
.TP
-\fBinterp \fBmarktrusted\fR \fIpath\fR
+\fBinterp marktrusted\fR \fIpath\fR
Marks the interpreter identified by \fIpath\fR as trusted. Does
not expose the hidden commands. This command can only be invoked from a
trusted interpreter.
@@ -222,7 +222,7 @@ The command has no effect if the interpreter identified by \fIpath\fR is
already trusted.
.VE
.TP
-\fBinterp \fBshare\fR \fIsrcPath channelId destPath\fR
+\fBinterp\fR \fBshare\fR \fIsrcPath channelId destPath\fR
Causes the IO channel identified by \fIchannelId\fR to become shared
between the interpreter identified by \fIsrcPath\fR and the interpreter
identified by \fIdestPath\fR. Both interpreters have the same permissions
@@ -231,12 +231,12 @@ Both interpreters must close it to close the underlying IO channel; IO
channels accessible in an interpreter are automatically closed when an
interpreter is destroyed.
.TP
-\fBinterp \fBslaves\fR ?\fIpath\fR?
+\fBinterp\fR \fBslaves\fR ?\fIpath\fR?
Returns a Tcl list of the names of all the slave interpreters associated
with the interpreter identified by \fIpath\fR. If \fIpath\fR is omitted,
the invoking interpreter is used.
.TP
-\fBinterp \fBtarget \fIpath alias\fR
+\fBinterp\fR \fBtarget\fR \fIpath alias\fR
Returns a Tcl list describing the target interpreter for an alias. The
alias is specified with an interpreter path and source command name, just
as in \fBinterp alias\fR above. The name of the target interpreter is
@@ -246,7 +246,7 @@ empty list is returned. If the target interpreter for the alias is not the
invoking interpreter or one of its descendants then an error is generated.
The target command does not have to be defined at the time of this invocation.
.TP
-\fBinterp \fBtransfer\fR \fIsrcPath channelId destPath\fR
+\fBinterp\fR \fBtransfer\fR \fIsrcPath channelId destPath\fR
Causes the IO channel identified by \fIchannelId\fR to become available in
the interpreter identified by \fIdestPath\fR and unavailable in the
interpreter identified by \fIsrcPath\fR.
@@ -300,7 +300,7 @@ the resulting string as a Tcl script in \fIslave\fR.
The result of this evaluation (including error information
such as the \fBerrorInfo\fR and \fBerrorCode\fR variables, if an
error occurs) is returned to the invoking interpreter.
-.VS BR
+.VS "" BR
.TP
\fIslave \fBexpose \fIhiddenName \fR?\fIexposedCmdName\fR?
This command exposes the hidden command \fIhiddenName\fR, eventually bringing
@@ -341,7 +341,7 @@ COMMANDS, below.
.TP
\fIslave \fBissafe\fR
Returns \fB1\fR if the slave interpreter is safe, \fB0\fR otherwise.
-.VS BR
+.VS "" BR
.TP
\fIslave \fBmarktrusted\fR
Marks the slave interpreter as trusted. Can only be invoked by a
@@ -391,7 +391,7 @@ split string subst switch
tell trace unset update
uplevel upvar vwait while\fR
.DE
-.VS BR
+.VS "" BR
The following commands are hidden by \fBinterp create\fR when it
creates a safe interpreter:
.DS
diff --git a/contrib/tcl/doc/load.n b/contrib/tcl/doc/load.n
index 096081f47cc7..0d5e6e8888b9 100644
--- a/contrib/tcl/doc/load.n
+++ b/contrib/tcl/doc/load.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) load.n 1.8 96/12/20 09:23:23
+'\" SCCS: @(#) load.n 1.9 97/08/22 18:51:18
'\"
.so man.macros
.TH load n 7.5 Tcl "Tcl Built-In Commands"
@@ -93,7 +93,7 @@ alphabetic and underline characters as the module name.
For example, the command \fBload libxyz4.2.so\fR uses the module
name \fBxyz\fR and the command \fBload bin/last.so {}\fR uses the
module name \fBlast\fR.
-.VS br
+.VS "" br
.PP
If \fIfileName\fR is an empty string, then \fIpackageName\fR must
be specified.
diff --git a/contrib/tcl/doc/lsort.n b/contrib/tcl/doc/lsort.n
index 8184663093ff..828cad8c63b6 100644
--- a/contrib/tcl/doc/lsort.n
+++ b/contrib/tcl/doc/lsort.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: @(#) lsort.n 1.9 97/03/24 20:51:09
+'\" SCCS: @(#) lsort.n 1.10 97/08/22 18:50:53
'\"
.so man.macros
.TH lsort n 8.0 Tcl "Tcl Built-In Commands"
@@ -29,7 +29,7 @@ control the sorting process (unique abbreviations are accepted):
\fB\-ascii\fR
Use string comparison with ASCII collation order. This is
the default.
-.VS br
+.VS 8.0 br
.TP 20
\fB\-dictionary\fR
Use dictionary-style comparison. This is the same as \fB\-ascii\fR
@@ -62,7 +62,7 @@ This is the default.
.TP 20
\fB\-decreasing\fR
Sort the list in decreasing order (``largest'' items first).
-.VS br
+.VS 8.0 br
.TP 20
\fB\-index\0\fIindex\fR
If this option is specified, each of the elements of \fIlist\fR must
diff --git a/contrib/tcl/doc/man.macros b/contrib/tcl/doc/man.macros
index 67e601275521..3af2da929343 100644
--- a/contrib/tcl/doc/man.macros
+++ b/contrib/tcl/doc/man.macros
@@ -26,10 +26,12 @@
'\" .CE
'\" End code excerpt.
'\"
-'\" .VS ?br?
+'\" .VS ?version? ?br?
'\" Begin vertical sidebar, for use in marking newly-changed parts
-'\" of man pages. If an argument is present, then a line break is
-'\" forced before starting the sidebar.
+'\" of man pages. The first argument is ignored and used for recording
+'\" the version when the .VS was added, so that the sidebars can be
+'\" found and removed when they reach a certain age. If another argument
+'\" is present, then a line break is forced before starting the sidebar.
'\"
'\" .VE
'\" End of vertical sidebar.
@@ -57,7 +59,7 @@
'\" .UL arg1 arg2
'\" Print arg1 underlined, then print arg2 normally.
'\"
-'\" SCCS: @(#) man.macros 1.8 96/02/15 20:02:24
+'\" SCCS: @(#) man.macros 1.9 97/08/22 18:50:59
'\"
'\" # Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
@@ -131,7 +133,7 @@
'\" # ^Y = starting y location
'\" # ^v = 1 (for troff; for nroff this doesn't matter)
.de VS
-.if !"\\$1"" .br
+.if !"\\$2"" .br
.mk ^Y
.ie n 'mc \s12\(br\s0
.el .nr ^v 1u
diff --git a/contrib/tcl/doc/pkgMkIndex.n b/contrib/tcl/doc/pkgMkIndex.n
index a0f32fd42ce1..702c6572e062 100644
--- a/contrib/tcl/doc/pkgMkIndex.n
+++ b/contrib/tcl/doc/pkgMkIndex.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) pkgMkIndex.n 1.6 96/10/04 11:31:53
+'\" SCCS: @(#) pkgMkIndex.n 1.8 97/10/31 12:51:13
'\"
.so man.macros
.TH pkg_mkIndex n 7.6 Tcl "Tcl Built-In Commands"
@@ -14,7 +14,7 @@
pkg_mkIndex \- Build an index for automatic loading of packages
.SH SYNOPSIS
.nf
-\fBpkg_mkIndex \fIdir \fIpattern \fR?\fIpattern pattern ...\fR?
+\fBpkg_mkIndex \fIdir\fR \fIpattern \fR?\fIpattern pattern ...\fR?
.fi
.BE
@@ -46,7 +46,7 @@ It does this by loading each file and seeing what packages
and new commands appear (this is why it is essential to have
\fBpackage provide\fR commands or \fBTcl_PkgProvide\fR calls
in the files, as described above).
-.VS br
+.VS "" br
.IP [3]
Install the package as a subdirectory of one of the directories given by
the \fBtcl_pkgPath\fR variable. If \fB$tcl_pkgPath\fR contains more
diff --git a/contrib/tcl/doc/resource.n b/contrib/tcl/doc/resource.n
index 1ccd50cc065d..0062992f3b2e 100644
--- a/contrib/tcl/doc/resource.n
+++ b/contrib/tcl/doc/resource.n
@@ -3,7 +3,7 @@
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-'\" SCCS: @(#) resource.n 1.3 97/07/25 10:24:23
+'\" SCCS: @(#) resource.n 1.4 97/09/10 15:22:18
'\"
.so man.macros
.TH resource n 8.0 Tcl "Tcl Built-In Commands"
@@ -32,6 +32,40 @@ Closes the given resource reference (obtained from \fBresource
open\fR). Resources from that resource file will no longer be
available.
.TP
+\fBresource delete\fR ?\fIoptions\fR? \fIresourceType\fR
+This command will delete the resource specified by \fIoptions\fR and
+type \fIresourceType\fR (see RESOURCE TYPES below). The options
+give you several ways to specify the resource to be deleted.
+.RS
+.TP
+\fB\-id\fR \fIresourceId\fR
+If the \fB-id\fR option is given the id \fIresourceId\fR (see RESOURCE
+IDS below) is used to specify the resource to be deleted. The id must
+be a number - to specify a name use the \fB\-name\fR option.
+.TP
+\fB\-name\fR \fIresourceName\fR
+If \fB-name\fR is specified, the resource named
+\fIresourceName\fR will be deleted. If the \fB-id\fR is also
+provided, then there must be a resource with BOTH this name and
+this id. If no name is provided, then the id will be used regardless
+of the name of the actual resource.
+.TP
+\fB\-file\fR \fIresourceRef\fR
+If the \fB-file\fR option is specified then the resource will be
+deleted from the file pointed to by \fIresourceRef\fR. Otherwise the
+first resource with the given \fIresourceName\fR and or
+\fIresourceId\fR which is found on the resource file path will be
+deleted. To inspect the file path, use the \fIresource files\fB command.
+.RE
+.TP
+\fBresource files ?\fIresourceRef\fR?
+If \fIresourceRef\fRis not provided, this command returns a Tcl list
+of the resource references for all the currently open resource files.
+The list is in the normal Macintosh search order for resources. If
+\fIresourceRef\fR is specified, the command will
+return the path to the file whose resource fork is represented by that
+token.
+.TP
\fBresource list \fIresourceType\fR ?\fIresourceRef\fR?
List all of the resources ids of type \fIresourceType\fR (see RESOURCE
TYPES below). If \fIresourceRef\fR is specified then the command will
@@ -88,6 +122,11 @@ name.
If the \fB-file\fR option is specified then the resource will be
written in the file pointed to by \fIresourceRef\fR, otherwise the
most resently open resource will be used.
+.TP
+\fB\-force\fR
+If the target resource already exists, then by default Tcl will not
+overwrite it, but raise an error instead. Use the -force flag to
+force overwriting the extant resource.
.RE
.SH "RESOURCE TYPES"
diff --git a/contrib/tcl/doc/safe.n b/contrib/tcl/doc/safe.n
index 03adf0f38b63..3be9c5f7b261 100644
--- a/contrib/tcl/doc/safe.n
+++ b/contrib/tcl/doc/safe.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) safe.n 1.3 97/08/13 12:44:45
+'\" SCCS: @(#) safe.n 1.11 97/10/31 12:51:13
'\"
.so man.macros
.TH "Safe Tcl" n 8.0 Tcl "Tcl Built-In Commands"
@@ -29,7 +29,10 @@ Safe Base \- A mechanism for creating and manipulating safe interpreters.
\fB::safe::setLogCmd\fR ?\fIcmd arg...\fR?
.SH OPTIONS
.PP
-?\fB\-accessPath\fR \fIpathList\fR? ?\fB\-noStatics\fR? ?\fB\-nestedLoadOk\fR? ?\fB\-deleteHook\fR \fIscript\fR?
+?\fB\-accessPath\fR \fIpathList\fR?
+?\fB\-statics\fR \fIboolean\fR? ?\fB\-noStatics\fR?
+?\fB\-nested\fR \fIboolean\fR? ?\fB\-nestedLoadOk\fR?
+?\fB\-deleteHook\fR \fIscript\fR?
.BE
.SH DESCRIPTION
@@ -54,95 +57,23 @@ No knowledge of the file system structure is leaked to the
safe interpreter, because it has access only to a virtualized path
containing tokens. When the safe interpreter requests to source a file, it
uses the token in the virtual path as part of the file name to source; the
-master interpreter translates the token into a real directory name and
-executes the requested operation.
+master interpreter transparently
+translates the token into a real directory name and executes the
+requested operation (see the section \fBSECURITY\fR below for details).
Different levels of security can be selected by using the optional flags
of the commands described below.
.PP
All commands provided in the master interpreter by the Safe Base reside in
-the \fBsafe\fR namespace.
-\fB::safe::interpCreate\fR creates a new safe interpreter with options,
-described in the section \fBOPTIONS\fR.
-The return value is the name of the new safe interpreter created.
-\fB::safe::interpInit\fR is similar to \fB::safe::interpCreate\fR except that
-it requires as its first argument the name of a safe interpreter that was
-previously created directly using the \fBinterp\fR command.
-\fB::safe::interpDelete\fR deletes the interpreter named by its argument.
-\fB::safe::interpConfigure\fR can be used to set or get options for the named
-safe interpreters; the options are described in the section \fBOPTIONS\fR.
-.PP
-A virtual path is maintained in the master interpreter for each safe
-interpreter created by \fB::safe::interpCreate\fR or initialized by
-\fB::safe::interpInit\fR.
-The path maps tokens accessible in the safe interpreter into real path
-names on the local file system.
-This prevents safe interpreters from gaining knowledge about the
-structure of the file system of the host on which the interpeter is
-executing.
-When a token is used in a safe interpreter in a request to source or
-load a file, the token is translated to a real path name and the file to be
-sourced or loaded is located on the file system.
-The safe interpreter never gains knowledge of the actual path name under
-which the file is stored on the file system.
-Commands are provided in the master interpreter to manipulate the virtual
-path for a safe interpreter.
-\fB::safe::interpConfigure\fR can be used to set a new path for a safe
-interpreter.
-\fB::safe::interpAddToAccessPath\fR adds a directory to the virtual path for
-the named safe interpreter and returns the token by which that directory
-will be accessible in the safe interpreter.
-\fB::safe::interpFindInAccessPath\fR finds the
-requested directory in the virtual path for the named safe interpreter and
-returns the token by which that directory can be accessed in the safe
-interpreter.
-If the path is not found, an error is raised.
-.PP
-\fB::safe::setLogCommand\fR installs a script to be called when interesting
-life cycle events happen.
-This script will be called with one argument, a string describing the event.
-.SH ALIASES
-.PP
-The following aliases are provided in a safe interpreter:
-.TP
-\fBsource\fB \fIfileName\fR
-The requested file, a Tcl source file, is sourced into the safe interpreter
-if it is found.
-The \fBsource\fR alias can only source files from directories in
-the virtual path for the safe interpreter. The \fBsource\fR alias requires
-the safe interpreter to
-use one of the token names in its virtual path to denote the directory in
-which the file to be sourced can be found.
-See the section on \fBSECURITY\fR for more discussion of restrictions on
-valid filenames.
-.TP
-\fBload\fR \fIfileName\fR
-The requested file, a shared object file, in dynamically loaded into the
-safe interpreter if it is found.
-The filename must contain a token name mentioned in the virtual path for
-the safe interpreter for it to be found successfully.
-Additionally, the shared object file must contain a safe entry point; see
-the manual page for the \fBload\fR command for more details.
-.TP
-\fBfile\fR ?\fIoptions\fR?
-The \fBfile\fR alias provides access to a safe subset of the subcommands of
-the \fBfile\fR command; it allows only \fBdirname\fR, \fBjoin\fR,
-\fBextension\fR, \fBroot\fR, \fBtail\fR, \fBpathname\fR and \fBsplit\fR
-subcommands. For more details on what these subcommands do see the manual
-page for the \fBfile\fR command.
-.TP
-\fBexit\fR
-The calling interpreter is deleted and its computation is stopped, but the
-Tcl process in which this interpreter exists is not terminated.
-.PP
+the \fBsafe\fR namespace:
+
.SH COMMANDS
-.PP
The following commands are provided in the master interpreter:
.TP
\fB::safe::interpCreate\fR ?\fIslave\fR? ?\fIoptions...\fR?
Creates a safe interpreter, installs the aliases described in the section
\fBALIASES\fR and initializes the auto-loading and package mechanism as
specified by the supplied \fBoptions\fR.
-See the \fBOPTIONS\fR section below for a description of the common
+See the \fBOPTIONS\fR section below for a description of the
optional arguments.
If the \fIslave\fR argument is omitted, a name will be generated.
\fB::safe::interpCreate\fR always returns the interpreter name.
@@ -150,18 +81,36 @@ If the \fIslave\fR argument is omitted, a name will be generated.
\fB::safe::interpInit\fR \fIslave\fR ?\fIoptions...\fR?
This command is similar to \fBinterpCreate\fR except it that does not
create the safe interpreter. \fIslave\fR must have been created by some
-other means, like \fB::interp create \-safe\fR.
+other means, like \fBinterp create \-safe\fR.
.TP
\fB::safe::interpConfigure\fR \fIslave\fR ?\fIoptions...\fR?
If no \fIoptions\fR are given, returns the settings for all options for the
-named safe interpreter.
-If \fIoptions\fR are supplied, sets the options for the named safe
-interpreter. See the section on \fBOPTIONS\fR below.
+named safe interpreter as a list of options and their current values
+for that \fIslave\fR.
+If a single additional argument is provided,
+it will return a list of 2 elements \fIname\fR and \fIvalue\fR where
+\fIname\fR is the full name of that option and \fIvalue\fR the current value
+for that option and the \fIslave\fR.
+If more than two additional arguments are provided, it will reconfigure the
+safe interpreter and change each and only the provided options.
+See the section on \fBOPTIONS\fR below for options description.
+Example of use:
+.RS
+.CS
+# Create a new interp with the same configuration as "$i0" :
+set i1 [eval safe::interpCreate [safe::interpConfigure $i0]]
+# Get the current deleteHook
+set dh [safe::interpConfigure $i0 \-del]
+# Change (only) the statics loading ok attribute of an interp
+# and its deleteHook (leaving the rest unchanged) :
+safe::interpConfigure $i0 \-delete {foo bar} \-statics 0 ;
+.CE
+.RE
.TP
\fB::safe::interpDelete\fR \fIslave\fR
Deletes the safe interpreter and cleans up the corresponding
master interpreter data structures.
-If a \fIdeletehook\fR script was specified for this interpreter it is
+If a \fIdeleteHook\fR script was specified for this interpreter it is
evaluated before the interpreter is deleted, with the name of the
interpreter as an additional argument.
.TP
@@ -170,9 +119,11 @@ This command finds and returns the token for the real directory
\fIdirectory\fR in the safe interpreter's current virtual access path.
It generates an error if the directory is not found.
Example of use:
+.RS
.CS
$slave eval [list set tk_library [::safe::interpFindInAccessPath $name $tk_library]]
.CE
+.RE
.TP
\fB::safe::interpAddToAccessPath\fR \fIslave\fR \fIdirectory\fR
This command adds \fIdirectory\fR to the virtual path maintained for the
@@ -181,13 +132,15 @@ the safe interpreter to obtain access to files in that directory.
If the directory is already in the virtual path, it only returns the token
without adding the directory to the virtual path again.
Example of use:
+.RS
.CS
$slave eval [list set tk_library [::safe::interpAddToAccessPath $name $tk_library]]
.CE
+.RE
.TP
\fB::safe::setLogCmd\fR ?\fIcmd arg...\fR?
This command installs a script that will be called when interesting
-lifecycle events occur for a safe interpreter.
+life cycle events occur for a safe interpreter.
When called with no arguments, it returns the currently installed script.
When called with one argument, an empty string, the currently installed
script is removed and logging is turned off.
@@ -224,75 +177,165 @@ Any option name can be abbreviated to its minimal
non-ambiguous name.
Option names are not case sensitive.
.TP
-\fB\-accessPath\fR ?\fIdirectoryList\fR?
+\fB\-accessPath\fR \fIdirectoryList\fR
This option sets the list of directories from which the safe interpreter
-can \fBsource\fR and \fBload\fR files, and returns a list of tokens that
-will allow the safe interpreter access to these directories.
-If a value for \fBdirectoryList\fR is not given, or if it is given as the
-empty list, the safe interpreter will use the same directories than its
+can \fBsource\fR and \fBload\fR files.
+If this option is not specified, or if it is given as the
+empty list, the safe interpreter will use the same directories as its
master for auto-loading.
See the section \fBSECURITY\fR below for more detail about virtual paths,
tokens and access control.
.TP
-\fB\-noStatics\fR
-This option specifies that the safe interpreter will not be allowed
+\fB\-statics\fR \fIboolean\fR
+This option specifies if the safe interpreter will be allowed
to load statically linked packages (like \fBload {} Tk\fR).
-The default is that safe interpreters are allowed to load statically linked
-packages.
+The default value is \fBtrue\fR :
+safe interpreters are allowed to load statically linked packages.
+.TP
+\fB\-noStatics\fR
+This option is a convenience shortcut for \fB-statics false\fR and
+thus specifies that the safe interpreter will not be allowed
+to load statically linked packages.
+.TP
+\fB\-nested\fR \fIboolean\fR
+This option specifies if the safe interpreter will be allowed
+to load packages into its own sub-interpreters.
+The default value is \fBfalse\fR :
+safe interpreters are not allowed to load packages into
+their own sub-interpreters.
.TP
\fB\-nestedLoadOk\fR
-This option specifies that the safe interpreter will be allowed
-to load packages into its own subinterpreters.
-The default is that safe interpreters are not allowed to load packages into
-their own subinterpreters.
+This option is a convenience shortcut for \fB-nested true\fR and
+thus specifies the safe interpreter will be allowed
+to load packages into its own sub-interpreters.
.TP
-\fB\-deleteHook\fR ?\fIscript\fR?
-If \fIscript\fR is given, it is evaluated in the master with the name of
-the safe interpreter as an additional argument just before deleting the
-safe interpreter.
-If no value is given for \fIscript\fR any currently installed deletion hook
-script for that safe interpreter is removed; it will no longer be called
-when the interpreter is deleted.
-There is no deletion hook script installed by default.
+\fB\-deleteHook\fR \fIscript\fR
+When this option is given an non empty \fIscript\fR, it will be
+evaluated in the master with the name of
+the safe interpreter as an additional argument
+just before actually deleting the safe interpreter.
+Giving an empty value removes any currently installed deletion hook
+script for that safe interpreter.
+The default value (\fB{}\fR) is not to have any deletion call back.
+.SH ALIASES
+The following aliases are provided in a safe interpreter:
+.TP
+\fBsource\fR \fIfileName\fR
+The requested file, a Tcl source file, is sourced into the safe interpreter
+if it is found.
+The \fBsource\fR alias can only source files from directories in
+the virtual path for the safe interpreter. The \fBsource\fR alias requires
+the safe interpreter to
+use one of the token names in its virtual path to denote the directory in
+which the file to be sourced can be found.
+See the section on \fBSECURITY\fR for more discussion of restrictions on
+valid filenames.
+.TP
+\fBload\fR \fIfileName\fR
+The requested file, a shared object file, is dynamically loaded into the
+safe interpreter if it is found.
+The filename must contain a token name mentioned in the virtual path for
+the safe interpreter for it to be found successfully.
+Additionally, the shared object file must contain a safe entry point; see
+the manual page for the \fBload\fR command for more details.
+.TP
+\fBfile\fR ?\fIsubCmd args...\fR?
+The \fBfile\fR alias provides access to a safe subset of the subcommands of
+the \fBfile\fR command; it allows only \fBdirname\fR, \fBjoin\fR,
+\fBextension\fR, \fBroot\fR, \fBtail\fR, \fBpathname\fR and \fBsplit\fR
+subcommands. For more details on what these subcommands do see the manual
+page for the \fBfile\fR command.
+.TP
+\fBexit\fR
+The calling interpreter is deleted and its computation is stopped, but the
+Tcl process in which this interpreter exists is not terminated.
.SH SECURITY
-.PP
The Safe Base does not attempt to completely prevent annoyance and
denial of service attacks. These forms of attack prevent the
application or user from temporarily using the computer to perform
useful work, for example by consuming all available CPU time or
all available screen real estate.
-These attacks, while agravating, are deemed to be of lesser importance
+These attacks, while aggravating, are deemed to be of lesser importance
in general than integrity and privacy attacks that the Safe Base
is to prevent.
-
+.PP
The commands available in a safe interpreter, in addition to
the safe set as defined in \fBinterp\fR manual page, are mediated aliases
for \fBsource\fR, \fBload\fR, \fBexit\fR, and a safe subset of \fBfile\fR.
-The safe interpreter can also auto-load code and it can request to load
-packages.
+The safe interpreter can also auto-load code and it can request that
+packages be loaded.
+.PP
Because some of these commands access the local file system, there is a
potential for information leakage about its directory structure.
-To prevent this, commands which take file names as arguments in a safe
+To prevent this, commands that take file names as arguments in a safe
interpreter use tokens instead of the real directory names.
These tokens are translated to the real directory name while a request to,
e.g., source a file is mediated by the master interpreter.
+This virtual path system is maintained in the master interpreter for each safe
+interpreter created by \fB::safe::interpCreate\fR or initialized by
+\fB::safe::interpInit\fR and
+the path maps tokens accessible in the safe interpreter into real path
+names on the local file system thus preventing safe interpreters
+from gaining knowledge about the
+structure of the file system of the host on which the interpreter is
+executing.
+The only valid file names arguments
+for the \fBsource\fR and \fBload\fR aliases provided to the slave
+are path in the form of
+\fB[file join \fR\fItoken filename\fR\fB]\fR (ie, when using the
+native file path formats: \fItoken\fR\fB/\fR\fIfilename\fR
+on Unix, \fItoken\fR\fB\\\fIfilename\fR on Windows,
+and \fItoken\fR\fB:\fR\fIfilename\fR on the Mac),
+where \fItoken\fR is representing one of the directories
+of the \fIaccessPath\fR list and \fIfilename\fR is
+one file in that directory (no sub directories access are allowed).
+.PP
+When a token is used in a safe interpreter in a request to source or
+load a file, the token is checked and
+translated to a real path name and the file to be
+sourced or loaded is located on the file system.
+The safe interpreter never gains knowledge of the actual path name under
+which the file is stored on the file system.
.PP
To further prevent potential information leakage from sensitive files that
are accidentally included in the set of files that can be sourced by a safe
-interpreter, the \fBsource\fR alias is restricted so that it can only
-source files with names that have the extension \fB.tcl\fR, that contain
-only one dot and that are forteen characters long or shorter.
+interpreter, the \fBsource\fR alias restricts access to files
+meeting the following constraints: the file name must
+fourteen characters or shorter, must not contain more than one dot ("\fB.\fR"),
+must end up with the extension \fB.tcl\fR or be called \fBtclIndex\fR.
+.PP
+Each element of the initial access path
+list will be assigned a token that will be set in
+the slave \fBauto_path\fR and the first element of that list will be set as
+the \fBtcl_library\fR for that slave.
.PP
-The default value of the Tcl variable \fBauto_path\fR in a safe interpreter
-is a virtualized token list for the directories in the value of its
-master's \fBauto_path\fR variable and their immediate subdirectories.
-The first token in this list is also assigned to the Tcl varibale
-\fBtcl_library\fR in the safe interpreter.
+If the access path argument is not given or is the empty list,
+the default behavior is to let the slave access the same packages
+as the master has access to (Or to be more precise:
+only packages written in Tcl (which by definition can't be dangerous
+as they run in the slave interpreter) and C extensions that
+provides a Safe_Init entry point). For that purpose, the master's
+\fBauto_path\fR will be used to construct the slave access path.
+In order that the slave successfully loads the Tcl library files
+(which includes the auto-loading mechanism itself) the \fBtcl_library\fR will be
+added or moved to the first position if necessary, in the
+slave access path, so the slave
+\fBtcl_library\fR will be the same as the master's (its real
+path will still be invisible to the slave though).
+In order that auto-loading works the same for the slave and
+the master in this by default case, the first-level
+sub directories of each directory in the master \fBauto_path\fR will
+also be added (if not already included) to the slave access path.
You can always specify a more
restrictive path for which sub directories will never be searched by
explicitly specifying your directory list with the \fB\-accessPath\fR flag
instead of relying on this default mechanism.
+.PP
+When the \fIaccessPath\fR is changed after the first creation or
+initialization (ie through \fBinterpConfigure -accessPath \fR\fIlist\fR),
+an \fBauto_reset\fR is automatically evaluated in the safe interpreter
+to synchronize its \fBauto_index\fR with the new token list.
.SH "SEE ALSO"
interp(n), library(n), load(n), package(n), source(n), unknown(n)
diff --git a/contrib/tcl/doc/socket.n b/contrib/tcl/doc/socket.n
index 13774976156b..f7666600d175 100644
--- a/contrib/tcl/doc/socket.n
+++ b/contrib/tcl/doc/socket.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) socket.n 1.13 96/04/05 12:05:26
+'\" SCCS: @(#) socket.n 1.14 97/10/31 12:51:12
.so man.macros
.TH socket n 7.5 Tcl "Tcl Built-In Commands"
.BS
@@ -15,7 +15,7 @@ socket \- Open a TCP network connection
.sp
\fBsocket \fR?\fIoptions\fR? \fIhost port\fR
.sp
-\fBsocket \fB\-server \fIcommand\fR ?\fIoptions\fR? \fIport\fR
+\fBsocket\fR \fB\-server \fIcommand\fR ?\fIoptions\fR? \fIport\fR
.BE
.SH DESCRIPTION
diff --git a/contrib/tcl/doc/source.n b/contrib/tcl/doc/source.n
index 4b153b978b47..122c79340547 100644
--- a/contrib/tcl/doc/source.n
+++ b/contrib/tcl/doc/source.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: @(#) source.n 1.7 96/04/15 13:07:38
+'\" SCCS: @(#) source.n 1.8 97/10/31 12:51:10
'\"
.so man.macros
.TH source n "" Tcl "Tcl Built-In Commands"
@@ -16,9 +16,9 @@ source \- Evaluate a file or resource as a Tcl script
.SH SYNOPSIS
\fBsource \fIfileName\fR
.sp
-\fBsource \fB\-rsrc \fIresourceName \fR?\fIfileName\fR?
+\fBsource\fR \fB\-rsrc \fIresourceName \fR?\fIfileName\fR?
.sp
-\fBsource \fB\-rsrcid \fIresourceId \fR?\fIfileName\fR?
+\fBsource\fR \fB\-rsrcid \fIresourceId \fR?\fIfileName\fR?
.BE
.SH DESCRIPTION
diff --git a/contrib/tcl/doc/switch.n b/contrib/tcl/doc/switch.n
index f92540dcdaf1..b2754ca0581e 100644
--- a/contrib/tcl/doc/switch.n
+++ b/contrib/tcl/doc/switch.n
@@ -1,11 +1,11 @@
'\"
'\" Copyright (c) 1993 The Regents of the University of California.
-'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
+'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) switch.n 1.8 96/03/25 20:24:31
+'\" SCCS: @(#) switch.n 1.10 97/10/31 13:05:55
'\"
.so man.macros
.TH switch n 7.0 Tcl "Tcl Built-In Commands"
@@ -14,9 +14,9 @@
.SH NAME
switch \- Evaluate one of several scripts, depending on a given value
.SH SYNOPSIS
-\fBswitch\fI \fR?\fIoptions\fR?\fI string \fIpattern body \fR?\fIpattern body \fR...?
+\fBswitch \fR?\fIoptions\fR?\fI string pattern body \fR?\fIpattern body \fR...?
.sp
-\fBswitch\fI \fR?\fIoptions\fR?\fI string \fR{\fIpattern body \fR?\fIpattern body \fR...?}
+\fBswitch \fR?\fIoptions\fR?\fI string \fR{\fIpattern body \fR?\fIpattern body \fR...?}
.BE
.SH DESCRIPTION
diff --git a/contrib/tcl/doc/tclvars.n b/contrib/tcl/doc/tclvars.n
index 9a7fa6ca2b34..b689a4fff26f 100644
--- a/contrib/tcl/doc/tclvars.n
+++ b/contrib/tcl/doc/tclvars.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: @(#) tclvars.n 1.33 97/08/13 17:50:20
+'\" SCCS: @(#) tclvars.n 1.34 97/08/22 18:51:04
'\"
.so man.macros
.TH tclvars n 8.0 Tcl "Tcl Built-In Commands"
@@ -37,12 +37,14 @@ If the entire \fBenv\fR array is unset then Tcl will stop
monitoring \fBenv\fR accesses and will not update environment
variables.
.RS
-Under Windows, the environment variables PATH, COMSPEC, and WINDIR in any
+.VS 8.0
+Under Windows, the environment variables PATH and COMSPEC in any
capitalization are converted automatically to upper case. For instance, the
PATH variable could be exported by the operating system as ``path'',
``Path'', ``PaTh'', etc., causing otherwise simple Tcl code to have to
support many special cases. All other environment variables inherited by
Tcl are left unmodified.
+.VE
.RE
.RS
On the Macintosh, the environment variable is constructed by Tcl as no
@@ -213,7 +215,7 @@ hold a string giving the current patch level for Tcl, such as
\fB7.4b4\fR for the fourth beta release of Tcl 7.4.
The value of this variable is returned by the \fBinfo patchlevel\fR
command.
-.VS br
+.VS 8.0 br
.TP
\fBtcl_pkgPath\fR
This variable holds a list of directories indicating where packages are
diff --git a/contrib/tcl/doc/vwait.n b/contrib/tcl/doc/vwait.n
index 868f5dc064f0..4780b722dd3b 100644
--- a/contrib/tcl/doc/vwait.n
+++ b/contrib/tcl/doc/vwait.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" SCCS: @(#) vwait.n 1.3 96/03/25 20:27:21
+'\" SCCS: @(#) vwait.n 1.4 97/09/29 11:31:18
'\"
.so man.macros
.TH vwait n 7.5 Tcl "Tcl Built-In Commands"
@@ -13,7 +13,7 @@
.SH NAME
vwait \- Process events until a variable is written
.SH SYNOPSIS
-\fBvwait\fR ?\fIvarName\fR?
+\fBvwait\fR \fIvarName\fR
.BE
.SH DESCRIPTION