summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/AllowExc.38
-rw-r--r--doc/AppInit.36
-rw-r--r--doc/CrtChannel.36
-rw-r--r--doc/CrtMathFnc.316
-rw-r--r--doc/DictObj.316
-rw-r--r--doc/DoOneEvent.38
-rw-r--r--doc/Encoding.314
-rw-r--r--doc/FileSystem.3569
-rw-r--r--doc/GetIndex.38
-rw-r--r--doc/GetInt.36
-rw-r--r--doc/GetOpnFl.36
-rw-r--r--doc/Hash.36
-rw-r--r--doc/InitStubs.36
-rw-r--r--doc/Limit.314
-rw-r--r--doc/LinkVar.318
-rw-r--r--doc/ListObj.34
-rw-r--r--doc/Namespace.38
-rw-r--r--doc/OpenFileChnl.38
-rw-r--r--doc/PkgRequire.36
-rw-r--r--doc/PrintDbl.34
-rw-r--r--doc/RecEvalObj.312
-rw-r--r--doc/RecordEval.312
-rw-r--r--doc/RegExp.34
-rw-r--r--doc/SetVar.314
-rw-r--r--doc/TraceCmd.331
-rw-r--r--doc/TraceVar.353
-rw-r--r--doc/UpVar.36
-rw-r--r--doc/Utf.310
-rw-r--r--doc/break.n4
-rw-r--r--doc/catch.n20
-rw-r--r--doc/continue.n4
-rw-r--r--doc/dict.n12
-rw-r--r--doc/error.n4
-rw-r--r--doc/return.n32
-rw-r--r--doc/tclvars.n6
-rw-r--r--doc/unload.n4
36 files changed, 492 insertions, 473 deletions
diff --git a/doc/AllowExc.3 b/doc/AllowExc.3
index 17d6ec0..e7eecfc 100644
--- a/doc/AllowExc.3
+++ b/doc/AllowExc.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.
'\"
-'\" RCS: @(#) $Id: AllowExc.3,v 1.3 2002/03/29 21:01:11 dgp Exp $
+'\" RCS: @(#) $Id: AllowExc.3,v 1.4 2004/09/18 17:01:04 dkf Exp $
'\"
.so man.macros
.TH Tcl_AllowExceptions 3 7.4 Tcl "Tcl Library Procedures"
@@ -27,8 +27,8 @@ Interpreter in which script will be evaluated.
.PP
If a script is evaluated at top-level (i.e. no other scripts are
pending evaluation when the script is invoked), and if the script
-terminates with a completion code other than TCL_OK, TCL_ERROR
-or TCL_RETURN, then Tcl normally converts this into a TCL_ERROR
+terminates with a completion code other than \fBTCL_OK\fR, \fBTCL_ERROR\fR
+or \fBTCL_RETURN\fR, then Tcl normally converts this into a \fBTCL_ERROR\fR
return with an appropriate message. The particular script
evaluation procedures of Tcl that act in the manner are
\fBTcl_EvalObjEx\fR, \fBTcl_EvalObjv\fR, \fBTcl_Eval\fR, \fBTcl_EvalEx\fR,
@@ -40,7 +40,7 @@ calling one of those a procedures, then arbitrary completion
codes are permitted from the script, and they are returned without
modification.
This is useful in cases where the caller can deal with exceptions
-such as TCL_BREAK or TCL_CONTINUE in a meaningful way.
+such as \fBTCL_BREAK\fR or \fBTCL_CONTINUE\fR in a meaningful way.
.SH KEYWORDS
continue, break, exception, interpreter
diff --git a/doc/AppInit.3 b/doc/AppInit.3
index 3412799..a06e9c7 100644
--- a/doc/AppInit.3
+++ b/doc/AppInit.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.
'\"
-'\" RCS: @(#) $Id: AppInit.3,v 1.3 2000/04/14 23:01:48 hobbs Exp $
+'\" RCS: @(#) $Id: AppInit.3,v 1.4 2004/09/18 17:01:04 dkf Exp $
'\"
.so man.macros
.TH Tcl_AppInit 3 7.0 Tcl "Tcl Library Procedures"
@@ -49,8 +49,8 @@ Tcl variables \fBargv\fR and \fBargv0\fR in \fIinterp\fR.
.IP [3]
Invoke a startup script to initialize the application.
.LP
-\fBTcl_AppInit\fR returns TCL_OK or TCL_ERROR.
-If it returns TCL_ERROR then it must leave an error message in
+\fBTcl_AppInit\fR returns \fBTCL_OK\fR or \fBTCL_ERROR\fR.
+If it returns \fBTCL_ERROR\fR then it must leave an error message in
for the interpreter's result; otherwise the result is ignored.
.PP
In addition to \fBTcl_AppInit\fR, your application should also contain
diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3
index 3356c9c..8d6997d 100644
--- a/doc/CrtChannel.3
+++ b/doc/CrtChannel.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.
'\"
-'\" RCS: @(#) $Id: CrtChannel.3,v 1.19 2004/09/06 09:44:56 dkf Exp $
+'\" RCS: @(#) $Id: CrtChannel.3,v 1.20 2004/09/18 17:01:05 dkf Exp $
.so man.macros
.TH Tcl_CreateChannel 3 8.3 Tcl "Tcl Library Procedures"
.BS
@@ -174,7 +174,7 @@ driver provides a \fBTcl_ChannelType\fR structure containing pointers to
functions implementing the various operations used by the generic layer to
communicate with the channel driver. The \fBTcl_ChannelType\fR structure
and the functions referenced by it are described in the section
-TCL_CHANNELTYPE, below.
+\fBTCL_CHANNELTYPE\fR, below.
.PP
Second, channel drivers usually provide a Tcl command to create
instances of that type of channel. For example, the Tcl \fBopen\fR
@@ -201,7 +201,7 @@ structure to perform operations on the channel.
\fItypePtr\fR and \fIinstanceData\fR with it. The channel is opened in the
mode indicated by \fImask\fR.
For a discussion of channel drivers, their operations and the
-\fBTcl_ChannelType\fR structure, see the section TCL_CHANNELTYPE, below.
+\fBTcl_ChannelType\fR structure, see the section \fBTCL_CHANNELTYPE\fR, below.
.PP
\fBTcl_CreateChannel\fR interacts with the code managing the standard
channels. Once a standard channel was initialized either through a
diff --git a/doc/CrtMathFnc.3 b/doc/CrtMathFnc.3
index e456cab..021129c 100644
--- a/doc/CrtMathFnc.3
+++ b/doc/CrtMathFnc.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.
'\"
-'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.8 2004/09/06 09:44:56 dkf Exp $
+'\" RCS: @(#) $Id: CrtMathFnc.3,v 1.9 2004/09/18 17:01:05 dkf Exp $
'\"
.so man.macros
.TH Tcl_CreateMathFunc 3 8.4 Tcl "Tcl Library Procedures"
@@ -75,8 +75,8 @@ is created. If it does exist, then the existing function is replaced.
\fINumArgs\fR and \fIargTypes\fR describe the arguments to the function.
Each entry in the \fIargTypes\fR array must be
.VS 8.4
-one of TCL_INT, TCL_DOUBLE, TCL_WIDE_INT,
-or TCL_EITHER to indicate whether the corresponding argument must be an
+one of \fBTCL_INT\fR, \fBTCL_DOUBLE\fR, \fBTCL_WIDE_INT\fR,
+or \fBTCL_EITHER\fR to indicate whether the corresponding argument must be an
integer, a double-precision floating value, a wide (64-bit) integer,
or any, respectively.
.VE 8.4
@@ -107,10 +107,10 @@ typedef struct Tcl_Value {
.CE
.PP
The \fItype\fR field indicates the type of the argument and is
-one of TCL_INT, TCL_DOUBLE or TCL_WIDE_INT.
+one of \fBTCL_INT\fR, \fBTCL_DOUBLE\fR or \fBTCL_WIDE_INT\fR.
.VE 8.4
It will match the \fIargTypes\fR value specified for the function unless
-the \fIargTypes\fR value was TCL_EITHER. Tcl converts
+the \fIargTypes\fR value was \fBTCL_EITHER\fR. Tcl converts
the argument supplied in the expression to the type requested in
\fIargTypes\fR, if that is necessary.
Depending on the value of the \fItype\fR field, the \fIintValue\fR,
@@ -124,12 +124,12 @@ in \fIresultPtr->intValue\fR or as a floating value in
\fIresultPtr->doubleValue\fR.
It should set also \fIresultPtr->type\fR to one of
.VS 8.4
-TCL_INT, TCL_DOUBLE or TCL_WIDE_INT
+\fBTCL_INT\fR, \fBTCL_DOUBLE\fR or \fBTCL_WIDE_INT\fR
.VE 8.4
to indicate which value was set.
-Under normal circumstances \fIproc\fR should return TCL_OK.
+Under normal circumstances \fIproc\fR should return \fBTCL_OK\fR.
If an error occurs while executing the function, \fIproc\fR should
-return TCL_ERROR and leave an error message in the interpreter's result.
+return \fBTCL_ERROR\fR and leave an error message in the interpreter's result.
.PP
.VS 8.4
\fBTcl_GetMathFuncInfo\fR retrieves the values associated with
diff --git a/doc/DictObj.3 b/doc/DictObj.3
index a8d19a4..93291f7 100644
--- a/doc/DictObj.3
+++ b/doc/DictObj.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.
'\"
-'\" RCS: @(#) $Id: DictObj.3,v 1.3 2004/09/06 09:44:56 dkf Exp $
+'\" RCS: @(#) $Id: DictObj.3,v 1.4 2004/09/18 17:01:05 dkf Exp $
'\"
.so man.macros
.TH Tcl_DictObj 3 8.5 Tcl "Tcl Library Procedures"
@@ -111,7 +111,7 @@ count of the object will be zero.
dictionary and writes a pointer to the value associated with that key
into the variable pointed to by \fIvaluePtrPtr\fR, or a NULL if the
key has no mapping within the dictionary. The result of this
-procedure is TCL_OK, or TCL_ERROR if the \fIdictPtr\fR cannot be
+procedure is \fBTCL_OK\fR, or \fBTCL_ERROR\fR if the \fIdictPtr\fR cannot be
converted to a dictionary.
.PP
\fBTcl_DictObjPut\fR updates the given dictionary so that the given
@@ -119,20 +119,20 @@ key maps to the given value; any key may exist at most once in any
particular dictionary. The dictionary must not be shared, but the key
and value may be. This procedure may increase the reference count of
both key and value if it proves necessary to store them. Neither key
-nor value should be NULL. The result of this procedure is TCL_OK, or
-TCL_ERROR if the \fIdictPtr\fR cannot be converted to a dictionary.
+nor value should be NULL. The result of this procedure is \fBTCL_OK\fR, or
+\fBTCL_ERROR\fR if the \fIdictPtr\fR cannot be converted to a dictionary.
.PP
\fBTcl_DictObjRemove\fR updates the given dictionary so that the given
key has no mapping to any value. The dictionary must not be shared,
but the key may be. The key actually stored in the dictionary will
have its reference count decremented if it was present. It is not an
error if the key did not previously exist. The result of this
-procedure is TCL_OK, or TCL_ERROR if the \fIdictPtr\fR cannot be
+procedure is \fBTCL_OK\fR, or \fBTCL_ERROR\fR if the \fIdictPtr\fR cannot be
converted to a dictionary.
.PP
\fBTcl_DictObjSize\fR updates the given variable with the number of
key/value pairs currently in the given dictionary. The result of this
-procedure is TCL_OK, or TCL_ERROR if the \fIdictPtr\fR cannot be
+procedure is \fBTCL_OK\fR, or \fBTCL_ERROR\fR if the \fIdictPtr\fR cannot be
converted to a dictionary.
.PP
\fBTcl_DictObjFirst\fR commences an iteration across all the key/value
@@ -153,8 +153,8 @@ variable that is updated to be zero of there are further key/value
pairs to be iterated over, or non-zero if the iteration is complete.
The order of iteration is implementation-defined. If the
\fIdictPtr\fR argument cannot be converted to a dictionary,
-\fBTcl_DictObjFirst\fR returns TCL_ERROR and the iteration is not
-commenced, and otherwise it returns TCL_OK.
+\fBTcl_DictObjFirst\fR returns \fBTCL_ERROR\fR and the iteration is not
+commenced, and otherwise it returns \fBTCL_OK\fR.
.PP
If the last call to \fBTcl_DictObjFirst\fR or \fBTcl_DictObjNext\fR
(for a particular \fIsearchPtr\fR) set the variable indicated by the
diff --git a/doc/DoOneEvent.3 b/doc/DoOneEvent.3
index 8ae7a88..dc3d6e6 100644
--- a/doc/DoOneEvent.3
+++ b/doc/DoOneEvent.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.
'\"
-'\" RCS: @(#) $Id: DoOneEvent.3,v 1.2 1998/09/14 18:39:48 stanton Exp $
+'\" RCS: @(#) $Id: DoOneEvent.3,v 1.3 2004/09/18 17:01:05 dkf Exp $
'\"
.so man.macros
.TH Tcl_DoOneEvent 3 7.5 Tcl "Tcl Library Procedures"
@@ -23,9 +23,9 @@ int
.AP int flags in
This parameter is normally zero. It may be an OR-ed combination
of any of the following flag bits:
-TCL_WINDOW_EVENTS,
-TCL_FILE_EVENTS, TCL_TIMER_EVENTS, TCL_IDLE_EVENTS, TCL_ALL_EVENTS, or
-TCL_DONT_WAIT.
+\fBTCL_WINDOW_EVENTS\fR, \fBTCL_FILE_EVENTS\fR,
+\fBTCL_TIMER_EVENTS\fR, \fBTCL_IDLE_EVENTS\fR, \fBTCL_ALL_EVENTS\fR,
+or \fBTCL_DONT_WAIT\fR.
.BE
.SH DESCRIPTION
diff --git a/doc/Encoding.3 b/doc/Encoding.3
index bd24e0f..0c423b4 100644
--- a/doc/Encoding.3
+++ b/doc/Encoding.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.
'\"
-'\" RCS: @(#) $Id: Encoding.3,v 1.16 2004/09/06 09:44:56 dkf Exp $
+'\" RCS: @(#) $Id: Encoding.3,v 1.17 2004/09/18 17:01:05 dkf Exp $
'\"
.so man.macros
.TH Tcl_GetEncoding 3 "8.1" Tcl "Tcl Library Procedures"
@@ -85,15 +85,15 @@ Pointer to an uninitialized or free \fBTcl_DString\fR in which the converted
result will be stored.
.AP int flags in
Various flag bits OR-ed together.
-TCL_ENCODING_START signifies that the
+\fBTCL_ENCODING_START\fR signifies that the
source buffer is the first block in a (potentially multi-block) input
stream, telling the conversion routine to reset to an initial state and
perform any initialization that needs to occur before the first byte is
-converted. TCL_ENCODING_END signifies that the source buffer is the last
+converted. \fBTCL_ENCODING_END\fR signifies that the source buffer is the last
block in a (potentially multi-block) input stream, telling the conversion
routine to perform any finalization that needs to occur after the last
byte is converted and then to reset to an initial state.
-TCL_ENCODING_STOPONERROR signifies that the conversion routine should
+\fBTCL_ENCODING_STOPONERROR\fR signifies that the conversion routine should
return immediately upon reading a source character that doesn't exist in
the target encoding; otherwise a default fallback character will
automatically be substituted.
@@ -206,7 +206,7 @@ if the input stream has been damaged or if the input encoding method was
misidentified.
.IP \fBTCL_CONVERT_UNKNOWN\fR 29
The source buffer contained a character that could not be represented in
-the target encoding and TCL_ENCODING_STOPONERROR was specified.
+the target encoding and \fBTCL_ENCODING_STOPONERROR\fR was specified.
.RE
.LP
\fBTcl_UtfToExternalDString\fR converts a source buffer \fIsrc\fR from UTF-8
@@ -271,11 +271,11 @@ was used to create the encoding. The string returned by
whenever the user passes a NULL value for the \fIencoding\fR argument to
any of the other encoding functions. If \fIname\fR is NULL, the system
encoding is reset to the default system encoding, \fBbinary\fR. If the
-name did not refer to any known or loadable encoding, TCL_ERROR is
+name did not refer to any known or loadable encoding, \fBTCL_ERROR\fR is
returned and an error message is left in \fIinterp\fR. Otherwise, this
procedure increments the reference count of the new system encoding,
decrements the reference count of the old system encoding, and returns
-TCL_OK.
+\fBTCL_OK\fR.
.PP
\fBTcl_GetEncodingNames\fR sets the \fIinterp\fR result to a list
consisting of the names of all the encodings that are currently defined
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index 0792b14..b3d618e 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.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.
'\"
-'\" RCS: @(#) $Id: FileSystem.3,v 1.45 2004/08/31 09:20:09 vincentdarley Exp $
+'\" RCS: @(#) $Id: FileSystem.3,v 1.46 2004/09/18 17:01:05 dkf Exp $
'\"
.so man.macros
.TH Filesystem 3 8.4 Tcl "Tcl Library Procedures"
@@ -83,7 +83,7 @@ int
int
\fBTcl_FSFileAttrsSet\fR(\fIinterp, int index, pathPtr, Tcl_Obj *objPtr\fR)
.sp
-CONST char**
+CONST char**
\fBTcl_FSFileAttrStrings\fR(\fIpathPtr, objPtrRef\fR)
.sp
int
@@ -92,7 +92,7 @@ int
int
\fBTcl_FSAccess\fR(\fIpathPtr, mode\fR)
.sp
-Tcl_Channel
+Tcl_Channel
\fBTcl_FSOpenFileChannel\fR(\fIinterp, pathPtr, modeString, permissions\fR)
.sp
Tcl_Obj*
@@ -122,19 +122,19 @@ Tcl_Obj*
int
\fBTcl_FSConvertToPathType\fR(\fIinterp, pathPtr\fR)
.sp
-ClientData
+ClientData
\fBTcl_FSGetInternalRep\fR(\fIpathPtr, fsPtr\fR)
.sp
-Tcl_Obj*
+Tcl_Obj *
\fBTcl_FSGetTranslatedPath\fR(\fIinterp, pathPtr\fR)
.sp
-CONST char*
+CONST char *
\fBTcl_FSGetTranslatedStringPath\fR(\fIinterp, pathPtr\fR)
.sp
Tcl_Obj*
\fBTcl_FSNewNativePath\fR(\fIfsPtr, clientData\fR)
.sp
-CONST char*
+CONST char *
\fBTcl_FSGetNativePath\fR(\fIpathPtr\fR)
.sp
Tcl_Obj*
@@ -152,14 +152,14 @@ The path represented by this object is used for the operation in
question. If the object does not already have an internal \fBpath\fR
representation, it will be converted to have one.
.AP Tcl_Obj *srcPathPtr in
-As for \fBpathPtr\fR, but used for the source file for a copy or
+As for \fIpathPtr\fR, but used for the source file for a copy or
rename operation.
.AP Tcl_Obj *destPathPtr in
-As for \fBpathPtr\fR, but used for the destination filename for a copy or
+As for \fIpathPtr\fR, but used for the destination filename for a copy or
rename operation.
.AP "CONST char" *encodingName in
The encoding of the data stored in the
-file identified by \fBpathPtr\fR and to be evaluted.
+file identified by \fIpathPtr\fR and to be evaluted.
.AP "CONST char" *pattern in
Only files or directories matching this pattern will be returned by
\fBTcl_FSMatchInDirectory\fR.
@@ -169,7 +169,7 @@ this structure will be returned by \fBTcl_FSMatchInDirectory\fR. It
is very important that the 'directory' and 'mount' flags are properly handled.
This parameter may be NULL.
.AP Tcl_Interp *interp in
-Interpreter to use either for results, evaluation, or reporting error
+Interpreter to use either for results, evaluation, or reporting error
messages.
.AP ClientData clientData in
The native description of the path object to create.
@@ -182,7 +182,7 @@ to \fBpath\fR type.
.AP Tcl_Obj *listObj in
The list of path elements to operate on with a \fBjoin\fR operation.
.AP int elements in
-If non-negative, the number of elements in the listObj which should
+If non-negative, the number of elements in the \fIlistObj\fR which should
be joined together. If negative, then all elements are joined.
.AP Tcl_Obj **errorPtr out
In the case of an error, filled with an object containing the name of
@@ -190,7 +190,8 @@ the file which caused an error in the various copy/rename operations.
.AP Tcl_Obj **objPtrRef out
Filled with an object containing the result of the operation.
.AP Tcl_Obj *result out
-Pre-allocated object in which to store (by lappending) the list of
+Pre-allocated object in which to store (using
+\fBTcl_ListObjAppendElement\fR) the list of
files or directories which are successfully matched in
\fBTcl_FSMatchInDirectory\fR.
.AP int mode in
@@ -214,7 +215,7 @@ function when it is called.
.AP TclfsUnloadFileProc_ **unloadProcPtr out
Filled with the function to use to unload this piece of code.
.AP utimbuf *tval in
-The access and modification times in this structure are read and
+The access and modification times in this structure are read and
used to set those values for a given file.
.AP "CONST char" *modeString in
Specifies how the file is to be accessed. May have any of the values
@@ -234,7 +235,8 @@ The elements to join to the given base path.
.SH DESCRIPTION
.PP
-There are several reasons for calling the \fBTcl_FS...\fR functions
+There are several reasons for calling the \fBTcl_FS\fR API functions
+(e.g. \fBTcl_FSAccess\fR and \fBTcl_FSStat\fR)
rather than calling system level functions like \fBaccess\fR and
\fBstat\fR directly. First, they will work cross-platform, so an
extension which calls them should work unmodified on Unix and
@@ -244,18 +246,18 @@ deal with any 'Utf to platform-native' path conversions which may be
required (and may cache the results of such conversions for greater
efficiency on subsequent calls). Fourth, and perhaps most importantly,
all of these functions are 'virtual filesystem aware'. Any virtual
-filesystem which has been registered (through
+filesystem (VFS for short) which has been registered (through
\fBTcl_FSRegister\fR) may reroute file access to alternative
media or access methods. This means that all of these functions (and
therefore the corresponding \fBfile\fR, \fBglob\fR, \fBpwd\fR, \fBcd\fR,
\fBopen\fR, etc. Tcl commands) may be operate on 'files' which are not
native files in the native filesystem. This also means that any Tcl
-extension which accesses the filesystem through this API is
+extension which accesses the filesystem (FS for short) through this API is
automatically 'virtual filesystem aware'. Of course, if an extension
accesses the native filesystem directly (through platform-specific
-APIs, for example), then Tcl cannot intercept such calls.
+APIs, for example), then Tcl cannot intercept such calls.
.PP
-If appropriate vfs's have been registered, the 'files' may, to give two
+If appropriate VFSes have been registered, the 'files' may, to give two
examples, be remote (e.g. situated on a remote ftp server) or archived
(e.g. lying inside a .zip archive). Such registered filesystems provide
a lookup table of functions to implement all or some of the functionality
@@ -264,70 +266,78 @@ abstract away from what the 'struct stat' buffer is actually
declared to be, allowing the same code to be used both on systems with
and systems without support for files larger than 2GB in size.
.PP
-The \fBTcl_FS...\fR are objectified and may cache internal
+The \fBTcl_FS\fR API is objectified and may cache internal
representations and other path-related strings (e.g. the current working
directory). One side-effect of this is that one must not pass in objects
-with a refCount of zero to any of these functions. If such calls were
+with a reference count of zero to any of these functions. If such calls were
handled, they might result
in memory leaks (under some circumstances, the filesystem code may wish
to retain a reference to the passed in object, and so one must not assume
-that after any of these calls return, the object still has a refCount of
-zero - it may have been incremented), or in a direct segfault
+that after any of these calls return, the object still has a reference count of
+zero - it may have been incremented) or in a direct segmentation fault
+(or other memory access error)
due to the object being freed part way through the complex object
manipulation required to ensure that the path is fully normalized and
absolute for filesystem determination. The practical lesson to learn
-from this is that \fBTcl_Obj *path = Tcl_NewStringObj(...) ;
-Tcl_FS...(path) ; Tcl_DecrRefCount(path)\fR is wrong, and may segfault.
-The 'path' must have its refCount incremented before passing it in, or
-decrementing it. For this reason, objects with a refCount of zero are
+from this is that
+.CS
+Tcl_Obj *path = Tcl_NewStringObj(...);
+Tcl_FS\fIWhatever\fR(path);
+Tcl_DecrRefCount(path);
+.CE
+is wrong, and may cause memory errors.
+The \fIpath\fR must have its reference count incremented before passing it in, or
+decrementing it. For this reason, objects with a reference count of zero are
considered not to be valid filesystem paths and calling any Tcl_FS API
-with such an object will result in no action being taken.
-.PP
-\fBTcl_FSCopyFile\fR attempts to copy the file given by srcPathPtr to the
-path name given by destPathPtr. If the two paths given lie in the same
+function with such an object will result in no action being taken.
+.SS "FS API FUNCTIONS"
+\fBTcl_FSCopyFile\fR attempts to copy the file given by \fIsrcPathPtr\fR to the
+path name given by \fIdestPathPtr\fR. If the two paths given lie in the same
filesystem (according to \fBTcl_FSGetFileSystemForPath\fR) then that
filesystem's 'copy file' function is called (if it is non-NULL).
-Otherwise the function returns -1 and sets Tcl's errno to the 'EXDEV'
-posix error code (which signifies a 'cross-domain link').
+Otherwise the function returns -1 and sets the \fBerrno\fR global C
+variable to the 'EXDEV'
+POSIX error code (which signifies a 'cross-domain link').
.PP
-\fBTcl_FSCopyDirectory\fR attempts to copy the directory given by srcPathPtr to the
-path name given by destPathPtr. If the two paths given lie in the same
+\fBTcl_FSCopyDirectory\fR attempts to copy the directory given by \fIsrcPathPtr\fR to the
+path name given by \fIdestPathPtr\fR. If the two paths given lie in the same
filesystem (according to \fBTcl_FSGetFileSystemForPath\fR) then that
filesystem's 'copy file' function is called (if it is non-NULL).
-Otherwise the function returns -1 and sets Tcl's errno to the 'EXDEV'
-posix error code (which signifies a 'cross-domain link').
+Otherwise the function returns -1 and sets the \fBerrno\fR global C
+variable to the 'EXDEV'
+POSIX error code (which signifies a 'cross-domain link').
.PP
\fBTcl_FSCreateDirectory\fR attempts to create the directory given by
-pathPtr by calling the owning filesystem's 'create directory'
+\fIpathPtr\fR by calling the owning filesystem's 'create directory'
function.
.PP
\fBTcl_FSDeleteFile\fR attempts to delete the file given by
-pathPtr by calling the owning filesystem's 'delete file'
+\fIpathPtr\fR by calling the owning filesystem's 'delete file'
function.
.PP
\fBTcl_FSRemoveDirectory\fR attempts to remove the directory given by
-pathPtr by calling the owning filesystem's 'remove directory'
+\fIpathPtr\fR by calling the owning filesystem's 'remove directory'
function.
.PP
\fBTcl_FSRenameFile\fR attempts to rename the file or directory given by
-srcPathPtr to the path name given by destPathPtr. If the two paths
+\fIsrcPathPtr\fR to the path name given by \fIdestPathPtr\fR. If the two paths
given lie in the same filesystem (according to
\fBTcl_FSGetFileSystemForPath\fR) then that filesystem's 'rename file'
function is called (if it is non-NULL). Otherwise the function returns -1
-and sets Tcl's errno to the 'EXDEV' posix error code (which signifies
-a ``cross-domain link'').
+and sets the \Berrno\fR global C variable to the 'EXDEV' POSIX error
+code (which signifies a 'cross-domain link').
.PP
\fBTcl_FSListVolumes\fR calls each filesystem which has a non-NULL 'list
volumes' function and asks them to return their list of root volumes. It
accumulates the return values in a list which is returned to the
-caller (with a refCount of 0).
+caller (with a reference count of 0).
.PP
.VS 8.5
\fBTcl_FSEvalFileEx\fR reads the file given by \fIpathPtr\fR using
-the encoding identified by \fBencodingName\fR and evaluates
+the encoding identified by \fIencodingName\fR and evaluates
its contents as a Tcl script. It returns the same information as
\fBTcl_EvalObjEx\fR.
-If \fBencodingName\fR is NULL, the system encoding is used for
+If \fIencodingName\fR is NULL, the system encoding is used for
reading the file contents.
If the file couldn't be read then a Tcl error is returned to describe
why the file couldn't be read.
@@ -342,45 +352,44 @@ when reading the file.
.PP
\fBTcl_FSLoadFile\fR dynamically loads a binary code file into memory and
returns the addresses of two procedures within that file, if they are
-defined. The appropriate function for the filesystem to which pathPtr
+defined. The appropriate function for the filesystem to which \fIpathPtr\fR
belongs will be called. If that filesystem does not implement this
function (most virtual filesystems will not, because of OS limitations
in dynamically loading binary code), Tcl will attempt to copy the file
to a temporary directory and load that temporary file.
.PP
Returns a standard Tcl completion code. If an error occurs, an error
-message is left in the interp's result.
+message is left in the \fIinterp\fR's result.
.PP
\fBTcl_FSMatchInDirectory\fR is used by the globbing code to search a
directory for all files which match a given pattern. The appropriate
-function for the filesystem to which pathPtr belongs will be called.
+function for the filesystem to which \fIpathPtr\fR belongs will be called.
.PP
The return value is a standard Tcl result indicating whether an error
occurred in globbing. Error messages are placed in interp, but good
results are placed in the resultPtr given.
-
-Note that the 'glob' code implements recursive patterns internally, so
+.PP
+Note that the \fBglob\fR code implements recursive patterns internally, so
this function will only ever be passed simple patterns, which can be
-matched using the logic of 'string match'. To handle recursion, Tcl
+matched using the logic of \fBstring match\fR. To handle recursion, Tcl
will call this function frequently asking only for directories to be
returned.
.PP
-\fBTcl_FSLink\fR replaces the library version of readlink(), and
-extends it to support the creation of links. The appropriate function
-for the filesystem to which linkNamePtr belongs will be called.
+\fBTcl_FSLink\fR replaces the library version of \fBreadlink\fR, and
+extends it to support the creation of links. The appropriate function
+for the filesystem to which \fIlinkNamePtr\fR belongs will be called.
.PP
-If the \fItoPtr\fR is NULL, a readlink action is performed. The result
+If the \fItoPtr\fR is NULL, a 'read link' action is performed. The result
is a Tcl_Obj specifying the contents of the symbolic link given by
\fIlinkNamePtr\fR, or NULL if the link could not be read. The result is owned
by the caller, which should call Tcl_DecrRefCount when the result is no
longer needed. If the \fItoPtr\fR is not NULL, Tcl should create a link
of one of the types passed in in the \fIlinkAction\fR flag. This flag is
-an or'd combination of TCL_CREATE_SYMBOLIC_LINK and TCL_CREATE_HARD_LINK.
+an ORed combination of \fBTCL_CREATE_SYMBOLIC_LINK\fR and \fBTCL_CREATE_HARD_LINK\fR.
Where a choice exists (i.e. more than one flag is passed in), the Tcl
convention is to prefer symbolic links. When a link is successfully
created, the return value should be \fItoPtr\fR (which is therefore
-already owned by the caller). If unsuccessful, NULL should be
-returned.
+already owned by the caller). If unsuccessful, NULL is returned.
.PP
\fBTcl_FSLstat\fR fills the stat structure \fIstatPtr\fR with information
about the specified file. You do not need any access rights to the
@@ -396,44 +405,45 @@ If \fIpath\fR exists, \fBTcl_FSLstat\fR returns 0 and the stat structure
is filled with data. Otherwise, -1 is returned, and no stat info is
given.
.PP
-\fBTcl_FSUtime\fR replaces the library version of utime.
+\fBTcl_FSUtime\fR replaces the library version of utime.
.PP
-This returns 0 on success and -1 on error (as per the 'utime'
+This returns 0 on success and -1 on error (as per the \fButime\fR
documentation). If successful, the function
will update the 'atime' and 'mtime' values of the file given.
.PP
-\fBTcl_FSFileAttrsGet\fR implements read access for the hookable 'file
-attributes' subcommand. The appropriate function for the filesystem to
-which pathPtr belongs will be called.
+\fBTcl_FSFileAttrsGet\fR implements read access for the hookable \fBfile
+attributes\fR subcommand. The appropriate function for the filesystem to
+which \fIpathPtr\fR belongs will be called.
.PP
-If the result is TCL_OK, then an object was placed in objPtrRef, which
-will only be temporarily valid (unless Tcl_IncrRefCount is called).
+If the result is \fBTCL_OK\fR, then an object was placed in
+\fIobjPtrRef\fR, which
+will only be temporarily valid (unless \fBTcl_IncrRefCount\fR is called).
.PP
-\fBTcl_FSFileAttrsSet\fR implements write access for the hookable 'file
-attributes' subcommand. The appropriate function for the filesystem to
-which pathPtr belongs will be called.
+\fBTcl_FSFileAttrsSet\fR implements write access for the hookable \fBfile
+attributes\fR subcommand. The appropriate function for the filesystem to
+which \fIpathPtr\fR belongs will be called.
+.PP
+\fBTcl_FSFileAttrStrings\fR implements part of the hookable \fBfile
+attributes\fR subcommand. The appropriate function for the filesystem
+to which \fIpathPtr\fR belongs will be called.
.PP
-\fBTcl_FSFileAttrStrings\fR implements part of the hookable 'file attributes'
-subcommand. The appropriate function for the filesystem to which
-pathPtr belongs will be called.
-.PP
The called procedure may either return an array of strings, or may
-instead return NULL and place a Tcl list into the given objPtrRef. Tcl
-will take that list and first increment its refCount before using it.
-On completion of that use, Tcl will decrement its refCount. Hence if
+instead return NULL and place a Tcl list into the given \fIobjPtrRef\fR. Tcl
+will take that list and first increment its reference count before using it.
+On completion of that use, Tcl will decrement its reference count. Hence if
the list should be disposed of by Tcl when done, it should have a
-refCount of zero, and if the list should not be disposed of, the
-filesystem should ensure it retains a refCount on the object.
+reference count of zero, and if the list should not be disposed of, the
+filesystem should ensure it retains a reference count to the object.
.PP
\fBTcl_FSAccess\fR checks whether the process would be allowed to read,
-write or test for existence of the file (or other file system object)
-whose name is pathname. If pathname is a symbolic link on Unix,
+write or test for existence of the file (or other filesystem object)
+whose name is \fIpathname\fR. If \fIpathname\fR is a symbolic link on Unix,
then permissions of the file referred by this symbolic link are
tested.
.PP
On success (all requested permissions granted), zero is returned. On
error (at least one bit in mode asked for a permission that is denied,
-or some other error occurred), -1 is returned.
+or some other error occurred), -1 is returned.
.PP
\fBTcl_FSStat\fR fills the stat structure \fIstatPtr\fR with information
about the specified file. You do not need any access rights to the
@@ -467,71 +477,71 @@ If one of the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was
previously closed, the act of creating the new channel also assigns it as a
replacement for the standard channel.
.PP
-\fBTcl_FSGetCwd\fR replaces the library version of getcwd().
+\fBTcl_FSGetCwd\fR replaces the library version of \fBgetcwd\fR.
.PP
It returns the Tcl library's current working directory. This may be
-different to the native platform's working directory, in the case for
-which the cwd is not in the native filesystem.
+different to the native platform's working directory, which happens when
+the current working directory is not in the native filesystem.
.PP
The result is a pointer to a Tcl_Obj specifying the current directory,
or NULL if the current directory could not be determined. If NULL is
-returned, an error message is left in the interp's result.
-
-The result already has its refCount incremented for the caller. When
-it is no longer needed, that refCount should be decremented. This is
+returned, an error message is left in the \fIinterp\fR's result.
+.PP
+The result already has its reference count incremented for the caller. When
+it is no longer needed, that reference count should be decremented. This is
needed for thread-safety purposes, to allow multiple threads to access
this and related functions, while ensuring the results are always
valid.
.PP
-\fBTcl_FSChdir\fR replaces the library version of chdir(). The path is
+\fBTcl_FSChdir\fR replaces the library version of \fBchdir\fR. The path is
normalized and then passed to the filesystem which claims it. If that
-filesystem does not implement this function, Tcl will fallback to a
-combination of stat and access to check whether the directory exists
-and has appropriate permissions.
-.PP
-For results, see chdir() documentation. If successful, we keep a
-record of the successful path in cwdPathPtr for subsequent calls to
-getcwd.
-.PP
-\fBTcl_FSPathSeparator\fR returns the separator character to be used for
-most specific element of the path specified by pathPtr (i.e. the last
+filesystem does not implement this function, Tcl will fallback to a
+combination of \fBstat\fR and \fBaccess\fR to check whether the directory
+exists and has appropriate permissions.
+.PP
+For results, see \fBchdir\fR documentation. If successful, we keep a
+record of the successful path in \fIcwdPathPtr\fR for subsequent calls to
+\fBTcl_FSGetCwd\fR.
+.PP
+\fBTcl_FSPathSeparator\fR returns the separator character to be used for
+most specific element of the path specified by \fIpathPtr\fR (i.e. the last
part of the path).
.PP
The separator is returned as a Tcl_Obj containing a string of length
1. If the path is invalid, NULL is returned.
.PP
\fBTcl_FSJoinPath\fR takes the given Tcl_Obj, which must be a valid
-list (which is allowed to have a refCount of zero), and returns the path
-object given by considering the first 'elements' elements as valid path
+list (which is allowed to have a reference count of zero), and returns the path
+object given by considering the first \fIelements\fR elements as valid path
segments (each path segment may be a complete path, a partial path or
just a single possible directory or file name). If any path segment is
actually an absolute path, then all prior path segments are discarded.
-If elements < 0, we use the entire list.
+If \fIelements\fR is less than 0, we use the entire list.
.PP
It is possible that the returned object is actually an element
-of the given list, so the caller should be careful to store a
-refCount to it before freeing the list.
+of the given list, so the caller should be careful to increment the
+reference count of the result before freeing the list.
.PP
-Returns object, typically with refCount of zero (but it could be shared
-under some conditions) , containing the joined path. The caller must
-add a refCount to the object before using it. In particular, the
+The returned object, typically with a reference count of zero (but it
+could be shared
+under some conditions), contains the joined path. The caller must
+add a reference count to the object before using it. In particular, the
returned object could be an element of the given list, so freeing the
-list might free the object prematurely if no refCount has been taken.
+list might free the object prematurely if no reference count has been taken.
If the number of elements is zero, then the returned object will be
an empty-string Tcl_Obj.
.PP
\fBTcl_FSSplitPath\fR takes the given Tcl_Obj, which should be a valid path,
-and returns a Tcl List object containing each segment of that path as
+and returns a Tcl list object containing each segment of that path as
an element.
-.PP
-Returns list object with refCount of zero. If the passed in lenPtr is
-non-NULL, we use it to return the number of elements in the returned
-list.
+It returns a list object with a reference count of zero. If the
+passed in \fIlenPtr\fR is non-NULL, the variable it points to will be
+updated to contain the number of elements in the returned list.
.PP
\fBTcl_FSEqualPaths\fR tests whether the two paths given represent the same
filesystem object
.PP
-It returns 1 if the paths are equal, and 0 if they are different. If
+It returns 1 if the paths are equal, and 0 if they are different. If
either path is NULL, 0 is always returned.
.PP
\fBTcl_FSGetNormalizedPath\fR this important function attempts to extract
@@ -565,9 +575,9 @@ even if this object is already supposedly of the correct type.
The filename may begin with "~" (to indicate current user's home
directory) or "~<user>" (to indicate any user's home directory).
.PP
-If the conversion succeeds (i.e. the object is a valid path in one of
-the current filesystems), then TCL_OK is returned. Otherwise
-TCL_ERROR is returned, and an error message may
+If the conversion succeeds (i.e. the object is a valid path in one of
+the current filesystems), then \fBTCL_OK\fR is returned. Otherwise
+\fBTCL_ERROR\fR is returned, and an error message may
be left in the interpreter.
.PP
\fBTcl_FSGetInternalRep\fR extracts the internal representation of a given
@@ -581,7 +591,7 @@ representation is cached, so that repeated calls to this function will
not require additional conversions.
.PP
\fBTcl_FSGetTranslatedPath\fR attempts to extract the translated path
-from the given Tcl_Obj.
+from the given Tcl_Obj.
.PP
If the translation succeeds (i.e. the object is a valid path), then it is
returned. Otherwise NULL will be returned, and an error message may be
@@ -596,17 +606,17 @@ better functions to use for most purposes.
\fBTcl_FSGetTranslatedStringPath\fR does the same as
\fBTcl_FSGetTranslatedPath\fR, but returns a character string or NULL.
The string returned is dynamically allocated and owned by the caller,
-which must store it or call ckfree to ensure it is freed. Again,
+which must store it or call \fBckfree\fR to ensure it is freed. Again,
\fBTcl_FSGetNormalizedPath\fR or \fBTcl_GetNativePath\fR are usually
better functions to use for most purposes.
.PP
\fBTcl_FSNewNativePath\fR performs something like that reverse of the
usual obj->path->nativerep conversions. If some code retrieves a path
-in native form (from, e.g. readlink or a native dialog), and that path
+in native form (from, e.g. \fBreadlink\fR or a native dialog), and that path
is to be used at the Tcl level, then calling this function is an
efficient way of creating the appropriate path object type.
.PP
-The resulting object is a pure 'path' object, which will only receive
+The resulting object is a pure 'path' object, which will only receive
a Utf-8 string representation if that is required by some Tcl code.
.PP
\fBTcl_FSGetNativePath\fR is for use by the Win/Unix native
@@ -648,12 +658,12 @@ recognized, when NULL will be returned.
.PP
If no filesystem will accept the path, NULL is returned.
.PP
-\fBTcl_FSGetPathType\fR determines whether the given path is relative
+\fBTcl_FSGetPathType\fR determines whether the given path is relative
to the current directory, relative to the current volume, or
absolute.
.PP
-It returns one of TCL_PATH_ABSOLUTE, TCL_PATH_RELATIVE, or
-TCL_PATH_VOLUME_RELATIVE
+It returns one of \fBTCL_PATH_ABSOLUTE\fR, \fBTCL_PATH_RELATIVE\fR, or
+\fBTCL_PATH_VOLUME_RELATIVE\fR
.PP
\fBTcl_AllocStatBuf\fR allocates a \fITcl_StatBuf\fR on the system
heap (which may be deallocated by being passed to \fBckfree\fR.) This
@@ -666,7 +676,7 @@ depends on the flags used to build Tcl.
A filesystem provides a \fBTcl_Filesystem\fR structure that contains
pointers to functions that implement the various operations on a
filesystem; these operations are invoked as needed by the generic
-layer, which generally occurs through the functions listed above.
+layer, which generally occurs through the functions listed above.
.PP
The \fBTcl_Filesystem\fR structures are manipulated using the following
methods.
@@ -676,13 +686,13 @@ optional piece of data to associated with that filesystem. On calling
this function, Tcl will attach the filesystem to the list of known
filesystems, and it will become fully functional immediately. Tcl does
not check if the same filesystem is registered multiple times (and in
-general that is not a good thing to do). TCL_OK will be returned.
+general that is not a good thing to do). \fBTCL_OK\fR will be returned.
.PP
\fBTcl_FSUnregister\fR removes the given filesystem structure from
-the list of known filesystems, if it is known, and returns TCL_OK. If
-the filesystem is not currently registered, TCL_ERROR is returned.
+the list of known filesystems, if it is known, and returns \fBTCL_OK\fR. If
+the filesystem is not currently registered, \fBTCL_ERROR\fR is returned.
.PP
-\fBTcl_FSData\fR will return the ClientData associated with the given
+\fBTcl_FSData\fR will return the ClientData associated with the given
filesystem, if that filesystem is registered. Otherwise it will
return NULL.
.PP
@@ -694,37 +704,37 @@ longer be correct.
The \fBTcl_Filesystem\fR structure contains the following fields:
.CS
typedef struct Tcl_Filesystem {
- CONST char *\fItypeName\fR;
- int \fIstructureLength\fR;
- Tcl_FSVersion \fIversion\fR;
+ CONST char *\fItypeName\fR;
+ int \fIstructureLength\fR;
+ Tcl_FSVersion \fIversion\fR;
Tcl_FSPathInFilesystemProc *\fIpathInFilesystemProc\fR;
Tcl_FSDupInternalRepProc *\fIdupInternalRepProc\fR;
Tcl_FSFreeInternalRepProc *\fIfreeInternalRepProc\fR;
Tcl_FSInternalToNormalizedProc *\fIinternalToNormalizedProc\fR;
Tcl_FSCreateInternalRepProc *\fIcreateInternalRepProc\fR;
- Tcl_FSNormalizePathProc *\fInormalizePathProc\fR;
+ Tcl_FSNormalizePathProc *\fInormalizePathProc\fR;
Tcl_FSFilesystemPathTypeProc *\fIfilesystemPathTypeProc\fR;
Tcl_FSFilesystemSeparatorProc *\fIfilesystemSeparatorProc\fR;
- Tcl_FSStatProc *\fIstatProc\fR;
- Tcl_FSAccessProc *\fIaccessProc\fR;
- Tcl_FSOpenFileChannelProc *\fIopenFileChannelProc\fR;
- Tcl_FSMatchInDirectoryProc *\fImatchInDirectoryProc\fR;
- Tcl_FSUtimeProc *\fIutimeProc\fR;
- Tcl_FSLinkProc *\fIlinkProc\fR;
- Tcl_FSListVolumesProc *\fIlistVolumesProc\fR;
+ Tcl_FSStatProc *\fIstatProc\fR;
+ Tcl_FSAccessProc *\fIaccessProc\fR;
+ Tcl_FSOpenFileChannelProc *\fIopenFileChannelProc\fR;
+ Tcl_FSMatchInDirectoryProc *\fImatchInDirectoryProc\fR;
+ Tcl_FSUtimeProc *\fIutimeProc\fR;
+ Tcl_FSLinkProc *\fIlinkProc\fR;
+ Tcl_FSListVolumesProc *\fIlistVolumesProc\fR;
Tcl_FSFileAttrStringsProc *\fIfileAttrStringsProc\fR;
Tcl_FSFileAttrsGetProc *\fIfileAttrsGetProc\fR;
Tcl_FSFileAttrsSetProc *\fIfileAttrsSetProc\fR;
- Tcl_FSCreateDirectoryProc *\fIcreateDirectoryProc\fR;
- Tcl_FSRemoveDirectoryProc *\fIremoveDirectoryProc\fR;
- Tcl_FSDeleteFileProc *\fIdeleteFileProc\fR;
- Tcl_FSCopyFileProc *\fIcopyFileProc\fR;
- Tcl_FSRenameFileProc *\fIrenameFileProc\fR;
- Tcl_FSCopyDirectoryProc *\fIcopyDirectoryProc\fR;
- Tcl_FSLstatProc *\fIlstatProc\fR;
- Tcl_FSLoadFileProc *\fIloadFileProc\fR;
- Tcl_FSGetCwdProc *\fIgetCwdProc\fR;
- Tcl_FSChdirProc *\fIchdirProc\fR;
+ Tcl_FSCreateDirectoryProc *\fIcreateDirectoryProc\fR;
+ Tcl_FSRemoveDirectoryProc *\fIremoveDirectoryProc\fR;
+ Tcl_FSDeleteFileProc *\fIdeleteFileProc\fR;
+ Tcl_FSCopyFileProc *\fIcopyFileProc\fR;
+ Tcl_FSRenameFileProc *\fIrenameFileProc\fR;
+ Tcl_FSCopyDirectoryProc *\fIcopyDirectoryProc\fR;
+ Tcl_FSLstatProc *\fIlstatProc\fR;
+ Tcl_FSLoadFileProc *\fIloadFileProc\fR;
+ Tcl_FSGetCwdProc *\fIgetCwdProc\fR;
+ Tcl_FSChdirProc *\fIchdirProc\fR;
} Tcl_Filesystem;
.CE
.PP
@@ -742,15 +752,15 @@ side-effects which are required by the filesystem; Tcl has less
efficient emulations it can fall back on). It is important to note
that, in the current version of Tcl, most of these fallbacks are only
used to handle commands initiated in Tcl, not in C. What this means is,
-that if a 'file rename' command is issued in Tcl, and the relevant
+that if a \fBfile rename\fR command is issued in Tcl, and the relevant
filesystem(s) do not implement their \fITcl_FSRenameFileProc\fR, Tcl's
core will instead fallback on a combination of other filesystem
functions (it will use \fITcl_FSCopyFileProc\fR followed by
\fITcl_FSDeleteFileProc\fR, and if \fITcl_FSCopyFileProc\fR is not
implemented there is a further fallback). However, if a
-\fITcl_FSRenameFile\fR command is issued at the C level, no such
+\fITcl_FSRenameFileProc\fR command is issued at the C level, no such
fallbacks occur. This is true except for the last four entries in the
-filesystem table (lstat, load, getcwd and chdir)
+filesystem table (\fBlstat\fR, \fBload\fR, \fBgetcwd\fR and \fBchdir\fR)
for which fallbacks do in fact occur at the C level.
.PP
As an example, here is the filesystem lookup table used by the
@@ -780,21 +790,21 @@ static Tcl_Filesystem vfsFilesystem = {
&VfsOpenFileChannel,
&VfsMatchInDirectory,
&VfsUtime,
- /* We choose not to support symbolic links inside our vfs's */
+ /* We choose not to support symbolic links inside our VFS's */
NULL,
&VfsListVolumes,
&VfsFileAttrStrings,
&VfsFileAttrsGet,
&VfsFileAttrsSet,
&VfsCreateDirectory,
- &VfsRemoveDirectory,
+ &VfsRemoveDirectory,
&VfsDeleteFile,
/* No copy file - fallback will occur at Tcl level */
NULL,
/* No rename file - fallback will occur at Tcl level */
NULL,
/* No copy directory - fallback will occur at Tcl level */
- NULL,
+ NULL,
/* Core will use stat for lstat */
NULL,
/* No load - fallback on core implementation */
@@ -813,7 +823,7 @@ to other native representations.
.PP
The \fItypeName\fR field contains a null-terminated string that
identifies the type of the filesystem implemented, e.g.
-\fBnative\fR or \fBzip\fR or \fBvfs\fR.
+``native'' or ``zip'' or ```vfs''.
.PP
.SH "STRUCTURE LENGTH"
.PP
@@ -838,7 +848,7 @@ filesystem or not. Tcl will only call the rest of the filesystem
functions with a path for which this function has returned \fBTCL_OK\fR.
If the path does not belong, -1 should be returned (the behaviour of Tcl
for any other return value is not defined). If \fBTCL_OK\fR is returned,
-then the optional \fBclientDataPtr\fR output parameter can be used to
+then the optional \fIclientDataPtr\fR output parameter can be used to
return an internal (filesystem specific) representation of the path,
which will be cached inside the path object, and may be retrieved
efficiently by the other filesystem functions. Tcl will simultaneously
@@ -848,7 +858,7 @@ Tcl's internal list of known filesystems.
.PP
.CS
typedef int Tcl_FSPathInFilesystemProc(
- Tcl_Obj *\fIpathPtr\fR,
+ Tcl_Obj *\fIpathPtr\fR,
ClientData *\fIclientDataPtr\fR);
.CE
.SH DUPINTERNALREPPROC
@@ -894,7 +904,7 @@ immediately creates an internal representation for paths it accepts.
typedef ClientData Tcl_FSCreateInternalRepProc(
Tcl_Obj *\fIpathPtr\fR);
.CE
-.SH NORMALIZEPATHPROC
+.SH NORMALIZEPATHPROC
.PP
Function to normalize a path. Should be implemented for all
filesystems which can have multiple string representations for the same
@@ -908,19 +918,19 @@ links, etc). If the very last component in the path is a symbolic
link, it should not be converted into the object it points to (but
its case or other aspects should be made unique). All other path
components should be converted from symbolic links. This one
-exception is required to agree with Tcl's semantics with 'file
-delete', 'file rename', 'file copy' operating on symbolic links.
-This function may be called with 'nextCheckpoint' either
+exception is required to agree with Tcl's semantics with \fBfile
+delete\fR, \fBfile rename\fR, \fBfile copy\fR operating on symbolic links.
+This function may be called with \fInextCheckpoint\fR either
at the beginning of the path (i.e. zero), at the end of the path, or
at any intermediate file separator in the path. It will never
point to any other arbitrary position in the path. In the last of
-the three valid cases, the implementation can assume that the path
+the three valid cases, the implementation can assume that the path
up to and including the file separator is known and normalized.
.PP
.CS
typedef int Tcl_FSNormalizePathProc(
- Tcl_Interp *\fIinterp\fR,
- Tcl_Obj *\fIpathPtr\fR,
+ Tcl_Interp *\fIinterp\fR,
+ Tcl_Obj *\fIpathPtr\fR,
int \fInextCheckpoint\fR);
.CE
.SH "FILESYSTEM OPERATIONS"
@@ -942,8 +952,8 @@ NULL, in which case no type information will be available to users of
the filesystem. The 'type' is used only for informational purposes,
and should be returned as the string representation of the Tcl_Obj
which is returned. A typical return value might be "networked", "zip"
-or "ftp". The Tcl_Obj result is owned by the filesystem and so Tcl will
-increment the refCount of that object if it wishes to retain a reference
+or "ftp". The Tcl_Obj result is owned by the filesystem and so Tcl will
+increment the refCount of that object if it wishes to retain a reference
to it.
.PP
.CS
@@ -962,10 +972,10 @@ return value should be an object with refCount of zero.
typedef Tcl_Obj* Tcl_FSFilesystemSeparatorProc(
Tcl_Obj *\fIpathPtr\fR);
.CE
-.SH STATPROC
+.SH STATPROC
.PP
-Function to process a \fBTcl_FSStat()\fR call. Must be implemented for any
-reasonable filesystem, since many Tcl level commands depend crucially
+Function to process a \fBTcl_FSStat\fR call. Must be implemented for any
+reasonable filesystem, since many Tcl level commands depend crucially
upon it (e.g. \fBfile atime\fR, \fBfile isdirectory\fR, \fBfile size\fR,
\fBglob\fR).
.PP
@@ -988,10 +998,10 @@ time.
If the file represented by \fIpathPtr\fR exists, the
\fBTcl_FSStatProc\fR returns 0 and the stat structure is filled with
data. Otherwise, -1 is returned, and no stat info is given.
-.SH ACCESSPROC
+.SH ACCESSPROC
.PP
-Function to process a \fBTcl_FSAccess()\fR call. Must be implemented for
-any reasonable filesystem, since many Tcl level commands depend crucially
+Function to process a \fBTcl_FSAccess\fR call. Must be implemented for
+any reasonable filesystem, since many Tcl level commands depend crucially
upon it (e.g. \fBfile exists\fR, \fBfile readable\fR).
.PP
.CS
@@ -1001,19 +1011,20 @@ typedef int Tcl_FSAccessProc(
.CE
.PP
The \fBTcl_FSAccessProc\fR checks whether the process would be allowed
-to read, write or test for existence of the file (or other file system
-object) whose name is pathname. If pathname is a symbolic link, then
+to read, write or test for existence of the file (or other filesystem
+object) whose name is in \fIpathPtr\fR. If the pathname refers to a
+symbolic link, then the
permissions of the file referred by this symbolic link should be tested.
.PP
On success (all requested permissions granted), zero is returned. On
error (at least one bit in mode asked for a permission that is denied,
or some other error occurred), -1 is returned.
.PP
-.SH OPENFILECHANNELPROC
+.SH OPENFILECHANNELPROC
.PP
-Function to process a \fBTcl_FSOpenFileChannel()\fR call. Must be
+Function to process a \fBTcl_FSOpenFileChannel\fR call. Must be
implemented for any reasonable filesystem, since any operations
-which require open or accessing a file's contents will use it
+which require open or accessing a file's contents will use it
(e.g. \fBopen\fR, \fBencoding\fR, and many Tk commands).
.PP
.CS
@@ -1042,19 +1053,19 @@ interpreter; to register it, use \fBTcl_RegisterChannel\fR. If one of
the standard channels, \fBstdin, stdout\fR or \fBstderr\fR was
previously closed, the act of creating the new channel also assigns it
as a replacement for the standard channel.
-.SH MATCHINDIRECTORYPROC
+.SH MATCHINDIRECTORYPROC
.PP
-Function to process a \fBTcl_FSMatchInDirectory()\fR call. If not
+Function to process a \fBTcl_FSMatchInDirectory\fR call. If not
implemented, then glob and recursive copy functionality will be lacking
-in the filesystem (and this may impact commands like 'encoding names'
+in the filesystem (and this may impact commands like \fBencoding names\fR
which use glob functionality internally).
.PP
.CS
typedef int Tcl_FSMatchInDirectoryProc(
- Tcl_Interp* \fIinterp\fR,
+ Tcl_Interp* \fIinterp\fR,
Tcl_Obj *\fIresult\fR,
- Tcl_Obj *\fIpathPtr\fR,
- CONST char *\fIpattern\fR,
+ Tcl_Obj *\fIpathPtr\fR,
+ CONST char *\fIpattern\fR,
Tcl_GlobTypeData * \fItypes\fR);
.CE
.PP
@@ -1071,13 +1082,13 @@ documented whether \fIpathPtr\fR will have a file separator at its end of
not, so code should be flexible to both possibilities.
.PP
The return value is a standard Tcl result indicating whether an error
-occurred in the matching process. Error messages are placed in interp,
-but on a TCL_OK result, the interpreter should not be modified, but
+occurred in the matching process. Error messages are placed in \fIinterp\fR;
+on a \fBTCL_OK\fR result, the interpreter should not be modified, but
rather results should be added to the \fIresult\fR object given
(which can be assumed to be a valid Tcl list). The matches added
-to \fIresult\fR should include any path prefix given in \fIpathPtr\fR
-(this usually means they will be absolute path specifications).
-Note that if no matches are found, that simply leads to an empty
+to \fIresult\fR should include any path prefix given in \fIpathPtr\fR
+(this usually means they will be absolute path specifications).
+Note that if no matches are found, that simply leads to an empty
result --- errors are only signaled for actual file or filesystem
problems which may occur during the matching process.
.PP
@@ -1088,20 +1099,20 @@ true (and in particular when the other flags are false). In the first of
these cases, the function must list the contained directories. Tcl uses
this to implement recursive globbing, so it is critical that filesystems
implement directory matching correctly. In the second of these cases,
-with \fITCL_GLOB_TYPE_MOUNT\fR, the filesystem must list the mount points
+with \fBTCL_GLOB_TYPE_MOUNT\fR, the filesystem must list the mount points
which lie within the given \fIpathPtr\fR (and in this case, \fIpathPtr\fR
need not lie within the same filesystem - different to all other cases in
which this function is called). Support for this is critical if Tcl is
to have seamless transitions between from one filesystem to another.
-.SH UTIMEPROC
+.SH UTIMEPROC
.PP
-Function to process a \fBTcl_FSUtime()\fR call. Required to allow setting
-(not reading) of times with 'file mtime', 'file atime' and the
-open-r/open-w/fcopy implementation of 'file copy'.
+Function to process a \fBTcl_FSUtime\fR call. Required to allow setting
+(not reading) of times with \fBfile mtime\fR, \fBfile atime\fR and the
+open-r/open-w/fcopy implementation of \fBfile copy\fR.
.PP
.CS
typedef int Tcl_FSUtimeProc(
- Tcl_Obj *\fIpathPtr\fR,
+ Tcl_Obj *\fIpathPtr\fR,
struct utimbuf *\fItval\fR);
.CE
.PP
@@ -1109,10 +1120,10 @@ The access and modification times of the file specified by \fIpathPtr\fR
should be changed to the values given in the \fItval\fR structure.
.PP
The return value should be 0 on success and -1 on an error, as
-with the system utime().
-.SH LINKPROC
+with the system \fButime\fR.
+.SH LINKPROC
.PP
-Function to process a \fBTcl_FSLink()\fR call. Should be implemented
+Function to process a \fBTcl_FSLink\fR call. Should be implemented
only if the filesystem supports links, and may otherwise be NULL.
.PP
.CS
@@ -1127,18 +1138,18 @@ contents of a link. The result is a Tcl_Obj specifying the contents of
the link given by \fIlinkNamePtr\fR, or NULL if the link could
not be read. The result is owned by the caller (and should therefore
have its ref count incremented before being returned). Any callers
-should call Tcl_DecrRefCount on this result when it is no longer needed.
-If \fItoPtr\fR is not NULL, the function should attempt to create a link.
-The result in this case should be \fItoPtr\fR if the link was successful
+should call Tcl_DecrRefCount on this result when it is no longer needed.
+If \fItoPtr\fR is not NULL, the function should attempt to create a link.
+The result in this case should be \fItoPtr\fR if the link was successful
and NULL otherwise. In this case the result is not owned by the caller
(i.e. no ref count manipulation on either end is needed). See
the documentation for \fBTcl_FSLink\fR for the correct interpretation
of the \fIlinkAction\fR flags.
-.SH LISTVOLUMESPROC
+.SH LISTVOLUMESPROC
.PP
Function to list any filesystem volumes added by this filesystem.
Should be implemented only if the filesystem adds volumes at the head
-of the filesystem, so that they can be returned by 'file volumes'.
+of the filesystem, so that they can be returned by \fBfile volumes\fR.
.PP
.CS
typedef Tcl_Obj* Tcl_FSListVolumesProc(void);
@@ -1169,55 +1180,56 @@ methods.
.PP
.CS
typedef CONST char** Tcl_FSFileAttrStringsProc(
- Tcl_Obj *\fIpathPtr\fR,
+ Tcl_Obj *\fIpathPtr\fR,
Tcl_Obj** \fIobjPtrRef\fR);
.CE
.PP
The called function may either return an array of strings, or may
-instead return NULL and place a Tcl list into the given objPtrRef. Tcl
-will take that list and first increment its refCount before using it.
-On completion of that use, Tcl will decrement its refCount. Hence if
+instead return NULL and place a Tcl list into the given \fIobjPtrRef\fR. Tcl
+will take that list and first increment its reference count before using it.
+On completion of that use, Tcl will decrement its reference count. Hence if
the list should be disposed of by Tcl when done, it should have a
-refCount of zero, and if the list should not be disposed of, the
-filesystem should ensure it retains a refCount on the object.
+reference count of zero, and if the list should not be disposed of, the
+filesystem should ensure it returns an object with a refererence count
+of at least one.
.SH FILEATTRSGETPROC
.PP
-Function to process a \fBTcl_FSFileAttrsGet()\fR call, used by 'file
-attributes'.
+Function to process a \fBTcl_FSFileAttrsGet\fR call, used by \fBfile
+attributes\fR.
.PP
.CS
typedef int Tcl_FSFileAttrsGetProc(
Tcl_Interp *\fIinterp\fR,
- int \fIindex\fR,
+ int \fIindex\fR,
Tcl_Obj *\fIpathPtr\fR,
Tcl_Obj **\fIobjPtrRef\fR);
.CE
.PP
Returns a standard Tcl return code. The attribute value retrieved,
which corresponds to the \fIindex\fR'th element in the list returned by
-the Tcl_FSFileAttrStringsProc, is a Tcl_Obj placed in objPtrRef (if
-TCL_OK was returned) and is likely to have a refCount of zero. Either
+the \fBTcl_FSFileAttrStringsProc\fR, is a Tcl_Obj placed in \fIobjPtrRef\fR (if
+\fBTCL_OK\fR was returned) and is likely to have a reference count of zero. Either
way we must either store it somewhere (e.g. the Tcl result), or
-Incr/Decr its refCount to ensure it is properly freed.
+Incr/Decr its reference count to ensure it is properly freed.
.SH FILEATTRSSETPROC
.PP
-Function to process a \fBTcl_FSFileAttrsSet()\fR call, used by 'file
-attributes'. If the filesystem is read-only, there is no need
+Function to process a \fBTcl_FSFileAttrsSet\fR call, used by \fBfile
+attributes\fR. If the filesystem is read-only, there is no need
to implement this.
.PP
.CS
typedef int Tcl_FSFileAttrsSetProc(
Tcl_Interp *\fIinterp\fR,
- int \fIindex\fR,
+ int \fIindex\fR,
Tcl_Obj *\fIpathPtr\fR,
Tcl_Obj *\fIobjPtr\fR);
.CE
.PP
The attribute value of the \fIindex\fR'th element in the list returned by
the Tcl_FSFileAttrStringsProc should be set to the \fIobjPtr\fR given.
-.SH CREATEDIRECTORYPROC
+.SH CREATEDIRECTORYPROC
.PP
-Function to process a \fBTcl_FSCreateDirectory()\fR call. Should be
+Function to process a \fBTcl_FSCreateDirectory\fR call. Should be
implemented unless the FS is read-only.
.PP
.CS
@@ -1229,15 +1241,15 @@ The return value is a standard Tcl result indicating whether an error
occurred in the process. If successful, a new directory should have
been added to the filesystem in the location specified by
\fIpathPtr\fR.
-.SH REMOVEDIRECTORYPROC
+.SH REMOVEDIRECTORYPROC
.PP
-Function to process a 'Tcl_FSRemoveDirectory()' call. Should be
+Function to process a \fBTcl_FSRemoveDirectory\fR call. Should be
implemented unless the FS is read-only.
.PP
.CS
typedef int Tcl_FSRemoveDirectoryProc(
Tcl_Obj *\fIpathPtr\fR,
- int \fIrecursive\fR,
+ int \fIrecursive\fR,
Tcl_Obj **\fIerrorPtr\fR);
.CE
.PP
@@ -1246,12 +1258,12 @@ occurred in the process. If successful, the directory specified by
\fIpathPtr\fR should have been removed from the filesystem. If the
\fIrecursive\fR flag is given, then a non-empty directory should be
deleted without error. If this flag is not given, then and the
-directory is non-empty a posix EEXIST error should be signalled. If an
+directory is non-empty a POSIX 'EEXIST' error should be signalled. If an
error does occur, the name of the file or directory which caused the
error should be placed in \fIerrorPtr\fR.
-.SH DELETEFILEPROC
+.SH DELETEFILEPROC
.PP
-Function to process a \fBTcl_FSDeleteFile()\fR call. Should be implemented
+Function to process a \fBTcl_FSDeleteFile\fR call. Should be implemented
unless the FS is read-only.
.PP
.CS
@@ -1267,28 +1279,29 @@ function and not Tcl_FSRemoveDirectoryProc when needed to delete them
(even if they are symbolic links to directories).
.SH "FILESYSTEM EFFICIENCY"
.PP
-.SH LSTATPROC
+.SH LSTATPROC
.PP
-Function to process a \fBTcl_FSLstat()\fR call. If not implemented, Tcl
+Function to process a \fBTcl_FSLstat\fR call. If not implemented, Tcl
will attempt to use the \fIstatProc\fR defined above instead. Therefore
it need only be implemented if a filesystem can differentiate between
\fBstat\fR and \fBlstat\fR calls.
.PP
.CS
typedef int Tcl_FSLstatProc(
- Tcl_Obj *\fIpathPtr\fR,
+ Tcl_Obj *\fIpathPtr\fR,
Tcl_StatBuf *\fIstatPtr\fR);
.CE
.PP
-The behavior of this function is very similar to that of the
-Tcl_FSStatProc defined above, except that if it is applied
+The behavior of this function is very similar to that of the
+\fBTcl_FSStatProc\fR defined above, except that if it is applied
to a symbolic link, it returns information about the link, not
about the target file.
.PP
-.SH COPYFILEPROC
+.SH COPYFILEPROC
.PP
-Function to process a \fBTcl_FSCopyFile()\fR call. If not implemented Tcl
-will fall back on open-r, open-w and fcopy as a copying mechanism.
+Function to process a \fBTcl_FSCopyFile\fR call. If not implemented Tcl
+will fall back on \fBopen\fR-r, \fBopen\fR-w and \fBfcopy\fR as a
+copying mechanism.
Therefore it need only be implemented if the filesystem can perform
that action more efficiently.
.PP
@@ -1302,17 +1315,17 @@ The return value is a standard Tcl result indicating whether an error
occurred in the copying process. Note that, \fIdestPathPtr\fR is the
name of the file which should become the copy of \fIsrcPathPtr\fR. It
is never the name of a directory into which \fIsrcPathPtr\fR could be
-copied (i.e. the function is much simpler than the Tcl level 'file
-copy' subcommand). Note that,
+copied (i.e. the function is much simpler than the Tcl level \fBfile
+copy\fR subcommand). Note that,
if the filesystem supports symbolic links, Tcl will always call this
-function and not Tcl_FSCopyDirectoryProc when needed to copy them
+function and not \fIcopyDirectoryProc\fR when needed to copy them
(even if they are symbolic links to directories). Finally, if the
-filesystem determines it cannot support the file copy action,
-calling \fBTcl_SetErrno(EXDEV)\fR and returning a non
-TCL_OK result will tell Tcl to use its standard fallback mechanisms.
-.SH RENAMEFILEPROC
+filesystem determines it cannot support the \fBfile copy\fR action,
+calling \fBTcl_SetErrno(EXDEV)\fR and returning a non-\fBTCL_OK\fR
+result will tell Tcl to use its standard fallback mechanisms.
+.SH RENAMEFILEPROC
.PP
-Function to process a \fBTcl_FSRenameFile()\fR call. If not implemented,
+Function to process a \fBTcl_FSRenameFile\fR call. If not implemented,
Tcl will fall back on a copy and delete mechanism. Therefore it need
only be implemented if the filesystem can perform that action more
efficiently.
@@ -1325,20 +1338,20 @@ typedef int Tcl_FSRenameFileProc(
.PP
The return value is a standard Tcl result indicating whether an error
occurred in the renaming process. If the
-filesystem determines it cannot support the file rename action,
-calling \fBTcl_SetErrno(EXDEV)\fR and returning a non
-TCL_OK result will tell Tcl to use its standard fallback mechanisms.
-.SH COPYDIRECTORYPROC
+filesystem determines it cannot support the \fBfile rename\fR action,
+calling \fBTcl_SetErrno(EXDEV)\fR and returning a non-\fBTCL_OK\fR
+result will tell Tcl to use its standard fallback mechanisms.
+.SH COPYDIRECTORYPROC
.PP
-Function to process a \fBTcl_FSCopyDirectory()\fR call. If not
-implemented, Tcl will fall back on a recursive create-dir, file copy
+Function to process a \fBTcl_FSCopyDirectory\fR call. If not
+implemented, Tcl will fall back on a recursive \fBfile mkdir\fR, \fBfile copy\fR
mechanism. Therefore it need only be implemented if the filesystem can
perform that action more efficiently.
.PP
.CS
typedef int Tcl_FSCopyDirectoryProc(
Tcl_Obj *\fIsrcPathPtr\fR,
- Tcl_Obj *\fIdestPathPtr\fR,
+ Tcl_Obj *\fIdestPathPtr\fR,
Tcl_Obj **\fIerrorPtr\fR);
.CE
.PP
@@ -1349,29 +1362,29 @@ the file or directory which caused the error should be placed in
directory-name which should become the mirror-image of
\fIsrcPathPtr\fR. It is not the name of a directory into which
\fIsrcPathPtr\fR should be copied (i.e. the function is much simpler
-than the Tcl level 'file copy' subcommand). Finally, if the
-filesystem determines it cannot support the directory copy action,
-calling \fBTcl_SetErrno(EXDEV)\fR and returning a non
-TCL_OK result will tell Tcl to use its standard fallback mechanisms.
-.SH LOADFILEPROC
-.PP
-Function to process a \fBTcl_FSLoadFile()\fR call. If not implemented, Tcl
-will fall back on a copy to native-temp followed by a Tcl_FSLoadFile on
+than the Tcl level \fBfile copy\fR subcommand). Finally, if the
+filesystem determines it cannot support the directory copy action,
+calling \fBTcl_SetErrno(EXDEV)\fR and returning a non-\fBTCL_OK\fR
+result will tell Tcl to use its standard fallback mechanisms.
+.SH LOADFILEPROC
+.PP
+Function to process a \fBTcl_FSLoadFile\fR call. If not implemented, Tcl
+will fall back on a copy to native-temp followed by a \fBTcl_FSLoadFile\fR on
that temporary copy. Therefore it need only be implemented if the
filesystem can load code directly, or it can be implemented simply to
-return TCL_ERROR to disable load functionality in this filesystem
+return \fBTCL_ERROR\fR to disable load functionality in this filesystem
entirely.
.PP
.CS
typedef int Tcl_FSLoadFileProc(
- Tcl_Interp * \fIinterp\fR,
- Tcl_Obj *\fIpathPtr\fR,
- Tcl_LoadHandle * \fIhandlePtr\fR,
- Tcl_FSUnloadFileProc * \fIunloadProcPtr\fR);
+ Tcl_Interp *\fIinterp\fR,
+ Tcl_Obj *\fIpathPtr\fR,
+ Tcl_LoadHandle *\fIhandlePtr\fR,
+ Tcl_FSUnloadFileProc *\fIunloadProcPtr\fR);
.CE
.PP
Returns a standard Tcl completion code. If an error occurs, an error
-message is left in the interp's result. The function dynamically loads a
+message is left in the \fIinterp\fR's result. The function dynamically loads a
binary code file into memory. On a successful load, the \fIhandlePtr\fR
should be filled with a token for the dynamically loaded file, and the
\fIunloadProcPtr\fR should be filled in with the address of a procedure.
@@ -1381,9 +1394,9 @@ native filesystem, the \fBTcl_LoadHandle\fR returned is currently a token
which can be used in the private \fBTclpFindSymbol\fR to access functions
in the new code. Each filesystem is free to define the
\fBTcl_LoadHandle\fR as it requires. Finally, if the
-filesystem determines it cannot support the file load action,
-calling \fBTcl_SetErrno(EXDEV)\fR and returning a non
-TCL_OK result will tell Tcl to use its standard fallback mechanisms.
+filesystem determines it cannot support the file load action,
+calling \fBTcl_SetErrno(EXDEV)\fR and returning a non-\fBTCL_OK\fR
+result will tell Tcl to use its standard fallback mechanisms.
.SH UNLOADFILEPROC
.PP
Function to unload a previously successfully loaded file. If load was
@@ -1396,9 +1409,9 @@ typedef void Tcl_FSUnloadFileProc(
.CE
.SH GETCWDPROC
.PP
-Function to process a \fBTcl_FSGetCwd()\fR call. Most filesystems need not
-implement this. It will usually only be called once, if 'getcwd' is
-called before 'chdir'. May be NULL.
+Function to process a \fBTcl_FSGetCwd\fR call. Most filesystems need not
+implement this. It will usually only be called once, if \fBgetcwd\fR is
+called before \fBchdir\fR. May be NULL.
.PP
.CS
typedef Tcl_Obj* Tcl_FSGetCwdProc(
@@ -1410,18 +1423,19 @@ directory (which might perhaps change independent of Tcl), this
function should return that cwd as the result, or NULL if the current
directory could not be determined (e.g. the user does not have
appropriate permissions on the cwd directory). If NULL is returned, an
-error message is left in the interp's result.
+error message is left in the \fIinterp\fR's result.
.PP
.SH CHDIRPROC
.PP
-Function to process a \fBTcl_FSChdir()\fR call. If filesystems do not
+Function to process a \fBTcl_FSChdir\fR call. If filesystems do not
implement this, it will be emulated by a series of directory access
checks. Otherwise, virtual filesystems which do implement it need only
-respond with a positive return result if the dirName is a valid,
+respond with a positive return result if the \fIpathPtr\fR is a valid,
accessible directory in their filesystem. They need not remember the
-result, since that will be automatically remembered for use by GetCwd.
+result, since that will be automatically remembered for use by
+\fBTcl_FSGetCwd\fR.
Real filesystems should carry out the correct action (i.e. call the
-correct system 'chdir' api).
+correct system \fBchdir\fR API).
.PP
.CS
typedef int Tcl_FSChdirProc(
@@ -1431,5 +1445,8 @@ typedef int Tcl_FSChdirProc(
The \fBTcl_FSChdirProc\fR changes the applications current working
directory to the value specified in \fIpathPtr\fR. The function returns
-1 on error or 0 on success.
+
.SH KEYWORDS
-stat access filesystem vfs
+stat, access, filesystem, vfs, virtual
+.SH "SEE ALSO"
+cd(n), file(n), load(n), open(n), pwd(n), unload(n)
diff --git a/doc/GetIndex.3 b/doc/GetIndex.3
index ec43774..3d67486 100644
--- a/doc/GetIndex.3
+++ b/doc/GetIndex.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.
'\"
-'\" RCS: @(#) $Id: GetIndex.3,v 1.12 2004/09/06 09:44:56 dkf Exp $
+'\" RCS: @(#) $Id: GetIndex.3,v 1.13 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures"
@@ -68,10 +68,10 @@ the strings in \fItablePtr\fR to find a match. A match occurs if
for exactly one of the strings in \fItablePtr\fR and the
\fBTCL_EXACT\fR flag was not specified; in either case
the index of the matching entry is stored at \fI*indexPtr\fR
-and TCL_OK is returned.
+and \fBTCL_OK\fR is returned.
.PP
If there is no matching entry,
-TCL_ERROR is returned and an error message is left in \fIinterp\fR's
+\fBTCL_ERROR\fR is returned and an error message is left in \fIinterp\fR's
result if \fIinterp\fR isn't NULL. \fIMsg\fR is included in the
error message to indicate what was being looked up. For example,
if \fImsg\fR is \fBoption\fR the error message will have a form like
@@ -87,7 +87,7 @@ operation. Note: \fBTcl_GetIndexFromObj\fR assumes that the entries
in \fItablePtr\fR are static: they must not change between
invocations. If the value of \fIobjPtr\fR is the empty string,
\fBTcl_GetIndexFromObj\fR will treat it as a non-matching value
-and return TCL_ERROR.
+and return \fBTCL_ERROR\fR.
.VS
.PP
\fBTcl_GetIndexFromObjStruct\fR works just like
diff --git a/doc/GetInt.3 b/doc/GetInt.3
index 70537a9..e036df7 100644
--- a/doc/GetInt.3
+++ b/doc/GetInt.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.
'\"
-'\" RCS: @(#) $Id: GetInt.3,v 1.4 2001/09/25 16:23:55 dgp Exp $
+'\" RCS: @(#) $Id: GetInt.3,v 1.5 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_GetInt 3 "" Tcl "Tcl Library Procedures"
@@ -47,8 +47,8 @@ integers). Each of the procedures takes a \fIstring\fR argument,
converts it to an internal form of a particular type, and stores
the converted value at the location indicated by the procedure's
third argument. If all goes well, each of the procedures returns
-TCL_OK. If \fIstring\fR doesn't have the proper syntax for the
-desired type then TCL_ERROR is returned, an error message is left
+\fBTCL_OK\fR. If \fIstring\fR doesn't have the proper syntax for the
+desired type then \fBTCL_ERROR\fR is returned, an error message is left
in the interpreter's result, and nothing is stored at *\fIintPtr\fR
or *\fIdoublePtr\fR or *\fIboolPtr\fR.
.PP
diff --git a/doc/GetOpnFl.3 b/doc/GetOpnFl.3
index 1f3c839..6492870 100644
--- a/doc/GetOpnFl.3
+++ b/doc/GetOpnFl.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.
'\"
-'\" RCS: @(#) $Id: GetOpnFl.3,v 1.5 2004/09/06 09:44:56 dkf Exp $
+'\" RCS: @(#) $Id: GetOpnFl.3,v 1.6 2004/09/18 17:01:06 dkf Exp $
.so man.macros
.TH Tcl_GetOpenFile 3 8.0 Tcl "Tcl Library Procedures"
.BS
@@ -45,10 +45,10 @@ be used for reading or writing.
In some cases, such as a channel that connects to a pipeline of
subprocesses, different FILE pointers will be returned for reading
and writing.
-\fBTcl_GetOpenFile\fR normally returns TCL_OK.
+\fBTcl_GetOpenFile\fR normally returns \fBTCL_OK\fR.
If an error occurs in \fBTcl_GetOpenFile\fR (e.g. \fIstring\fR didn't
make any sense or \fIcheckUsage\fR was set and the file wasn't opened
-for the access specified by \fIwrite\fR) then TCL_ERROR is returned
+for the access specified by \fIwrite\fR) then \fBTCL_ERROR\fR is returned
and the interpreter's result will contain an error message.
In the current implementation \fIcheckUsage\fR is ignored and consistency
checks are always performed.
diff --git a/doc/Hash.3 b/doc/Hash.3
index f7c1164..a4b11ca 100644
--- a/doc/Hash.3
+++ b/doc/Hash.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.
'\"
-'\" RCS: @(#) $Id: Hash.3,v 1.14 2004/09/06 09:44:56 dkf Exp $
+'\" RCS: @(#) $Id: Hash.3,v 1.15 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_Hash 3 "" Tcl "Tcl Library Procedures"
@@ -56,8 +56,8 @@ Address of hash table structure (for all procedures but
previous call to \fBTcl_InitHashTable\fR).
.AP int keyType in
Kind of keys to use for new hash table. Must be either
-TCL_STRING_KEYS, TCL_ONE_WORD_KEYS, TCL_CUSTOM_TYPE_KEYS,
-TCL_CUSTOM_PTR_KEYS, or an integer value greater than 1.
+\fBTCL_STRING_KEYS\fR, \fBTCL_ONE_WORD_KEYS\fR, \fBTCL_CUSTOM_TYPE_KEYS\fR,
+\fBTCL_CUSTOM_PTR_KEYS\fR, or an integer value greater than 1.
.AP Tcl_HashKeyType *typePtr in
Address of structure which defines the behaviour of the hash table.
.AP "CONST char" *key in
diff --git a/doc/InitStubs.3 b/doc/InitStubs.3
index da4009e..584a7cb 100644
--- a/doc/InitStubs.3
+++ b/doc/InitStubs.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.
'\"
-'\" RCS: @(#) $Id: InitStubs.3,v 1.8 2002/07/01 18:24:39 jenglish Exp $
+'\" RCS: @(#) $Id: InitStubs.3,v 1.9 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_InitStubs 3 8.1 Tcl "Tcl Library Procedures"
@@ -61,8 +61,8 @@ steps:
Call \fBTcl_InitStubs\fR in the extension before calling any other
Tcl functions.
.IP 2) 5
-Define the USE_TCL_STUBS symbol. Typically, you would include the
--DUSE_TCL_STUBS flag when compiling the extension.
+Define the \fBUSE_TCL_STUBS\fR symbol. Typically, you would include the
+\fB\-DUSE_TCL_STUBS\fR flag when compiling the extension.
.IP 3) 5
Link the extension with the Tcl stubs library instead of the standard
Tcl library. On Unix platforms, the library name is
diff --git a/doc/Limit.3 b/doc/Limit.3
index 366034d..2f18624 100644
--- a/doc/Limit.3
+++ b/doc/Limit.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.
'\"
-'\" RCS: @(#) $Id: Limit.3,v 1.2 2004/07/01 07:59:22 dkf Exp $
+'\" RCS: @(#) $Id: Limit.3,v 1.3 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_LimitCheck 3 8.5 Tcl "Tcl Library Procedures"
@@ -66,7 +66,7 @@ Interpreter that the limit being managed applies to or that will have
its limits checked.
.AP int type in
The type of limit that the operation refers to. Must be either
-TCL_LIMIT_COMMANDS or TCL_LIMIT_TIME.
+\fBTCL_LIMIT_COMMANDS\fR or \fBTCL_LIMIT_TIME\fR.
.AP int commandLimit in
The maximum number of commands (as reported by \fBinfo cmdcount\fR)
that may be executed in the interpreter.
@@ -123,8 +123,8 @@ interpreter (typically a master interpreter) to handle the error.
.SH "LIMIT CHECKING API"
.PP
To check the resource limits for an interpreter, call
-\fBTcl_LimitCheck\fR, which returns TCL_OK if the limit was not
-exceeded (after processing callbacks) and TCL_ERROR if the limit was
+\fBTcl_LimitCheck\fR, which returns \fBTCL_OK\fR if the limit was not
+exceeded (after processing callbacks) and \fBTCL_ERROR\fR if the limit was
exceeded (in which case an error message is also placed in the
interpreter result). That function should only be called when
\fBTcl_LimitReady\fR returns non-zero so that granularity policy is
@@ -175,8 +175,8 @@ and the \fIinterp\fR is the interpreter that had its limit exceeded.
.PP
The \fIdeleteProc\fR argument to \fBTcl_LimitAddHandler\fR is a
function to call to delete the \fIclientData\fR value. It may be
-TCL_STATIC or NULL if no deletion action is necessary, or TCL_DYNAMIC
-if all that is necessary is to free the structure with
+\fBTCL_STATIC\fR or NULL if no deletion action is necessary, or
+\fBTCL_DYNAMIC\fR if all that is necessary is to free the structure with
\fBTcl_Free\fR. Otherwise, it should refer to a function with the
following prototype:
.PP
@@ -190,7 +190,7 @@ handler removed will be the first one found (out of the handlers added
with \fBTcl_LimitAddHandler\fR) with exactly matching \fItype\fR,
\fIhandlerProc\fR and \fIclientData\fR arguments. This function
always invokes the \fIdeleteProc\fR on the \fIclientData\fR (unless
-the \fIdeleteProc\fR was NULL or TCL_STATIC).
+the \fIdeleteProc\fR was NULL or \fBTCL_STATIC\fR).
.SH KEYWORDS
interpreter, resource, limit, commands, time, callback
diff --git a/doc/LinkVar.3 b/doc/LinkVar.3
index 300482a..2741685 100644
--- a/doc/LinkVar.3
+++ b/doc/LinkVar.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.
'\"
-'\" RCS: @(#) $Id: LinkVar.3,v 1.7 2003/07/18 16:56:41 dgp Exp $
+'\" RCS: @(#) $Id: LinkVar.3,v 1.8 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_LinkVar 3 7.5 Tcl "Tcl Library Procedures"
@@ -32,12 +32,12 @@ Name of global variable.
.AP char *addr in
Address of C variable that is to be linked to \fIvarName\fR.
.AP int type in
-Type of C variable. Must be one of TCL_LINK_INT, TCL_LINK_DOUBLE,
+Type of C variable. Must be one of \fBTCL_LINK_INT\fR, \fBTCL_LINK_DOUBLE\fR,
.VS 8.4
-TCL_LINK_WIDE_INT,
+\fBTCL_LINK_WIDE_INT\fR,
.VE 8.4
-TCL_LINK_BOOLEAN, or TCL_LINK_STRING, optionally OR'ed with
-TCL_LINK_READ_ONLY to make Tcl variable read-only.
+\fBTCL_LINK_BOOLEAN\fR, or \fBTCL_LINK_STRING\fR, optionally OR'ed with
+\fBTCL_LINK_READ_ONLY\fR to make Tcl variable read-only.
.BE
.SH DESCRIPTION
@@ -48,14 +48,14 @@ given by \fIaddr\fR.
Whenever the Tcl variable is read the value of the C variable will
be returned, and whenever the Tcl variable is written the C
variable will be updated to have the same value.
-\fBTcl_LinkVar\fR normally returns TCL_OK; if an error occurs
+\fBTcl_LinkVar\fR normally returns \fBTCL_OK\fR; if an error occurs
while setting up the link (e.g. because \fIvarName\fR is the
-name of array) then TCL_ERROR is returned and the interpreter's result
+name of array) then \fBTCL_ERROR\fR is returned and the interpreter's result
contains an error message.
.PP
The \fItype\fR argument specifies the type of the C variable,
and must have one of the following values, optionally OR'ed with
-TCL_LINK_READ_ONLY:
+\fBTCL_LINK_READ_ONLY\fR:
.TP
\fBTCL_LINK_INT\fR
The C variable is of type \fBint\fR.
@@ -104,7 +104,7 @@ new value.
If the C variable contains a NULL pointer then the Tcl variable
will read as ``NULL''.
.PP
-If the TCL_LINK_READ_ONLY flag is present in \fItype\fR then the
+If the \fBTCL_LINK_READ_ONLY\fR flag is present in \fItype\fR then the
variable will be read-only from Tcl, so that its value can only be
changed by modifying the C variable.
Attempts to write the variable from Tcl will be rejected with errors.
diff --git a/doc/ListObj.3 b/doc/ListObj.3
index 9aaf858..5b95d9b 100644
--- a/doc/ListObj.3
+++ b/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.
'\"
-'\" RCS: @(#) $Id: ListObj.3,v 1.4 2000/01/26 03:37:30 hobbs Exp $
+'\" RCS: @(#) $Id: ListObj.3,v 1.5 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_ListObj 3 8.0 Tcl "Tcl Library Procedures"
@@ -230,7 +230,7 @@ to the end of the list \fIlistPtr\fR:
.CS
result = Tcl_ListObjLength(interp, listPtr, &length);
if (result == TCL_OK) {
- result = Tcl_ListObjReplace(interp, listPtr, length, 0, objc, objv);
+ result = Tcl_ListObjReplace(interp, listPtr, length, 0, objc, objv);
}
.CE
The \fIcount\fR list elements starting at \fIfirst\fR can be deleted
diff --git a/doc/Namespace.3 b/doc/Namespace.3
index 6133399..f76b421 100644
--- a/doc/Namespace.3
+++ b/doc/Namespace.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.
'\"
-'\" RCS: @(#) $Id: Namespace.3,v 1.4 2004/09/06 09:44:57 dkf Exp $
+'\" RCS: @(#) $Id: Namespace.3,v 1.5 2004/09/18 17:01:06 dkf Exp $
'\"
'\" Note that some of these functions do not seem to belong, but they
'\" were all introduced with the same TIP (#139)
@@ -81,11 +81,11 @@ term is not rooted at the global namespace. NULL indicates the
current namespace.
.AP int flags in
OR-ed combination of bits controlling how the search is to be
-performed. The following flags are supported: TCL_GLOBAL_ONLY
+performed. The following flags are supported: \fBTCL_GLOBAL_ONLY\fR
(indicates that the search is always to be conducted relative to the
-global namespace), TCL_NAMESPACE_ONLY (just for \fBTcl_FindCommand\fR;
+global namespace), \fBTCL_NAMESPACE_ONLY\fR (just for \fBTcl_FindCommand\fR;
indicates that the search is always to be conducted relative to the
-context namespace), and TCL_LEAVE_ERR_MSG (indicates that an error
+context namespace), and \fBTCL_LEAVE_ERR_MSG\fR (indicates that an error
message should be left in the interpreter if the search fails.)
.BE
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index 295f055..e0bec62 100644
--- a/doc/OpenFileChnl.3
+++ b/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.
'\"
-'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.25 2004/07/16 22:22:35 andreas_kupries Exp $
+'\" RCS: @(#) $Id: OpenFileChnl.3,v 1.26 2004/09/18 17:01:06 dkf Exp $
.so man.macros
.TH Tcl_OpenFileChannel 3 8.3 Tcl "Tcl Library Procedures"
.BS
@@ -227,7 +227,7 @@ platform-independent mechanism for performing buffered input
and output operations on a variety of file, socket, and device
types.
The channel mechanism is extensible to new channel types, by
-providing a low level channel driver for the new type; the channel driver
+providing a low-level channel driver for the new type; the channel driver
interface is described in the manual entry for \fBTcl_CreateChannel\fR. The
channel mechanism provides a buffering scheme modeled after
Unix's standard I/O, and it also allows for nonblocking I/O on
@@ -348,7 +348,7 @@ reference to a channel that is also registered in a Tcl interpreter.
.PP
This procedure interacts with the code managing the standard
channels. If no standard channels were initialized before the first
-call to \fBTcl_RegisterChannel\fR they will get initialized by that
+call to \fBTcl_RegisterChannel\fR, they will get initialized by that
call. See \fBTcl_StandardChannels\fR for a general treatise about
standard channels and the behaviour of the Tcl library with regard to
them.
@@ -375,7 +375,7 @@ accessible in \fIinterp\fR. After this call, Tcl programs will no longer be
able to use the channel's name to refer to the channel in that interpreter.
Beyond that, this command has no further effect. It cannot be used on
the standard channels (stdout, stderr, stdin), and will return
-TCL_ERROR if passed one of those channels.
+\fBTCL_ERROR\fR if passed one of those channels.
.PP
Code not associated with a Tcl interpreter can call
\fBTcl_DetachChannel\fR with \fIinterp\fR as NULL, to indicate to Tcl
diff --git a/doc/PkgRequire.3 b/doc/PkgRequire.3
index f16288a..e2a4877 100644
--- a/doc/PkgRequire.3
+++ b/doc/PkgRequire.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.
'\"
-'\" RCS: @(#) $Id: PkgRequire.3,v 1.6 2002/02/26 02:22:20 hobbs Exp $
+'\" RCS: @(#) $Id: PkgRequire.3,v 1.7 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_PkgRequire 3 7.5 Tcl "Tcl Library Procedures"
@@ -74,8 +74,8 @@ that is provided in the interpreter (which may be different than
\fIversion\fR); if an error occurs they return NULL and leave an error
message in the interpreter's result.
.PP
-\fBTcl_PkgProvide\fR returns TCL_OK if it completes successfully;
-if an error occurs it returns TCL_ERROR and leaves an error message
+\fBTcl_PkgProvide\fR returns \fBTCL_OK\fR if it completes successfully;
+if an error occurs it returns \fBTCL_ERROR\fR and leaves an error message
in the interpreter's result.
.PP
\fBTcl_PkgProvideEx\fR, \fBTcl_PkgPresentEx\fR and \fBTcl_PkgRequireEx\fR
diff --git a/doc/PrintDbl.3 b/doc/PrintDbl.3
index 04e2c79..1a08c8e 100644
--- a/doc/PrintDbl.3
+++ b/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.
'\"
-'\" RCS: @(#) $Id: PrintDbl.3,v 1.3 2004/09/06 09:44:57 dkf Exp $
+'\" RCS: @(#) $Id: PrintDbl.3,v 1.4 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_PrintDouble 3 8.0 Tcl "Tcl Library Procedures"
@@ -30,7 +30,7 @@ that is now shared by all interpreters.
Floating-point value to be converted.
.AP char *dst out
Where to store the string representing \fIvalue\fR. Must have at
-least TCL_DOUBLE_SPACE characters of storage.
+least \fBTCL_DOUBLE_SPACE\fR characters of storage.
.BE
.SH DESCRIPTION
diff --git a/doc/RecEvalObj.3 b/doc/RecEvalObj.3
index 19f292c..742524c 100644
--- a/doc/RecEvalObj.3
+++ b/doc/RecEvalObj.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.
'\"
-'\" RCS: @(#) $Id: RecEvalObj.3,v 1.4 2004/09/06 09:44:57 dkf Exp $
+'\" RCS: @(#) $Id: RecEvalObj.3,v 1.5 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_RecordAndEvalObj 3 8.0 Tcl "Tcl Library Procedures"
@@ -25,8 +25,8 @@ Tcl interpreter in which to evaluate command.
Points to a Tcl object containing a command (or sequence of commands)
to execute.
.AP int flags in
-An OR'ed combination of flag bits. TCL_NO_EVAL means record the
-command but don't evaluate it. TCL_EVAL_GLOBAL means evaluate
+An OR'ed combination of flag bits. \fBTCL_NO_EVAL\fR means record the
+command but don't evaluate it. \fBTCL_EVAL_GLOBAL\fR means evaluate
the command at global level instead of the current stack level.
.BE
@@ -34,9 +34,9 @@ the command at global level instead of the current stack level.
.PP
\fBTcl_RecordAndEvalObj\fR is invoked to record a command as an event
on the history list and then execute it using \fBTcl_EvalObjEx\fR
-(or \fBTcl_GlobalEvalObj\fR if the TCL_EVAL_GLOBAL bit is set
+(or \fBTcl_GlobalEvalObj\fR if the \fBTCL_EVAL_GLOBAL\fR bit is set
in \fIflags\fR).
-It returns a completion code such as TCL_OK just like \fBTcl_EvalObjEx\fR,
+It returns a completion code such as \fBTCL_OK\fR just like \fBTcl_EvalObjEx\fR,
as well as a result object containing additional information
(a result value or error message)
that can be retrieved using \fBTcl_GetObjResult\fR.
@@ -45,7 +45,7 @@ you should invoke \fBTcl_EvalObjEx\fR instead of \fBTcl_RecordAndEvalObj\fR.
Normally \fBTcl_RecordAndEvalObj\fR is only called with top-level
commands typed by the user, since the purpose of history is to
allow the user to re-issue recently invoked commands.
-If the \fIflags\fR argument contains the TCL_NO_EVAL bit then
+If the \fIflags\fR argument contains the \fBTCL_NO_EVAL\fR bit then
the command is recorded without being evaluated.
.SH "SEE ALSO"
diff --git a/doc/RecordEval.3 b/doc/RecordEval.3
index ebc726c..6301a82 100644
--- a/doc/RecordEval.3
+++ b/doc/RecordEval.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.
'\"
-'\" RCS: @(#) $Id: RecordEval.3,v 1.4 2002/01/16 06:02:33 dgp Exp $
+'\" RCS: @(#) $Id: RecordEval.3,v 1.5 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_RecordAndEval 3 7.4 Tcl "Tcl Library Procedures"
@@ -25,8 +25,8 @@ Tcl interpreter in which to evaluate command.
.AP "CONST char" *cmd in
Command (or sequence of commands) to execute.
.AP int flags in
-An OR'ed combination of flag bits. TCL_NO_EVAL means record the
-command but don't evaluate it. TCL_EVAL_GLOBAL means evaluate
+An OR'ed combination of flag bits. \fBTCL_NO_EVAL\fR means record the
+command but don't evaluate it. \fBTCL_EVAL_GLOBAL\fR means evaluate
the command at global level instead of the current stack level.
.BE
@@ -34,15 +34,15 @@ the command at global level instead of the current stack level.
.PP
\fBTcl_RecordAndEval\fR is invoked to record a command as an event
on the history list and then execute it using \fBTcl_Eval\fR
-(or \fBTcl_GlobalEval\fR if the TCL_EVAL_GLOBAL bit is set in \fIflags\fR).
-It returns a completion code such as TCL_OK just like \fBTcl_Eval\fR
+(or \fBTcl_GlobalEval\fR if the \fBTCL_EVAL_GLOBAL\fR bit is set in \fIflags\fR).
+It returns a completion code such as \fBTCL_OK\fR just like \fBTcl_Eval\fR
and it leaves information in the interpreter's result.
If you don't want the command recorded on the history list then
you should invoke \fBTcl_Eval\fR instead of \fBTcl_RecordAndEval\fR.
Normally \fBTcl_RecordAndEval\fR is only called with top-level
commands typed by the user, since the purpose of history is to
allow the user to re-issue recently-invoked commands.
-If the \fIflags\fR argument contains the TCL_NO_EVAL bit then
+If the \fIflags\fR argument contains the \fBTCL_NO_EVAL\fR bit then
the command is recorded without being evaluated.
.PP
Note that \fBTcl_RecordAndEval\fR has been largely replaced by the
diff --git a/doc/RegExp.3 b/doc/RegExp.3
index 6eb6fbb..836126d 100644
--- a/doc/RegExp.3
+++ b/doc/RegExp.3
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: RegExp.3,v 1.14 2004/09/06 09:44:57 dkf Exp $
+'\" RCS: @(#) $Id: RegExp.3,v 1.15 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_RegExpMatch 3 8.1 Tcl "Tcl Library Procedures"
@@ -97,7 +97,7 @@ all of the matching subexpressions will be remembered. Any other
value will be taken as the maximum number of subexpressions to
remember.
.AP int eflags in
-OR-ed combination of the values TCL_REG_NOTBOL and TCL_REG_NOTEOL.
+OR-ed combination of the values \fBTCL_REG_NOTBOL\fR and \fBTCL_REG_NOTEOL\fR.
See below for more information.
.AP Tcl_RegExpInfo *infoPtr out
The address of the location where information about a previous match
diff --git a/doc/SetVar.3 b/doc/SetVar.3
index c18c4c1..36f1a47 100644
--- a/doc/SetVar.3
+++ b/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.
'\"
-'\" RCS: @(#) $Id: SetVar.3,v 1.9 2004/08/16 14:11:16 msofer Exp $
+'\" RCS: @(#) $Id: SetVar.3,v 1.10 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_SetVar 3 8.1 Tcl "Tcl Library Procedures"
@@ -139,9 +139,9 @@ a variable, so that future attempts to read the variable will return
an error.
The arguments to these procedures are treated in the same way
as the arguments to the procedures above.
-If the variable is successfully removed then TCL_OK is returned.
+If the variable is successfully removed then \fBTCL_OK\fR is returned.
If the variable cannot be removed because it doesn't exist then
-TCL_ERROR is returned and an error message is left
+\fBTCL_ERROR\fR is returned and an error message is left
in \fIinterp\fR's result if the \fBTCL_LEAVE_ERR_MSG\fR \fIflag\fR
bit is set.
If an array element is specified, the given element is removed
@@ -233,8 +233,8 @@ 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).
-\fBTcl_GetVar\fR and \fBTcl_GetVar2\fR use the flag bits TCL_GLOBAL_ONLY
-and TCL_LEAVE_ERR_MSG, both of
+\fBTcl_GetVar\fR and \fBTcl_GetVar2\fR use the flag bits \fBTCL_GLOBAL_ONLY\fR
+and \fBTCL_LEAVE_ERR_MSG\fR, both of
which have
the same meaning as for \fBTcl_SetVar\fR.
If an error occurs in reading the variable (e.g. the variable
@@ -246,9 +246,9 @@ a variable, so that future calls to \fBTcl_GetVar\fR or \fBTcl_GetVar2\fR
for the variable will return an error.
The arguments to these procedures are treated in the same way
as the arguments to \fBTcl_GetVar\fR and \fBTcl_GetVar2\fR.
-If the variable is successfully removed then TCL_OK is returned.
+If the variable is successfully removed then \fBTCL_OK\fR is returned.
If the variable cannot be removed because it doesn't exist then
-TCL_ERROR is returned.
+\fBTCL_ERROR\fR is returned.
If an array element is specified, the given element is removed
but the array remains.
If an array name is specified without an index, then the entire
diff --git a/doc/TraceCmd.3 b/doc/TraceCmd.3
index a596cbd..3df4bc6 100644
--- a/doc/TraceCmd.3
+++ b/doc/TraceCmd.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.
'\"
-'\" CVS: @(#) $Id: TraceCmd.3,v 1.5 2002/07/01 18:24:39 jenglish Exp $
+'\" CVS: @(#) $Id: TraceCmd.3,v 1.6 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_TraceCommand 3 7.4 Tcl "Tcl Library Procedures"
@@ -30,7 +30,8 @@ Interpreter containing the command.
.AP "CONST char" *cmdName in
Name of command.
.AP int flags in
-OR-ed collection of the value TCL_TRACE_RENAME and TCL_TRACE_DELETE.
+OR-ed collection of the values \fBTCL_TRACE_RENAME\fR and
+\fBTCL_TRACE_DELETE\fR.
.AP Tcl_CommandTraceProc *proc in
Procedure to call when specified operations occur to \fIcmdName\fR.
.AP ClientData clientData in
@@ -46,9 +47,9 @@ call will return information about first trace.
\fBTcl_TraceCommand\fR allows a C procedure to monitor operations
performed on a Tcl command, so that the C procedure is invoked
whenever the command is renamed or deleted. If the trace is created
-successfully then \fBTcl_TraceCommand\fR returns TCL_OK. If an error
+successfully then \fBTcl_TraceCommand\fR returns \fBTCL_OK\fR. If an error
occurred (e.g. \fIcmdName\fR specifies a non-existent command) then
-TCL_ERROR is returned and an error message is left in the
+\fBTCL_ERROR\fR is returned and an error message is left in the
interpreter's result.
.PP
The \fIflags\fR argument to \fBTcl_TraceCommand\fR indicates when the
@@ -80,16 +81,16 @@ data structure that describes what to do when \fIproc\fR is invoked.
\fInewName\fR gives the name that the command is being renamed to (or
an empty string or NULL when the command is being deleted.)
\fIFlags\fR is an OR-ed combination of bits potentially providing
-several pieces of information. One of the bits TCL_TRACE_RENAME and
-TCL_TRACE_DELETE will be set in \fIflags\fR to indicate which
+several pieces of information. One of the bits \fBTCL_TRACE_RENAME\fR and
+\fBTCL_TRACE_DELETE\fR will be set in \fIflags\fR to indicate which
operation is being performed on the command. The bit
-TCL_TRACE_DESTROYED will be set in \fIflags\fR if the trace is about
+\fBTCL_TRACE_DESTROYED\fR will be set in \fIflags\fR if the trace is about
to be destroyed; this information may be useful to \fIproc\fR so that
it can clean up its own internal data structures (see the section
-TCL_TRACE_DESTROYED below for more details). Lastly, the bit
-TCL_INTERP_DESTROYED will be set if the entire interpreter is being
+\fBTCL_TRACE_DESTROYED\fR below for more details). Lastly, the bit
+\fBTCL_INTERP_DESTROYED\fR will be set if the entire interpreter is being
destroyed. When this bit is set, \fIproc\fR must be especially
-careful in the things it does (see the section TCL_INTERP_DESTROYED
+careful in the things it does (see the section \fBTCL_INTERP_DESTROYED\fR
below).
.PP
\fBTcl_UntraceCommand\fR may be used to remove a trace. If the
@@ -124,7 +125,7 @@ traces for a given command that have the same \fIproc\fR.
.PP
During rename traces, the command being renamed is visible with both
names simultaneously, and the command still exists during delete
-traces (if TCL_INTERP_DESTROYED is not set). However, there is no
+traces (if \fBTCL_INTERP_DESTROYED\fR is not set). However, there is no
mechanism for signaling that an error occurred in a trace procedure,
so great care should be taken that errors do not get silently lost.
@@ -142,7 +143,7 @@ rename the command, the last renaming takes precedence.
.SH "TCL_TRACE_DESTROYED FLAG"
.PP
-In a delete callback to \fIproc\fR, the TCL_TRACE_DESTROYED bit
+In a delete callback to \fIproc\fR, the \fBTCL_TRACE_DESTROYED\fR bit
is set in \fIflags\fR.
'\" Perhaps need some more comments here? - DKF
@@ -151,10 +152,10 @@ is set in \fIflags\fR.
.PP
When an interpreter is destroyed, unset traces are called for
all of its commands.
-The TCL_INTERP_DESTROYED bit will be set in the \fIflags\fR
+The \fBTCL_INTERP_DESTROYED\fR bit will be set in the \fIflags\fR
argument passed to the trace procedures.
Trace procedures must be extremely careful in what they do if
-the TCL_INTERP_DESTROYED bit is set.
+the \fBTCL_INTERP_DESTROYED\fR bit is set.
It is not safe for the procedures to invoke any Tcl procedures
on the interpreter, since its state is partially deleted.
All that trace procedures should do under these circumstances is
@@ -163,7 +164,7 @@ to clean up and free their own internal data structures.
.SH BUGS
.PP
Tcl doesn't do any error checking to prevent trace procedures
-from misusing the interpreter during traces with TCL_INTERP_DESTROYED
+from misusing the interpreter during traces with \fBTCL_INTERP_DESTROYED\fR
set.
.SH KEYWORDS
diff --git a/doc/TraceVar.3 b/doc/TraceVar.3
index acaaad3..f214ee1 100644
--- a/doc/TraceVar.3
+++ b/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.
'\"
-'\" RCS: @(#) $Id: TraceVar.3,v 1.9 2004/09/06 09:44:57 dkf Exp $
+'\" RCS: @(#) $Id: TraceVar.3,v 1.10 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_TraceVar 3 7.4 Tcl "Tcl Library Procedures"
@@ -40,9 +40,10 @@ Name of variable. May refer to a scalar variable, to
an array variable with no index, or to an array variable
with a parenthesized index.
.AP int flags in
-OR-ed combination of the values TCL_TRACE_READS, TCL_TRACE_WRITES,
-TCL_TRACE_UNSETS, TCL_TRACE_ARRAY, TCL_GLOBAL_ONLY, TCL_NAMESPACE_ONLY,
-TCL_TRACE_RESULT_DYNAMIC and TCL_TRACE_RESULT_OBJECT.
+OR-ed combination of the values \fBTCL_TRACE_READS\fR,
+\fBTCL_TRACE_WRITES\fR, \fBTCL_TRACE_UNSETS\fR, \fBTCL_TRACE_ARRAY\fR,
+\fBTCL_GLOBAL_ONLY\fR, \fBTCL_NAMESPACE_ONLY\fR,
+\fBTCL_TRACE_RESULT_DYNAMIC\fR and \fBTCL_TRACE_RESULT_OBJECT\fR.
Not all flags are used by all
procedures. See below for more information.
.AP Tcl_VarTraceProc *proc in
@@ -68,8 +69,8 @@ trace.
access to a Tcl variable, so that the C procedure is invoked
whenever the variable is read or written or unset.
If the trace is created successfully then \fBTcl_TraceVar\fR returns
-TCL_OK. If an error occurred (e.g. \fIvarName\fR specifies an element
-of an array, but the actual variable isn't an array) then TCL_ERROR
+\fBTCL_OK\fR. If an error occurred (e.g. \fIvarName\fR specifies an element
+of an array, but the actual variable isn't an array) then \fBTCL_ERROR\fR
is returned and an error message is left in the interpreter's result.
.PP
The \fIflags\fR argument to \fBTcl_TraceVar\fR indicates when the
@@ -111,14 +112,14 @@ before an array set, but that will trigger write traces.
The result of invoking the \fIproc\fR is a dynamically allocated
string that will be released by the Tcl library via a call to
\fBckfree\fR. Must not be specified at the same time as
-TCL_TRACE_RESULT_OBJECT.
+\fBTCL_TRACE_RESULT_OBJECT\fR.
.TP
\fBTCL_TRACE_RESULT_OBJECT\fR
The result of invoking the \fIproc\fR is a Tcl_Obj* (cast to a char*)
with a reference count of at least one. The ownership of that
reference will be transferred to the Tcl core for release (when the
core has finished with it) via a call to \fBTcl_DecrRefCount\fR. Must
-not be specified at the same time as TCL_TRACE_RESULT_DYNAMIC.
+not be specified at the same time as \fBTCL_TRACE_RESULT_DYNAMIC\fR.
.VE 8.4
.PP
Whenever one of the specified operations occurs on the variable,
@@ -144,30 +145,30 @@ in the normal two-part form (see the description of \fBTcl_TraceVar2\fR
below for details).
\fIFlags\fR is an OR-ed combination of bits providing several
pieces of information.
-One of the bits TCL_TRACE_READS, TCL_TRACE_WRITES, TCL_TRACE_ARRAY,
-or TCL_TRACE_UNSETS
+One of the bits \fBTCL_TRACE_READS\fR, \fBTCL_TRACE_WRITES\fR,
+\fBTCL_TRACE_ARRAY\fR, or \fBTCL_TRACE_UNSETS\fR
will be set in \fIflags\fR to indicate which operation is being performed
on the variable.
-The bit TCL_GLOBAL_ONLY will be set whenever the variable being
+The bit \fBTCL_GLOBAL_ONLY\fR will be set whenever the variable being
accessed is a global one not accessible from the current level of
procedure call: the trace procedure will need to pass this flag
back to variable-related procedures like \fBTcl_GetVar\fR if it
attempts to access the variable.
-The bit TCL_NAMESPACE_ONLY will be set whenever the variable being
+The bit \fBTCL_NAMESPACE_ONLY\fR will be set whenever the variable being
accessed is a namespace one not accessible from the current level of
procedure call: the trace procedure will need to pass this flag
back to variable-related procedures like \fBTcl_GetVar\fR if it
attempts to access the variable.
-The bit TCL_TRACE_DESTROYED will be set in \fIflags\fR if the trace is
+The bit \fBTCL_TRACE_DESTROYED\fR will be set in \fIflags\fR if the trace is
about to be destroyed; this information may be useful to \fIproc\fR
so that it can clean up its own internal data structures (see
-the section TCL_TRACE_DESTROYED below for more details).
-Lastly, the bit TCL_INTERP_DESTROYED will be set if the entire
+the section \fBTCL_TRACE_DESTROYED\fR below for more details).
+Lastly, the bit \fBTCL_INTERP_DESTROYED\fR will be set if the entire
interpreter is being destroyed.
When this bit is set, \fIproc\fR must be especially careful in
-the things it does (see the section TCL_INTERP_DESTROYED below).
+the things it does (see the section \fBTCL_INTERP_DESTROYED\fR below).
The trace procedure's return value should normally be NULL; see
-ERROR RETURNS below for information on other possibilities.
+\fBERROR RETURNS\fR below for information on other possibilities.
.PP
\fBTcl_UntraceVar\fR may be used to remove a trace.
If the variable specified by \fIinterp\fR, \fIvarName\fR, and \fIflags\fR
@@ -182,8 +183,8 @@ traces set on a given variable.
The return value from \fBTcl_VarTraceInfo\fR is the \fIclientData\fR
associated with a particular trace.
The trace must be on the variable specified by the \fIinterp\fR,
-\fIvarName\fR, and \fIflags\fR arguments (only the TCL_GLOBAL_ONLY and
-TCL_NAMESPACE_ONLY bits from \fIflags\fR is used; other bits are
+\fIvarName\fR, and \fIflags\fR arguments (only the \fBTCL_GLOBAL_ONLY\fR and
+\fBTCL_NAMESPACE_ONLY\fR bits from \fIflags\fR is used; other bits are
ignored) and its trace procedure must the same as the \fIproc\fR
argument.
If the \fIprevClientData\fR argument is NULL then the return
@@ -323,8 +324,8 @@ error occurred.
The return value must be a pointer to a static character string
containing an error message,
.VS 8.4
-unless (\fIexactly\fR one of) the TCL_TRACE_RESULT_DYNAMIC and
-TCL_TRACE_RESULT_OBJECT flags is set, which specify that the result is
+unless (\fIexactly\fR one of) the \fBTCL_TRACE_RESULT_DYNAMIC\fR and
+\fBTCL_TRACE_RESULT_OBJECT\fR flags is set, which specify that the result is
either a dynamic string (to be released with \fBckfree\fR) or a
Tcl_Obj* (cast to char* and to be released with
\fBTcl_DecrRefCount\fR) containing the error message.
@@ -363,11 +364,11 @@ procedure will still be invoked.
.SH "TCL_TRACE_DESTROYED FLAG"
.PP
-In an unset callback to \fIproc\fR, the TCL_TRACE_DESTROYED bit
+In an unset callback to \fIproc\fR, the \fBTCL_TRACE_DESTROYED\fR bit
is set in \fIflags\fR if the trace is being removed as part
of the deletion.
Traces on a variable are always removed whenever the variable
-is deleted; the only time TCL_TRACE_DESTROYED isn't set is for
+is deleted; the only time \fBTCL_TRACE_DESTROYED\fR isn't set is for
a whole-array trace invoked when only a single element of an
array is unset.
@@ -375,10 +376,10 @@ array is unset.
.PP
When an interpreter is destroyed, unset traces are called for
all of its variables.
-The TCL_INTERP_DESTROYED bit will be set in the \fIflags\fR
+The \fBTCL_INTERP_DESTROYED\fR bit will be set in the \fIflags\fR
argument passed to the trace procedures.
Trace procedures must be extremely careful in what they do if
-the TCL_INTERP_DESTROYED bit is set.
+the \fBTCL_INTERP_DESTROYED\fR bit is set.
It is not safe for the procedures to invoke any Tcl procedures
on the interpreter, since its state is partially deleted.
All that trace procedures should do under these circumstances is
@@ -387,7 +388,7 @@ to clean up and free their own internal data structures.
.SH BUGS
.PP
Tcl doesn't do any error checking to prevent trace procedures
-from misusing the interpreter during traces with TCL_INTERP_DESTROYED
+from misusing the interpreter during traces with \fBTCL_INTERP_DESTROYED\fR
set.
.PP
Array traces are not yet integrated with the Tcl "info exists" command,
diff --git a/doc/UpVar.3 b/doc/UpVar.3
index fd65cd3..ff43044 100644
--- a/doc/UpVar.3
+++ b/doc/UpVar.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.
'\"
-'\" RCS: @(#) $Id: UpVar.3,v 1.7 2002/08/05 03:24:39 dgp Exp $
+'\" RCS: @(#) $Id: UpVar.3,v 1.8 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Tcl_UpVar 3 7.4 Tcl "Tcl Library Procedures"
@@ -39,7 +39,7 @@ variable so that references to \fIdestName\fR
refer to the other variable. Must not currently exist except as
an upvar-ed variable.
.AP int flags in
-Either TCL_GLOBAL_ONLY or 0; if non-zero, then \fIdestName\fR is
+Either \fBTCL_GLOBAL_ONLY\fR or 0; if non-zero, then \fIdestName\fR is
a global variable; otherwise it is a local to the current procedure
(or global if no procedure is active).
.AP "CONST char" *name1 in
@@ -63,7 +63,7 @@ element name (by calling \fBTcl_UpVar2\fR).
The destination variable name is specified in a single string; it
may not be an array element.
.PP
-Both procedures return either TCL_OK or TCL_ERROR, and they
+Both procedures return either \fBTCL_OK\fR or \fBTCL_ERROR\fR, and they
leave an error message in the interpreter's result if an error occurs.
.PP
As with the \fBupvar\fR command, the source variable need not exist;
diff --git a/doc/Utf.3 b/doc/Utf.3
index cef0eb8..bd3d44f 100644
--- a/doc/Utf.3
+++ b/doc/Utf.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.
'\"
-'\" RCS: @(#) $Id: Utf.3,v 1.16 2004/09/06 09:44:57 dkf Exp $
+'\" RCS: @(#) $Id: Utf.3,v 1.17 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH Utf 3 "8.1" Tcl "Tcl Library Procedures"
@@ -85,7 +85,7 @@ int
.AS "CONST Tcl_UniChar" numChars in/out
.AP char *buf out
Buffer in which the UTF-8 representation of the Tcl_UniChar is stored. At most
-TCL_UTF_MAX bytes are stored in the buffer.
+\fBTCL_UTF_MAX\fR bytes are stored in the buffer.
.AP int ch in
The Tcl_UniChar to be converted or examined.
.AP Tcl_UniChar *chPtr out
@@ -115,7 +115,7 @@ If non-NULL, filled with the number of bytes in the backslash sequence,
including the backslash character.
.AP char *dst out
Buffer in which the bytes represented by the backslash sequence are stored.
-At most TCL_UTF_MAX bytes are stored in the buffer.
+At most \fBTCL_UTF_MAX\fR bytes are stored in the buffer.
.VS 8.4
.AP int nocase in
Specifies whether the match should be done case-sensitive (0) or
@@ -128,7 +128,7 @@ case-insensitive (1).
These routines convert between UTF-8 strings and Tcl_UniChars. A
Tcl_UniChar is a Unicode character represented as an unsigned, fixed-size
quantity. A UTF-8 character is a Unicode character represented as
-a varying-length sequence of up to TCL_UTF_MAX bytes. A multibyte UTF-8
+a varying-length sequence of up to \fBTCL_UTF_MAX\fR bytes. A multibyte UTF-8
sequence consists of a lead byte followed by some number of trail bytes.
.PP
\fBTCL_UTF_MAX\fR is the maximum number of bytes that it takes to
@@ -250,7 +250,7 @@ the return pointer points to the first character in the source string.
\fBTcl_UtfBackslash\fR is a utility procedure used by several of the Tcl
commands. It parses a backslash sequence and stores the properly formed
UTF-8 character represented by the backslash sequence in the output
-buffer \fIdst\fR. At most TCL_UTF_MAX bytes are stored in the buffer.
+buffer \fIdst\fR. At most \fBTCL_UTF_MAX\fR bytes are stored in the buffer.
\fBTcl_UtfBackslash\fR modifies \fI*readPtr\fR to contain the number
of bytes in the backslash sequence, including the backslash character.
The return value is the number of bytes stored in the output buffer.
diff --git a/doc/break.n b/doc/break.n
index af0eac4..b0350ad 100644
--- a/doc/break.n
+++ b/doc/break.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.
'\"
-'\" RCS: @(#) $Id: break.n,v 1.5 2004/05/05 23:08:39 dkf Exp $
+'\" RCS: @(#) $Id: break.n,v 1.6 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH break n "" Tcl "Tcl Built-In Commands"
@@ -21,7 +21,7 @@ break \- Abort looping command
.PP
This command is typically invoked inside the body of a looping command
such as \fBfor\fR or \fBforeach\fR or \fBwhile\fR.
-It returns a TCL_BREAK code, which causes a break exception
+It returns a \fBTCL_BREAK\fR code, which causes a break exception
to occur.
The exception causes the current script to be aborted
out to the innermost containing loop command, which then
diff --git a/doc/catch.n b/doc/catch.n
index cc5d4bc..4414893 100644
--- a/doc/catch.n
+++ b/doc/catch.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: catch.n,v 1.10 2004/08/31 15:19:35 dkf Exp $
+'\" RCS: @(#) $Id: catch.n,v 1.11 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH catch n "8.5" Tcl "Tcl Built-In Commands"
@@ -28,10 +28,10 @@ regardless of any errors that might occur while executing \fIscript\fR.
If \fIscript\fR raises an error, \fBcatch\fR will return a non-zero integer
value corresponding to the exceptional return code returned by evaluation
of \fIscript\fR. Tcl defines the normal return code from script
-evaluation to be zero (0), or TCL_OK. Tcl also defines four exceptional
-return codes: 1 (TCL_ERROR), 2 (TCL_RETURN), 3 (TCL_BREAK),
-and 4 (TCL_CONTINUE). Errors during evaluation of a script are indicated
-by a return code of TCL_ERROR. The other exceptional return codes are
+evaluation to be zero (0), or \fBTCL_OK\fR. Tcl also defines four exceptional
+return codes: 1 (\fBTCL_ERROR\fR), 2 (\fBTCL_RETURN\fR), 3 (\fBTCL_BREAK\fR),
+and 4 (\fBTCL_CONTINUE\fR). Errors during evaluation of a script are indicated
+by a return code of \fBTCL_ERROR\fR. The other exceptional return codes are
returned by the \fBreturn\fR, \fBbreak\fR, and \fBcontinue\fR commands
and in other special situations as documented. Tcl packages can define
new commands that return other integer values as return codes as well,
@@ -40,8 +40,8 @@ have return codes other than the five defined by Tcl.
.PP
If the \fIresultVarName\fR argument is given, then the variable it names is
set to the result of the script evaluation. When the return code from
-the script is TCL_ERROR, the value stored in \fIresultVarName\fR is an error
-message. When the return code from the script is TCL_OK, the value
+the script is \fBTCL_ERROR\fR, the value stored in \fIresultVarName\fR is an error
+message. When the return code from the script is \fBTCL_OK\fR, the value
stored in \fIresultVarName\fR is the value returned from \fIscript\fR.
.VS 8.5
.PP
@@ -49,14 +49,14 @@ If the \fIoptionsVarName\fR argument is given, then the variable it
names is set to a dictionary of return options returned by evaluation
of \fIscript\fR. Tcl specifies two entries that are always
defined in the dictionary: \fB-code\fR and \fB-level\fR. When
-the return code from evaluation of \fIscript\fR is not TCL_RETURN,
+the return code from evaluation of \fIscript\fR is not \fBTCL_RETURN\fR,
the value of the \fB-level\fR entry will be 0, and the value
of the \fB-code\fR entry will be the same as the return code.
-Only when the return code is TCL_RETURN will the values of
+Only when the return code is \fBTCL_RETURN\fR will the values of
the \fB-level\fR and \fB-code\fR entries be something else, as
further described in the documentation for the \fBreturn\fR command.
.PP
-When the return code from evaluation of \fIscript\fR is TCL_ERROR,
+When the return code from evaluation of \fIscript\fR is \fBTCL_ERROR\fR,
three additional entries are defined in the dictionary of return options
stored in \fIoptionsVarName\fR: \fB-errorinfo\fR, \fB-errorcode\fR,
and \fB-errorline\fR. The value of the \fB-errorinfo\fR entry
diff --git a/doc/continue.n b/doc/continue.n
index 86478e2..4fca93e 100644
--- a/doc/continue.n
+++ b/doc/continue.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.
'\"
-'\" RCS: @(#) $Id: continue.n,v 1.5 2004/05/05 23:08:39 dkf Exp $
+'\" RCS: @(#) $Id: continue.n,v 1.6 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH continue n "" Tcl "Tcl Built-In Commands"
@@ -21,7 +21,7 @@ continue \- Skip to the next iteration of a loop
.PP
This command is typically invoked inside the body of a looping command
such as \fBfor\fR or \fBforeach\fR or \fBwhile\fR.
-It returns a TCL_CONTINUE code, which causes a continue exception
+It returns a \fBTCL_CONTINUE\fR code, which causes a continue exception
to occur.
The exception causes the current script to be aborted
out to the innermost containing loop command, which then
diff --git a/doc/dict.n b/doc/dict.n
index 9d5f3dc..715814d 100644
--- a/doc/dict.n
+++ b/doc/dict.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.
'\"
-'\" RCS: @(#) $Id: dict.n,v 1.5 2004/09/06 09:44:56 dkf Exp $
+'\" RCS: @(#) $Id: dict.n,v 1.6 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH dict n 8.5 Tcl "Tcl Built-In Commands"
@@ -56,9 +56,9 @@ the given script which should return a boolean value (with the
key/value pair only being included in the result of the \fBdict
filter\fR when a true value is returned.) Note that the first
argument after the rule selection word is a two-element list. If the
-\fIscript\fR returns with a condition of TCL_BREAK, no further
+\fIscript\fR returns with a condition of \fBTCL_BREAK\fR, no further
key/value pairs are considered for inclusion in the resulting
-dictionary, and a condition of TCL_CONTINUE is equivalent to a false
+dictionary, and a condition of \fBTCL_CONTINUE\fR is equivalent to a false
result.
.TP
\fBdict filter \fIdictionaryValue \fBvalue \fIglobPattern\fR
@@ -73,11 +73,11 @@ the dictionary), the second the dictionary value to iterate across,
and the third a script to be evaluated for each mapping with the key
and value variables set appropriately (in the manner of \fBforeach\fR.)
The result of the command is an empty string. If any evaluation of the
-body generates a TCL_BREAK result, no further pairs from the
+body generates a \fBTCL_BREAK\fR result, no further pairs from the
dictionary will be iterated over and the \fBdict for\fR command will
terminate successfully immediately. If any evaluation of the body
-generates a TCL_CONTINUE result, this shall be treated exactly like a
-normal TCL_OK result. The order of iteration is undefined.
+generates a \fBTCL_CONTINUE\fR result, this shall be treated exactly like a
+normal \fBTCL_OK\fR result. The order of iteration is undefined.
.TP
\fBdict get \fIdictionaryValue \fR?\fIkey ...\fR?
Given a dictionary value (first argument) and a key (second argument),
diff --git a/doc/error.n b/doc/error.n
index b7d6f06..b992d47 100644
--- a/doc/error.n
+++ b/doc/error.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.
'\"
-'\" RCS: @(#) $Id: error.n,v 1.4 2004/05/24 12:24:47 dkf Exp $
+'\" RCS: @(#) $Id: error.n,v 1.5 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH error n "" Tcl "Tcl Built-In Commands"
@@ -19,7 +19,7 @@ error \- Generate an error
.SH DESCRIPTION
.PP
-Returns a TCL_ERROR code, which causes command interpretation to be
+Returns a \fBTCL_ERROR\fR code, which causes command interpretation to be
unwound. \fIMessage\fR is a string that is returned to the application
to indicate what went wrong.
.PP
diff --git a/doc/return.n b/doc/return.n
index 58c4bd1..c1c09b7 100644
--- a/doc/return.n
+++ b/doc/return.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: return.n,v 1.9 2004/03/16 22:19:43 dgp Exp $
+'\" RCS: @(#) $Id: return.n,v 1.10 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH return n 8.5 Tcl "Tcl Built-In Commands"
@@ -51,26 +51,26 @@ exceptional return from the procedure.
.TP 13
\fBok (or 0)\fR
Normal return: same as if the option is omitted. The return code
-of the procedure is 0 (TCL_OK).
+of the procedure is 0 (\fBTCL_OK\fR).
.TP 13
\fBerror (1)\fR
-Error return: the return code of the procedure is 1 (TCL_ERROR).
+Error return: the return code of the procedure is 1 (\fBTCL_ERROR\fR).
The procedure command behaves in its calling context as if it
were the command \fBerror \fIresult\fR. See below for additional
options.
.TP 13
\fBreturn (2)\fR
-The return code of the procedure is 2 (TCL_RETURN). The
+The return code of the procedure is 2 (\fBTCL_RETURN\fR). The
procedure command behaves in its calling context as if it
were the command \fBreturn\fR (with no arguments).
.TP 13
\fBbreak (3)\fR
-The return code of the procedure is 3 (TCL_BREAK). The
+The return code of the procedure is 3 (\fBTCL_BREAK\fR). The
procedure command behaves in its calling context as if it
were the command \fBbreak\fR.
.TP 13
\fBcontinue (4)\fR
-The return code of the procedure is 4 (TCL_CONTINUE). The
+The return code of the procedure is 4 (\fBTCL_CONTINUE\fR). The
procedure command behaves in its calling context as if it
were the command \fBcontinue\fR.
.TP 13
@@ -108,7 +108,7 @@ recognized and treated specially by Tcl. They are:
.TP
\fB-errorcode \fIlist\fR
The \fB-errorcode\fR option receives special treatment only when the value
-of the \fB-code\fR option is TCL_ERROR. Then the \fIlist\fR value, which
+of the \fB-code\fR option is \fBTCL_ERROR\fR. Then the \fIlist\fR value, which
must be a valid Tcl list, is stored in the global variable \fBerrorCode\fR.
The \fIlist\fR value is meant to be additional information about the error,
presented as a Tcl list for further processing by programs.
@@ -119,7 +119,7 @@ the global variable \fBerrorCode\fR to the default value of \fBNONE\fR.
.TP
\fB-errorinfo \fIinfo\fR
The \fB-errorinfo\fR option receives special treatment only when the value
-of the \fB-code\fR option is TCL_ERROR. Then \fIinfo\fR is the initial
+of the \fB-code\fR option is \fBTCL_ERROR\fR. Then \fIinfo\fR is the initial
stack trace, meant to provide to a human reader additional information
about the context in which the error occurred. The stack trace will
also be stored in the global variable \fBerrorInfo\fR.
@@ -158,8 +158,8 @@ dictionary are treated as additional \fIoption value\fR pairs for the
.PP
Return codes are used in Tcl to control program flow. A Tcl script
is a sequence of Tcl commands. So long as each command evaluation
-returns a return code of TCL_OK, evaluation will continue to the next
-command in the script. Any exceptional return code (non-TCL_OK)
+returns a return code of \fBTCL_OK\fR, evaluation will continue to the next
+command in the script. Any exceptional return code (non-\fBTCL_OK\fR)
returned by a command evaluation causes the flow on to the next
command to be interrupted. Script evaluation ceases, and the
exceptional return code from the command becomes the return code
@@ -175,7 +175,7 @@ codes to enable special features. For example, the built-in
Tcl commands that provide loops -- such as \fBwhile\fR, \fBfor\fR,
and \fBforeach\fR -- evaluate a script that is the body of the
loop. If evaluation of the loop body returns the return code
-of TCL_BREAK or TCL_CONTINUE, the loop command can react in such
+of \fBTCL_BREAK\fR or \fBTCL_CONTINUE\fR, the loop command can react in such
a way as to give the \fBbreak\fR and \fBcontinue\fR commands
their documented interpretation in loops.
.PP
@@ -183,19 +183,19 @@ their documented interpretation in loops.
Procedure invocation also involves evaluation of a script, the body
of the procedure. Procedure invocation provides special treatment
when evaluation of the procedure body returns the return code
-TCL_RETURN. In that circumstance, the \fB-level\fR entry in the
+\fBTCL_RETURN\fR. In that circumstance, the \fB-level\fR entry in the
return options dictionary is decremented. If after decrementing,
the value of the \fB-level\fR entry is 0, then the value of
the \fB-code\fR entry becomes the return code of the procedure.
If after decrementing, the value of the \fB-level\fR entry is
greater than zero, then the return code of the procedure is
-TCL_RETURN. If the procedure invocation occurred during the
+\fBTCL_RETURN\fR. If the procedure invocation occurred during the
evaluation of the body of another procedure, the process will
repeat itself up the call stack, decrementing the value of the
\fB-level\fR entry at each level, so that the \fIcode\fR will
be the return code of the current command \fIlevel\fR levels
up the call stack. The \fBsource\fR command performs the
-same handling of the TCL_RETURN return code, which explains
+same handling of the \fBTCL_RETURN\fR return code, which explains
the similarity of \fBreturn\fR invocation during a \fBsource\fR
to \fBreturn\fR invocation within a procedure.
.PP
@@ -203,10 +203,10 @@ The return code of the \fBreturn\fR command itself triggers this
special handling by procedure invocation. If \fBreturn\fR
is provided the option \fB-level 0\fR, then the return code
of the \fBreturn\fR command itself will be the value \fIcode\fR
-of the \fB-code\fR option (or TCL_OK by default). Any other value
+of the \fB-code\fR option (or \fBTCL_OK\fR by default). Any other value
for the \fB-level\fR option (including the default value of 1)
will cause the return code of the \fBreturn\fR command itself
-to be TCL_RETURN, triggering a return from the enclosing procedure.
+to be \fBTCL_RETURN\fR, triggering a return from the enclosing procedure.
.VE 8.5
.SH EXAMPLES
diff --git a/doc/tclvars.n b/doc/tclvars.n
index f3da299..1cdb78d 100644
--- a/doc/tclvars.n
+++ b/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.
'\"
-'\" RCS: @(#) $Id: tclvars.n,v 1.16 2004/09/06 09:44:57 dkf Exp $
+'\" RCS: @(#) $Id: tclvars.n,v 1.17 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH tclvars n 8.0 Tcl "Tcl Built-In Commands"
@@ -287,7 +287,7 @@ It is also occasionally useful when converting
existing code to use Tcl8.0.
This variable and functionality only exist if
-TCL_COMPILE_DEBUG was defined during Tcl's compilation.
+\fBTCL_COMPILE_DEBUG\fR was defined during Tcl's compilation.
.TP
\fBtcl_traceExec\fR
The value of this variable can be set to control
@@ -312,7 +312,7 @@ It is also occasionally useful when converting
code to use Tcl8.0.
This variable and functionality only exist if
-TCL_COMPILE_DEBUG was defined during Tcl's compilation.
+\fBTCL_COMPILE_DEBUG\fR was defined during Tcl's compilation.
.TP
\fBtcl_wordchars\fR
The value of this variable is a regular expression that can be set to
diff --git a/doc/unload.n b/doc/unload.n
index 8b860ee..1afe6e6 100644
--- a/doc/unload.n
+++ b/doc/unload.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.
'\"
-'\" RCS: @(#) $Id: unload.n,v 1.5 2004/09/06 09:44:57 dkf Exp $
+'\" RCS: @(#) $Id: unload.n,v 1.6 2004/09/18 17:01:06 dkf Exp $
'\"
.so man.macros
.TH unload n 8.5 Tcl "Tcl Built-In Commands"
@@ -80,7 +80,7 @@ instead of \fIpkg\fB_Unload\fR.
If \fBunload\fR determines that a library is not unloadable (or unload
functionality has been disabled during compilation), an error will be returned.
If the library is unloadable, then \fBunload\fR will call the unload
-procedure. If the unload procedure returns TCL_OK, \fBunload\fR will proceed
+procedure. If the unload procedure returns \fBTCL_OK\fR, \fBunload\fR will proceed
and decrease the proper reference count (depending on the target interpreter
type). When both reference counts have reached 0, the library will be
detached from the process.