summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2024-01-25 17:45:17 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2024-01-25 17:45:17 (GMT)
commitd78ebb8e014475bdb1c47d4b695856f79925e755 (patch)
treed6ac371db01bf12d8b1e08214f3eef292617549f /doc
parent104d50836d96335baa9b788de5e85dc2359dc323 (diff)
downloadtcl-d78ebb8e014475bdb1c47d4b695856f79925e755.zip
tcl-d78ebb8e014475bdb1c47d4b695856f79925e755.tar.gz
tcl-d78ebb8e014475bdb1c47d4b695856f79925e755.tar.bz2
Another round of small fixes, especially spelling errors...
Diffstat (limited to 'doc')
-rw-r--r--doc/AddErrInfo.39
-rw-r--r--doc/Alloc.32
-rw-r--r--doc/ByteArrObj.34
-rw-r--r--doc/CallDel.33
-rw-r--r--doc/CrtChannel.33
-rw-r--r--doc/CrtCommand.36
-rw-r--r--doc/CrtObjCmd.33
-rw-r--r--doc/DoOneEvent.318
-rw-r--r--doc/DoWhenIdle.32
-rw-r--r--doc/DoubleObj.33
-rw-r--r--doc/Encoding.323
-rw-r--r--doc/Ensemble.31
-rw-r--r--doc/Exit.315
-rw-r--r--doc/FileSystem.320
-rw-r--r--doc/GetCwd.32
-rw-r--r--doc/GetIndex.32
-rw-r--r--doc/GetTime.34
-rw-r--r--doc/Hash.32
-rw-r--r--doc/Init.37
-rw-r--r--doc/NRE.32
-rw-r--r--doc/Notifier.39
-rw-r--r--doc/Object.39
-rw-r--r--doc/ObjectType.349
-rw-r--r--doc/OpenFileChnl.32
-rw-r--r--doc/OpenTcp.32
-rw-r--r--doc/ParseArgs.348
-rw-r--r--doc/ParseCmd.346
-rw-r--r--doc/RegConfig.39
-rw-r--r--doc/RegExp.322
-rw-r--r--doc/SetVar.35
-rw-r--r--doc/StdChannels.315
-rw-r--r--doc/StringObj.33
-rw-r--r--doc/Tcl.n9
-rw-r--r--doc/TclZlib.328
-rw-r--r--doc/TraceCmd.32
-rw-r--r--doc/TraceVar.38
-rw-r--r--doc/UniCharIsAlpha.322
-rw-r--r--doc/WrongNumArgs.32
-rw-r--r--doc/after.n2
-rw-r--r--doc/binary.n9
-rw-r--r--doc/cd.n1
-rw-r--r--doc/chan.n51
-rw-r--r--doc/classvariable.n4
-rw-r--r--doc/clock.n212
-rw-r--r--doc/configurable.n3
-rw-r--r--doc/cookiejar.n28
-rw-r--r--doc/define.n11
-rw-r--r--doc/dict.n2
-rw-r--r--doc/encoding.n30
-rw-r--r--doc/eval.n1
-rw-r--r--doc/exec.n3
-rw-r--r--doc/expr.n37
-rw-r--r--doc/fconfigure.n36
-rw-r--r--doc/fcopy.n30
-rw-r--r--doc/file.n52
-rw-r--r--doc/filename.n14
-rw-r--r--doc/for.n2
-rw-r--r--doc/format.n61
-rw-r--r--doc/fpclassify.n20
-rw-r--r--doc/glob.n27
-rw-r--r--doc/history.n4
-rw-r--r--doc/http.n427
-rw-r--r--doc/info.n83
-rw-r--r--doc/interp.n37
-rw-r--r--doc/load.n2
-rw-r--r--doc/lrange.n3
-rw-r--r--doc/lrepeat.n4
-rw-r--r--doc/lsearch.n20
-rw-r--r--doc/lsort.n20
-rw-r--r--doc/msgcat.n208
-rw-r--r--doc/my.n6
-rw-r--r--doc/namespace.n21
-rw-r--r--doc/next.n8
-rw-r--r--doc/open.n178
-rw-r--r--doc/package.n20
-rw-r--r--doc/packagens.n8
-rw-r--r--doc/pkgMkIndex.n10
-rw-r--r--doc/platform.n6
-rw-r--r--doc/platform_shell.n6
-rw-r--r--doc/prefix.n15
-rw-r--r--doc/proc.n8
-rw-r--r--doc/process.n10
-rw-r--r--doc/re_syntax.n146
-rw-r--r--doc/read.n9
-rw-r--r--doc/refchan.n12
-rw-r--r--doc/regexp.n19
-rw-r--r--doc/registry.n36
-rw-r--r--doc/regsub.n20
-rw-r--r--doc/return.n9
-rw-r--r--doc/safe.n32
-rw-r--r--doc/scan.n55
-rw-r--r--doc/seek.n12
-rw-r--r--doc/set.n3
-rw-r--r--doc/singleton.n4
-rw-r--r--doc/socket.n25
-rw-r--r--doc/source.n3
-rw-r--r--doc/string.n15
-rw-r--r--doc/subst.n3
-rw-r--r--doc/switch.n17
-rw-r--r--doc/tclsh.16
-rw-r--r--doc/tcltest.n140
-rw-r--r--doc/tclvars.n49
-rw-r--r--doc/timerate.n31
-rw-r--r--doc/trace.n16
-rw-r--r--doc/transchan.n8
-rw-r--r--doc/unload.n13
-rw-r--r--doc/uplevel.n3
-rw-r--r--doc/vwait.n17
-rw-r--r--doc/while.n2
-rw-r--r--doc/zipfs.32
-rw-r--r--doc/zipfs.n20
-rw-r--r--doc/zlib.n89
112 files changed, 1400 insertions, 1577 deletions
diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3
index 21b75cb..05b20b8 100644
--- a/doc/AddErrInfo.3
+++ b/doc/AddErrInfo.3
@@ -71,11 +71,14 @@ Last \fIelement\fR argument must be NULL.
.AP int lineNum
The line number of a script where an error occurred.
.AP "const char" *script in
-Pointer to first character in script containing command (must be <= command)
+Pointer to first character in script containing command
+(must be <= \fIcommand\fR).
.AP "const char" *command in
-Pointer to first character in command that generated the error
+Pointer to first character in the command that generated the error; must
+point within the string given by \fIscript\fR.
.AP Tcl_Size commandLength in
-Number of bytes in command; a negative value means use all bytes up to first null byte
+Number of bytes in command; a negative value means use all bytes up to the
+first null byte.
.BE
.SH DESCRIPTION
.PP
diff --git a/doc/Alloc.3 b/doc/Alloc.3
index bed6d83..493eebc 100644
--- a/doc/Alloc.3
+++ b/doc/Alloc.3
@@ -72,7 +72,7 @@ When a module or Tcl itself is compiled with \fBTCL_MEM_DEBUG\fR defined,
the procedures \fBTcl_Alloc\fR, \fBTcl_Free\fR, \fBTcl_Realloc\fR,
\fBTcl_AttemptAlloc\fR, and \fBTcl_AttempRealloc\fR are implemented
as macros, redefined to be special debugging versions of these procedures.
-
+.PP
\fBTcl_GetMemoryInfo\fR appends a list-of-lists of memory stats to the
provided DString. This function cannot be used in stub-enabled extensions,
and it is only available if Tcl is compiled with the threaded memory allocator
diff --git a/doc/ByteArrObj.3 b/doc/ByteArrObj.3
index 174bbc0..ae1a79c 100644
--- a/doc/ByteArrObj.3
+++ b/doc/ByteArrObj.3
@@ -63,7 +63,7 @@ a finite byte sequence.
A byte is an 8-bit quantity with no inherent meaning. When the 8 bits are
interpreted as an integer value, the range of possible values is (0-255).
The C type best suited to store a byte is the \fBunsigned char\fR.
-An \fBunsigned char\fR array of size \fIN\fR stores an aribtrary binary
+An \fBunsigned char\fR array of size \fIN\fR stores an arbitrary binary
value of size \fIN\fR bytes. We call this representation a byte-array.
Here we document the routines that allow us to operate on Tcl values as
byte-arrays.
@@ -126,7 +126,7 @@ way \fBTcl_GetByteArrayFromObj\fR functioned in Tcl 8.
\fBTcl_GetBytesFromObj\fR is the more capable interface and should
usually be favored for use over \fBTcl_GetByteArrayFromObj\fR.
.PP
-On success, both \fBTcl_GetByteFromObj\fR and \fBTcl_GetByteArrayFromObj\fR
+On success, both \fBTcl_GetBytesFromObj\fR and \fBTcl_GetByteArrayFromObj\fR
return a pointer into the internal representation of a \fBTcl_Obj\fR.
That pointer must not be freed by the caller, and should not be retained
for use beyond the known time the internal representation of the value
diff --git a/doc/CallDel.3 b/doc/CallDel.3
index 7d65154..418998e 100644
--- a/doc/CallDel.3
+++ b/doc/CallDel.3
@@ -61,7 +61,8 @@ If there is no deletion callback that matches \fIinterp\fR,
.PP
Note that if the callback is being used to delete a resource that \fImust\fR
be released on exit, \fBTcl_CreateExitHandler\fR should be used to ensure that
-a callback is received even if the application terminates without deleting the interpreter.
+a callback is received even if the application terminates without deleting the
+interpreter.
.SH "SEE ALSO"
Tcl_CreateExitHandler(3), Tcl_CreateThreadExitHandler(3)
.SH KEYWORDS
diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3
index cbeb9da..3c622f2 100644
--- a/doc/CrtChannel.3
+++ b/doc/CrtChannel.3
@@ -316,7 +316,7 @@ details about the old structure.
The \fBTcl_ChannelType\fR structure contains the following fields:
.PP
.CS
-typedef struct Tcl_ChannelType {
+typedef struct {
const char *\fItypeName\fR;
Tcl_ChannelTypeVersion \fIversion\fR;
void *\fIcloseProc\fR; /* Not used any more*/
@@ -373,7 +373,6 @@ This value can be retrieved with \fBTcl_ChannelName\fR, which returns
a pointer to the string.
.SS VERSION
.PP
-
The \fIversion\fR field should be set to the version of the structure
that you require. \fBTCL_CHANNEL_VERSION_5\fR is the minimum supported.
.PP
diff --git a/doc/CrtCommand.3 b/doc/CrtCommand.3
index f88e4f0..d15a920 100644
--- a/doc/CrtCommand.3
+++ b/doc/CrtCommand.3
@@ -26,7 +26,7 @@ Name of command.
.AP Tcl_CmdProc *proc in
Implementation of new command: \fIproc\fR will be called whenever
\fIcmdName\fR is invoked as a command.
-.AP voie *clientData in
+.AP void *clientData in
Arbitrary one-word value to pass to \fIproc\fR and \fIdeleteProc\fR.
.AP Tcl_CmdDeleteProc *deleteProc in
Procedure to call before \fIcmdName\fR is deleted from the interpreter;
@@ -93,11 +93,11 @@ the command name) and \fIargv\fR giving the values of the arguments
as strings. The \fIargv\fR array will contain \fIargc\fR+1 values;
the first \fIargc\fR values point to the argument strings, and the
last value is NULL.
+.PP
Note that the argument strings should not be modified as they may
point to constant strings or may be shared with other parts of the
interpreter.
-.PP
-Note that the argument strings are encoded in normalized UTF-8 since
+Note also that the argument strings are encoded in normalized UTF-8 since
version 8.1 of Tcl.
.PP
\fIProc\fR must return an integer code that is expected to be one of
diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3
index 57eaf8e..522f903 100644
--- a/doc/CrtObjCmd.3
+++ b/doc/CrtObjCmd.3
@@ -294,8 +294,7 @@ Note that \fBTcl_SetCommandInfo\fR and
\fBTcl_SetCommandInfoFromToken\fR both allow the clientData for a
command's deletion procedure to be given a different value than the
clientData for its command procedure.
-.PP
-Note that neither \fBTcl_SetCommandInfo\fR nor
+Note also that neither \fBTcl_SetCommandInfo\fR nor
\fBTcl_SetCommandInfoFromToken\fR will change a command's namespace.
Use \fBTcl_Eval\fR to call the \fBrename\fR command to do that.
.PP
diff --git a/doc/DoOneEvent.3 b/doc/DoOneEvent.3
index e515328..b14f2e1 100644
--- a/doc/DoOneEvent.3
+++ b/doc/DoOneEvent.3
@@ -54,24 +54,18 @@ If the \fIflags\fR argument to \fBTcl_DoOneEvent\fR is non-zero,
it restricts the kinds of events that will be processed by
\fBTcl_DoOneEvent\fR.
\fIFlags\fR may be an OR-ed combination of any of the following bits:
-.TP 27
-\fBTCL_WINDOW_EVENTS\fR \-
+.IP \fBTCL_WINDOW_EVENTS\fR
Process window system events.
-.TP 27
-\fBTCL_FILE_EVENTS\fR \-
+.IP \fBTCL_FILE_EVENTS\fR
Process file events.
-.TP 27
-\fBTCL_TIMER_EVENTS\fR \-
+.IP \fBTCL_TIMER_EVENTS\fR
Process timer events.
-.TP 27
-\fBTCL_IDLE_EVENTS\fR \-
+.IP \fBTCL_IDLE_EVENTS\fR
Process idle callbacks.
-.TP 27
-\fBTCL_ALL_EVENTS\fR \-
+.IP \fBTCL_ALL_EVENTS\fR
Process all kinds of events: equivalent to OR-ing together all of the
above flags or specifying none of them.
-.TP 27
-\fBTCL_DONT_WAIT\fR \-
+.IP \fBTCL_DONT_WAIT\fR
Do not sleep: process only events that are ready at the time of the
call.
.LP
diff --git a/doc/DoWhenIdle.3 b/doc/DoWhenIdle.3
index aed3a4a..f342820 100644
--- a/doc/DoWhenIdle.3
+++ b/doc/DoWhenIdle.3
@@ -22,7 +22,7 @@ Tcl_DoWhenIdle, Tcl_CancelIdleCall \- invoke a procedure when there are no pendi
.AS Tcl_IdleProc clientData
.AP Tcl_IdleProc *proc in
Procedure to invoke.
-.AP coid *clientData in
+.AP void *clientData in
Arbitrary one-word value to pass to \fIproc\fR.
.BE
.SH DESCRIPTION
diff --git a/doc/DoubleObj.3 b/doc/DoubleObj.3
index c4db52c..4696cc3 100644
--- a/doc/DoubleObj.3
+++ b/doc/DoubleObj.3
@@ -74,4 +74,5 @@ is holding a reference to the object, it will be deleted.
.SH "SEE ALSO"
Tcl_NewObj, Tcl_DecrRefCount, Tcl_IncrRefCount, Tcl_GetObjResult
.SH KEYWORDS
-double, double value, double type, internal representation, value, value type, string representation
+double, double value, double type, internal representation, value, value type,
+string representation
diff --git a/doc/Encoding.3 b/doc/Encoding.3
index 2759ec7..9e5ae06 100644
--- a/doc/Encoding.3
+++ b/doc/Encoding.3
@@ -219,12 +219,12 @@ be used to specify the profile to be used for the transform. The
ignored as the function assumes the entire source string to be decoded is passed
into the function. On success, the function returns \fBTCL_OK\fR with the
converted string stored in \fB*dstPtr\fR. For errors \fIother than conversion
-errors\fR, such as invalid flags, the function returns \fBTCL_ERROR\fR with an error
-message in \fBinterp\fR if it is not NULL.
+errors\fR, such as invalid flags, the function returns \fBTCL_ERROR\fR with an
+error message in \fBinterp\fR if it is not NULL.
For conversion errors, \fBTcl_ExternalToUtfDStringEx\fR returns one
of the \fBTCL_CONVERT_*\fR errors listed below for \fBTcl_ExternalToUtf\fR.
-When one of these conversion errors is returned, an error message is
-stored in \fBinterp\fR only if \fBerrorIdxPtr\fR is NULL. Otherwise, no error message
+When one of these conversion errors is returned, an error message is stored
+in \fBinterp\fR only if \fBerrorIdxPtr\fR is NULL. Otherwise, no error message
is stored as the function expects the caller is interested the decoded data
up to that point and not treating this as an immediate error condition.
The index of the error location is stored in \fB*errorIdxPtr\fR.
@@ -253,8 +253,8 @@ the unconverted bytes that remained in \fIsrc\fR plus some further bytes
from the source stream to properly convert the formerly split-up multibyte
sequence.
.IP \fBTCL_CONVERT_SYNTAX\fR 29
-The source buffer contained an invalid byte or character sequence. This may occur
-if the input stream has been damaged or if the input encoding method was
+The source buffer contained an invalid byte or character sequence. This may
+occur 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
@@ -271,11 +271,12 @@ encoding, a default fallback character will be used. The return value is
a pointer to the value stored in the DString.
.PP
\fBTcl_UtfToExternalDStringEx\fR is an enhanced version of
-\fBTcl_UtfToExternalDString\fR that transforms UTF-8 encoded source data to a specified
-\fIencoding\fR. Except for the direction of the transform, the parameters and
-return values are identical to those of \fBTcl_ExternalToUtfDStringEx\fR. See
+\fBTcl_UtfToExternalDString\fR that transforms UTF-8 encoded source data to a
+specified \fIencoding\fR. Except for the direction of the transform, the
+parameters and return values are identical to those of
+\fBTcl_ExternalToUtfDStringEx\fR. See
that function above for details about the same.
-
+.PP
Irrespective of the return code from the function, the caller must free
resources associated with \fB*dstPtr\fR when the function returns.
.PP
@@ -339,7 +340,7 @@ about the name of the encoding and the procedures that will be called to
convert between this encoding and UTF-8. It is defined as follows:
.PP
.CS
-typedef struct Tcl_EncodingType {
+typedef struct {
const char *\fIencodingName\fR;
Tcl_EncodingConvertProc *\fItoUtfProc\fR;
Tcl_EncodingConvertProc *\fIfromUtfProc\fR;
diff --git a/doc/Ensemble.3 b/doc/Ensemble.3
index 0dfaa01..0c2ea9d 100644
--- a/doc/Ensemble.3
+++ b/doc/Ensemble.3
@@ -162,6 +162,7 @@ All command names in prefixes set via \fBTcl_SetEnsembleMappingDict\fR
must be fully qualified.
.TP
\fBformal pre-subcommand parameter list\fR (read-write)
+.
A list of formal parameter names (the names only being used when generating
error messages) that come at invocation of the ensemble between the name of
the ensemble and the subcommand argument. NULL (the default) is equivalent to
diff --git a/doc/Exit.3 b/doc/Exit.3
index a1d0694..d791f60 100644
--- a/doc/Exit.3
+++ b/doc/Exit.3
@@ -36,8 +36,8 @@ Tcl_ExitProc *
.AS Tcl_ExitProc clientData
.AP int status in
Provides information about why the application or thread exited.
-Exact meaning may
-be platform-specific. 0 usually means a normal exit, any nonzero value
+Exact meaning may be platform-specific.
+0 usually means a normal exit, any nonzero value
usually means that an error occurred.
.AP Tcl_ExitProc *proc in
Procedure to invoke before exiting application, or (for
@@ -54,14 +54,14 @@ execution of a \fBTcl\fR application. Exit handlers are invoked to cleanup the
application's state before ending the execution of \fBTcl\fR code.
.PP
Invoke \fBTcl_Exit\fR to end a \fBTcl\fR application and to exit from this
-process. This procedure is invoked by the \fBexit\fR command, and can be
+process. This procedure is invoked by the \fBexit\fR Tcl command, and can be
invoked anyplace else to terminate the application.
-No-one should ever invoke the \fBexit\fR system procedure directly; always
+No-one should ever invoke the \fBexit()\fR system call directly; always
invoke \fBTcl_Exit\fR instead, so that it can invoke exit handlers.
-Note that if other code invokes \fBexit\fR system procedure directly, or
+Note that if other code invokes \fBexit()\fR system call directly, or
otherwise causes the application to terminate without calling
\fBTcl_Exit\fR, the exit handlers will not be run.
-\fBTcl_Exit\fR internally invokes the \fBexit\fR system call, thus it never
+\fBTcl_Exit\fR internally invokes the \fBexit()\fR system call, thus it never
returns control to its caller.
If an application exit handler has been installed (see
\fBTcl_SetExitProc\fR), that handler is invoked with an argument
@@ -140,4 +140,5 @@ cast to a void *value.
.SH "SEE ALSO"
exit(n)
.SH KEYWORDS
-abort, callback, cleanup, dynamic loading, end application, exit, unloading, thread
+abort, callback, cleanup, dynamic loading, end application, exit, unloading,
+thread
diff --git a/doc/FileSystem.3 b/doc/FileSystem.3
index 255606c..b6c6d1e 100644
--- a/doc/FileSystem.3
+++ b/doc/FileSystem.3
@@ -377,7 +377,8 @@ variable to the
POSIX error code (which signifies a
.QW "cross-domain link" ).
.PP
-\fBTcl_FSCopyDirectory\fR attempts to copy the directory given by \fIsrcPathPtr\fR to the
+\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
@@ -487,8 +488,9 @@ 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 \fBTcl_DecrRefCount\fR 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'ed combination of \fBTCL_CREATE_SYMBOLIC_LINK\fR and \fBTCL_CREATE_HARD_LINK\fR.
+of one of the types passed in in the \fIlinkAction\fR flag.
+This flag is an OR'ed 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
@@ -841,7 +843,7 @@ longer be correct.
The \fBTcl_Filesystem\fR structure contains the following fields:
.PP
.CS
-typedef struct Tcl_Filesystem {
+typedef struct {
const char *\fItypeName\fR;
Tcl_Size \fIstructureLength\fR;
Tcl_FSVersion \fIversion\fR;
@@ -1254,7 +1256,7 @@ The \fBTcl_GlobTypeData\fR structure passed in the \fItypes\fR
parameter contains the following fields:
.PP
.CS
-typedef struct Tcl_GlobTypeData {
+typedef struct {
/* Corresponds to bcdpfls as in 'find -t' */
int \fItype\fR;
/* Corresponds to file permissions */
@@ -1382,10 +1384,10 @@ typedef int \fBTcl_FSFileAttrsGetProc\fR(
.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 \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 reference count to ensure it is properly freed.
+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 reference count to ensure it is properly freed.
.SS FILEATTRSSETPROC
.PP
Function to process a \fBTcl_FSFileAttrsSet\fR call, used by \fBfile
diff --git a/doc/GetCwd.3 b/doc/GetCwd.3
index 26bc691..b901098 100644
--- a/doc/GetCwd.3
+++ b/doc/GetCwd.3
@@ -47,7 +47,7 @@ The format of the path is UTF\-8.
.PP
\fBTcl_Chdir\fR changes the applications current working directory to
the value specified in \fIdirName\fR. The format of the passed in string
-must be UTF\-8. The function returns -1 on error or 0 on success.
+must be UTF\-8. The function returns \-1 on error or 0 on success.
.SH KEYWORDS
pwd
diff --git a/doc/GetIndex.3 b/doc/GetIndex.3
index 4dcee45..deb77fe 100644
--- a/doc/GetIndex.3
+++ b/doc/GetIndex.3
@@ -90,7 +90,7 @@ the table and the index of the matching entry. If \fBTcl_GetIndexFromObj\fR
is invoked again with the same \fIobjPtr\fR and \fItablePtr\fR
arguments (e.g. during a reinvocation of a Tcl command), it returns
the matching index immediately without having to redo the lookup
-operation. Note: \fBTcl_GetIndexFromObj\fR assumes that the entries
+operation. Note that \fBTcl_GetIndexFromObj\fR assumes that the entries
in \fItablePtr\fR are static: they must not change between
invocations. This caching mechanism can be disallowed by specifying
the \fBTCL_INDEX_TEMP_TABLE\fR flag.
diff --git a/doc/GetTime.3 b/doc/GetTime.3
index 9f898e4..ff302e5 100644
--- a/doc/GetTime.3
+++ b/doc/GetTime.3
@@ -44,7 +44,7 @@ The \fBTcl_GetTime\fR function retrieves the current time as a
structure has the following definition:
.PP
.CS
-typedef struct Tcl_Time {
+typedef struct {
long long \fIsec\fR;
long \fIusec\fR;
} \fBTcl_Time\fR;
@@ -53,7 +53,7 @@ typedef struct Tcl_Time {
On return, the \fIsec\fR member of the structure is filled in with the
number of seconds that have elapsed since the \fIepoch:\fR the epoch
is the point in time of 00:00 UTC, 1 January 1970. This number does
-\fInot\fR count leap seconds \- an interval of one day advances it by
+\fInot\fR count leap seconds; an interval of one day advances it by
86400 seconds regardless of whether a leap second has been inserted.
.PP
The \fIusec\fR member of the structure is filled in with the number of
diff --git a/doc/Hash.3 b/doc/Hash.3
index dced52f..e4567a5 100644
--- a/doc/Hash.3
+++ b/doc/Hash.3
@@ -242,7 +242,7 @@ calling \fBTcl_InitCustomHashTable\fR. The \fBTcl_HashKeyType\fR structure is
defined as follows:
.PP
.CS
-typedef struct Tcl_HashKeyType {
+typedef struct {
int \fIversion\fR;
int \fIflags\fR;
Tcl_HashKeyProc *\fIhashKeyProc\fR;
diff --git a/doc/Init.3 b/doc/Init.3
index 575a39d..03e0c97 100644
--- a/doc/Init.3
+++ b/doc/Init.3
@@ -39,13 +39,12 @@ A value of \fINULL\fR may be passed to not register any script.
The pre-initialization script is executed by \fBTcl_Init\fR before accessing
the file system. The purpose is to typically prepare a custom file system
(like an embedded zip-file) to be activated before the search.
-
+.PP
When used in stub-enabled embedders, the stubs table must be first initialized
-using one of \fBTcl_InitSubsystems\fR, \fBTcl_SetPanicProc\fR, \fBTcl_FindExecutable\fR
+using one of \fBTcl_InitSubsystems\fR, \fBTcl_SetPanicProc\fR,
+\fBTcl_FindExecutable\fR
or \fBTclZipfs_AppHook\fR before \fBTcl_SetPreInitScript\fR may be called.
-
.SH "SEE ALSO"
Tcl_AppInit, Tcl_Main
-
.SH KEYWORDS
application, initialization, interpreter
diff --git a/doc/NRE.3 b/doc/NRE.3
index bf757c3..2bf2698 100644
--- a/doc/NRE.3
+++ b/doc/NRE.3
@@ -157,7 +157,7 @@ the routine.
.SH EXAMPLE
.PP
The following command uses \fBTcl_EvalObjEx\fR, which consumes space on the C
-stack, to evalute a script:
+stack, to evaluate a script:
.PP
.CS
int
diff --git a/doc/Notifier.3 b/doc/Notifier.3
index 8041dd8..6aab2e2 100644
--- a/doc/Notifier.3
+++ b/doc/Notifier.3
@@ -255,7 +255,7 @@ a structure that describes a time interval in seconds and
microseconds:
.PP
.CS
-typedef struct Tcl_Time {
+typedef struct {
long long \fIsec\fR;
long \fIusec\fR;
} \fBTcl_Time\fR;
@@ -317,7 +317,7 @@ structure is used when communicating between the event source and the
rest of the notifier. A \fBTcl_Event\fR has the following definition:
.PP
.CS
-typedef struct {
+typedef struct Tcl_Event {
Tcl_EventProc *\fIproc\fR;
struct Tcl_Event *\fInextPtr\fR;
} \fBTcl_Event\fR;
@@ -533,7 +533,7 @@ passing a pointer to a \fBTcl_NotifierProcs\fR data structure. The
structure has the following layout:
.PP
.CS
-typedef struct Tcl_NotifierProcs {
+typedef struct {
Tcl_SetTimerProc *\fIsetTimerProc\fR;
Tcl_WaitForEventProc *\fIwaitForEventProc\fR;
Tcl_CreateFileHandlerProc *\fIcreateFileHandlerProc\fR;
@@ -616,4 +616,5 @@ mode.
Tcl_CreateFileHandler(3), Tcl_DeleteFileHandler(3), Tcl_Sleep(3),
Tcl_DoOneEvent(3), Thread(3)
.SH KEYWORDS
-event, notifier, event queue, event sources, file events, timer, idle, service mode, threads
+event, notifier, event queue, event sources, file events, timer, idle,
+service mode, threads
diff --git a/doc/Object.3 b/doc/Object.3
index d14124f..0f52a51 100644
--- a/doc/Object.3
+++ b/doc/Object.3
@@ -113,7 +113,7 @@ Each Tcl value is represented by a \fBTcl_Obj\fR structure
which is defined as follows.
.PP
.CS
-typedef struct Tcl_Obj {
+typedef struct {
Tcl_Size \fIrefCount\fR;
char *\fIbytes\fR;
Tcl_Size \fIlength\fR;
@@ -294,10 +294,11 @@ that the target list or dictionary be well-formed, but that is
often easy to arrange when the value is being initially constructed.)
The macro \fBTcl_IncrRefCount\fR increments the reference count when a
new reference to the value is created.
-The macro \fBTcl_DecrRefCount\fR decrements the count when a reference is no longer needed.
-If the value's reference count drops to zero, frees
+The macro \fBTcl_DecrRefCount\fR decrements the count when a reference
+is no longer needed. If the value's reference count drops to zero, frees
its storage.
-The macro \fBTcl_BounceRefCount\fR will check if the value has no references (i.e. in a "new" state) and free the value.
+The macro \fBTcl_BounceRefCount\fR will check if the value has no
+references (i.e. in a "new" state) and free the value.
A value shared by different code or data structures has
\fIrefCount\fR greater than 1. Incrementing a value's reference count
ensures that it will not be freed too early or have its value change
diff --git a/doc/ObjectType.3 b/doc/ObjectType.3
index 3b4782d..62104a8 100644
--- a/doc/ObjectType.3
+++ b/doc/ObjectType.3
@@ -103,7 +103,7 @@ extensions to look up their Tcl_ObjType by name with the
defined as follows:
.PP
.CS
-typedef struct Tcl_ObjType {
+typedef struct {
const char *\fIname\fR;
Tcl_FreeInternalRepProc *\fIfreeIntRepProc\fR;
Tcl_DupInternalRepProc *\fIdupIntRepProc\fR;
@@ -216,7 +216,6 @@ The \fIdupIntRepProc\fR member contains the address of a function
called to copy an internal representation from one value to another.
.PP
.CS
-
typedef void \fBTcl_DupInternalRepProc\fR(
Tcl_Obj *\fIsrcPtr\fR,
Tcl_Obj *\fIdupPtr\fR);
@@ -240,7 +239,6 @@ The \fIfreeIntRepProc\fR member contains the address of a function
that is called when a value is freed.
.PP
.CS
-
typedef void \fBTcl_FreeInternalRepProc\fR(
Tcl_Obj *\fIobjPtr\fR);
.CE
@@ -269,7 +267,7 @@ before the outermost current \fBTcl_DecrRefCount\fR returns.
.SS "THE VERSION FIELD"
.PP
The \fIversion\fR member provides for future extensibility of the
-structure and should be set to \fBTCL_OBJTYPE_V0\fR for compatability
+structure and should be set to \fBTCL_OBJTYPE_V0\fR for compatibility
of ObjType definitions prior to version 9.0. Specifics about versions
will be described further in the sections below.
.SH "ABSTRACT LIST TYPES"
@@ -302,11 +300,9 @@ C API. The function returns the number of elements in the list. It
is used in every List operation and is required for all Abstract List
implementations.
.CS
-
typedef Tcl_Size
(Tcl_ObjTypeLengthProc) (Tcl_Obj *listPtr);
.CE
-
.PP
.SS "THE INDEXPROC FIELD"
.PP
@@ -314,9 +310,7 @@ The \fBIndexProc\fR function correlates with with the
\fBTcl_ListObjIndex\fR C API. The function returns a Tcl_Obj value for
the element at the specified index.
.CS
-
-typedef int
-(Tcl_ObjTypeIndexProc) (
+typedef int (\fBTcl_ObjTypeIndexProc\fR) (
Tcl_Interp *interp,
Tcl_Obj *listPtr,
Tcl_Size index,
@@ -326,11 +320,9 @@ typedef int
.PP
The \fBSliceProc\fR correlates with the \fBlrange\fR command,
returning a new List or Abstract List for the portion of the original
-list specifed.
+list specified.
.CS
-
-typedef int
-(Tcl_ObjTypeSliceProc) (
+typedef int (\fBTcl_ObjTypeSliceProc\fR) (
Tcl_Interp *interp,
Tcl_Obj *listPtr,
Tcl_Size fromIdx,
@@ -343,9 +335,7 @@ The \fBReverseProc\fR correlates with the \fBlreverse\fR command,
returning a List or Abstract List that has the same elements as the
input Abstract List, with the elements in the reverse order.
.CS
-
-typedef int
-(Tcl_ObjTypeReverseProc) (
+typedef int (\fBTcl_ObjTypeReverseProc\fR) (
Tcl_Interp *interp,
Tcl_Obj *listPtr,
Tcl_Obj **newObjPtr);
@@ -353,12 +343,10 @@ typedef int
.SS "THE GETELEMENTS FIELD"
.PP
The \fBGetElements\fR function returns a count and a pointer to an
-array of Tcl_Obj values for the entire Abstract List. This is a
-correlary to the \fBTcl_ListObjGetElements\fR C API call.
+array of Tcl_Obj values for the entire Abstract List. This
+correlates to the \fBTcl_ListObjGetElements\fR C API call.
.CS
-
-typedef int
-(Tcl_ObjTypeGetElements) (
+typedef int (\fBTcl_ObjTypeGetElements\fR) (
Tcl_Interp *interp,
Tcl_Obj *listPtr,
Tcl_Size *objcptr,
@@ -370,9 +358,7 @@ The \fBSetElement\fR function replaces the element within the
specified list at the give index. This function correlates to the
\fBlset\fR command.
.CS
-
-typedef Tcl_Obj*
-Tcl_ObjTypeSetElement) (
+typedef Tcl_Obj *(\fBTcl_ObjTypeSetElement\fR) (
Tcl_Interp *interp,
Tcl_Obj *listPtr,
Tcl_Size indexCount,
@@ -381,13 +367,11 @@ Tcl_ObjTypeSetElement) (
.CE
.SS "REPLACEPROC FIELD"
.PP
-The \fBReplaceProc\fR returns a new list after modfying the list
+The \fBReplaceProc\fR returns a new list after modifying the list
replacing the elements to be deleted, and adding the elements to be
inserted. This function correlates to the \fBTcl_ListObjReplace\fR C API.
.CS
-
-typedef int
-(Tcl_ObjTypeReplaceProc) (
+typedef int (\fBTcl_ObjTypeReplaceProc\fR) (
Tcl_Interp *interp,
Tcl_Obj *listObj,
Tcl_Size first,
@@ -395,7 +379,7 @@ typedef int
Tcl_Size numToInsert,
Tcl_Obj *const insertObjs[]);
.CE
-.SS "THE INOPERATORPROC FIELD"
+.SS "THE INOPERPROC FIELD"
.PP
The \fBInOperProc\fR function determines whether the value is present in the
given list, according to equivalent string comparison of elements. The
@@ -403,9 +387,7 @@ given list, according to equivalent string comparison of elements. The
(false) if it is not present. This function implements the "in" and
"ni" math operators for an abstract list.
.CS
-
-typedef int
-(Tcl_ObjTypeInOperatorProc) (
+typedef int (\fBTcl_ObjTypeInOperatorProc\fR) (
Tcl_Interp *interp,
Tcl_Obj *valueObj,
Tcl_Obj *listObj,
@@ -431,4 +413,5 @@ then those subsidiary values may have their reference counts modified.
.SH "SEE ALSO"
Tcl_NewObj(3), Tcl_DecrRefCount(3), Tcl_IncrRefCount(3), Tcl_BounceRefCount(3)
.SH KEYWORDS
-internal representation, value, value type, string representation, type conversion
+internal representation, value, value type, string representation,
+type conversion
diff --git a/doc/OpenFileChnl.3 b/doc/OpenFileChnl.3
index db25ce2..59364e0 100644
--- a/doc/OpenFileChnl.3
+++ b/doc/OpenFileChnl.3
@@ -390,7 +390,7 @@ If the channel is being closed synchronously and an error occurs during
closing of the channel and \fIinterp\fR is not NULL, an error message is
left in the interpreter's result.
.PP
-Note: it is not safe to call \fBTcl_Close\fR on a channel that has been
+Note that it is not safe to call \fBTcl_Close\fR on a channel that has been
registered using \fBTcl_RegisterChannel\fR; see the documentation for
\fBTcl_RegisterChannel\fR, above, for details. If the channel has ever
been given as the \fBchan\fR argument in a call to
diff --git a/doc/OpenTcp.3 b/doc/OpenTcp.3
index 3e62363..709a8fc 100644
--- a/doc/OpenTcp.3
+++ b/doc/OpenTcp.3
@@ -51,7 +51,7 @@ If nonzero, the client socket is connected asynchronously to the server.
Length of OS listen backlog queue. Use -1 for default value.
.AP "unsigned int" flags in
ORed combination of \fBTCL_TCPSERVER_*\fR flags that specify additional
-informations about the socket being created.
+information about the socket being created.
.AP void *sock in
Platform-specific handle for client TCP socket.
.AP Tcl_TcpAcceptProc *proc in
diff --git a/doc/ParseArgs.3 b/doc/ParseArgs.3
index 7c7b08e..edc0bc0 100644
--- a/doc/ParseArgs.3
+++ b/doc/ParseArgs.3
@@ -63,20 +63,14 @@ The collection of arguments to be parsed is described by the \fIargTable\fR
parameter. This points to a table of descriptor structures that is terminated
by an entry with the \fItype\fR field set to TCL_ARGV_END. As convenience, the
following prototypical entries are provided:
-.TP
-\fBTCL_ARGV_AUTO_HELP\fR
-.
+.IP \fBTCL_ARGV_AUTO_HELP\fR
Enables the argument processor to provide help when passed the argument
.QW \fB\-help\fR .
-.TP
-\fBTCL_ARGV_AUTO_REST\fR
-.
+.IP \fBTCL_ARGV_AUTO_REST\fR
Instructs the argument processor that arguments after
.QW \fB\-\-\fR
are to be unprocessed.
-.TP
-\fBTCL_ARGV_TABLE_END\fR
-.
+.IP \fBTCL_ARGV_TABLE_END\fR
Marks the end of the table of argument descriptors.
.SS "ARGUMENT DESCRIPTOR ENTRIES"
.PP
@@ -105,27 +99,19 @@ users when they request it.
As noted above, the \fItype\fR field is used to describe the interpretation of
the argument's value. The following values are acceptable values for
\fItype\fR:
-.TP
-\fBTCL_ARGV_CONSTANT\fR
-.
+.IP \fBTCL_ARGV_CONSTANT\fR
The argument does not take any following value argument. If this argument is
present, the (integer) value of the \fIsrcPtr\fR field is copied to the variable
pointed to by the \fIdstPtr\fR field. The \fIclientData\fR field is ignored.
-.TP
-\fBTCL_ARGV_END\fR
-.
+.IP \fBTCL_ARGV_END\fR
This value marks the end of all option descriptors in the table. All other
fields are ignored.
-.TP
-\fBTCL_ARGV_FLOAT\fR
-.
+.IP \fBTCL_ARGV_FLOAT\fR
This argument takes a following floating point value argument. The value (once
parsed by \fBTcl_GetDoubleFromObj\fR) will be stored as a double-precision
value in the variable pointed to by the \fIdstPtr\fR field. The \fIsrcPtr\fR
and \fIclientData\fR fields are ignored.
-.TP
-\fBTCL_ARGV_FUNC\fR
-.
+.IP \fBTCL_ARGV_FUNC\fR
This argument optionally takes a following value argument; it is up to the
handler callback function passed in \fIsrcPtr\fR to decide. That function will
have the following signature:
@@ -144,9 +130,7 @@ argument. The \fIclientData\fR is the value from the table entry, the
there are no following arguments at all, and the \fIdstPtr\fR argument to the
\fBTcl_ArgvFuncProc\fR is the location to write the parsed value to.
.RE
-.TP
-\fBTCL_ARGV_GENFUNC\fR
-.
+.IP \fBTCL_ARGV_GENFUNC\fR
This argument takes zero or more following arguments; the handler callback
function passed in \fIsrcPtr\fR returns how many (or a negative number to
signal an error, in which case it should also set the interpreter result). The
@@ -168,28 +152,20 @@ argument, \fIobjc\fR and \fIobjv\fR describe an array of all the remaining
arguments, and \fIdstPtr\fR argument to the \fBTcl_ArgvGenFuncProc\fR is the
location to write the parsed value (or values) to.
.RE
-.TP
-\fBTCL_ARGV_HELP\fR
-.
+.IP \fBTCL_ARGV_HELP\fR
This special argument does not take any following value argument, but instead
causes \fBTcl_ParseArgsObjv\fR to generate an error message describing the
arguments supported. All other fields except the \fIhelpStr\fR field are
ignored.
-.TP
-\fBTCL_ARGV_INT\fR
-.
+.IP \fBTCL_ARGV_INT\fR
This argument takes a following integer value argument. The value (once parsed
by \fBTcl_GetIntFromObj\fR) will be stored as an int in the variable pointed
to by the \fIdstPtr\fR field. The \fIsrcPtr\fR field is ignored.
-.TP
-\fBTCL_ARGV_REST\fR
-.
+.IP \fBTCL_ARGV_REST\fR
This special argument does not take any following value argument, but instead
marks all following arguments to be left unprocessed. The \fIsrcPtr\fR,
\fIdstPtr\fR and \fIclientData\fR fields are ignored.
-.TP
-\fBTCL_ARGV_STRING\fR
-.
+.IP \fBTCL_ARGV_STRING\fR
This argument takes a following string value argument. A pointer to the string
will be stored at \fIdstPtr\fR; the string inside will have a lifetime linked
to the lifetime of the string representation of the argument value that it
diff --git a/doc/ParseCmd.3 b/doc/ParseCmd.3
index 0e2c3b4..cdce96c 100644
--- a/doc/ParseCmd.3
+++ b/doc/ParseCmd.3
@@ -195,7 +195,7 @@ result; it can be retrieved using \fBTcl_GetObjResult\fR.
return parse information in two data structures, Tcl_Parse and Tcl_Token:
.PP
.CS
-typedef struct Tcl_Parse {
+typedef struct {
const char *\fIcommentStart\fR;
Tcl_Size \fIcommentSize\fR;
const char *\fIcommandStart\fR;
@@ -206,7 +206,7 @@ typedef struct Tcl_Parse {
...
} \fBTcl_Parse\fR;
-typedef struct Tcl_Token {
+typedef struct {
int \fItype\fR;
const char *\fIstart\fR;
Tcl_Size \fIsize\fR;
@@ -220,8 +220,7 @@ These fields are not used by the other parsing procedures.
.PP
\fBTcl_ParseCommand\fR fills in a Tcl_Parse structure
with information that describes one Tcl command and any comments that
-precede the command.
-If there are comments,
+precede the command. If there are comments,
the \fIcommentStart\fR field points to the \fB#\fR character that begins
the first comment and \fIcommentSize\fR indicates the number of bytes
in all of the comments preceding the command, including the newline
@@ -251,9 +250,7 @@ such as \fBTCL_TOKEN_WORD\fR and \fBTCL_TOKEN_VARIABLE\fR, consist of
several component tokens, which immediately follow the parent token;
the \fInumComponents\fR field describes how many of these there are.
The \fItype\fR field has one of the following values:
-.TP 20
-\fBTCL_TOKEN_WORD\fR
-.
+.IP \fBTCL_TOKEN_WORD\fR
This token ordinarily describes one word of a command
but it may also describe a quoted or braced string in an expression.
The token describes a component of the script that is
@@ -266,42 +263,30 @@ space, semicolon, close bracket, close quote, or close brace that
terminates the component. The \fInumComponents\fR field counts the total
number of sub-tokens that make up the word, including sub-tokens
of \fBTCL_TOKEN_VARIABLE\fR and \fBTCL_TOKEN_BS\fR tokens.
-.TP
-\fBTCL_TOKEN_SIMPLE_WORD\fR
-.
+.IP \fBTCL_TOKEN_SIMPLE_WORD\fR
This token has the same meaning as \fBTCL_TOKEN_WORD\fR, except that
the word is guaranteed to consist of a single \fBTCL_TOKEN_TEXT\fR
sub-token. The \fInumComponents\fR field is always 1.
-.TP
-\fBTCL_TOKEN_EXPAND_WORD\fR
-.
+.IP \fBTCL_TOKEN_EXPAND_WORD\fR
This token has the same meaning as \fBTCL_TOKEN_WORD\fR, except that
the command parser notes this word began with the expansion
prefix \fB{*}\fR, indicating that after substitution,
the list value of this word should be expanded to form multiple
arguments in command evaluation. This
token type can only be created by Tcl_ParseCommand.
-.TP
-\fBTCL_TOKEN_TEXT\fR
-.
+.IP \fBTCL_TOKEN_TEXT\fR
The token describes a range of literal text that is part of a word.
The \fInumComponents\fR field is always 0.
-.TP
-\fBTCL_TOKEN_BS\fR
-.
+.IP \fBTCL_TOKEN_BS\fR
The token describes a backslash sequence such as \fB\en\fR or \fB\e0xA3\fR.
The \fInumComponents\fR field is always 0.
-.TP
-\fBTCL_TOKEN_COMMAND\fR
-.
+.IP \fBTCL_TOKEN_COMMAND\fR
The token describes a command whose result must be substituted into
the word. The token includes the square brackets that surround the
command. The \fInumComponents\fR field is always 0 (the nested command
is not parsed; call \fBTcl_ParseCommand\fR recursively if you want to
see its tokens).
-.TP
-\fBTCL_TOKEN_VARIABLE\fR
-.
+.IP \fBTCL_TOKEN_VARIABLE\fR
The token describes a variable substitution, including the
\fB$\fR, variable name, and array index (if there is one) up through the
close parenthesis that terminates the index. This token is followed
@@ -315,9 +300,7 @@ token giving the array name and the remaining sub-tokens are
\fBTCL_TOKEN_VARIABLE\fR tokens that must be concatenated to produce the
array index. The \fInumComponents\fR field includes nested sub-tokens
that are part of \fBTCL_TOKEN_VARIABLE\fR tokens in the array index.
-.TP
-\fBTCL_TOKEN_SUB_EXPR\fR
-.
+.IP \fBTCL_TOKEN_SUB_EXPR\fR
The token describes one subexpression of an expression
(or an entire expression).
A subexpression may consist of a value
@@ -342,9 +325,7 @@ one of the token types \fBTCL_TOKEN_WORD\fR, \fBTCL_TOKEN_TEXT\fR,
The \fInumComponents\fR field
counts the total number of sub-tokens that make up the subexpression;
this includes the sub-tokens for any nested \fBTCL_TOKEN_SUB_EXPR\fR tokens.
-.TP
-\fBTCL_TOKEN_OPERATOR\fR
-.
+.IP \fBTCL_TOKEN_OPERATOR\fR
The token describes one operator of an expression
such as \fB&&\fR or \fBhypot\fR.
A \fBTCL_TOKEN_OPERATOR\fR token is always preceded by a
@@ -451,4 +432,5 @@ There are additional fields in the Tcl_Parse structure after the
\fBTcl_ParseQuotedString\fR, and \fBTcl_ParseVarName\fR; they should not be
referenced by code outside of these procedures.
.SH KEYWORDS
-backslash substitution, braces, command, expression, parse, token, variable substitution
+backslash substitution, braces, command, expression, parse, token,
+variable substitution
diff --git a/doc/RegConfig.3 b/doc/RegConfig.3
index 09ae116..f2bd2e3 100644
--- a/doc/RegConfig.3
+++ b/doc/RegConfig.3
@@ -86,20 +86,23 @@ their associated values can be retrieved through calls to
The command \fBpkgconfig\fR will provide two subcommands, \fBlist\fR
and \fBget\fR:
.RS
+.\" METHOD: list
.TP
::\fIpkgName\fR::\fBpkgconfig\fR list
+.
Returns a list containing the names of all defined keys.
+.\" METHOD: get
.TP
::\fIpkgName\fR::\fBpkgconfig\fR get \fIkey\fR
-Returns the configuration value associated with the specified
-\fIkey\fR.
+.
+Returns the configuration value associated with the specified \fIkey\fR.
.RE
.SH TCL_CONFIG
.PP
The \fBTcl_Config\fR structure contains the following fields:
.PP
.CS
-typedef struct Tcl_Config {
+typedef struct {
const char *\fIkey\fR;
const char *\fIvalue\fR;
} \fBTcl_Config\fR;
diff --git a/doc/RegExp.3 b/doc/RegExp.3
index 35b14a2..114bbbb 100644
--- a/doc/RegExp.3
+++ b/doc/RegExp.3
@@ -122,7 +122,7 @@ used in subsequent calls to \fBTcl_RegExpExec\fR or \fBTcl_RegExpRange\fR.
If an error occurs while compiling the regular expression then
\fBTcl_RegExpCompile\fR returns NULL and leaves an error message
in the interpreter result.
-Note: the return value from \fBTcl_RegExpCompile\fR is only valid
+Note that the return value from \fBTcl_RegExpCompile\fR is only valid
up to the next call to \fBTcl_RegExpCompile\fR; it is not safe to
retain these values for long periods of time.
.PP
@@ -188,6 +188,7 @@ zero or more of the following flags that control the compilation of
.RS 2
.TP
\fBTCL_REG_ADVANCED\fR
+.
Compile advanced regular expressions
.PQ ARE s .
This mode corresponds to
@@ -195,6 +196,7 @@ the normal regular expression syntax accepted by the Tcl \fBregexp\fR and
\fBregsub\fR commands.
.TP
\fBTCL_REG_EXTENDED\fR
+.
Compile extended regular expressions
.PQ ERE s .
This mode corresponds
@@ -202,6 +204,7 @@ to the regular expression syntax recognized by Tcl 8.0 and earlier
versions.
.TP
\fBTCL_REG_BASIC\fR
+.
Compile basic regular expressions
.PQ BRE s .
This mode corresponds
@@ -210,18 +213,22 @@ like \fBsed\fR and \fBgrep\fR. This is the default if no flags are
specified.
.TP
\fBTCL_REG_EXPANDED\fR
+.
Compile the regular expression (basic, extended, or advanced) using an
expanded syntax that allows comments and whitespace. This mode causes
non-backslashed non-bracket-expression white
space and #-to-end-of-line comments to be ignored.
.TP
\fBTCL_REG_QUOTE\fR
+.
Compile a literal string, with all characters treated as ordinary characters.
.TP
\fBTCL_REG_NOCASE\fR
+.
Compile for matching that ignores upper/lower case distinctions.
.TP
\fBTCL_REG_NEWLINE\fR
+.
Compile for newline-sensitive matching. By default, newline is a
completely ordinary character with no special meaning in either
regular expressions or strings. With this flag,
@@ -239,6 +246,7 @@ an empty string before any newline in addition to its normal function.
\fBREG_NLANCH\fR.
.TP
\fBTCL_REG_NLSTOP\fR
+.
Compile for partial newline-sensitive matching,
with the behavior of
.QW [^
@@ -255,6 +263,7 @@ bracket expressions and
never match newline.
.TP
\fBTCL_REG_NLANCH\fR
+.
Compile for inverse partial newline-sensitive matching,
with the behavior of
.QW ^
@@ -275,12 +284,14 @@ matches
an empty string before any newline in addition to its normal function.
.TP
\fBTCL_REG_NOSUB\fR
+.
Compile for matching that reports only success or failure,
not what was matched. This reduces compile overhead and may improve
performance. Subsequent calls to \fBTcl_RegExpGetInfo\fR or
\fBTcl_RegExpRange\fR will not report any match information.
.TP
\fBTCL_REG_CANMATCH\fR
+.
Compile for matching that reports the potential to complete a partial
match given more text (see below).
.RE
@@ -310,6 +321,7 @@ zero or more of the following flags:
.RS 2
.TP
\fBTCL_REG_NOTBOL\fR
+.
The starting character will not be treated as the beginning of a
line or the beginning of the string, so
.QW ^
@@ -319,6 +331,7 @@ Note that this flag has no effect on how
matches.
.TP
\fBTCL_REG_NOTEOL\fR
+.
The last character in the string will not be treated as the end of a
line or the end of the string, so
.QW $
@@ -334,7 +347,7 @@ performed with a given regular expression \fIregexp\fR. The
defined as follows:
.PP
.CS
-typedef struct Tcl_RegExpInfo {
+typedef struct {
Tcl_Size \fInsubs\fR;
Tcl_RegExpIndices *\fImatches\fR;
Tcl_Size \fIextendStart\fR;
@@ -352,7 +365,7 @@ appear in the pattern. Each element is a structure that is defined as
follows:
.PP
.CS
-typedef struct Tcl_RegExpIndices {
+typedef struct {
Tcl_Size \fIstart\fR;
Tcl_Size \fIend\fR;
} \fBTcl_RegExpIndices\fR;
@@ -394,4 +407,5 @@ additional reference being taken.
.SH "SEE ALSO"
re_syntax(n)
.SH KEYWORDS
-match, pattern, regular expression, string, subexpression, Tcl_RegExpIndices, Tcl_RegExpInfo
+match, pattern, regular expression, string, subexpression,
+Tcl_RegExpIndices, Tcl_RegExpInfo
diff --git a/doc/SetVar.3 b/doc/SetVar.3
index ad4773e..c34e55f 100644
--- a/doc/SetVar.3
+++ b/doc/SetVar.3
@@ -169,6 +169,7 @@ options to the procedures.
It consists of an OR-ed combination of the following bits.
.TP
\fBTCL_GLOBAL_ONLY\fR
+.
Under normal circumstances the procedures look up variables as follows.
If a procedure call is active in \fIinterp\fR,
the variable is looked up at the current level of procedure call.
@@ -181,12 +182,14 @@ If both \fBTCL_GLOBAL_ONLY\fR and \fBTCL_NAMESPACE_ONLY\fR are given,
\fBTCL_GLOBAL_ONLY\fR is ignored.
.TP
\fBTCL_NAMESPACE_ONLY\fR
+.
If this bit is set in \fIflags\fR then the variable
is looked up only in the current namespace; if a procedure is active
its variables are ignored, and the global namespace is also ignored unless
it is the current namespace.
.TP
\fBTCL_LEAVE_ERR_MSG\fR
+.
If an error is returned and this bit is set in \fIflags\fR, then
an error message will be left in the interpreter's result,
where it can be retrieved with \fBTcl_GetObjResult\fR
@@ -195,12 +198,14 @@ If this flag bit is not set then no error message is left
and the interpreter's result will not be modified.
.TP
\fBTCL_APPEND_VALUE\fR
+.
If this bit is set then \fInewValuePtr\fR or \fInewValue\fR is
appended to the current value instead of replacing it.
If the variable is currently undefined, then the bit is ignored.
This bit is only used by the \fBTcl_Set*\fR procedures.
.TP
\fBTCL_LIST_ELEMENT\fR
+.
If this bit is set, then \fInewValue\fR is converted to a valid
Tcl list element before setting (or appending to) the variable.
A separator space is appended before the new list element unless
diff --git a/doc/StdChannels.3 b/doc/StdChannels.3
index d3ecff2..e22e326 100644
--- a/doc/StdChannels.3
+++ b/doc/StdChannels.3
@@ -45,8 +45,7 @@ standard channels. (A channel is not
if it could not be
successfully opened; for example, in a Tcl application run as a
Windows NT service.)
-.TP
-1)
+.IP 1)
A single standard channel is initialized when it is explicitly
specified in a call to \fBTcl_SetStdChannel\fR. The states of the
other standard channels are unaffected.
@@ -55,17 +54,14 @@ other standard channels are unaffected.
Missing platform-specific standard channels do not matter here. This
approach is not available at the script level.
.RE
-.TP
-2)
+.IP 2)
All uninitialized standard channels are initialized to
platform-specific default values:
.RS
-.TP
-(a)
+.IP (a)
when open channels are listed with \fBTcl_GetChannelNames\fR (or the
\fBfile channels\fR script command), or
-.TP
-(b)
+.IP (b)
when information about any standard channel is requested with a call
to \fBTcl_GetStdChannel\fR, or with a call to \fBTcl_GetChannel\fR
which specifies one of the standard names (\fBstdin\fR, \fBstdout\fR
@@ -76,8 +72,7 @@ standard channels are considered as initialized and then immediately
closed. This means that the first three Tcl channels then opened by
the application are designated as the Tcl standard channels.
.RE
-.TP
-3)
+.IP 3)
All uninitialized standard channels are initialized to
platform-specific default values when a user-requested channel is
registered with \fBTcl_RegisterChannel\fR.
diff --git a/doc/StringObj.3 b/doc/StringObj.3
index cb81559..817ed34 100644
--- a/doc/StringObj.3
+++ b/doc/StringObj.3
@@ -116,7 +116,8 @@ of a value's string representation.
May be (Tcl_Size *)NULL when not used. If it points to a variable which
type is not \fBTcl_Size\fR, a compiler warning will be generated.
If your extensions is compiled with -DTCL_8_API, this function will
-panic for strings with more than INT_MAX bytes/characters, otherwise expect it to crash.
+panic for strings with more than INT_MAX bytes/characters, otherwise
+expect it to crash.
.AP "const char" *string in
Null-terminated string value to append to \fIobjPtr\fR.
.AP Tcl_Size limit in
diff --git a/doc/Tcl.n b/doc/Tcl.n
index 0bceca6..fbe77bc 100644
--- a/doc/Tcl.n
+++ b/doc/Tcl.n
@@ -114,6 +114,7 @@ variable within an array variable, and may be empty.
\fIname\fR may be empty. Substitutions are performed on \fIindex\fR.
.TP 15
\fB${\fIname\fB}\fR
+.
\fIname\fR may be empty.
.TP 15
\fB${\fIname(index)\fB}\fR
@@ -135,24 +136,31 @@ are replaced as described:
.RS
.TP 7
\e\fBa\fR
+.
Audible alert (bell) (U+7).
.TP 7
\e\fBb\fR
+.
Backspace (U+8).
.TP 7
\e\fBf\fR
+.
Form feed (U+C).
.TP 7
\e\fBn\fR
+.
Newline (U+A).
.TP 7
\e\fBr\fR
+.
Carriage-return (U+D).
.TP 7
\e\fBt\fR
+.
Tab (U+9).
.TP 7
\e\fBv\fR
+.
Vertical tab (U+B).
.TP 7
\e\fB<newline>\fIwhiteSpace\fR
@@ -164,6 +172,7 @@ within braced words, and if the resulting space may subsequently be treated as
a word delimiter.
.TP 7
\e\e
+.
Backslash
.PQ \e "" .
.TP 7
diff --git a/doc/TclZlib.3 b/doc/TclZlib.3
index efbe07b..d14ba48 100644
--- a/doc/TclZlib.3
+++ b/doc/TclZlib.3
@@ -219,47 +219,33 @@ an unshared dictionary value).
.PP
The following fields in the dictionary value are understood. All other fields
are ignored. No field is required when creating a gzip-format stream.
-.TP
-\fBcomment\fR
-.
+.IP \fBcomment\fR
This holds the comment field of the header, if present. If absent, no comment
was supplied (on decompression) or will be created (on compression).
-.TP
-\fBcrc\fR
-.
+.IP \fBcrc\fR
A boolean value describing whether a CRC of the header is computed. Note that
the \fBgzip\fR program does \fInot\fR use or allow a CRC on the header.
-.TP
-\fBfilename\fR
-.
+.IP \fBfilename\fR
The name of the file that held the uncompressed data. This should not contain
any directory separators, and should be sanitized before use on decompression
with \fBfile tail\fR.
-.TP
-\fBos\fR
-.
+.IP \fBos\fR
The operating system type code field from the header (if not the
.QW unknown
value). See RFC 1952 for the meaning of these codes. On compression, if this
is absent then the field will be set to the
.QW unknown
value.
-.TP
-\fBsize\fR
-.
+.IP \fBsize\fR
The size of the uncompressed data. This is ignored on compression; the size
of the data compressed depends on how much data is supplied to the
compression engine.
-.TP
-\fBtime\fR
-.
+.IP \fBtime\fR
The time field from the header if non-zero, expected to be the time that the
file named by the \fBfilename\fR field was modified. Suitable for use with
\fBclock format\fR. On creation, the right value to use is that from
\fBclock seconds\fR or \fBfile mtime\fR.
-.TP
-\fBtype\fR
-.
+.IP \fBtype\fR
The type of the uncompressed data (either \fBbinary\fR or \fBtext\fR) if
known.
.SH "REFERENCE COUNT MANAGEMENT"
diff --git a/doc/TraceCmd.3 b/doc/TraceCmd.3
index d5de5a9..c1f2cbb 100644
--- a/doc/TraceCmd.3
+++ b/doc/TraceCmd.3
@@ -54,9 +54,11 @@ trace procedure is to be invoked. It consists of an OR'ed combination
of any of the following values:
.TP
\fBTCL_TRACE_RENAME\fR
+.
Invoke \fIproc\fR whenever the command is renamed.
.TP
\fBTCL_TRACE_DELETE\fR
+.
Invoke \fIproc\fR when the command is deleted.
.PP
Whenever one of the specified operations occurs to the command,
diff --git a/doc/TraceVar.3 b/doc/TraceVar.3
index 2c572d3..3fb3ab6 100644
--- a/doc/TraceVar.3
+++ b/doc/TraceVar.3
@@ -77,22 +77,27 @@ for setting up the trace. It consists of an OR-ed combination
of any of the following values:
.TP
\fBTCL_GLOBAL_ONLY\fR
+.
Normally, the variable will be looked up at the current level of
procedure call; if this bit is set then the variable will be looked
up at global level, ignoring any active procedures.
.TP
\fBTCL_NAMESPACE_ONLY\fR
+.
Normally, the variable will be looked up at the current level of
procedure call; if this bit is set then the variable will be looked
up in the current namespace, ignoring any active procedures.
.TP
\fBTCL_TRACE_READS\fR
+.
Invoke \fIproc\fR whenever an attempt is made to read the variable.
.TP
\fBTCL_TRACE_WRITES\fR
+.
Invoke \fIproc\fR whenever an attempt is made to modify the variable.
.TP
\fBTCL_TRACE_UNSETS\fR
+.
Invoke \fIproc\fR whenever the variable is unset.
A variable may be unset either explicitly by an \fBunset\fR command,
or implicitly when a procedure returns (its local variables are
@@ -100,18 +105,21 @@ automatically unset) or when the interpreter or namespace is deleted (all
variables are automatically unset).
.TP
\fBTCL_TRACE_ARRAY\fR
+.
Invoke \fIproc\fR whenever the array command is invoked.
This gives the trace procedure a chance to update the array before
array names or array get is called. Note that this is called
before an array set, but that will trigger write traces.
.TP
\fBTCL_TRACE_RESULT_DYNAMIC\fR
+.
The result of invoking the \fIproc\fR is a dynamically allocated
string that will be released by the Tcl library via a call to
\fBTcl_Free\fR. Must not be specified at the same time as
\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
diff --git a/doc/UniCharIsAlpha.3 b/doc/UniCharIsAlpha.3
index 1f70f6d..4ae4612 100644
--- a/doc/UniCharIsAlpha.3
+++ b/doc/UniCharIsAlpha.3
@@ -65,28 +65,34 @@ with the various routines.
.SH "CHARACTER CLASSES"
.PP
-\fBTcl_UniCharIsAlnum\fR tests if the character is an alphanumeric Unicode character.
+\fBTcl_UniCharIsAlnum\fR tests if the character is an alphanumeric Unicode
+character.
.PP
-\fBTcl_UniCharIsAlpha\fR tests if the character is an alphabetic Unicode character.
+\fBTcl_UniCharIsAlpha\fR tests if the character is an alphabetic Unicode
+character.
.PP
\fBTcl_UniCharIsControl\fR tests if the character is a Unicode control character.
.PP
\fBTcl_UniCharIsDigit\fR tests if the character is a numeric Unicode character.
.PP
-\fBTcl_UniCharIsGraph\fR tests if the character is any Unicode print character except space.
+\fBTcl_UniCharIsGraph\fR tests if the character is any Unicode print character
+except space.
.PP
\fBTcl_UniCharIsLower\fR tests if the character is a lowercase Unicode character.
.PP
\fBTcl_UniCharIsPrint\fR tests if the character is a Unicode print character.
.PP
-\fBTcl_UniCharIsPunct\fR tests if the character is a Unicode punctuation character.
+\fBTcl_UniCharIsPunct\fR tests if the character is a Unicode punctuation
+character.
.PP
-\fBTcl_UniCharIsSpace\fR tests if the character is a whitespace Unicode character.
+\fBTcl_UniCharIsSpace\fR tests if the character is a whitespace Unicode
+character.
.PP
-\fBTcl_UniCharIsUpper\fR tests if the character is an uppercase Unicode character.
+\fBTcl_UniCharIsUpper\fR tests if the character is an uppercase Unicode
+character.
.PP
-\fBTcl_UniCharIsUnicode\fR tests if the character is a Unicode character, not being
-a surrogate or noncharacter.
+\fBTcl_UniCharIsUnicode\fR tests if the character is a Unicode character,
+not being a surrogate or noncharacter.
.PP
\fBTcl_UniCharIsWordChar\fR tests if the character is alphanumeric or
a connector punctuation mark.
diff --git a/doc/WrongNumArgs.3 b/doc/WrongNumArgs.3
index fbd0f59..864d315 100644
--- a/doc/WrongNumArgs.3
+++ b/doc/WrongNumArgs.3
@@ -64,7 +64,7 @@ a subcommand. The command
into an \fIindexObject\fR. If an error occurs in the parsing of the
subcommand we would like to use the full subcommand name rather than
the abbreviation. If the \fBTcl_WrongNumArgs\fR command finds any
-\fIindexObjects\fR in the \fIobjv\fR array it will use the full subcommand
+\fIindexObject\fRs in the \fIobjv\fR array, it will use the full subcommand
name in the error message instead of the abbreviated name that was
originally passed in. Using the above example, let us assume that
\fIbar\fR is actually an abbreviation for \fIbarfly\fR and the value
diff --git a/doc/after.n b/doc/after.n
index b43f2cb..a619935 100644
--- a/doc/after.n
+++ b/doc/after.n
@@ -53,7 +53,7 @@ registered with \fBinterp bgerror\fR.
The \fBafter\fR command returns an identifier that can be used
to cancel the delayed command using \fBafter cancel\fR.
A \fIms\fR value of 0 (or negative) queues the event immediately with
-priority over other event types (if not installed withn an event proc,
+priority over other event types (if not installed with an event proc,
which will wait for next round of events).
.\" METHOD: cancel
.TP
diff --git a/doc/binary.n b/doc/binary.n
index 8793b2f..911e170 100644
--- a/doc/binary.n
+++ b/doc/binary.n
@@ -59,11 +59,13 @@ information.
.RS
.PP
During encoding, the following options are supported:
+.\" OPTION: -maxlen
.TP
\fB\-maxlen \fIlength\fR
.
Indicates that the output should be split into lines of no more than
\fIlength\fR characters. By default, lines are not split.
+.\" OPTION: -wrapchar
.TP
\fB\-wrapchar \fIcharacter\fR
.
@@ -73,6 +75,7 @@ newline character,
.QW \en .
.PP
During decoding, the following options are supported:
+.\" OPTION: -strict
.TP
\fB\-strict\fR
.
@@ -91,6 +94,7 @@ When decoding, upper and lower characters are accepted.
.PP
No options are supported during encoding. During decoding, the following
options are supported:
+.\" OPTION: -strict
.TP
\fB\-strict\fR
.
@@ -107,12 +111,14 @@ largely superseded by the \fBbase64\fR binary encoding.
.PP
During encoding, the following options are supported (though changing them may
produce files that other implementations of decoders cannot process):
+.\" OPTION: -maxlen
.TP
\fB\-maxlen \fIlength\fR
.
Indicates the maximum number of characters to produce for each encoded line.
The valid range is 5 to 85. Line lengths outside that range cannot be
accommodated by the encoding format. The default value is 61.
+.\" OPTION: -wrapchar
.TP
\fB\-wrapchar \fIcharacter\fR
.
@@ -124,6 +130,7 @@ they would generate encoded text that could not be decoded. The default value
is a single newline.
.PP
During decoding, the following options are supported:
+.\" OPTION: -strict
.TP
\fB\-strict\fR
.
@@ -1101,7 +1108,7 @@ base64 and prints them:
set f [open $filename rb]
set data [read $f]
close $f
-puts [\fBbinary encode\fR base64 \-maxlen 64 $data]
+puts [\fBbinary encode\fR base64 -maxlen 64 $data]
.CE
.SH "SEE ALSO"
encoding(n), format(n), scan(n), string(n), tcl_platform(n)
diff --git a/doc/cd.n b/doc/cd.n
index c6d8527..b750807 100644
--- a/doc/cd.n
+++ b/doc/cd.n
@@ -20,6 +20,7 @@ Change the current working directory to \fIdirName\fR, or to the
home directory (as specified in the HOME environment variable) if
\fIdirName\fR is not given.
Returns an empty string.
+.PP
Note that the current working directory is a per-process resource; the
\fBcd\fR command changes the working directory for all interpreters
and all threads.
diff --git a/doc/chan.n b/doc/chan.n
index 5436cc8..b03d6e4 100644
--- a/doc/chan.n
+++ b/doc/chan.n
@@ -105,6 +105,7 @@ The options described below are supported for all channels. Each type of
channel may provide additional options. Those options are described in the
relevant documentation. For example, additional options are documented for
\fBsocket\fR, and also for serial devices at \fBopen\fR.
+.\" OPTION: -blocking
.TP
\fB\-blocking\fI boolean\fR
.
@@ -115,6 +116,7 @@ flush\fR, and \fBchan close\fR take care not to block. Non-blocking mode in
generally requires that the event loop is entered, e.g. by calling
\fBTcl_DoOneEvent\fR or \fBvwait\fR or by using Tk, to give Tcl a chance to
process events on the channel.
+.\" OPTION: -buffering
.TP
\fB\-buffering\fI newValue\fR
.
@@ -125,11 +127,13 @@ character is written. If \fInewValue\fR is \fBnone\fR, output is flushed after
every output operation. For \fBstdin\fR, \fBstdout\fR, and channels that
connect to terminal-like devices, the default value is \fBline\fR. For
\fBstderr\fR the default value is \fBnone\fR.
+.\" OPTION: -buffersize
.TP
\fB\-buffersize\fI newSize\fR
.
\fInewSize\fR, an integer no greater than one million, is the size in bytes of
any input or output buffers subsequently allocated for this channel.
+.\" OPTION: -encoding
.TP
\fB\-encoding\fR ?\fIname\fR?
.
@@ -147,6 +151,7 @@ The encoding of a new channel is the value of \fBencoding system\fR,
which returns the platform- and locale-dependent system encoding used to
interface with the operating system,
.RE
+.\" OPTION: -eofchar
.TP
\fB\-eofchar\fI char\fR
.
@@ -159,6 +164,7 @@ The default value is the empty string. The acceptable range is \ex01 -
\ex7F. A value outside this range results in an error.
.RE
.VS "TCL8.7 TIP656"
+.\" OPTION: -profile
.TP
\fB\-profile\fI profile\fR
.
@@ -168,6 +174,7 @@ rules of that profile. Any failures will result in a channel error. See
\fBPROFILES\fR in the \fBencoding(n)\fR documentation for details about encoding
profiles.
.VE "TCL8.7 TIP656"
+.\" OPTION: -translation
.TP
\fB\-translation\fI translation\fR
.TP
@@ -181,9 +188,9 @@ carriage-return-linefeed sequence is normally used in network connections.
Therefore, on input, e.g. with \fBchan gets\fR and \fBchan read\fR, each
external end-of-line character is translated into a line feed. On
output, e.g. with \fBchan puts\fR, each line feed is translated to the external
-end-of-line character. The default translation, \fBauto\fR, handles all the common
-cases, and \fB\-translation\fR provides explicit control over the end-of-line
-character.
+end-of-line character. The default translation, \fBauto\fR, handles all the
+common cases, and \fB\-translation\fR provides explicit control over the
+end-of-line character.
.RS
.PP
Returns the input translation for a read-only channel, the output translation
@@ -192,18 +199,14 @@ translation for a read-write channel. When two translations are given, they
are the input and output translation, respectively. When only one translation
is given for a read-write channel, it is the translation for both input and
output. The following values are currently supported:
-.TP
-\fBauto\fR
-.
+.IP \fBauto\fR
The default. For input each occurrence of a line feed (\fBlf\fR), carriage
return (\fBcr\fR), or carriage return followed by a line feed (\fBcrlf\fR) is
translated into a line feed. For output, each line feed is translated into a
platform-specific representation: For all Unix variants it is \fBlf\fR, and
for all Windows variants it is \fBcrlf\fR, except that for sockets on all
platforms it is \fBcrlf\fR for both input and output.
-.TP
-\fBbinary\fR
-.
+.IP \fBbinary\fR
Like \fBlf\fR, no end-of-line translation is performed, but in addition, sets
\fB\-eofchar\fR to the empty string to disable it, and sets \fB\-encoding\fR
to \fBiso8859-1\fR. With this one setting, a channel is fully configured
@@ -214,24 +217,18 @@ makes it possible to work seamlessly with binary data as long as each character
in the data remains in the range of 0 to 255 so that there is no distinction
between binary data and text. For example, A JPEG image can be read from a
such a channel, manipulated, and then written back to such a channel.
-.TP
-\fBcr\fR
-.
+.IP \fBcr\fR
The end of a line is represented in the external data by a single carriage
return character. For input, each carriage return is translated to a line
feed, and for output each line feed character is translated to a carriage
return.
-.TP
-\fBcrlf\fR
-.
+.IP \fBcrlf\fR
The end of a line is represented in the external data by a carriage return
character followed by a line feed. For input, each carriage-return-linefeed
sequence is translated to a line feed. For output, each line feed is
translated to a carriage-return-linefeed sequence. This translation is
typically used for network connections, and also on Windows systems.
-.TP
-\fBlf\fR
-.
+.IP \fBlf\fR
The end of a line in the external data is represented by a line feed so no
translations occur during either input or output. This translation is
typically used on UNIX platforms,
@@ -275,9 +272,6 @@ wrong-sided I/O attempted (by a \fBchan event\fR handler or otherwise) results
in a
.QW "channel busy"
error.
-.PP
-.PP
-.IP \fBEXAMPLES\fR
.RE
.\" METHOD: create
.TP
@@ -576,18 +570,11 @@ bytes relative to \fIorigin\fR. A negative offset moves the current position
backwards from the origin. \fIorigin\fR is one of the
following:
.RS
-.PP
-.TP 10
-\fBstart\fR
-.
+.IP \fBstart\fR
The origin is the start of the data. This is the default.
-.TP 10
-\fBcurrent\fR
-.
+.IP \fBcurrent\fR
The origin is the current position.
-.TP 10
-\fBend\fR
-.
+.IP \fBend\fR
The origin is the end of the data.
.PP
\fBChan seek\fR flushes all buffered output even if the channel is in
@@ -603,7 +590,7 @@ not characters,
\fBchan tell \fIchannelName\fR
.
Returns the offset in bytes of the current position in the underlying data, or
--1 if the channel does not suport seeking. The value can be passed to \fBchan
+-1 if the channel does not support seeking. The value can be passed to \fBchan
seek\fR to set current position to that offset.
.\" METHOD: truncate
.TP
diff --git a/doc/classvariable.n b/doc/classvariable.n
index 15b8783..198f09e 100644
--- a/doc/classvariable.n
+++ b/doc/classvariable.n
@@ -26,8 +26,8 @@ elements. The originating scope for the variables is the namespace of the
class that the method was defined by. In other words, the referenced variables
are shared between all instances of that class.
.PP
-Note: This command is equivalent to the command \fBtypevariable\fR provided by
-the snit package in tcllib for approximately the same purpose. If used in a
+Note that this command is equivalent to the command \fBtypevariable\fR provided
+by the snit package in tcllib for approximately the same purpose. If used in a
method defined directly on a class instance (e.g., through the
\fBoo::objdefine\fR \fBmethod\fR definition) this is very much like just
using:
diff --git a/doc/clock.n b/doc/clock.n
index e7f1b11..871a942 100644
--- a/doc/clock.n
+++ b/doc/clock.n
@@ -81,6 +81,7 @@ See \fBSCANNING TIMES\fR for a full description.
.\" METHOD: seconds
.TP
\fBclock seconds\fR
+.
Returns the current time as an integer number of seconds.
.SS "PARAMETERS"
.TP
@@ -107,12 +108,14 @@ One of the words, \fBseconds\fR, \fBminutes\fR, \fBhours\fR,
Used in conjunction with \fIcount\fR to identify an interval of time,
for example, \fI3 seconds\fR or \fI1 year\fR.
.SS "OPTIONS"
+.\" OPTION: -base
.TP
\fB\-base\fR time
.
Specifies that any relative times present in a \fBclock scan\fR command
are to be given relative to \fItime\fR. \fItime\fR must be expressed as
a count of nominal seconds from the epoch time of 1 January 1970, 00:00 UTC.
+.\" OPTION: -format
.TP
\fB\-format\fR format
.
@@ -135,6 +138,7 @@ On \fBclock scan\fR, the lack of a \fB\-format\fR option indicates that a
.QW "free format scan"
is requested; see \fBFREE FORM SCAN\fR for a description of what happens.
.RE
+.\" OPTION: -gmt
.TP
\fB\-gmt\fR boolean
.
@@ -145,6 +149,7 @@ zone. This usage is obsolete; the correct current usage is to
specify the UTC time zone with
.QW "\fB\-timezone\fI :UTC\fR"
or any of the equivalent ways to specify it.
+.\" OPTION: -locale
.TP
\fB\-locale\fR localeName
.
@@ -161,6 +166,7 @@ descriptions of the individual format groups under \fBFORMAT GROUPS\fR.
The effect of locale on clock arithmetic is discussed under
\fBCLOCK ARITHMETIC\fR.
.RE
+.\" OPTION: -timezone
.TP
\fB\-timezone\fR zoneName
.
@@ -488,81 +494,57 @@ if the clock had not changed.
.PP
The following format groups are recognized by the \fBclock scan\fR and
\fBclock format\fR commands.
-.TP
-\fB%a\fR
-.
+.IP \fB%a\fR
On output, produces an abbreviation (\fIe.g., \fBMon\fR) for the day
of the week in the given locale. On input, matches the name of the day
of the week in the given locale (in either abbreviated or full form, or
any unique prefix of either form).
-.TP
-\fB%A\fR
-.
+.IP \fB%A\fR
On output, produces the full name (\fIe.g., \fBMonday\fR) of the day
of the week in the given locale. On input, matches the name of the day
of the week in the given locale (in either abbreviated or full form, or
any unique prefix of either form).
-.TP
-\fB%b\fR
-.
+.IP \fB%b\fR
On output, produces an abbreviation (\fIe.g., \fBJan\fR) for the name
of the month in the given locale. On input, matches the name of the month
in the given locale (in either abbreviated or full form, or
any unique prefix of either form).
-.TP
-\fB%B\fR
-.
+.IP \fB%B\fR
On output, produces the full name (\fIe.g., \fBJanuary\fR)
of the month in the given locale. On input, matches the name of the month
in the given locale (in either abbreviated or full form, or
any unique prefix of either form).
-.TP
-\fB%c\fR
-.
+.IP \fB%c\fR
On output, produces a localized representation of date and time of day;
the localized representation is expected to use the Gregorian calendar.
On input, matches whatever \fB%c\fR produces.
-.TP
-\fB%C\fR
-.
+.IP \fB%C\fR
On output, produces the number of the century in Indo-Arabic numerals.
On input, matches one or two digits, possibly with leading whitespace,
that are expected to be the number of the century.
-.TP
-\fB%d\fR
-.
+.IP \fB%d\fR
On output, produces the number of the day of the month, as two decimal
digits. On input, matches one or two digits, possibly with leading
whitespace, that are expected to be the number of the day of the month.
-.TP
-\fB%D\fR
-.
+.IP \fB%D\fR
This format group is synonymous with \fB%m/%d/%Y\fR. It should be
used only in exchanging data within the \fBen_US\fR locale, since
other locales typically do not use this order for the fields of the date.
-.TP
-\fB%e\fR
-.
+.IP \fB%e\fR
On output, produces the number of the day of the month, as one or
two decimal digits (with a leading blank for one-digit dates).
On input, matches one or two digits, possibly with leading
whitespace, that are expected to be the number of the day of the month.
-.TP
-\fB%Ec\fR
-.
+.IP \fB%Ec\fR
On output, produces a locale-dependent representation of the date and
time of day in the locale's alternative calendar. On input, matches
whatever \fB%Ec\fR produces. The locale's alternative calendar need not
be the Gregorian calendar.
-.TP
-\fB%EC\fR
-.
+.IP \fB%EC\fR
On output, produces a locale-dependent name of an era in the locale's
alternative calendar. On input, matches the name of the era or any
unique prefix.
-.TP
-\fB%EE\fR
-.
+.IP \fB%EE\fR
On output, produces the string \fBB.C.E.\fR or \fBC.E.\fR, or a
string of the same meaning in the locale, to indicate whether \fB%Y\fR refers
to years before or after Year 1 of the Common Era. On input, accepts
@@ -570,242 +552,168 @@ the string \fBB.C.E.\fR, \fBB.C.\fR, \fBC.E.\fR, \fBA.D.\fR, or the
abbreviation appropriate to the current locale, and uses it to fix
whether \fB%Y\fR refers to years before or after Year 1 of the
Common Era.
-.TP
-\fB%Ex\fR
-.
+.IP \fB%Ex\fR
On output, produces a locale-dependent representation of the date
in the locale's alternative calendar. On input, matches
whatever \fB%Ex\fR produces. The locale's alternative calendar need not
be the Gregorian calendar.
-.TP
-\fB%EX\fR
-.
+.IP \fB%EX\fR
On output, produces a locale-dependent representation of the
time of day in the locale's alternative numerals. On input, matches
whatever \fB%EX\fR produces.
-.TP
-\fB%Ey\fR
-.
+.IP \fB%Ey\fR
On output, produces a locale-dependent number of the year of the era
in the locale's alternative calendar and numerals. On input, matches
such a number.
-.TP
-\fB%EY\fR
-.
+.IP \fB%EY\fR
On output, produces a representation of the year in the locale's
alternative calendar and numerals. On input, matches what \fB%EY\fR
produces. Often synonymous with \fB%EC%Ey\fR.
-.TP
-\fB%g\fR
-.
+.IP \fB%g\fR
On output, produces a two-digit year number suitable for use with
the week-based ISO8601 calendar; that is, the year number corresponds
to the week number produced by \fB%V\fR. On input, accepts such
a two-digit year number, possibly with leading whitespace.
-.TP
-\fB%G\fR
-.
+.IP \fB%G\fR
On output, produces a four-digit year number suitable for use with
the week-based ISO8601 calendar; that is, the year number corresponds
to the week number produced by \fB%V\fR. On input, accepts such
a four-digit year number, possibly with leading whitespace.
-.TP
-\fB%h\fR
-.
+.IP \fB%h\fR
This format group is synonymous with \fB%b\fR.
-.TP
-\fB%H\fR
-.
+.IP \fB%H\fR
On output, produces a two-digit number giving the hour of the day
(00-23) on a 24-hour clock. On input, accepts such a number.
-.TP
-\fB%I\fR
-.
+.IP \fB%I\fR
On output, produces a two-digit number giving the hour of the day
(12-11) on a 12-hour clock. On input, accepts such a number.
-.TP
-\fB%j\fR
-.
+.IP \fB%j\fR
On output, produces a three-digit number giving the day of the year
(001-366). On input, accepts such a number.
-.TP
-\fB%J\fR
-.
+.IP \fB%J\fR
On output, produces a string of digits giving the Julian Day Number.
On input, accepts a string of digits and interprets it as a Julian Day Number.
The Julian Day Number is a count of the number of calendar days
that have elapsed since 1 January, 4713 BCE of the proleptic
Julian calendar. The epoch time of 1 January 1970 corresponds
to Julian Day Number 2440588.
-.TP
-\fB%k\fR
-.
+.IP \fB%k\fR
On output, produces a one- or two-digit number giving the hour of the day
(0-23) on a 24-hour clock. On input, accepts such a number.
-.TP
-\fB%l\fR
-.
+.IP \fB%l\fR
On output, produces a one- or two-digit number giving the hour of the day
(12-11) on a 12-hour clock. On input, accepts such a number.
-.TP
-\fB%m\fR
-.
+.IP \fB%m\fR
On output, produces the number of the month (01-12) with exactly two
digits. On input, accepts two digits and interprets them as the number
of the month.
-.TP
-\fB%M\fR
-.
+.IP \fB%M\fR
On output, produces the number of the minute of the hour (00-59)
with exactly two digits. On input, accepts two digits and interprets them
as the number of the minute of the hour.
-.TP
-\fB%N\fR
-.
+.IP \fB%N\fR
On output, produces the number of the month (1-12) with one or two digits,
and a leading blank for one-digit dates.
On input, accepts one or two digits, possibly with leading whitespace,
and interprets them as the number of the month.
-.TP
-\fB%Od\fR, \fB%Oe\fR, \fB%OH\fR, \fB%OI\fR, \fB%Ok\fR, \fB%Ol\fR, \fB%Om\fR, \fB%OM\fR, \fB%OS\fR, \fB%Ou\fR, \fB%Ow\fR, \fB%Oy\fR
-.
+.IP "\fB%Od\fR, \fB%Oe\fR, \fB%OH\fR, \fB%OI\fR, \fB%Ok\fR, \fB%Ol\fR, \fB%Om\fR, \fB%OM\fR, \fB%OS\fR, \fB%Ou\fR, \fB%Ow\fR, \fB%Oy\fR"
All of these format groups are synonymous with their counterparts
without the
.QW \fBO\fR ,
except that the string is produced and parsed in the
locale-dependent alternative numerals.
-.TP
-\fB%p\fR
-.
+.IP \fB%p\fR
On output, produces an indicator for the part of the day, \fBAM\fR
or \fBPM\fR, appropriate to the given locale. If the script of the
given locale supports multiple letterforms, lowercase is preferred.
On input, matches the representation \fBAM\fR or \fBPM\fR in
the given locale, in either case.
-.TP
-\fB%P\fR
-.
+.IP \fB%P\fR
On output, produces an indicator for the part of the day, \fBam\fR
or \fBpm\fR, appropriate to the given locale. If the script of the
given locale supports multiple letterforms, uppercase is preferred.
On input, matches the representation \fBAM\fR or \fBPM\fR in
the given locale, in either case.
-.TP
-\fB%Q\fR
-.
+.IP \fB%Q\fR
This format group is reserved for internal use within the Tcl library.
.\" It's the STARDATE! We're so Enterprise-ready...
-.TP
-\fB%r\fR
-.
+.IP \fB%r\fR
On output, produces a locale-dependent time of day representation on a
12-hour clock. On input, accepts whatever \fB%r\fR produces.
-.TP
-\fB%R\fR
-.
+.IP \fB%R\fR
On output, the time in 24-hour notation (%H:%M). For a version
including the seconds, see \fB%T\fR below. On input, accepts whatever
\fB%R\fR produces.
-.TP
-\fB%s\fR
-.
+.IP \fB%s\fR
On output, simply formats the \fItimeVal\fR argument as a decimal
integer and inserts it into the output string. On input, accepts
a decimal integer and uses is as the time value without any further
processing. Since \fB%s\fR uniquely determines a point in time, it
overrides all other input formats.
-.TP
-\fB%S\fR
-.
+.IP \fB%S\fR
On output, produces a two-digit number of the second of the minute
(00-59). On input, accepts two digits and uses them as the second of the
minute.
-.TP
-\fB%t\fR
-.
+.IP \fB%t\fR
On output, produces a TAB character. On input, matches a TAB character.
-.TP
-\fB%T\fR
-.
+.IP \fB%T\fR
Synonymous with \fB%H:%M:%S\fR.
-.TP
-\fB%u\fR
-.
+.IP \fB%u\fR
On output, produces the number of the day of the week
(\fB1\fR\(->Monday, \fB7\fR\(->Sunday). On input, accepts a single digit and
interprets it as the day of the week. Sunday may be either \fB0\fR or
\fB7\fR.
-.TP
-\fB%U\fR
-.
+.IP \fB%U\fR
On output, produces the ordinal number of the week of the year
(00-53). The first Sunday of the year is the first day of week 01. On
input accepts two digits which are otherwise ignored. This format
group is never used in determining an input date. This interpretation
of the week of the year was once common in US banking but is now
largely obsolete. See \fB%V\fR for the ISO8601 week number.
-.TP
-\fB%V\fR
-.
+.IP \fB%V\fR
On output, produces the number of the ISO8601 week as a two digit
number (01-53). Week 01 is the week containing January 4; or the first
week of the year containing at least 4 days; or the week containing
the first Thursday of the year (the three statements are
equivalent). Each week begins on a Monday. On input, accepts the
ISO8601 week number.
-.TP
-\fB%w\fR
-.
+.IP \fB%w\fR
On output, produces the ordinal number of the day of the week
(Sunday==0; Saturday==6). On input, accepts a single digit and
interprets it as the day of the week; Sunday may be represented as
either 0 or 7. Note that \fB%w\fR is not the ISO8601 weekday number,
which is produced and accepted by \fB%u\fR.
-.TP
-\fB%W\fR
-.
+.IP \fB%W\fR
On output, produces a week number (00-53) within the year; week 01
begins on the first Monday of the year. On input, accepts two digits,
which are otherwise ignored. This format group is never used in
determining an input date. It is not the ISO8601 week number; that
week is produced and accepted by \fB%V\fR.
-.TP
-\fB%x\fR
-.
+.IP \fB%x\fR
On output, produces the date in a locale-dependent representation. On
input, accepts whatever \fB%x\fR produces and is used to determine
calendar date.
-.TP
-\fB%X\fR
-.
+.IP \fB%X\fR
On output, produces the time of day in a locale-dependent
representation. On input, accepts whatever \fB%X\fR produces and is used
to determine time of day.
-.TP
-\fB%y\fR
-.
+.IP \fB%y\fR
On output, produces the two-digit year of the century. On input,
accepts two digits, and is used to determine calendar date. The
date is presumed to lie between 1938 and 2037 inclusive. Note
that \fB%y\fR does not yield a year appropriate for use with the ISO8601
week number \fB%V\fR; programs should use \fB%g\fR for that purpose.
-.TP
-\fB%Y\fR
-.
+.IP \fB%Y\fR
On output, produces the four-digit calendar year. On input,
accepts four digits and may be used to determine calendar date. Note
that \fB%Y\fR does not yield a year appropriate for use with the ISO8601
week number \fB%V\fR; programs should use \fB%G\fR for that purpose.
-.TP
-\fB%z\fR
-.
+.IP \fB%z\fR
On output, produces the current time zone, expressed in hours and
minutes east (+hhmm) or west (\-hhmm) of Greenwich. On input, accepts a
time zone specifier (see \fBTIME ZONES\fR below) that will be used to
determine the time zone.
-.TP
-\fB%Z\fR
-.
+.IP \fB%Z\fR
On output, produces the current time zone's name, possibly
translated to the given locale. On input, accepts a time zone
specifier (see \fBTIME ZONES\fR below) that will be used to determine the
@@ -814,17 +722,13 @@ parsing RFC822 dates. Other uses are fraught with ambiguity; for
instance, the string \fBBST\fR may represent British Summer Time or
Brazilian Standard Time. It is recommended that date/time strings for
use by computers use numeric time zones instead.
-.TP
-\fB%%\fR
-.
+.IP \fB%%\fR
On output, produces a literal
.QW \fB%\fR
character. On input, matches a literal
.QW \fB%\fR
character.
-.TP
-\fB%+\fR
-.
+.IP \fB%+\fR
Synonymous with
.QW "\fB%a %b %e %H:%M:%S %Z %Y\fR" .
.SH "TIME ZONES"
@@ -976,7 +880,7 @@ acceptable formats are
.QW "\fIdd monthname yy\fR" ,
.QW "?\fICC\fR?\fIyymmdd\fR" ,
and
-.QW "\fIdd\fB-\fImonthname\fB-\fR?\fICC\fR?\fIyy\fR" .
+.QW "\fIdd\fB\-\fImonthname\fB\-\fR?\fICC\fR?\fIyy\fR" .
The default year is the current year. If the year is less
than 100, we treat the years 00-68 as 2000-2068 and the years 69-99
as 1969-1999. Not all platforms can represent the years 38-70, so
diff --git a/doc/configurable.n b/doc/configurable.n
index 07335bd..7ab5b92 100644
--- a/doc/configurable.n
+++ b/doc/configurable.n
@@ -86,6 +86,7 @@ The \fBproperty\fR command takes the name of a property to define first,
\fIwithout a leading hyphen\fR, followed by a number of option-value pairs
that modify the basic behavior of the property. This can then be followed by
an arbitrary number of other property definitions. The supported options are:
+.\" OPTION: -get
.TP
\fB\-get \fIgetterScript\fR
.
@@ -99,6 +100,7 @@ of the instance variable with the same name as the property (e.g.,
will result in a method
.QW <ReadProp-xyz>
being created).
+.\" OPTION: -kind
.TP
\fB\-kind \fIpropertyKind\fR
.
@@ -114,6 +116,7 @@ Note that write-only properties are not particularly discoverable as they are
never reported by the \fBconfigure\fR method other than by error messages when
attempting to write to a property that does not exist.
.RE
+.\" OPTION: -set
.TP
\fB\-set \fIsetterScript\fR
.
diff --git a/doc/cookiejar.n b/doc/cookiejar.n
index 224d488..7d8e99e 100644
--- a/doc/cookiejar.n
+++ b/doc/cookiejar.n
@@ -45,6 +45,7 @@ to be the given value.
.RS
.PP
Supported options are:
+.\" OPTION: -domainfile
.TP
\fB\-domainfile \fIfilename\fR
.
@@ -54,6 +55,7 @@ list of top-level domains (e.g., \fB.com\fR or \fB.co.jp\fR). Such domains
domains is both security-sensitive and \fInot\fR constant and should be
periodically refetched. Cookie jars maintain their own cache of the domain
list.
+.\" OPTION: -domainlist
.TP
\fB\-domainlist \fIurl\fR
.
@@ -62,33 +64,39 @@ A URL to fetch the list of top-level domains (e.g., \fB.com\fR or
them. Note that the list of such domains is both security-sensitive and
\fInot\fR constant and should be periodically refetched. Cookie jars maintain
their own cache of the domain list.
+.\" OPTION: -domainrefresh
.TP
\fB\-domainrefresh \fIintervalMilliseconds\fR
.
-The number of milliseconds between checks of the \fI\-domainlist\fR for new
+The number of milliseconds between checks of the \fB\-domainlist\fR for new
domains.
+.\" OPTION: -loglevel
.TP
\fB\-loglevel \fIlevel\fR
.
The logging level of this package. The logging level must be (in order of
decreasing verbosity) one of \fBdebug\fR, \fBinfo\fR, \fBwarn\fR, or
\fBerror\fR.
+.\" OPTION: -offline
.TP
\fB\-offline \fIflag\fR
.
-Allows the cookie managment engine to be placed into offline mode. In offline
+Allows the cookie management engine to be placed into offline mode. In offline
mode, the list of domains is read immediately from the file configured in the
\fB\-domainfile\fR option, and the \fB\-domainlist\fR option is not used; it
also makes the \fB\-domainrefresh\fR option be effectively ignored.
+.\" OPTION: -purgeold
.TP
\fB\-purgeold \fIintervalMilliseconds\fR
.
The number of milliseconds between checks of the database for expired
cookies; expired cookies are deleted.
+.\" OPTION: -retain
.TP
\fB\-retain \fIcookieCount\fR
.
The maximum number of cookies to retain in the database.
+.\" OPTION: -vacuumtrigger
.TP
\fB\-vacuumtrigger \fIdeletionCount\fR
.
@@ -104,8 +112,8 @@ creation methods (\fBcreate\fR or \fBnew\fR).
.
If a \fIfilename\fR argument is provided, it is the name of a file containing
an SQLite database that will contain the persistent cookies maintained by the
-cookie jar; the database will be created if the file does not already
-exist. If \fIfilename\fR is not supplied, the database will be held entirely within
+cookie jar; the database will be created if the file does not already exist.
+If \fIfilename\fR is not supplied, the database will be held entirely within
memory, which effectively forces all cookies within it to be session cookies.
.SS "INSTANCE METHODS"
.PP
@@ -143,17 +151,11 @@ after the built-in security checks are done, and should return a boolean
value; if the value is false, the operation is rejected and the database is
not modified. The supported \fIoperation\fRs are:
.RS
-.TP
-\fBdelete\fR
-.
+.IP \fBdelete\fR
The \fIdomain\fR is seeking to delete a cookie.
-.TP
-\fBsession\fR
-.
+.IP \fBsession\fR
The \fIdomain\fR is seeking to create or update a session cookie.
-.TP
-\fBset\fR
-.
+.IP \fBset\fR
The \fIdomain\fR is seeking to create or update a persistent cookie (with a
defined lifetime).
.PP
diff --git a/doc/define.n b/doc/define.n
index 1344b32..91d927c 100644
--- a/doc/define.n
+++ b/doc/define.n
@@ -127,7 +127,6 @@ below), this command creates private forwarded methods.
.VE TIP500
.RE
.\" METHOD: initialise
-.\" METHOD: initialize
.TP
\fBinitialise\fI script\fR
.TP
@@ -491,6 +490,7 @@ that the object is an instance of and cannot rename in an instance object the
methods provided by those classes (though a \fBoo::objdefine forward\fRed
method may provide an equivalent capability). Does not change the export
status of the method; if it was exported before, it will be afterwards.
+.\" METHOD: self
.TP
\fBself \fR
.VS TIP470
@@ -514,32 +514,38 @@ Some of the configurable definitions of a class or object are \fIslotted
definitions\fR. This means that the configuration is implemented by a slot
object, that is an instance of the class \fBoo::Slot\fR, which manages a list
of values (class names, variable names, etc.) that comprises the contents of
-the slot. The class defines five operations (as methods) that may be done on
+the slot. The class defines six operations (as methods) that may be done on
the slot:
+.\" METHOD: -append
.TP
\fIslot\fR \fB\-append\fR ?\fImember ...\fR?
.
This appends the given \fImember\fR elements to the slot definition.
+.\" METHOD: -appendifnew
.TP
\fIslot\fR \fB\-appendifnew\fR ?\fImember ...\fR?
.VS TIP558
This appends the given \fImember\fR elements to the slot definition if they
do not already exist.
.VE TIP558
+.\" METHOD: -clear
.TP
\fIslot\fR \fB\-clear\fR
.
This sets the slot definition to the empty list.
+.\" METHOD: -prepend
.TP
\fIslot\fR \fB\-prepend\fR ?\fImember ...\fR?
.VS TIP516
This prepends the given \fImember\fR elements to the slot definition.
.VE TIP516
+.\" METHOD: -remove
.TP
\fIslot\fR \fB\-remove\fR ?\fImember ...\fR?
.VS TIP516
This removes the given \fImember\fR elements from the slot definition.
.VE TIP516
+.\" METHOD: -set
.TP
\fIslot\fR \fB\-set\fR ?\fImember ...\fR?
.
@@ -549,6 +555,7 @@ A consequence of this is that any use of a slot's default operation where the
first member argument begins with a hyphen will be an error. One of the above
operations should be used explicitly in those circumstances.
.SS "SLOT IMPLEMENTATION"
+.\" METHOD: --default-operation
Internally, slot objects also define a method \fB\-\-default\-operation\fR
which is forwarded to the default operation of the slot (thus, for the class
.QW \fBvariable\fR
diff --git a/doc/dict.n b/doc/dict.n
index 9fcb05f..1517573 100644
--- a/doc/dict.n
+++ b/doc/dict.n
@@ -307,6 +307,7 @@ it is recommended that this command only be used in a local scope
(\fBproc\fRedure, lambda term for \fBapply\fR, or method). Because of
this, the variables set by \fBdict update\fR will continue to
exist after the command finishes (unless explicitly \fBunset\fR).
+.PP
Note that the mapping of values to variables
does not use traces; changes to the \fIdictionaryVariable\fR's
contents only happen when \fIbody\fR terminates.
@@ -348,6 +349,7 @@ it is recommended that this command only be used in a local scope
(\fBproc\fRedure, lambda term for \fBapply\fR, or method). Because of
this, the variables set by \fBdict with\fR will continue to
exist after the command finishes (unless explicitly \fBunset\fR).
+.PP
Note that the mapping of values to variables does not use
traces; changes to the \fIdictionaryVariable\fR's contents only happen
when \fIbody\fR terminates.
diff --git a/doc/encoding.n b/doc/encoding.n
index b88dbc4..d556839 100644
--- a/doc/encoding.n
+++ b/doc/encoding.n
@@ -16,14 +16,15 @@ encoding \- Work with encodings
.SH INTRODUCTION
.PP
In Tcl every string is composed of Unicode values. Text may be encoded into an
-encoding such as cp1252, iso8859-1, Shitf\-JIS, utf-8, utf-16, etc. Not every
-Unicode vealue is encodable in every encoding, and some encodings can encode
+encoding such as cp1252, iso8859-1, Shift\-JIS, utf-8, utf-16, etc. Not every
+Unicode value is encodable in every encoding, and some encodings can encode
values that are not available in Unicode.
.PP
Even though Unicode is for encoding the written texts of human languages, any
-sequence of bytes can be encoded as the first 255 Unicode values. iso8859-1 an
-encoding for a subset of Unicode in which each byte is a Unicode value of 255
-or less. Thus, any sequence of bytes can be considered to be a Unicode string
+sequence of bytes can be encoded as the first 255 Unicode values. In particular,
+iso8859-1 is an encoding (a superset of classic ASCII) for a subset of Unicode
+in which each byte is a Unicode value of 255
+or less; any sequence of bytes can be considered to be a Unicode string
encoded in iso8859-1. To work with binary data in Tcl, decode it from
iso8859-1 when reading it in, and encode it into iso8859-1 when writing it out,
ensuring that each character in the string has a value of 255 or less.
@@ -32,13 +33,14 @@ does nothing.
.PP
For example, the following is true:
.CS
+
set text {In Tcl binary data is treated as Unicode text and it just works.}
-set encoded [encoding convertto iso8859-1 $text]
+set encoded [\fBencoding convertto\fR iso8859-1 $text]
expr {$text eq $encoded}; #-> 1
.CE
The following is also true:
.CS
-set decoded [encoding convertfrom iso8859-1 $text]
+set decoded [\fBencoding convertfrom\fR iso8859-1 $text]
expr {$text eq $decoded}; #-> 1
.CE
.SH DESCRIPTION
@@ -48,14 +50,14 @@ Performs one of the following encoding \fIoperations\fR:
.TP
\fBencoding convertfrom\fR ?\fIencoding\fR? \fIdata\fR
.TP
-\fBencoding convertfrom\fR ?\fB-profile \fIprofile\fR? ?\fB-failindex var\fR? \fIencoding data\fR
+\fBencoding convertfrom\fR ?\fB\-profile \fIprofile\fR? ?\fB\-failindex var\fR? \fIencoding data\fR
.
Decodes \fIdata\fR encoded in \fIencoding\fR. If \fIencoding\fR is not
specified the current system encoding is used.
.VS "TCL8.7 TIP607, TIP656"
-\fB-profile\fR determines how invalid data for the encoding are handled. See
+\fB\-profile\fR determines how invalid data for the encoding are handled. See
the \fBPROFILES\fR section below for details. Returns an error if decoding
-fails. However, if \fB-failindex\fR given, returns the result of the
+fails. However, if \fB\-failindex\fR given, returns the result of the
conversion up to the point of termination, and stores in \fBvar\fR the index of
the character that could not be converted. If no errors are encountered the
entire result of the conversion is returned and the value \fB-1\fR is stored in
@@ -65,12 +67,13 @@ entire result of the conversion is returned and the value \fB-1\fR is stored in
.TP
\fBencoding convertto\fR ?\fIencoding\fR? \fIdata\fR
.TP
-\fBencoding convertto\fR ?\fB-profile \fIprofile\fR? ?\fB-failindex var\fR? \fIencoding data\fR
+\fBencoding convertto\fR ?\fB\-profile \fIprofile\fR? ?\fB\-failindex var\fR? \fIencoding data\fR
.
Converts \fIstring\fR to \fIencoding\fR. If \fIencoding\fR is not given, the
current system encoding is used.
.VS "TCL8.7 TIP607, TIP656"
-See \fBencoding convertfrom\fR for the meaning of \fB-profile\fR and \fB-failindex\fR.
+See \fBencoding convertfrom\fR for the meaning of \fB\-profile\fR and
+\fB\-failindex\fR.
.VE "TCL8.7 TIP607, TIP656"
.\" METHOD: dirs
.TP
@@ -91,9 +94,10 @@ The encodings
and
.QW iso8859-1
are guaranteed to be present in the list.
-.VS "TCL8.7 TIP656"
+.\" METHOD: profiles
.TP
\fBencoding profiles\fR
+.VS "TCL8.7 TIP656"
Returns a list of names of available encoding profiles. See \fBPROFILES\fR
below.
.VE "TCL8.7 TIP656"
diff --git a/doc/eval.n b/doc/eval.n
index 448a459..018628b 100644
--- a/doc/eval.n
+++ b/doc/eval.n
@@ -22,6 +22,7 @@ script containing one or more commands.
fashion as the \fBconcat\fR command, passes the concatenated string to the
Tcl interpreter recursively, and returns the result of that
evaluation (or any error generated by it).
+.PP
Note that the \fBlist\fR command quotes sequences of words in such a
way that they are not further expanded by the \fBeval\fR command;
for \fIany\fR values, $a, $b, and $c, these two lines are effectively
diff --git a/doc/exec.n b/doc/exec.n
index 612bd4e..ed1f45d 100644
--- a/doc/exec.n
+++ b/doc/exec.n
@@ -31,16 +31,19 @@ If the initial arguments to \fBexec\fR start with \fB\-\fR then
they are treated as command-line switches and are not part
of the pipeline specification. The following switches are
currently supported:
+.\" OPTION: -ignorestderr
.TP 13
\fB\-ignorestderr\fR
.
Stops the \fBexec\fR command from treating the output of messages to the
pipeline's standard error channel as an error case.
+.\" OPTION: -keepnewline
.TP 13
\fB\-keepnewline\fR
.
Retains a trailing newline in the pipeline's output.
Normally a trailing newline will be deleted.
+.\" OPTION: --
.TP 13
\fB\-\|\-\fR
.
diff --git a/doc/expr.n b/doc/expr.n
index 340495c..1349809 100644
--- a/doc/expr.n
+++ b/doc/expr.n
@@ -54,15 +54,13 @@ ignored. Each operand is interpreted as a numeric value if at all possible.
.PP
Each operand has one of the following forms:
.RS
-.PP
.TP
A \fBnumeric value\fR
.PP
.RS
-.
Either integer or floating-point. The first two characters of an integer may
also be \fB0d\fR for decimal, \fB0b\fR for binary, \fB0o\fR for octal or
-\fB0x\fR for hexadicimal.
+\fB0x\fR for hexadecimal.
.PP
A floating-point number may be take any of several
common decimal formats, and may use the decimal point \fB.\fR,
@@ -105,6 +103,7 @@ Backslash, variable, and command substitution are performed according to the
rules for \fBTcl\fR.
.TP
A string enclosed in \fBbraces\fR.
+.
The operand is treated as a braced value according to the rule for braces in
\fBTcl\fR.
.TP
@@ -113,8 +112,10 @@ A Tcl command enclosed in \fBbrackets\fR
Command substitution is performed as according to the command substitution rule
for \fBTcl\fR.
.TP
-A mathematical function such as \fBsin($x)\fR, whose arguments have any of the above
-forms for operands. See \fBMATH FUNCTIONS\fR below for
+A function call.
+.
+This is mathematical function such as \fBsin($x)\fR, whose arguments have any of
+the above forms for operands. See \fBMATH FUNCTIONS\fR below for
a discussion of how mathematical functions are handled.
.RE
.PP
@@ -140,8 +141,8 @@ produces the value on the right side.
For operators having both a numeric mode and a string mode, the numeric mode is
chosen when all operands have a numeric interpretation. The integer
interpretation of an operand is preferred over the floating-point
-interpretation. To ensure string operations on arbitrary values it is generally a
-good idea to use \fBeq\fR, \fBne\fR, or the \fBstring\fR command instead of
+interpretation. To ensure string operations on arbitrary values it is generally
+a good idea to use \fBeq\fR, \fBne\fR, or the \fBstring\fR command instead of
more versatile operators such as \fB==\fR.
.PP
Unless otherwise specified, operators accept non-numeric operands. The value
@@ -201,7 +202,7 @@ comparison operators below, which have the same precedence.
Boolean string comparisons: less than, greater than, less than or equal, and
greater than or equal. These always compare values using their UNICODE strings
(also see \fBstring compare\fR), unlike with the numeric-preferring
-comparisons abov, which have the same precedence.
+comparisons above, which have the same precedence.
.VE "8.7, TIP461"
.TP 20
\fB==\0\0!=\fR
@@ -289,8 +290,8 @@ For more details on the results
produced by each operator, see the documentation for C.
.SS "MATH FUNCTIONS"
.PP
-A mathematical function such as \fBsin($x)\fR is replaced with a call to an ordinary
-Tcl command in the \fBtcl::mathfunc\fR namespace. The evaluation
+A mathematical function such as \fBsin($x)\fR is replaced with a call to an
+ordinary Tcl command in the \fBtcl::mathfunc\fR namespace. The evaluation
of an expression such as
.PP
.CS
@@ -310,12 +311,13 @@ tcl::mathfunc::sin [\fBexpr\fR {$x+$y}]
.CE
.PP
\fBtcl::mathfunc::sin\fR is resolved as described in
-\fBNAMESPACE RESOLUTION\fR in the \fBnamespace\fR(n) documentation. Given the
+\fBNAMESPACE RESOLUTION\fR in the \fBnamespace\fR(n) documentation. Given the
default value of \fBnamespace path\fR, \fB[namespace
current]::tcl::mathfunc::sin\fR or \fB::tcl::mathfunc::sin\fR are the typical
resolutions.
.PP
-As in C, a mathematical function may accept multiple arguments separated by commas. Thus,
+As in C, a mathematical function may accept multiple arguments separated by
+commas. Thus,
.PP
.CS
\fBexpr\fR {hypot($x,$y)}
@@ -386,13 +388,12 @@ the expression, resulting in better speed and smaller storage requirements.
This also avoids issues that can arise if Tcl is allowed to perform
substitution on the value before \fBexpr\fR is called.
.PP
-In the following example, the value of the expression is 11 because the Tcl parser first
-substitutes \fB$b\fR and \fBexpr\fR then substitutes \fB$a\fR as part
-of evaluating the expression
+In the following example, the value of the expression is 11 because the Tcl
+parser first substitutes \fB$b\fR and \fBexpr\fR then substitutes \fB$a\fR as
+part of evaluating the expression
.QW "$a + 2*4" .
-Enclosing the
-expression in braces would result in a syntax error as \fB$b\fR does
-not evaluate to a numeric value.
+Enclosing the expression in braces would result in a syntax error as \fB$b\fR
+does not evaluate to a numeric value.
.PP
.CS
set a 3
diff --git a/doc/fconfigure.n b/doc/fconfigure.n
index e265fc4..468cd62 100644
--- a/doc/fconfigure.n
+++ b/doc/fconfigure.n
@@ -41,8 +41,10 @@ entry for the command that creates each type of channels for the options
that that specific type of channel supports. For example, see the manual
entry for the \fBsocket\fR command for additional options for sockets, and
the \fBopen\fR command for additional options for serial devices.
+.\" OPTION: -blocking
.TP
\fB\-blocking\fI boolean\fR
+.
The \fB\-blocking\fR option determines whether I/O operations on the
channel can cause the process to block indefinitely.
The value of the option must be a proper boolean value.
@@ -54,6 +56,7 @@ see the documentation for those commands for details.
For nonblocking mode to work correctly, the application must be
using the Tcl event loop (e.g. by calling \fBTcl_DoOneEvent\fR or
invoking the \fBvwait\fR command).
+.\" OPTION: -buffering
.TP
\fB\-buffering\fI newValue\fR
.
@@ -67,6 +70,7 @@ automatically after every output operation. The default is for
connect to terminal-like devices; for these channels the initial setting
is \fBline\fR. Additionally, \fBstdin\fR and \fBstdout\fR are
initially set to \fBline\fR, and \fBstderr\fR is set to \fBnone\fR.
+.\" OPTION: -buffersize
.TP
\fB\-buffersize\fI newSize\fR
.
@@ -74,6 +78,7 @@ initially set to \fBline\fR, and \fBstderr\fR is set to \fBnone\fR.
buffers, in bytes, subsequently allocated for this channel to store input
or output. \fINewvalue\fR must be between one and one million, allowing
buffers of one to one million bytes in size.
+.\" OPTION: -encoding
.TP
\fB\-encoding\fI name\fR
.
@@ -100,6 +105,7 @@ The default encoding for newly opened channels is the same platform- and
locale-dependent system encoding used for interfacing with the operating
system, as returned by \fBencoding system\fR.
.RE
+.\" OPTION: -eofchar
.TP
\fB\-eofchar\fI char\fR
.
@@ -113,6 +119,7 @@ The acceptable range for \fB\-eofchar\fR values is \ex01 - \ex7F;
attempting to set \fB\-eofchar\fR to a value outside of this range will
generate an error.
.VS "TCL8.7 TIP656"
+.\" OPTION: -profile
.TP
\fB\-profile\fI profile\fR
.
@@ -122,6 +129,7 @@ rules of that profile. Any failures will result in a channel error. See
\fBPROFILES\fR in the \fBencoding(n)\fR documentation for details about encoding
profiles.
.VE "TCL8.7 TIP656"
+.\" OPTION: -translation
.TP
\fB\-translation\fI mode\fR
.TP
@@ -150,9 +158,7 @@ you can specify a single value that will apply to both reading and
writing. When querying the translation mode of a read-write channel, a
two-element list will always be returned. The following values are
currently supported:
-.TP
-\fBauto\fR
-.
+.IP \fBauto\fR
As the input translation mode, \fBauto\fR treats any of newline
(\fBlf\fR), carriage return (\fBcr\fR), or carriage return followed by a
newline (\fBcrlf\fR) as the end of line representation. The end of line
@@ -162,9 +168,7 @@ chooses a platform specific representation; for sockets on all platforms
Tcl chooses \fBcrlf\fR, for all Unix flavors, it chooses \fBlf\fR, and
for the various flavors of Windows it chooses \fBcrlf\fR. The default
setting for \fB\-translation\fR is \fBauto\fR for both input and output.
-.TP
-\fBbinary\fR
-.
+.IP \fBbinary\fR
No end-of-line translations are performed. This is nearly identical to
\fBlf\fR mode, except that in addition \fBbinary\fR mode also sets the
end-of-file character to the empty string (which disables it) and sets the
@@ -177,17 +181,13 @@ translator this value \fBis\fR identical to \fBlf\fR and is therefore
reported as such when queried. Even if \fBbinary\fR was used to set
the translation.
.RE
-.TP
-\fBcr\fR
-.
+.IP \fBcr\fR
The end of a line in the underlying file or device is represented by a
single carriage return character. As the input translation mode,
\fBcr\fR mode converts carriage returns to newline characters. As the
output translation mode, \fBcr\fR mode translates newline characters to
carriage returns.
-.TP
-\fBcrlf\fR
-.
+.IP \fBcrlf\fR
The end of a line in the underlying file or device is represented by a
carriage return character followed by a linefeed character. As the input
translation mode, \fBcrlf\fR mode converts carriage-return-linefeed
@@ -195,9 +195,7 @@ sequences to newline characters. As the output translation mode,
\fBcrlf\fR mode translates newline characters to carriage-return-linefeed
sequences. This mode is typically used on Windows platforms and for
network connections.
-.TP
-\fBlf\fR
-.
+.IP \fBlf\fR
The end of a line in the underlying file or device is represented by a
single newline (linefeed) character. In this mode no translations occur
during either input or output. This mode is typically used on UNIX
@@ -249,7 +247,7 @@ Read a PPM-format image from a file:
.CS
# Open the file and put it into Unix ASCII mode
set f [open teapot.ppm]
-\fBfconfigure\fR $f \-encoding ascii \-translation lf
+\fBfconfigure\fR $f -encoding ascii -translation lf
# Get the header
if {[gets $f] ne "P6"} {
@@ -271,7 +269,7 @@ lassign $words xSize ySize depth
# Now switch to binary mode to pull in the data,
# one byte per channel (red,green,blue) per pixel.
-\fBfconfigure\fR $f \-translation binary
+\fBfconfigure\fR $f -translation binary
set numDataBytes [expr {3 * $xSize * $ySize}]
set data [read $f $numDataBytes]
@@ -282,8 +280,8 @@ close(n), encoding(n), flush(n), gets(n), open(n), puts(n), read(n), socket(n),
Tcl_StandardChannels(3)
.SH KEYWORDS
blocking, buffering, carriage return, end of line, encoding, flushing, linemode,
-newline, nonblocking, platform, profile, translation, encoding, filter, byte array,
-binary
+newline, nonblocking, platform, profile, translation, encoding, filter,
+byte array, binary
'\" Local Variables:
'\" mode: nroff
'\" End:
diff --git a/doc/fcopy.n b/doc/fcopy.n
index 2eafdd7..e044fb7 100644
--- a/doc/fcopy.n
+++ b/doc/fcopy.n
@@ -16,20 +16,20 @@ fcopy \- Copy data from one channel to another
.BE
.SH DESCRIPTION
.PP
-The \fBfcopy\fR command copies data from one I/O channel, \fIinchan\fR to another I/O channel, \fIoutchan\fR.
+The \fBfcopy\fR command copies data from one I/O channel, \fIinchan\fR, to
+another I/O channel, \fIoutchan\fR.
The \fBfcopy\fR command leverages the buffering in the Tcl I/O system to
avoid extra copies and to avoid buffering too much data in
main memory when copying large files to destinations like
network sockets.
-.
.SS "DATA QUANTITY"
All data until \fIEOF\fR is copied.
-In addition, the quantity of copied data may be specified by the option \fB-size\fR.
-The given size is in bytes, if the input channel is in binary mode.
-Otherwise, it is in characters.
+In addition, the quantity of copied data may be specified by the option
+\fB\-size\fR. The given size is in bytes, if the input channel is in binary
+mode. Otherwise, it is in characters.
.PP
-Depreciated feature: the transfer is treated as a binary transfer, if the encoding
-profile is set to
+Depreciated feature: the transfer is treated as a binary transfer, if the
+encoding profile is set to
.QW tcl8
and the input encoding matches the output encoding.
In this case, eventual encoding errors are not handled.
@@ -69,7 +69,8 @@ then all data already queued for \fIoutchan\fR is written out.
Note that \fIinchan\fR can become readable during a background copy.
You should turn off any \fBfileevent\fR handlers during a background
copy so those handlers do not interfere with the copy.
-Any wrong-sided I/O attempted (by a \fBfileevent\fR handler or otherwise) will get a
+Any wrong-sided I/O attempted (by a \fBfileevent\fR handler or otherwise) will
+get a
.QW "channel busy"
error.
.
@@ -109,15 +110,16 @@ channel is configured to the
.QW strict
encoding profile.
.PP
-If an encoding error arises on the input channel, any data before the error byte is
-written to the output channel. The input file pointer is located just before the
-values causing the encoding error.
+If an encoding error arises on the input channel, any data before the error
+byte is written to the output channel. The input file pointer is located just
+before the values causing the encoding error.
Error inspection or recovery is possible by changing the encoding parameters and
invoking a file command (\fBread\fR, \fBfcopy\fR).
.PP
-If an encoding error arises on the output channel, the errorneous data is lost.
-To make the difference between the input error case and the output error case, only the
-error message may be inspected (read or write), as both throw the error code \fIEILSEQ\fR.
+If an encoding error arises on the output channel, the erroneous data is lost.
+To make the difference between the input error case and the output error case,
+only the error message may be inspected (read or write), as both throw the
+error code \fIEILSEQ\fR.
.SH EXAMPLES
.PP
The first example transfers the contents of one channel exactly to
diff --git a/doc/file.n b/doc/file.n
index f35f40e..d37ed22 100644
--- a/doc/file.n
+++ b/doc/file.n
@@ -62,7 +62,7 @@ write permission for the file's group and other users. An
\fBls\fR-style string of the form \fBrwxrwxrwx\fR is also accepted but
must always be 9 characters long. E.g., \fBrwxr-xr-t\fR is equivalent
to \fB01755\fR. On versions of Unix supporting file flags,
-\fB-readonly\fR returns the value of, or sets, or clears the readonly
+\fB\-readonly\fR returns the value of, or sets, or clears the readonly
attribute of a file, i.e., the user immutable flag (\fBuchg\fR) to the
\fBchflags\fR command.
.PP
@@ -86,14 +86,40 @@ off the file.
.PP
On all platforms, files in \fBzipfs\fR mounted archives return the following
attributes. These are all read-only and cannot be directly set.
-\fB-archive\fR gives the path of the mounted ZIP archive containing the file.
-\fB-compsize\fR gives the compressed size of the file within the archive.
-This is \fB0\fR for directories.
-\fB-crc\fR gives the CRC of the file if present, else \fB0\fR.
-\fB-mount\fR gives the path where the containing archive is mounted.
-\fB-offset\fR gives the offset of the file within the archive.
-\fB-uncompsize\fR gives the uncompressed size of the file.
+.RS
+.\" OPTION: -archive
+.TP
+\fB\-archive\fR
+.
+The path of the mounted ZIP archive containing the file.
+.\" OPTION: -compsize
+.TP
+\fB\-compsize\fR
+.
+The compressed size of the file within the archive.
This is \fB0\fR for directories.
+.\" OPTION: -crc
+.TP
+\fB\-crc\fR
+.
+The CRC of the file if present, else \fB0\fR.
+.\" OPTION: -mount
+.TP
+\fB\-mount\fR
+.
+The path where the containing archive is mounted.
+.\" OPTION: -offset
+.TP
+\fB\-offset\fR
+.
+The offset of the file within the archive.
+.\" OPTION: -uncompsize
+.TP
+\fB\-uncompsize\fR
+.
+The uncompressed size of the file. This is \fB0\fR for directories.
+.RE
+.PP
Other attributes may be present in the returned list. These should
be ignored.
.RE
@@ -503,7 +529,7 @@ between platforms:
.\" METHOD: tempfile
.TP
\fBfile tempfile\fR ?\fInameVar\fR? ?\fItemplate\fR?
-'\" TIP #210
+.\" TIP #210
Creates a temporary file and returns a read-write channel opened on that file.
If the \fInameVar\fR is given, it specifies a variable that the name of the
temporary file will be written into; if absent, Tcl will attempt to arrange
@@ -564,12 +590,12 @@ Returns \fB1\fR if file \fIname\fR is writable by the current user,
\fB0\fR otherwise.
.SH "PORTABILITY ISSUES"
.TP
-\fBUnix\fR\0\0\0\0\0\0\0
+\fBUnix\fR
.
These commands always operate using the real user and group identifiers,
not the effective ones.
.TP
-\fBWindows\fR\0\0\0\0
+\fBWindows\fR
.
The \fBfile owned\fR subcommand uses the user identifier (SID) of
the process token, not the thread token which may be impersonating
@@ -591,7 +617,7 @@ proc findMatchingCFiles {dir} {
set ext .o
}
}
- foreach file [glob \-nocomplain \-directory $dir *.c] {
+ foreach file [glob -nocomplain -directory $dir *.c] {
set objectFile [\fBfile tail\fR [\fBfile rootname\fR $file]]$ext
if {[\fBfile exists\fR $objectFile]} {
lappend files $file
@@ -612,7 +638,7 @@ if {![\fBfile isdirectory\fR [\fBfile dirname\fR $newName]]} {
\fBfile mkdir\fR [\fBfile dirname\fR $newName]
}
\fBfile rename\fR $oldName $newName
-\fBfile link\fR \-symbolic $oldName $newName
+\fBfile link\fR -symbolic $oldName $newName
.CE
.PP
On Windows, a file can be
diff --git a/doc/filename.n b/doc/filename.n
index 29ff1d7..373a8ee 100644
--- a/doc/filename.n
+++ b/doc/filename.n
@@ -41,6 +41,7 @@ The rules for native names depend on the value reported in the Tcl
\fBplatform\fR element of the \fBtcl_platform\fR array:
.TP 10
\fBUnix\fR
+.
On Unix and Apple MacOS X platforms, Tcl uses path names where the
components are separated by slashes. Path names may be relative or
absolute, and file names may contain any character other than slash.
@@ -58,28 +59,35 @@ The following examples illustrate various forms of path
names:
.TP 15
\fB/\fR
+.
Absolute path to the root directory.
.TP 15
\fB/etc/passwd\fR
+.
Absolute path to the file named \fBpasswd\fR in the directory
\fBetc\fR in the root directory.
.TP 15
\fB\&.\fR
+.
Relative path to the current directory.
.TP 15
\fBfoo\fR
+.
Relative path to the file \fBfoo\fR in the current directory.
.TP 15
\fBfoo/bar\fR
+.
Relative path to the file \fBbar\fR in the directory \fBfoo\fR in the
current directory.
.TP 15
\fB\&../foo\fR
+.
Relative path to the file \fBfoo\fR in the directory above the current
directory.
.RE
.TP
\fBWindows\fR
+.
On Microsoft Windows platforms, Tcl supports both drive-relative and UNC
style names. Both \fB/\fR and \fB\e\fR may be used as directory separators
in either type of name. Drive-relative names consist of an optional drive
@@ -93,28 +101,34 @@ following examples illustrate various forms of path names:
.RS
.TP 15
\fB\&\e\eHost\eshare/file\fR
+.
Absolute UNC path to a file called \fBfile\fR in the root directory of
the export point \fBshare\fR on the host \fBHost\fR. Note that
repeated use of \fBfile dirname\fR on this path will give
\fB//Host/share\fR, and will never give just \fB//Host\fR.
.TP 15
\fBc:foo\fR
+.
Volume-relative path to a file \fBfoo\fR in the current directory on drive
\fBc\fR.
.TP 15
\fBc:/foo\fR
+.
Absolute path to a file \fBfoo\fR in the root directory of drive
\fBc\fR.
.TP 15
\fBfoo\ebar\fR
+.
Relative path to a file \fBbar\fR in the \fBfoo\fR directory in the current
directory on the current volume.
.TP 15
\fB\&\efoo\fR
+.
Volume-relative path to a file \fBfoo\fR in the root directory of the current
volume.
.TP 15
\fB\&\e\efoo\fR
+.
Volume-relative path to a file \fBfoo\fR in the root directory of the current
volume. This is not a valid UNC path, so the assumption is that the
extra backslashes are superfluous.
diff --git a/doc/for.n b/doc/for.n
index 759b66e..99d6003 100644
--- a/doc/for.n
+++ b/doc/for.n
@@ -37,7 +37,7 @@ The operation of \fBbreak\fR and \fBcontinue\fR are similar to the
corresponding statements in C.
\fBFor\fR returns an empty string.
.PP
-Note: \fItest\fR should almost always be enclosed in braces. If not,
+Note that \fItest\fR should almost always be enclosed in braces. If not,
variable substitutions will be made before the \fBfor\fR
command starts executing, which means that variable changes
made by the loop body will not be considered in the expression.
diff --git a/doc/format.n b/doc/format.n
index 1e70995..79de204 100644
--- a/doc/format.n
+++ b/doc/format.n
@@ -63,25 +63,20 @@ then all of the specifiers must be positional.
.PP
The second portion of a conversion specifier may contain any of the
following flag characters, in any order:
-.TP 10
-\fB\-\fR
+.IP \fB\-\fR 10
Specifies that the converted argument should be left-justified
in its field (numbers are normally right-justified with leading
spaces if needed).
-.TP 10
-\fB+\fR
+.IP \fB+\fR 10
Specifies that a number should always be printed with a sign,
even if positive.
-.TP 10
-\fIspace\fR
+.IP \fIspace\fR 10
Specifies that a space should be added to the beginning of the
number if the first character is not a sign.
-.TP 10
-\fB0\fR
+.IP \fB0\fR 10
Specifies that the number should be padded on the left with
zeroes instead of spaces.
-.TP 10
-\fB#\fR
+.IP \fB#\fR 10
Requests an alternate output form. For \fBo\fR conversions,
\fB0o\fR will be added to the beginning of the result unless
it is zero. For \fBx\fR or \fBX\fR conversions, \fB0x\fR
@@ -125,8 +120,8 @@ be omitted unless the \fB#\fR flag has been specified).
For integer conversions, it specifies a minimum number of digits
to print (leading zeroes will be added if necessary).
For \fBs\fR conversions it specifies the maximum number of characters to be
-printed; if the string is longer than this then the trailing characters will be dropped.
-If the precision is specified with \fB*\fR rather than a number
+printed; if the string is longer than this then the trailing characters will
+be dropped. If the precision is specified with \fB*\fR rather than a number
then the next argument to the \fBformat\fR command determines the precision;
it must be a numeric string.
.SS "OPTIONAL SIZE MODIFIER"
@@ -152,67 +147,53 @@ determined by the value of the \fBwordSize\fR element of the
The last thing in a conversion specifier is an alphabetic character
that determines what kind of conversion to perform.
The following conversion characters are currently supported:
-.TP 10
-\fBd\fR
+.IP \fBd\fR 10
Convert integer to signed decimal string.
-.TP 10
-\fBu\fR
+.IP \fBu\fR 10
Convert integer to unsigned decimal string.
-.TP 10
-\fBi\fR
+.IP \fBi\fR 10
Convert integer to signed decimal string (equivalent to \fBd\fR).
-.TP 10
-\fBo\fR
+.IP \fBo\fR 10
Convert integer to unsigned octal string.
-.TP 10
-\fBx\fR or \fBX\fR
+.IP "\fBx\fR or \fBX\fR" 10
Convert integer to unsigned hexadecimal string, using digits
.QW 0123456789abcdef
for \fBx\fR and
.QW 0123456789ABCDEF
for \fBX\fR).
-.TP 10
-\fBb\fR
+.IP \fBb\fR 10
Convert integer to unsigned binary string, using digits 0 and 1.
-.TP 10
-\fBc\fR
+.IP \fBc\fR 10
Convert integer to the Unicode character it represents.
-.TP 10
-\fBs\fR
+.IP \fBs\fR 10
No conversion; just insert string.
-.TP 10
-\fBf\fR
+.IP \fBf\fR 10
Convert number to signed decimal string of
the form \fIxx.yyy\fR, where the number of \fIy\fR's is determined by
the precision (default: 6).
If the precision is 0 then no decimal point is output.
-.TP 10
-\fBe\fR or \fBE\fR
+.IP "\fBe\fR or \fBE\fR" 10
Convert number to scientific notation in the
form \fIx.yyy\fBe\(+-\fIzz\fR, where the number of \fIy\fR's is determined
by the precision (default: 6).
If the precision is 0 then no decimal point is output.
If the \fBE\fR form is used then \fBE\fR is
printed instead of \fBe\fR.
-.TP 10
-\fBg\fR or \fBG\fR
+.IP "\fBg\fR or \fBG\fR" 10
If the exponent is less than \-4 or greater than or equal to the
precision, then convert number as for \fB%e\fR or
\fB%E\fR.
Otherwise convert as for \fB%f\fR.
Trailing zeroes and a trailing decimal point are omitted.
-.TP 10
-\fBa\fR or \fBA\fR
+.IP "\fBa\fR or \fBA\fR" 10
Convert double to hexadecimal notation in the form
\fI0x1.yyy\fBp\(+-\fIzz\fR, where the number of \fIy\fR's is
determined by the precision (default: 13).
If the \fBA\fR form is used then the hex characters
are printed in uppercase.
-.TP 10
-\fB%\fR
+.IP \fB%\fR 10
No conversion: just insert \fB%\fR.
-.TP 10
-\fBp\fR
+.IP \fBp\fR 10
Shorthand form for \fB0x%zx\fR, so it outputs the integer in
hexadecimal form with \fB0x\fR prefix.
.SH "DIFFERENCES FROM ANSI SPRINTF"
diff --git a/doc/fpclassify.n b/doc/fpclassify.n
index b6eb0e6..18722dc 100644
--- a/doc/fpclassify.n
+++ b/doc/fpclassify.n
@@ -19,26 +19,16 @@ package require \fBtcl 8.7\fR
.SH DESCRIPTION
The \fBfpclassify\fR command takes a floating point number, \fIvalue\fR, and
returns one of the following strings that describe it:
-.TP
-\fBzero\fR
-.
+.IP \fBzero\fR
\fIvalue\fR is a floating point zero.
-.TP
-\fBsubnormal\fR
-.
+.IP \fBsubnormal\fR
\fIvalue\fR is the result of a gradual underflow.
-.TP
-\fBnormal\fR
-.
+.IP \fBnormal\fR
\fIvalue\fR is an ordinary floating-point number (not zero, subnormal,
infinite, nor NaN).
-.TP
-\fBinfinite\fR
-.
+.IP \fBinfinite\fR
\fIvalue\fR is a floating-point infinity.
-.TP
-\fBnan\fR
-.
+.IP \fBnan\fR
\fIvalue\fR is Not-a-Number.
.PP
The \fBfpclassify\fR command throws an error if value is not a floating-point
diff --git a/doc/glob.n b/doc/glob.n
index 840d1b7..f93d6e6 100644
--- a/doc/glob.n
+++ b/doc/glob.n
@@ -28,6 +28,7 @@ in the list, so if a sorted list is required the caller should use
If the initial arguments to \fBglob\fR start with \fB\-\fR then
they are treated as switches. The following switches are
currently supported:
+.\" OPTION: -directory
.TP
\fB\-directory\fI directory\fR
.
@@ -37,17 +38,20 @@ contains glob-sensitive characters without the need to quote such
characters explicitly. This option may not be used in conjunction with
\fB\-path\fR, which is used to allow searching for complete file paths
whose names may contain glob-sensitive characters.
+.\" OPTION: -join
.TP
\fB\-join\fR
.
The remaining pattern arguments, after option processing, are treated
as a single pattern obtained by joining the arguments with directory
separators.
+.\" OPTION: -nocomplain
.TP
\fB\-nocomplain\fR
.
Allows an empty list to be returned without error; This is the
default behavior in Tcl 9.0, so this switch has no effect any more.
+.\" OPTION: -path
.TP
\fB\-path\fI pathPrefix\fR
.
@@ -61,6 +65,7 @@ as $path, but differing extensions, you should use
.QW "\fBglob \-path [file rootname $path] .*\fR"
which will work even if \fB$path\fR contains
numerous glob-sensitive characters.
+.\" OPTION: -tails
.TP
\fB\-tails\fR
.
@@ -74,6 +79,7 @@ For \fB\-path\fR specifications, the returned names will include the last
path segment, so
.QW "\fBglob \-tails \-path [file rootname /home/fred/foo.tex] .*\fR"
will return paths like \fBfoo.aux foo.bib foo.tex\fR etc.
+.\" OPTION: -types
.TP
\fB\-types\fI typeList\fR
.
@@ -116,6 +122,7 @@ except that the first case doesn't return the trailing
.QW /
and is more platform independent.
.RE
+.\" OPTION: --
.TP
\fB\-\|\-\fR
.
@@ -126,27 +133,17 @@ be treated as a \fIpattern\fR even if it starts with a \fB\-\fR.
The \fIpattern\fR arguments may contain any of the following
special characters, which are a superset of those supported by
\fBstring match\fR:
-.TP 10
-\fB?\fR
-.
+.IP \fB?\fR 10
Matches any single character.
-.TP 10
-\fB*\fR
-.
+.IP \fB*\fR 10
Matches any sequence of zero or more characters.
-.TP 10
-\fB[\fIchars\fB]\fR
-.
+.IP \fB[\fIchars\fB]\fR 10
Matches any single character in \fIchars\fR. If \fIchars\fR
contains a sequence of the form \fIa\fB\-\fIb\fR then any
character between \fIa\fR and \fIb\fR (inclusive) will match.
-.TP 10
-\fB\e\fIx\fR
-.
+.IP \fB\e\fIx\fR 10
Matches the character \fIx\fR.
-.TP 10
-\fB{\fIa\fB,\fIb\fB,\fI...\fR}
-.
+.IP \fB{\fIa\fB,\fIb\fB,\fI...\fB}\fR 10
Matches any of the sub-patterns \fIa\fR, \fIb\fR, etc.
.PP
On Unix, as with csh, a
diff --git a/doc/history.n b/doc/history.n
index 30a5eeb..1c2b581 100644
--- a/doc/history.n
+++ b/doc/history.n
@@ -37,8 +37,8 @@ matches the event in the sense of the \fBstring match\fR command.
The \fBhistory\fR command can take any of the following forms:
.TP
\fBhistory\fR
-Same
-as \fBhistory info\fR, described below.
+.
+Same as \fBhistory info\fR, described below.
.\" METHOD: add
.TP
\fBhistory add\fI command \fR?\fBexec\fR?
diff --git a/doc/http.n b/doc/http.n
index f35e917..93efbac 100644
--- a/doc/http.n
+++ b/doc/http.n
@@ -104,7 +104,7 @@ The response itself is returned by command \fB::http::responseBody\fR,
unless it has been redirected to a file by the \fI\-channel\fR option
of \fB::http::geturl\fR.
.SH COMMANDS
-.\" METHOD: config
+.\" COMMAND: config
.TP
\fB::http::config\fR ?\fIoptions\fR?
.
@@ -116,6 +116,7 @@ of the flags described below. In this case the current value of
that setting is returned. Otherwise, the options should be a set of
flags and values that define the configuration:
.RS
+.\" OPTION: -accept
.TP
\fB\-accept\fI mimetypes\fR
.
@@ -124,6 +125,7 @@ all types of documents are accepted. Otherwise you can supply a
comma-separated list of mime type patterns that you are
willing to receive. For example,
.QW "image/gif, image/jpeg, text/*" .
+.\" OPTION: -cookiejar
.TP
\fB\-cookiejar\fI command\fR
.VS TIP406
@@ -133,12 +135,14 @@ default value) is used, no cookies will be sent by requests or stored
from responses. The command indicated by \fIcommand\fR, if supplied,
must obey the \fBCOOKIE JAR PROTOCOL\fR described below.
.VE TIP406
+.\" OPTION: -pipeline
.TP
\fB\-pipeline\fI boolean\fR
.
Specifies whether HTTP/1.1 transactions on a persistent socket will be
pipelined. See the \fBPERSISTENT SOCKETS\fR section for details. The default
is 1.
+.\" OPTION: -postfresh
.TP
\fB\-postfresh\fI boolean\fR
.
@@ -146,6 +150,7 @@ Specifies whether requests that use the \fBPOST\fR method will always use a
fresh socket, overriding the \fB\-keepalive\fR option of
command \fBhttp::geturl\fR. See the \fBPERSISTENT SOCKETS\fR section for
details. The default is 0.
+.\" OPTION: -proxyauth
.TP
\fB\-proxyauth\fI string\fR
.
@@ -156,6 +161,7 @@ technique, e.g. Digest Authentication, the \fB\-proxyauth\fR option is not
useful. In that case the caller must expect a 407 response from the proxy,
compute the authentication value to be supplied, and use the \fB\-headers\fR
option to supply it as the value of the Proxy-Authorization header.
+.\" OPTION: -proxyfilter
.TP
\fB\-proxyfilter\fI command\fR
.
@@ -183,12 +189,14 @@ a \fBcatch\fR command. Therefore an error in the callback command does
not call the \fBbgerror\fR handler. See the \fBERRORS\fR section for
details.
.RE
+.\" OPTION: -proxyhost
.TP
\fB\-proxyhost\fI hostname\fR
.
The host name or IP address of the proxy server, if any. If this value is
the empty string, the URL host is contacted directly. See
\fB\-proxyfilter\fR for how the value is used.
+.\" OPTION: -proxynot
.TP
\fB\-proxynot\fI list\fR
.
@@ -198,11 +206,13 @@ element using a case-insensitive \fBstring match\fR. It is often convenient
to use the wildcard "*" at the start of a domain name (e.g. *.example.com) or
at the end of an IP address (e.g. 192.168.0.*). See \fB\-proxyfilter\fR for
how the value is used.
+.\" OPTION: -proxyport
.TP
\fB\-proxyport\fI number\fR
.
The port number of the proxy server. See \fB\-proxyfilter\fR for how the
value is used.
+.\" OPTION: -repost
.TP
\fB\-repost\fI boolean\fR
.
@@ -215,30 +225,34 @@ that uses \fBhttp::geturl\fR is expected to seek user confirmation before
retrying the POST. The value \fBtrue\fR should be used only under certain
conditions. See the \fBPERSISTENT SOCKETS\fR section for details. The
default is 0.
+.\" OPTION: -threadlevel
.TP
\fB\-threadlevel\fI level\fR
.
Specifies whether and how to use the \fBThread\fR package. Possible values
of \fIlevel\fR are 0, 1 or 2.
.RS
+.IP \fB0\fR
+(the default) do not use Thread
+.IP \fB1\fR
+use Thread if it is available, do not use it if it is unavailable
+.IP \fB2\fR
+use Thread if it is available, raise an error if it is unavailable
.PP
-.DS
-0 - (the default) do not use Thread
-1 - use Thread if it is available, do not use it if it is unavailable
-2 - use Thread if it is available, raise an error if it is unavailable
-.DE
The Tcl \fBsocket -async\fR command can block in adverse cases (e.g. a slow
DNS lookup). Using the Thread package works around this problem, for both
HTTP and HTTPS transactions. Values of \fIlevel\fR other than 0 are
available only to the main interpreter in each thread. See
section \fBTHREADS\fR for more information.
.RE
+.\" OPTION: -urlencoding
.TP
\fB\-urlencoding\fI encoding\fR
.
The \fIencoding\fR used for creating the x-url-encoded URLs with
\fB::http::formatQuery\fR and \fB::http::quoteString\fR.
The default is \fButf-8\fR, as specified by RFC 2718.
+.\" OPTION: -useragent
.TP
\fB\-useragent\fI string\fR
.
@@ -249,6 +263,7 @@ the version numbers of \fBhttp\fR and \fBTcl\fR, and is (for example)
A safe interpreter cannot determine its operating system, and so the default
in a safe interpreter is to use a Windows 10 value with the current version
numbers of \fBhttp\fR and \fBTcl\fR.
+.\" OPTION: -zip
.TP
\fB\-zip\fI boolean\fR
.
@@ -260,7 +275,7 @@ In either case the default can be overridden for an individual request by
supplying a custom \fBAccept-Encoding\fR header in the \fB\-headers\fR option
of \fBhttp::geturl\fR. The default value is 1.
.RE
-.\" METHOD: geturl
+.\" COMMAND: geturl
.TP
\fB::http::geturl\fI url\fR ?\fIoptions\fR?
.
@@ -276,6 +291,7 @@ completes, unless the \fB\-command\fR option specifies a callback
that is invoked when the HTTP transaction completes.
\fB::http::geturl\fR takes several options:
.RS
+.\" OPTION: -binary
.TP
\fB\-binary\fI boolean\fR
.
@@ -283,17 +299,20 @@ Specifies whether to force interpreting the URL data as binary. Normally
this is auto-detected (anything not beginning with a \fBtext\fR content
type or whose content encoding is \fBgzip\fR or \fBdeflate\fR is
considered binary data).
+.\" OPTION: -blocksize
.TP
\fB\-blocksize\fI size\fR
.
The block size used when reading the URL.
At most \fIsize\fR bytes are read at once. After each block, a call to the
\fB\-progress\fR callback is made (if that option is specified).
+.\" OPTION: -channel
.TP
\fB\-channel\fI name\fR
.
Copy the URL contents to channel \fIname\fR instead of saving it in
a Tcl variable for retrieval by \fB::http::responseBody\fR.
+.\" OPTION: -command
.TP
\fB\-command\fI callback\fR
.
@@ -320,6 +339,7 @@ a \fBcatch\fR command. Therefore an error in the callback command does
not call the \fBbgerror\fR handler. See the \fBERRORS\fR section for
details.
.RE
+.\" OPTION: -guesstype
.TP
\fB\-guesstype\fI boolean\fR
.
@@ -333,7 +353,8 @@ detecting XML documents that begin with an XML declaration. In this case
the \fBContent-Type\fR is changed to "application/xml", the binary flag
state(binary) is changed to 0, and the character set is changed to
the one specified by the "encoding" tag of the XML line, or to utf-8 if no
-encoding is specified. Not used if a \fI\-channel\fR is specified.
+encoding is specified. Not used if a \fB\-channel\fR is specified.
+.\" OPTION: -handler
.TP
\fB\-handler\fI callback\fR
.
@@ -381,6 +402,7 @@ a \fBcatch\fR command. Therefore an error in the callback command does
not call the \fBbgerror\fR handler. See the \fBERRORS\fR section for
details.
.RE
+.\" OPTION: -headers
.TP
\fB\-headers\fI keyvaluelist\fR
.
@@ -398,11 +420,13 @@ HTTP request:
Pragma: no-cache
.CE
.RE
+.\" OPTION: -keepalive
.TP
\fB\-keepalive\fI boolean\fR
.
If boolean \fBtrue\fR, attempt to keep the connection open for servicing
multiple requests. Default is 0.
+.\" OPTION: -method
.TP
\fB\-method\fI type\fR
.
@@ -420,11 +444,13 @@ caller must also supply the option
\-headers {Content-Length 0}
.CE
.RE
+.\" OPTION: -myaddr
.TP
\fB\-myaddr\fI address\fR
.
Pass an specific local address to the underlying \fBsocket\fR call in case
multiple interfaces are available.
+.\" OPTION: -progress
.TP
\fB\-progress\fI callback\fR
.
@@ -451,12 +477,14 @@ proc httpProgress {token total current} {
}
.CE
.RE
+.\" OPTION: -protocol
.TP
\fB\-protocol\fI version\fR
.
Select the HTTP protocol version to use. This should be 1.0 or 1.1 (the
default). Should only be necessary for servers that do not understand or
otherwise complain about HTTP/1.1.
+.\" OPTION: -query
.TP
\fB\-query\fI query\fR
.
@@ -475,6 +503,7 @@ x-url-encoding formatted query-string (this \fB\-type\fR and query format are
used in a POST submitted from an html form). The \fB::http::formatQuery\fR
procedure can be used to do the formatting.
.RE
+.\" OPTION: -queryblocksize
.TP
\fB\-queryblocksize\fI size\fR
.
@@ -484,6 +513,7 @@ At most
bytes are written at once. After each block, a call to the
\fB\-queryprogress\fR
callback is made (if that option is specified).
+.\" OPTION: -querychannel
.TP
\fB\-querychannel\fI channelID\fR
.
@@ -495,6 +525,7 @@ If a \fBContent-Length\fR header is not specified via the \fB\-headers\fR
options, \fB::http::geturl\fR attempts to determine the size of the post data
in order to create that header. If it is
unable to determine the size, it returns an error.
+.\" OPTION: -queryprogress
.TP
\fB\-queryprogress\fI callback\fR
.
@@ -503,12 +534,14 @@ then the \fIcallback\fR is made after each transfer of data to the URL
in a POST request (i.e. a call to \fB::http::geturl\fR with
option \fB\-query\fR or \fB\-querychannel\fR) and acts exactly like
the \fB\-progress\fR option (the callback format is the same).
+.\" OPTION: -strict
.TP
\fB\-strict\fI boolean\fR
.
If true then the command will test that the URL complies with RFC 3986, i.e.
that it has no characters that should be "x-url-encoded" (e.g. a space should
be encoded to "%20"). Default value is 1.
+.\" OPTION: -timeout
.TP
\fB\-timeout\fI milliseconds\fR
.
@@ -519,12 +552,14 @@ the \fB\-command\fR callback, if specified.
The return value of \fB::http::status\fR (and the value of the \fIstatus\fR key
in the dictionary returned by \fB::http::responseInfo\fR) is \fBtimeout\fR
after a timeout has occurred.
+.\" OPTION: -type
.TP
\fB\-type\fI mime-type\fR
.
Use \fImime-type\fR as the \fBContent-Type\fR value, instead of the
default value (\fBapplication/x-www-form-urlencoded\fR) during a
POST operation.
+.\" OPTION: -validate
.TP
\fB\-validate\fI boolean\fR
.
@@ -535,7 +570,7 @@ would for a HTTP GET request, but omits the response entity
transaction using command \fB::http::responseHeaders\fR or, for selected
information, \fB::http::responseInfo\fR.
.RE
-.\" METHOD: formatQuery
+.\" COMMAND: formatQuery
.TP
\fB::http::formatQuery\fI key value\fR ?\fIkey value\fR ...?
.
@@ -544,20 +579,20 @@ number of arguments that are the keys and values of the query. It
encodes the keys and values, and generates one string that has the
proper & and = separators. The result is suitable for the
\fB\-query\fR value passed to \fB::http::geturl\fR.
-.\" METHOD: quoteString
+.\" COMMAND: quoteString
.TP
\fB::http::quoteString\fI value\fR
.
This procedure does x-url-encoding of string. It takes a single argument and
encodes it.
-.\" METHOD: reset
+.\" COMMAND: reset
.TP
\fB::http::reset\fI token\fR ?\fIwhy\fR?
.
This command resets the HTTP transaction identified by \fItoken\fR, if any.
This sets the \fBstate(status)\fR value to \fIwhy\fR, which defaults to
\fBreset\fR, and then calls the registered \fB\-command\fR callback.
-.\" METHOD: wait
+.\" COMMAND: wait
.TP
\fB::http::wait\fI token\fR
.
@@ -568,7 +603,7 @@ uses \fBvwait\fR. Also, it is not useful for the case where
because in this case the \fB::http::geturl\fR call does not return
until the HTTP transaction is complete, and thus there is nothing to
wait for.
-.\" METHOD: status
+.\" COMMAND: status
.TP
\fB::http::status\fI token\fR
.
@@ -582,20 +617,20 @@ section \fBERRORS\fR (below).
The name "status" is not related to the terms "status line" and
"status code" that are defined for a HTTP response.
.RE
-.\" METHOD: size
+.\" COMMAND: size
.TP
\fB::http::size\fI token\fR
.
This command returns the number of bytes
received so far from the URL in the \fB::http::geturl\fR call.
-.\" METHOD: error
+.\" COMMAND: error
.TP
\fB::http::error\fI token\fR
.
This command returns the error information if the HTTP transaction failed,
or the empty string if there was no error. The information is a Tcl list of
the error message, stack trace, and error code.
-.\" METHOD: postError
+.\" COMMAND: postError
.TP
\fB::http::postError\fI token\fR
.
@@ -607,7 +642,7 @@ string if there was no error. The information is a Tcl list of the error
message, stack trace, and error code. When this type of error occurs,
the \fB::http::geturl\fR command continues the transaction and attempts to
receive a response from the server.
-.\" METHOD: cleanup
+.\" COMMAND: cleanup
.TP
\fB::http::cleanup\fI token\fR
.
@@ -619,7 +654,7 @@ this function after you are done with a given HTTP request. Not doing
so will result in memory not being freed, and if your app calls
\fB::http::geturl\fR enough times, the memory leak could cause a
performance hit...or worse.
-.\" METHOD: requestLine
+.\" COMMAND: requestLine
.TP
\fB::http::requestLine\fI token\fR
.
@@ -633,7 +668,7 @@ GET / HTTP/1.1
GET /introduction.html?subject=plumbing HTTP/1.1
POST /forms/order.html HTTP/1.1
.RE
-.\" METHOD: requestHeaders
+.\" COMMAND: requestHeaders
.TP
\fB::http::requestHeaders\fI token\fR ?\fIheaderName\fR?
.
@@ -646,7 +681,7 @@ are returned. If two arguments are supplied, the
second provides the value of a header name. Only headers with the requested
name (converted to lower case) are returned. If no such headers are found,
an empty list is returned.
-.\" METHOD: requestHeaderValue
+.\" COMMAND: requestHeaderValue
.TP
\fB::http::requestHeaderValue\fI token headerName\fR
.
@@ -656,7 +691,7 @@ lower case. If no such header exists, the return value is the empty string.
If there are multiple headers named \fIheaderName\fR, the result is obtained
by joining the individual values with the string ", " (comma and space),
preserving their order.
-.\" METHOD: responseLine
+.\" COMMAND: responseLine
.TP
\fB::http::responseLine\fI token\fR
.
@@ -684,7 +719,7 @@ and can be changed without affecting the HTTP protocol. The recommended
values (RFC 7231 and IANA assignments) for each code are provided by the
command \fB::http::reasonPhrase\fR.
.RE
-.\" METHOD: responseCode
+.\" COMMAND: responseCode
.TP
\fB::http::responseCode\fI token\fR
.
@@ -692,7 +727,7 @@ This command returns the "status code" (200, 404, etc.) of the server
"status line". If a three-digit code cannot be found, the full status
line is returned. See command \fB::http::responseLine\fR for more information
on the "status line".
-.\" METHOD: reasonPhrase
+.\" COMMAND: reasonPhrase
.TP
\fB::http::reasonPhrase\fI code\fR
.
@@ -715,7 +750,7 @@ the "reason phrase" stored in key \fIreasonPhrase\fR).
A registry of valid status codes is maintained at
https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
.RE
-.\" METHOD: responseHeaders
+.\" COMMAND: responseHeaders
.TP
\fB::http::responseHeaders\fI token\fR ?\fIheaderName\fR?
.
@@ -731,7 +766,7 @@ supplied, it provides the value of a header name. Only headers with the
requested name (converted to lower case) are returned. If no such headers
are found, an empty list is returned. See section \fBMETADATA\fR for more
information.
-.\" METHOD: responseHeaderValue
+.\" COMMAND: responseHeaderValue
.TP
\fB::http::responseHeaderValue\fI token headerName\fR
.
@@ -745,7 +780,7 @@ in this manner, except \fBSet-Cookie\fR which does not conform to the
comma-separated-list syntax and cannot be combined into a single value.
Each \fBSet-Cookie\fR header must be treated individually, e.g. by processing
the return value of \fB::http::responseHeaders\fI token\fR \fBSet-Cookie\fR.
-.\" METHOD: responseInfo
+.\" COMMAND: responseInfo
.TP
\fB::http::responseInfo\fI token\fR
.
@@ -769,7 +804,7 @@ text resource as a binary, or vice versa.
After a POST transaction, check the value of \fIpostError\fR to verify that
the request body was uploaded without error.
.RE
-.\" METHOD: responseBody
+.\" COMMAND: responseBody
.TP
\fB::http::responseBody\fI token\fR
.
@@ -783,7 +818,7 @@ Other terms for
"resource", "response body after decoding", "payload",
"message body after decoding", "content(s)", and "file".
.RE
-.\" METHOD: register
+.\" COMMAND: register
.TP
\fB::http::register\fI proto port command\fR ?\fIsocketCmdVarName\fR? ?\fIuseSockThread\fR? ?\fIendToEndProxy\fR?
.
@@ -821,7 +856,6 @@ For example,
.PP
.CS
package require http
-
package require tls
::http::register https 443 ::tls::socket ::tls::socketCmd 1 1
@@ -830,7 +864,7 @@ set token [::http::geturl https://my.secure.site/]
.CE
.RE
.RE
-.\" METHOD: registerError
+.\" COMMAND: registerError
.TP
\fB::http::registerError\fI sock\fR ?\fImessage\fR?
.
@@ -842,7 +876,7 @@ propagate to \fBhttp\fR. The command allows \fBhttp\fR to provide a
precise error message rather than a general one. The command returns the
value provided by the last call with argument \fImessage\fR, or the empty
string if no such call has been made.
-.\" METHOD: unregister
+.\" COMMAND: unregister
.TP
\fB::http::unregister\fI proto\fR
.
@@ -850,22 +884,22 @@ This procedure unregisters a protocol handler that was previously
registered via \fB::http::register\fR, returning a six-item list of
the values that were previously supplied to \fB::http::register\fR
if there was such a handler, and an error if there was no such handler.
-.\" METHOD: code
+.\" COMMAND: code
.TP
\fB::http::code\fI token\fR
.
An alternative name for the command \fB::http::responseLine\fR
-.\" METHOD: data
+.\" COMMAND: data
.TP
\fB::http::data\fI token\fR
.
An alternative name for the command \fB::http::responseBody\fR.
-.\" METHOD: meta
+.\" COMMAND: meta
.TP
\fB::http::meta\fI token\fR ?\fIheaderName\fR?
.
An alternative name for the command \fB::http::responseHeaders\fR
-.\" METHOD: ncode
+.\" COMMAND: ncode
.TP
\fB::http::ncode\fI token\fR
.
@@ -916,41 +950,29 @@ determined by examining the status from \fB::http::status\fR (or the value
of the \fIstatus\fR key in the dictionary returned
by \fB::http::responseInfo\fR).
These are described below.
-.TP
-\fBok\fR
-.
+.IP \fBok\fR
If the HTTP transaction completes entirely, then status will be \fBok\fR.
However, you should still check the \fB::http::responseLine\fR value to get
the HTTP status. The \fB::http::responseCode\fR procedure provides just
the numeric error (e.g., 200, 404 or 500) while the \fB::http::responseLine\fR
procedure returns a value like
.QW "HTTP 404 File not found" .
-.TP
-\fBeof\fR
-.
+.IP \fBeof\fR
If the server closes the socket without replying, then no error
is raised, but the status of the transaction will be \fBeof\fR.
-.TP
-\fBerror\fR
-.
+.IP \fBerror\fR
The error message, stack trace, and error code are accessible
via \fB::http::error\fR. The error message is also provided by the value of
the \fIerror\fR key in the dictionary returned by \fB::http::responseInfo\fR.
-.TP
-\fBtimeout\fR
-.
+.IP \fBtimeout\fR
A timeout occurred before the transaction could complete.
-.TP
-\fBreset\fR
-.
+.IP \fBreset\fR
The user has called \fB::http::reset\fR.
-.TP
-\fB""\fR
-.
+.IP \fB""\fR
(empty string) The transaction has not yet finished.
.PP
Another error possibility is that \fB::http::geturl\fR failed to
-write the whole of the POST request body (\fB-query\fR or \fB-querychannel\fR
+write the whole of the POST request body (\fB\-query\fR or \fB\-querychannel\fR
data) to the server. \fB::http::geturl\fR stores the error message for later
retrieval by the \fB::http::postError\fR or \fB::http::responseInfo\fR
commands, and then attempts to complete the transaction.
@@ -976,46 +998,35 @@ the \fBdict\fR are:
.PP
.RS
.RS
+.\" TODO: Find a better way to mark this up!
\fB===== Essential Values =====\fR
.RE
.RE
-.TP
-\fBstage\fR
-.
+.IP \fBstage\fR
This value, set by \fB::http::geturl\fR, describes the stage that the
transaction has reached. Values, in order of the transaction lifecycle,
are: "created", "connecting", "header", "body", and "complete". The
other \fBdict\fR keys will not be available until the value of \fBstage\fR
is "body" or "complete". The key \fBcurrentSize\fR has its final value only
when \fBstage\fR is "complete".
-.TP
-\fBstatus\fR
-.
+.IP \fBstatus\fR
This value, set by \fB::http::geturl\fR, is "ok" for a successful transaction;
"eof", "error", "timeout", or "reset" for an unsuccessful transaction; or ""
if the transaction is still in progress. The value is the same as that
returned by command \fB::http::status\fR. The meaning of these values is
described in the section \fBERRORS\fR (above).
-.TP
-\fBresponseCode\fR
-.
+.IP \fBresponseCode\fR
The "HTTP status code" sent by the server in the first line (the "status line")
of the response. If the value cannot be extracted from the status line, the
full status line is returned.
-.TP
-\fBreasonPhrase\fR
-.
+.IP \fBreasonPhrase\fR
The "reason phrase" sent by the server as a description of the HTTP status code.
If the value cannot be extracted from the status line, the full status
line is returned.
-.TP
-\fBcontentType\fR
-.
+.IP \fBcontentType\fR
The value of the \fBContent-Type\fR response header or, if the header was not
supplied, the default value "application/octet-stream".
-.TP
-\fBbinary\fR
-.
+.IP \fBbinary\fR
This boolean value, set by \fB::http::geturl\fR, describes how the command
has interpreted the entity returned by the server (after decoding any
compression specified by the \fBContent-Encoding\fR response header).
@@ -1027,7 +1038,7 @@ The value is \fBtrue\fR if http has interpreted the decoded entity as binary.
The value returned by \fB::http::responseBody\fR is a Tcl binary string.
This is a suitable format for image data, zip files, etc.
\fB::http::geturl\fR chooses this value if the user has requested a binary
-interpretation by passing the option \fI\-binary\fR to the command, or if the
+interpretation by passing the option \fB\-binary\fR to the command, or if the
server has supplied a binary content type in a \fBContent-Type\fR response
header, or if the server has not supplied any \fBContent-Type\fR header.
.PP
@@ -1040,15 +1051,11 @@ It is always worth checking the value of "binary" after a HTTP transaction,
to determine whether a misconfigured server has caused http to interpret a
text resource as a binary, or vice versa.
.RE
-.TP
-\fBredirection\fR
-.
+.IP \fBredirection\fR
The URL that is the redirection target. The value is that of the \fBLocation\fR
response header. This header is sent when a response has status code
3XX (redirection).
-.TP
-\fBupgrade\fR
-.
+.IP \fBupgrade\fR
If not empty, the value indicates the protocol(s) to which the server will
switch after completion of this transaction, while continuing to use the
same connection. When the server intends to switch protocols, it will also
@@ -1056,14 +1063,10 @@ send the value "101" as the status code (the \fBresponseCode\fR key), and the
word "upgrade" as an element of the \fBConnection\fR response header (the
\fBconnectionResponse\fR key), and it will not send a response body.
See the section \fBPROTOCOL UPGRADES\fR for more information.
-.TP
-\fBerror\fR
-.
+.IP \fBerror\fR
The error message, if there is one. Further information, including a stack
trace and error code, are available from command \fB::http::error\fR.
-.TP
-\fBpostError\fR
-.
+.IP \fBpostError\fR
The error message (if any) generated when a HTTP POST request sends its
request-body to the server. Further information, including a stack trace
and error code, are available from command \fB::http::postError\fR. A POST
@@ -1077,13 +1080,9 @@ the request-body.
\fB===== Informational Values =====\fR
.RE
.RE
-.TP
-\fBmethod\fR
-.
+.IP \fBmethod\fR
The HTTP method used in the request.
-.TP
-\fBcharset\fR
-.
+.IP \fBcharset\fR
The value of the charset attribute of the \fBContent-Type\fR response header.
The charset value is used only for a text resource. If the server did not
specify a charset, the value defaults to that of the
@@ -1091,72 +1090,48 @@ variable \fB::http::defaultCharset\fR, which unless it has been deliberately
modified by the caller is \fBiso8859-1\fR. Incoming text data is automatically
converted from the character set defined by \fBcharset\fR to Tcl's internal
Unicode representation, i.e. to a Tcl string.
-.TP
-\fBcompression\fR
-.
+.IP \fBcompression\fR
A copy of the \fBContent-Encoding\fR response-header value.
-.TP
-\fBhttpRequest\fR
-.
+.IP \fBhttpRequest\fR
The version of HTTP specified in the request (i.e. sent in the request line).
The value is that of the option \fB\-protocol\fR supplied
to \fB::http::geturl\fR (default value "1.1"), unless the command reduced the
value to "1.0" because it was passed the \fB\-handler\fR option.
-.TP
-\fBhttpResponse\fR
-.
+.IP \fBhttpResponse\fR
The version of HTTP used by the server (obtained from the response
"status line"). The server uses this version of HTTP in its response, but
ensures that this response is compatible with the HTTP version specified in the
client's request. If the value cannot be extracted from the status line, the
full status line is returned.
-.TP
-\fBurl\fR
-.
+.IP \fBurl\fR
The requested URL, typically the URL supplied as an argument
to \fB::http::geturl\fR but without its "fragment" (the final part of the URL
beginning with "#").
-.TP
-\fBconnectionRequest\fR
-.
+.IP \fBconnectionRequest\fR
The value, if any, sent to the server in \fBConnection\fR request header(s).
-.TP
-\fBconnectionResponse\fR
-.
+.IP \fBconnectionResponse\fR
The value, if any, received from the server in \fBConnection\fR response
header(s).
-.TP
-\fBconnectionActual\fR
-.
+.IP \fBconnectionActual\fR
This value, set by \fB::http::geturl\fR, reports whether the connection was
closed after the transaction (value "close"), or left open (value "keep-alive").
-.TP
-\fBtransferEncoding\fR
-.
+.IP \fBtransferEncoding\fR
The value of the Transfer-Encoding response header, if it is present.
The value is either "chunked" (indicating HTTP/1.1 "chunked encoding") or
the empty string.
-.TP
-\fBtotalPost\fR
-.
+.IP \fBtotalPost\fR
The total length of the request body in a POST request.
-.TP
-\fBcurrentPost\fR
-.
+.IP \fBcurrentPost\fR
The number of bytes of the POST request body sent to the server so far.
The value is the same as that returned by command \fB::http::size\fR.
-.TP
-\fBtotalSize\fR
-.
+.IP \fBtotalSize\fR
A copy of the \fBContent-Length\fR response-header value.
The number of bytes specified in a \fBContent-Length\fR header, if one
was sent. If none was sent, the value is 0. A correctly configured server
omits this header if the transfer-encoding is "chunked", or (for older
servers) if the server closes the connection when it reaches the end of
the resource.
-.TP
-\fBcurrentSize\fR
-.
+.IP \fBcurrentSize\fR
The number of bytes fetched from the server so far.
.PP
.SS "MORE METADATA"
@@ -1181,63 +1156,49 @@ Some of the header names (metadata keys) are listed below, but the HTTP
standard defines several more, and servers are free to add their own.
When a dictionary key is mentioned below, this refers to the \fBdict\fR
value returned by command \fB::http::responseInfo\fR.
-.TP
-\fBContent-Type\fR
-.
+.IP \fBContent-Type\fR
The content type of the URL contents. Examples include \fBtext/html\fR,
\fBimage/gif,\fR \fBapplication/postscript\fR and
\fBapplication/x-tcl\fR. Text values typically specify a character set, e.g.
\fBtext/html; charset=UTF-8\fR. Dictionary key \fIcontentType\fR.
-.TP
-\fBContent-Length\fR
-.
+.IP \fBContent-Length\fR
The advertised size in bytes of the contents, available as dictionary
key \fItotalSize\fR. The actual number of bytes read by \fB::http::geturl\fR
so far is available as dictionary key \fBcurrentSize\fR.
-.TP
-\fBContent-Encoding\fR
-.
+.IP \fBContent-Encoding\fR
The compression algorithm used for the contents.
Examples include \fBgzip\fR, \fBdeflate\fR.
Dictionary key \fIcontent\fR.
-.TP
-\fBLocation\fR
-.
+.IP \fBLocation\fR
This header is sent when a response has status code 3XX (redirection).
It provides the URL that is the redirection target.
Dictionary key \fIredirection\fR.
-.TP
-\fBSet-Cookie\fR
-.
+.IP \fBSet-Cookie\fR
This header is sent to offer a cookie to the client. Cookie management is
-done by the \fB::http::config\fR option \fI\-cookiejar\fR, and so
+done by the \fB::http::config\fR option \fB\-cookiejar\fR, and so
the \fBSet-Cookie\fR headers need not be parsed by user scripts.
See section \fBCOOKIE JAR PROTOCOL\fR.
-.TP
-\fBConnection\fR
-.
+.IP \fBConnection\fR
The value can be supplied as a comma-separated list, or by multiple headers.
The list often has only one element, either "close" or "keep-alive".
The value "upgrade" indicates a successful upgrade request and is typically
combined with the status code 101, an \fBUpgrade\fR response header, and no
response body. Dictionary key \fIconnectionResponse\fR.
-.TP
-\fBUpgrade\fR
-.
+.IP \fBUpgrade\fR
The value indicates the protocol(s) to which the server will switch
immediately after the empty line that terminates the 101 response headers.
Dictionary key \fIupgrade\fR.
.RE
.PP
.SS "EVEN MORE METADATA"
-.PP
-1. Details of the HTTP request. The request is determined by the options
+.IP 1.
+Details of the HTTP request. The request is determined by the options
supplied to \fB::http::geturl\fR and \fB::http::config\fR. However, it is
sometimes helpful to examine what \fB::http::geturl\fR actually sent to the
server, and this information is available through
commands \fB::http::requestHeaders\fR and \fB::http::requestLine\fR.
-.PP
-2. The state array: the internal variables of \fB::http::geturl\fR.
+.IP 2.
+The state array: the internal variables of \fB::http::geturl\fR.
It may sometimes be helpful to examine this array.
Details are given in the next section.
.SH "STATE ARRAY"
@@ -1265,114 +1226,60 @@ values returned by commands as described below. When a dictionary key is
mentioned below, this refers to the \fBdict\fR value returned by
command \fB::http::responseInfo\fR.
.RS
-.TP
-\fBbinary\fR
-.
+.IP \fBbinary\fR
For dictionary key \fIbinary\fR.
-.TP
-\fBbody\fR
-.
+.IP \fBbody\fR
For command \fB::http::responseBody\fR.
-.TP
-\fBcharset\fR
-.
+.IP \fBcharset\fR
For dictionary key \fIcharset\fR.
-.TP
-\fBcoding\fR
-.
+.IP \fBcoding\fR
For dictionary key \fIcompression\fR.
-.TP
-\fBconnection\fR
-.
+.IP \fBconnection\fR
For dictionary key \fIconnectionActual\fR.
-.TP
-\fBcurrentsize\fR
-.
+.IP \fBcurrentsize\fR
For command \fB::http::size\fR; and for dictionary key \fIcurrentSize\fR.
-.TP
-\fBerror\fR
-.
+.IP \fBerror\fR
For command \fB::http::error\fR; part is used in dictionary key \fIerror\fR.
-.TP
-\fBhttp\fR
-.
+.IP \fBhttp\fR
For command \fB::http::responseLine\fR.
-.TP
-\fBhttpResponse\fR
-.
+.IP \fBhttpResponse\fR
For dictionary key \fIhttpResponse\fR.
-.TP
-\fBmeta\fR
-.
+.IP \fBmeta\fR
For command \fB::http::responseHeaders\fR. Further discussion above in the
section \fBMORE METADATA\fR.
-.TP
-\fBmethod\fR
-.
+.IP \fBmethod\fR
For dictionary key \fImethod\fR.
-.TP
-\fBposterror\fR
-.
+.IP \fBposterror\fR
For dictionary key \fIpostError\fR.
-.TP
-\fBpostErrorFull\fR
-.
+.IP \fBpostErrorFull\fR
For command \fB::http::postError\fR.
-.TP
-\fB\-protocol\fR
-.
+.IP \fB\-protocol\fR
For dictionary key \fIhttpRequest\fR.
-.TP
-\fBquerylength\fR
-.
+.IP \fBquerylength\fR
For dictionary key \fItotalPost\fR.
-.TP
-\fBqueryoffset\fR
-.
+.IP \fBqueryoffset\fR
For dictionary key \fIcurrentPost\fR.
-.TP
-\fBreasonPhrase\fR
-.
+.IP \fBreasonPhrase\fR
For dictionary key \fIreasonPhrase\fR.
-.TP
-\fBrequestHeaders\fR
-.
+.IP \fBrequestHeaders\fR
For command \fB::http::requestHeaders\fR.
-.TP
-\fBrequestLine\fR
-.
+.IP \fBrequestLine\fR
For command \fB::http::requestLine\fR.
-.TP
-\fBresponseCode\fR
-.
+.IP \fBresponseCode\fR
For dictionary key \fIresponseCode\fR.
-.TP
-\fBstate\fR
-.
+.IP \fBstate\fR
For dictionary key \fIstage\fR.
-.TP
-\fBstatus\fR
-.
+.IP \fBstatus\fR
For command \fB::http::status\fR; and for dictionary key \fIstatus\fR.
-.TP
-\fBtotalsize\fR
-.
+.IP \fBtotalsize\fR
For dictionary key \fItotalSize\fR.
-.TP
-\fBtransfer\fR
-.
+.IP \fBtransfer\fR
For dictionary key \fItransferEncoding\fR.
-.TP
-\fBtype\fR
-.
+.IP \fBtype\fR
For dictionary key \fIcontentType\fR.
-.TP
-\fBupgrade\fR
-.
+.IP \fBupgrade\fR
For dictionary key \fIupgrade\fR.
-.TP
-\fBurl\fR
-.
+.IP \fBurl\fR
For dictionary key \fIurl\fR.
.RE
.SH "PERSISTENT CONNECTIONS"
@@ -1483,7 +1390,7 @@ Cookies are short key-value pairs used to implement sessions within the
otherwise-stateless HTTP protocol. (See RFC 6265 for details; Tcl does not
implement the Cookie2 protocol as that is rarely seen in the wild.)
.PP
-Cookie storage managment commands \(em
+Cookie storage management commands \(em
.QW "cookie jars"
\(em must support these subcommands which form the HTTP cookie storage
management protocol. Note that \fIcookieJar\fR below does not have to be a
@@ -1521,58 +1428,40 @@ returned by a request; the result of this command is ignored. The cookie
(which will have been parsed by the http package) is described by a
dictionary, \fIcookieDictionary\fR, that may have the following keys:
.RS
-.TP
-\fBdomain\fR
-.
+.IP \fBdomain\fR
This is always present. Its value describes the domain hostname \fIor
prefix\fR that the cookie should be returned for. The checking of the domain
against the origin (below) should be careful since sites that issue cookies
should only do so for domains related to themselves. Cookies that do not obey
a relevant origin matching rule should be ignored.
-.TP
-\fBexpires\fR
-.
+.IP \fBexpires\fR
This is optional. If present, the cookie is intended to be a persistent cookie
and the value of the option is the Tcl timestamp (in seconds from the same
base as \fBclock seconds\fR) of when the cookie expires (which may be in the
past, which should result in the cookie being deleted immediately). If absent,
the cookie is intended to be a session cookie that should be not persisted
beyond the lifetime of the cookie jar.
-.TP
-\fBhostonly\fR
-.
+.IP \fBhostonly\fR
This is always present. Its value is a boolean that describes whether the
cookie is a single host cookie (true) or a domain-level cookie (false).
-.TP
-\fBhttponly\fR
-.
+.IP \fBhttponly\fR
This is always present. Its value is a boolean that is true when the site
wishes the cookie to only ever be used with HTTP (or HTTPS) traffic.
-.TP
-\fBkey\fR
-.
+.IP \fBkey\fR
This is always present. Its value is the \fIkey\fR of the cookie, which is
part of the information that must be return when sending this cookie back in a
future request.
-.TP
-\fBorigin\fR
-.
+.IP \fBorigin\fR
This is always present. Its value describes where the http package believes it
received the cookie from, which may be useful for checking whether the
cookie's domain is valid.
-.TP
-\fBpath\fR
-.
+.IP \fBpath\fR
This is always present. Its value describes the path prefix of requests to the
cookie domain where the cookie should be returned.
-.TP
-\fBsecure\fR
-.
+.IP \fBsecure\fR
This is always present. Its value is a boolean that is true when the cookie
should only used on requests sent over secure channels (typically HTTPS).
-.TP
-\fBvalue\fR
-.
+.IP \fBvalue\fR
This is always present. Its value is the value of the cookie, which is part of
the information that must be return when sending this cookie back in a future
request.
@@ -1622,19 +1511,19 @@ See https://w3c.github.io/webappsec-upgrade-insecure-requests/
.SS "PURPOSE"
.PP
Command \fB::http::geturl\fR uses the Tcl \fB::socket\fR command with
-the \fI\-async\fR option to connect to a remote server, but the return from
+the \fB\-async\fR option to connect to a remote server, but the return from
this command can be delayed in adverse cases (e.g. a slow DNS lookup),
preventing the event loop from processing other events.
This delay is avoided if the \fB::socket\fR command is evaluated in another
thread. The Thread package is not part of Tcl but is provided in
"Batteries Included" distributions. Instead of the \fB::socket\fR command,
the http package uses \fB::http::socket\fR which makes connections in the
-manner specified by the value of \fI\-threadlevel\fR and the availability
+manner specified by the value of \fB\-threadlevel\fR and the availability
of package Thread.
.PP
.SS "WITH TLS (HTTPS)"
.PP
-The same \fI\-threadlevel\fR configuration applies to both HTTP and HTTPS
+The same \fB\-threadlevel\fR configuration applies to both HTTP and HTTPS
connections.
HTTPS is enabled by using the \fBhttp::register\fR command, typically by
specifying the \fB::tls::socket\fR command of the tls package to handle TLS
@@ -1652,10 +1541,10 @@ for integrating \fB::http::socket\fR into its own replacement command.
.PP
The peer thread can transfer the socket only to the main interpreter of the
script's thread. Therefore the thread-based \fB::http::socket\fR works with
-non-zero \fI\-threadlevel\fR values only if the script runs in the main
-interpreter. A child interpreter must use \fI\-threadlevel 0\fR unless the
+non-zero \fB\-threadlevel\fR values only if the script runs in the main
+interpreter. A child interpreter must use \fB\-threadlevel 0\fR unless the
parent interpreter has provided alternative facilities. The main parent
-interpreter may grant full \fI\-threadlevel\fR facilities to a child
+interpreter may grant full \fB\-threadlevel\fR facilities to a child
interpreter, for example by aliasing, to \fB::http::socket\fR in the child,
a command that runs \fBhttp::socket\fR in the parent, and then transfers
the socket to the child.
@@ -1695,7 +1584,7 @@ proc httpcopy { url file {chunk 4096} } {
return $token
}
proc httpCopyProgress {args} {
- puts \-nonewline stderr .
+ puts -nonewline stderr .
flush stderr
}
.CE
diff --git a/doc/info.n b/doc/info.n
index a7896a9..96c0375 100644
--- a/doc/info.n
+++ b/doc/info.n
@@ -176,60 +176,37 @@ is seen by \fBinfo frame\fR invoked within
.QW x .
.PP
The dictionary may contain the following keys:
-.TP
-\fBtype\fR
-.
+.IP \fBtype\fR
Always present. Possible values are \fBsource\fR, \fBproc\fR,
\fBeval\fR, and \fBprecompiled\fR.
.RS
-.TP
-\fBsource\fR\0\0\0\0\0\0\0\0
-.
-A script loaded via the \fBsource\fR
-command.
-.TP
-\fBproc\fR\0\0\0\0\0\0\0\0
-.
+.IP \fBsource\fR
+A script loaded via the \fBsource\fR command.
+.IP \fBproc\fR
The body of a procedure that could not be traced back to a
line in a particular script.
-.TP
-\fBeval\fR\0\0\0\0\0\0\0\0
-.
+.IP \fBeval\fR
The body of a script provided to \fBeval\fR or \fBuplevel\fR.
-.TP
-\fBprecompiled\fR\0\0\0\0\0\0\0\0
-.
+.IP \fBprecompiled\fR
A precompiled script (loadable by the package
\fBtbcload\fR), and no further information is available.
.RE
-.TP
-\fBline\fR
-.
+.IP \fBline\fR
The line number of of the command inside its script. Not available for
\fBprecompiled\fR commands. When the type is \fBsource\fR, the line number is
relative to the beginning of the file, whereas for the last two types it is
relative to the start of the script.
-.TP
-\fBfile\fR
-.
+.IP \fBfile\fR
For type \fBsource\fR, provides the normalized path of the file that contains
the command.
-.TP
-\fBcmd\fR
-.
+.IP \fBcmd\fR
The command before substitutions were performed.
-.TP
-\fBproc\fR
-.
+.IP \fBproc\fR
For type \fBprod\fR, the name of the procedure containing the command.
-.TP
-\fBlambda\fR
-.
+.IP \fBlambda\fR
For a command in a script evaluated as the body of an unnamed routine via the
\fBapply\fR command, the definition of that routine.
-.TP
-\fBlevel\fR
-.
+.IP \fBlevel\fR
For a frame that corresponds to a level, (to be determined).
.PP
When a command can be traced to its literal definition in some script, e.g.
@@ -295,7 +272,7 @@ If \fInumber\fR is not given, the level this routine was called from.
Otherwise returns the complete command active at the given level. If
\fInumber\fR is greater than \fB0\fR, it is the desired level. Otherwise, it
is \fInumber\fR levels up from the current level. A complete command is the
-words in the command, with all subsitutions performed, meaning that it is a
+words in the command, with all substitutions performed, meaning that it is a
list. See \fBuplevel\fR for more information on levels.
.\" METHOD: library
.TP
@@ -488,6 +465,7 @@ This subcommand returns a list of all public (i.e. exported) methods of the
class called \fIclass\fR. Any of the following \fIoption\fRs may be
given, controlling exactly which method names are returned:
.RS
+.\" OPTION: -all
.TP
\fB\-all\fR
.
@@ -498,6 +476,7 @@ and the \fB\-scope\fR flag is not given,
the list of methods will include those
methods defined not just by the class, but also by the class's superclasses
and mixins.
+.\" OPTION: -private
.TP
\fB\-private\fR
.
@@ -512,6 +491,7 @@ mixins, if \fB\-all\fR is also given).
Note that this naming is an unfortunate clash with true private methods; this
option name is retained for backward compatibility.
.VE TIP500
+.\" OPTION: -scope
.TP
\fB\-scope\fI scope\fR
.VS TIP500
@@ -520,14 +500,14 @@ Returns a list of all methods on \fIclass\fR that have the given visibility
\fB\-private\fR options are ignored. The valid values for \fIscope\fR are:
.RS
.IP \fBpublic\fR 3
-Only methods with \fIpublic\fR scope (i.e., callable from anywhere by any instance
-of this class) are to be returned.
+Only methods with \fIpublic\fR scope (i.e., callable from anywhere by any
+instance of this class) are to be returned.
.IP \fBunexported\fR 3
-Only methods with \fIunexported\fR scope (i.e., only callable via \fBmy\fR) are to
-be returned.
+Only methods with \fIunexported\fR scope (i.e., only callable via \fBmy\fR)
+are to be returned.
.IP \fBprivate\fR 3
-Only methods with \fIprivate\fR scope (i.e., only callable from within this class's
-methods) are to be returned.
+Only methods with \fIprivate\fR scope (i.e., only callable from within this
+class's methods) are to be returned.
.RE
.VE TIP500
.RE
@@ -553,16 +533,19 @@ class named \fIclass\fR.
This subcommand returns a sorted list of properties defined on the class named
\fIclass\fR. The \fIoptions\fR define exactly which properties are returned:
.RS
+.\" OPTION: -all
.TP
\fB\-all\fR
.
With this option, the properties from the superclasses and mixins of the class
are also returned.
+.\" OPTION: -readable
.TP
\fB\-readable\fR
.
This option (the default behavior) asks for the readable properties to be
returned. Only readable or writable properties are returned, not both.
+.\" OPTION: -writable
.TP
\fB\-writable\fR
.
@@ -709,6 +692,7 @@ This subcommand returns a list of all public (i.e. exported) methods of the
object called \fIobject\fR. Any of the following \fIoption\fRs may be
given, controlling exactly which method names are returned:
.RS
+.\" OPTION: -all
.TP
\fB\-all\fR
.
@@ -719,6 +703,7 @@ and the \fB\-scope\fR flag is not given,
the list of methods will include those
methods defined not just by the object, but also by the object's class and
mixins, plus the superclasses of those classes.
+.\" OPTION: -private
.TP
\fB\-private\fR
.
@@ -733,6 +718,7 @@ the non-exported methods of the object (and classes, if
Note that this naming is an unfortunate clash with true private methods; this
option name is retained for backward compatibility.
.VE TIP500
+.\" OPTION: -scope
.TP
\fB\-scope\fI scope\fR
.VS TIP500
@@ -744,11 +730,11 @@ Returns a list of all methods on \fIobject\fR that have the given visibility
Only methods with \fIpublic\fR scope (i.e., callable from anywhere) are to be
returned.
.IP \fBunexported\fR 3
-Only methods with \fIunexported\fR scope (i.e., only callable via \fBmy\fR) are to
-be returned.
+Only methods with \fIunexported\fR scope (i.e., only callable via \fBmy\fR)
+are to be returned.
.IP \fBprivate\fR 3
-Only methods with \fIprivate\fR scope (i.e., only callable from within this object's
-instance methods) are to be returned.
+Only methods with \fIprivate\fR scope (i.e., only callable from within this
+object's instance methods) are to be returned.
.RE
.VE TIP500
.RE
@@ -781,16 +767,19 @@ This subcommand returns a sorted list of properties defined on the object
named \fIobject\fR. The \fIoptions\fR define exactly which properties are
returned:
.RS
+.\" OPTION: -all
.TP
\fB\-all\fR
.
With this option, the properties from the class, superclasses and mixins of
the object are also returned.
+.\" OPTION: -readable
.TP
\fB\-readable\fR
.
This option (the default behavior) asks for the readable properties to be
returned. Only readable or writable properties are returned, not both.
+.\" OPTION: -writable
.TP
\fB\-writable\fR
.
@@ -800,7 +789,7 @@ writable properties are returned, not both.
.VE "TIP 558"
.\" METHOD: variables
.TP
-\fBinfo object variables\fI object\fRR ?\fB\-private\fR?
+\fBinfo object variables\fI object\fR ?\fB\-private\fR?
.
This subcommand returns a list of all variables that have been declared for
the object named \fIobject\fR (i.e. that are automatically present in the
diff --git a/doc/interp.n b/doc/interp.n
index 7cff9c2..2c08533 100644
--- a/doc/interp.n
+++ b/doc/interp.n
@@ -266,11 +266,14 @@ a Tcl script in the child interpreter identified by \fIpath\fR. The result
of this evaluation (including all \fBreturn\fR options,
such as \fB\-errorinfo\fR and \fB\-errorcode\fR information, if an
error occurs) is returned to the invoking interpreter.
+.RS
+.PP
Note that the script will be executed in the current context stack frame of the
\fIpath\fR interpreter; this is so that the implementations (in a parent
interpreter) of aliases in a child interpreter can execute scripts in
the child that find out information about the child's current state
and stack frame.
+.RE
.\" METHOD: exists
.TP
\fBinterp exists \fIpath\fR
@@ -333,9 +336,13 @@ The \fB\-\|\-\fR flag allows the \fIhiddenCmdName\fR argument to start with a
character, and is otherwise unnecessary.
If both the \fB\-namespace\fR and \fB\-global\fR flags are present, the
\fB\-namespace\fR flag is ignored.
+.RS
+.PP
Note that the hidden command will be executed (by default) in the
current context stack frame of the \fIpath\fR interpreter.
+.PP
Hidden commands are explained in more detail in \fBHIDDEN COMMANDS\fR, below.
+.RE
.\" METHOD: issafe
.TP
\fBinterp issafe\fR ?\fIpath\fR?
@@ -484,11 +491,14 @@ the resulting string as a Tcl script in \fIchild\fR.
The result of this evaluation (including all \fBreturn\fR options,
such as \fB\-errorinfo\fR and \fB\-errorcode\fR information, if an
error occurs) is returned to the invoking interpreter.
+.RS
+.PP
Note that the script will be executed in the current context stack frame
of \fIchild\fR; this is so that the implementations (in a parent
interpreter) of aliases in a child interpreter can execute scripts in
the child that find out information about the child's current state
and stack frame.
+.RE
.\" METHOD: expose
.TP
\fIchild \fBexpose \fIhiddenName \fR?\fIexposedCmdName\fR?
@@ -540,10 +550,13 @@ The \fB\-\|\-\fR flag allows the \fIhiddenCmdName\fR argument to start with a
character, and is otherwise unnecessary.
If both the \fB\-namespace\fR and \fB\-global\fR flags are given, the
\fB\-namespace\fR flag is ignored.
+.RS
+.PP
Note that the hidden command will be executed (by default) in the
current context stack frame of \fIchild\fR.
-For more details on hidden commands,
-see \fBHIDDEN COMMANDS\fR, below.
+.PP
+For more details on hidden commands, see \fBHIDDEN COMMANDS\fR, below.
+.RE
.\" METHOD: issafe
.TP
\fIchild \fBissafe\fR
@@ -823,6 +836,7 @@ catch and handle.
Every limit has a number of options associated with it, some of which are
common across all kinds of limits, and others of which are particular to the
kind of limit.
+.\" OPTION: -command
.TP
\fB\-command\fR
.
@@ -833,9 +847,13 @@ The callback may modify the limit on the interpreter if it wishes the limited
interpreter to continue executing. If the callback generates an exception, it
is reported through the background exception mechanism (see
\fBBACKGROUND EXCEPTION HANDLING\fR).
+.RS
+.PP
Note that the callbacks defined by one interpreter are
completely isolated from the callbacks defined by another, and that the order
in which those callbacks are called is undefined.
+.RE
+.\" OPTION: -granularity
.TP
\fB\-granularity\fR
.
@@ -844,6 +862,7 @@ points when the Tcl interpreter is in a consistent state where limit checking
is possible) that the limit is actually checked. This allows the tuning of how
frequently a limit is checked, and hence how often the limit-checking overhead
(which may be substantial in the case of time limits) is incurred.
+.\" OPTION: -milliseconds
.TP
\fB\-milliseconds\fR
.
@@ -851,6 +870,7 @@ This option specifies the number of milliseconds after the moment defined in
the \fB\-seconds\fR option that the time limit will fire. It should only ever
be specified in conjunction with the \fB\-seconds\fR option (whether it was
set previously or is being set this invocation.)
+.\" OPTION: -seconds
.TP
\fB\-seconds\fR
.
@@ -860,6 +880,7 @@ limit will be triggered at the start of the second unless specified at a
sub-second level using the \fB\-milliseconds\fR option. This option may be the
empty string, which indicates that a time limit is not set for the
interpreter.
+.\" OPTION: -value
.TP
\fB\-value\fR
.
@@ -879,14 +900,15 @@ necessary.
.PP
When an exception happens in a situation where it cannot be reported directly up
the stack (e.g. when processing events in an \fBupdate\fR or \fBvwait\fR call)
-the exception is instead reported through the background exception handling mechanism.
-Every interpreter has a background exception handler registered; the default exception
+the exception is instead reported through the background exception handling
+mechanism. Every interpreter has a background exception handler registered;
+the default exception
handler arranges for the \fBbgerror\fR command in the interpreter's global
namespace to be called, but other exception handlers may be installed and process
background exceptions in substantially different ways.
.PP
-A background exception handler consists of a non-empty list of words to which will
-be appended two further words at invocation time. The first word will be the
+A background exception handler consists of a non-empty list of words to which
+will be appended two further words at invocation time. The first word will be the
interpreter result at time of the exception, typically an error message,
and the second will be the dictionary of return options at the time of
the exception. These are the same values that \fBcatch\fR can capture
@@ -934,7 +956,8 @@ set i [\fBinterp create\fR]
}
.CE
.SH "SEE ALSO"
-bgerror(n), load(n), safe(n), Tcl_CreateChild(3), Tcl_Eval(3), Tcl_BackgroundException(3)
+bgerror(n), load(n), safe(n),
+Tcl_CreateChild(3), Tcl_Eval(3), Tcl_BackgroundException(3)
.SH KEYWORDS
alias, parent interpreter, safe interpreter, child interpreter
'\"Local Variables:
diff --git a/doc/load.n b/doc/load.n
index dfaca58..e741204 100644
--- a/doc/load.n
+++ b/doc/load.n
@@ -117,7 +117,7 @@ use this when you know what you are doing, you will not get a nice
error message when something is wrong with the loaded library.
.SH "PORTABILITY ISSUES"
.TP
-\fBWindows\fR\0\0\0\0\0
+\fBWindows\fR
.
When a load fails with
.QW "library not found"
diff --git a/doc/lrange.n b/doc/lrange.n
index 38c4abf..8dac91f 100644
--- a/doc/lrange.n
+++ b/doc/lrange.n
@@ -29,7 +29,8 @@ If \fIlast\fR is greater than or equal to the number of elements
in the list, then it is treated as if it were \fBend\fR.
If \fIfirst\fR is greater than \fIlast\fR then an empty string
is returned.
-Note:
+.PP
+Note that
.QW "\fBlrange \fIlist first first\fR"
does not always produce the same result as
.QW "\fBlindex \fIlist first\fR"
diff --git a/doc/lrepeat.n b/doc/lrepeat.n
index cd672db..8e4cc41 100644
--- a/doc/lrepeat.n
+++ b/doc/lrepeat.n
@@ -18,7 +18,9 @@ lrepeat \- Build a list by repeating elements
The \fBlrepeat\fR command creates a list of size \fIcount * number of
elements\fR by repeating \fIcount\fR times the sequence of elements
\fIelement ...\fR. \fIcount\fR must be a non-negative integer,
-\fIelement\fR can be any Tcl value. Note that \fBlrepeat 1 element ...\fR
+\fIelement\fR can be any Tcl value.
+.PP
+Note that \fBlrepeat 1 element ...\fR
is identical to \fBlist element ...\fR.
.SH EXAMPLES
.CS
diff --git a/doc/lsearch.n b/doc/lsearch.n
index c8d2ec9..cc5d795 100644
--- a/doc/lsearch.n
+++ b/doc/lsearch.n
@@ -31,22 +31,26 @@ indicates how the elements of the list are to be matched against
If all matching style options are omitted, the default matching style
is \fB\-glob\fR. If more than one matching style is specified, the
last matching style given takes precedence.
+.\" OPTION: -exact
.TP
\fB\-exact\fR
.
\fIPattern\fR is a literal string that is compared for exact equality
against each list element.
+.\" OPTION: -glob
.TP
\fB\-glob\fR
.
\fIPattern\fR is a glob-style pattern which is matched against each list
element using the same rules as the \fBstring match\fR command.
+.\" OPTION: -regexp
.TP
\fB\-regexp\fR
.
\fIPattern\fR is treated as a regular expression and matched against
each list element using the rules described in the \fBre_syntax\fR
reference page.
+.\" OPTION: -sorted
.TP
\fB\-sorted\fR
.
@@ -60,6 +64,7 @@ is treated exactly like \fB\-exact\fR when either \fB\-all\fR or
.SS "GENERAL MODIFIER OPTIONS"
.PP
These options may be given with all matching styles.
+.\" OPTION: -all
.TP
\fB\-all\fR
.
@@ -67,17 +72,20 @@ Changes the result to be the list of all matching indices (or all matching
values if \fB\-inline\fR is specified as well.) If indices are returned, the
indices will be in ascending numeric order. If values are returned, the order
of the values will be the order of those values within the input \fIlist\fR.
+.\" OPTION: -inline
.TP
\fB\-inline\fR
.
The matching value is returned instead of its index (or an empty
string if no value matches.) If \fB\-all\fR is also specified, then
the result of the command is the list of all values that matched.
+.\" OPTION: -not
.TP
\fB\-not\fR
.
This negates the sense of the match, returning the index of the first
non-matching value in the list.
+.\" OPTION: -start
.TP
\fB\-start\fR\0\fIindex\fR
.
@@ -91,11 +99,13 @@ These options describe how to interpret the items in the list being
searched. They are only meaningful when used with the \fB\-exact\fR
and \fB\-sorted\fR options. If more than one is specified, the last
one takes precedence. The default is \fB\-ascii\fR.
+.\" OPTION: -ascii
.TP
\fB\-ascii\fR
.
The list elements are to be examined as Unicode strings (the name is
for backward-compatibility reasons.)
+.\" OPTION: -dictionary
.TP
\fB\-dictionary\fR
.
@@ -104,16 +114,19 @@ comparisons (see \fBlsort\fR for a fuller description). Note that this
only makes a meaningful difference from the \fB\-ascii\fR option when
the \fB\-sorted\fR option is given, because values are only
dictionary-equal when exactly equal.
+.\" OPTION: -integer
.TP
\fB\-integer\fR
.
The list elements are to be compared as integers.
+.\" OPTION: -nocase
.TP
\fB\-nocase\fR
.
Causes comparisons to be handled in a case-insensitive manner. Has no
effect if combined with the \fB\-dictionary\fR, \fB\-integer\fR, or
\fB\-real\fR options.
+.\" OPTION: -real
.TP
\fB\-real\fR
.
@@ -123,18 +136,22 @@ The list elements are to be compared as floating-point values.
These options (only meaningful with the \fB\-sorted\fR option) specify
how the list is sorted. If more than one is given, the last one takes
precedence. The default option is \fB\-increasing\fR.
+.\" OPTION: -decreasing
.TP
\fB\-decreasing\fR
.
The list elements are sorted in decreasing order. This option is only
meaningful when used with \fB\-sorted\fR.
+.\" OPTION: -increasing
.TP
\fB\-increasing\fR
.
The list elements are sorted in increasing order. This option is only
meaningful when used with \fB\-sorted\fR.
+.\" OPTION: -bisect
.TP
\fB\-bisect\fR
+.
Inexact search when the list elements are in sorted order. For an increasing
list the last index where the element is less than or equal to the pattern
is returned. For a decreasing list the last index where the element is greater
@@ -146,6 +163,7 @@ or \fB\-not\fR.
.PP
These options are used to search lists of lists. They may be used
with any other options.
+.\" OPTION: -stride
.TP
\fB\-stride\0\fIstrideLength\fR
.
@@ -159,6 +177,7 @@ index always points to the first element in a group.
The list length must be an integer multiple of \fIstrideLength\fR, which
in turn must be at least 1. A \fIstrideLength\fR of 1 is the default and
indicates no grouping.
+.\" OPTION: -index
.TP
\fB\-index\fR\0\fIindexList\fR
.
@@ -166,6 +185,7 @@ This option is designed for use when searching within nested lists.
The \fIindexList\fR argument gives a path of indices (much as might be
used with the \fBlindex\fR or \fBlset\fR commands) within each element
to allow the location of the term being matched against.
+.\" OPTION: -subindices
.TP
\fB\-subindices\fR
.
diff --git a/doc/lsort.n b/doc/lsort.n
index 1695ea8..4e4f720 100644
--- a/doc/lsort.n
+++ b/doc/lsort.n
@@ -20,18 +20,20 @@ lsort \- Sort the elements of a list
.PP
This command sorts the elements of \fIlist\fR, returning a new
list in sorted order. The implementation of the \fBlsort\fR command
-uses the merge\-sort algorithm which is a stable sort that has O(n log
+uses the merge-sort algorithm which is a stable sort that has O(n log
n) performance characteristics.
.PP
By default ASCII sorting is used with the result returned in
increasing order. However, any of the following options may be
specified before \fIlist\fR to control the sorting process (unique
abbreviations are accepted):
+.\" OPTION: -ascii
.TP
\fB\-ascii\fR
.
Use string comparison with Unicode code-point collation order (the
name is for backward-compatibility reasons.) This is the default.
+.\" OPTION: -dictionary
.TP
\fB\-dictionary\fR
.
@@ -42,14 +44,17 @@ not characters. For example, in \fB\-dictionary\fR mode, \fBbigBoy\fR
sorts between \fBbigbang\fR and \fBbigboy\fR, and \fBx10y\fR
sorts between \fBx9y\fR and \fBx11y\fR. Overrides the \fB\-nocase\fR
option.
+.\" OPTION: -integer
.TP
\fB\-integer\fR
.
Convert list elements to integers and use integer comparison.
+.\" OPTION: -real
.TP
\fB\-real\fR
.
Convert list elements to floating-point values and use floating comparison.
+.\" OPTION: -command
.TP
\fB\-command\0\fIcommand\fR
.
@@ -60,22 +65,26 @@ arguments. The script should return an integer less than,
equal to, or greater than zero if the first element is to
be considered less than, equal to, or greater than the second,
respectively.
+.\" OPTION: -increasing
.TP
\fB\-increasing\fR
.
Sort the list in increasing order
.PQ smallest "items first" .
This is the default.
+.\" OPTION: -decreasing
.TP
\fB\-decreasing\fR
.
Sort the list in decreasing order
.PQ largest "items first" .
+.\" OPTION: -indices
.TP
\fB\-indices\fR
.
Return a list of indices into \fIlist\fR in sorted order instead of
the values themselves.
+.\" OPTION: -index
.TP
\fB\-index\0\fIindexList\fR
.
@@ -119,6 +128,7 @@ returns \fB{{d e m o} 34512} {{b i g} 12345} {{c o d e} 54321}\fR
This option is much more efficient than using \fB\-command\fR
to achieve the same effect.
.RE
+.\" OPTION: -stride
.TP
\fB\-stride\0\fIstrideLength\fR
.
@@ -136,7 +146,7 @@ in turn must be at least 2.
For example,
.PP
.CS
-\fBlsort\fR \-stride 2 {carrot 10 apple 50 banana 25}
+\fBlsort\fR -stride 2 {carrot 10 apple 50 banana 25}
.CE
.PP
returns
@@ -144,18 +154,20 @@ returns
and
.PP
.CS
-\fBlsort\fR \-stride 2 \-index 1 \-integer {carrot 10 apple 50 banana 25}
+\fBlsort\fR -stride 2 -index 1 -integer {carrot 10 apple 50 banana 25}
.CE
.PP
returns
.QW "carrot 10 banana 25 apple 50" .
.RE
+.\" OPTION: -nocase
.TP
\fB\-nocase\fR
.
Causes comparisons to be handled in a case-insensitive manner. Has no
effect if combined with the \fB\-dictionary\fR, \fB\-integer\fR, or
\fB\-real\fR options.
+.\" OPTION: -unique
.TP
\fB\-unique\fR
.
@@ -234,7 +246,7 @@ Sorting using striding and multiple indices:
.PP
.CS
\fI%\fR # Note the first index value is relative to the group
-\fI%\fR \fBlsort\fR \-stride 3 \-index {0 1} \e
+\fI%\fR \fBlsort\fR -stride 3 -index {0 1} \e
{{Bob Smith} 25 Audi {Jane Doe} 40 Ford}
{{Jane Doe} 40 Ford {Bob Smith} 25 Audi}
.CE
diff --git a/doc/msgcat.n b/doc/msgcat.n
index 43ea95d..21b6aa1 100644
--- a/doc/msgcat.n
+++ b/doc/msgcat.n
@@ -18,7 +18,7 @@ msgcat \- Tcl message catalog
\fB::msgcat::mc \fIsrc-string\fR ?\fIarg arg ...\fR?
\fB::msgcat::mcmax ?\fIsrc-string src-string ...\fR?
.VS "TIP 412"
-\fB::msgcat::mcexists\fR ?\fB-exactnamespace\fR? ?\fB-exactlocale\fR? \fIsrc-string\fR
+\fB::msgcat::mcexists\fR ?\fB\-exactnamespace\fR? ?\fB\-exactlocale\fR? \fIsrc-string\fR
.VE "TIP 412"
.VS "TIP 490"
\fB::msgcat::mcpackagenamespaceget\fR
@@ -58,14 +58,16 @@ the application source code. New languages
or locales may be provided by adding a new file to
the message catalog.
.PP
-\fBmsgcat\fR distinguishes packages by its namespace.
-Each package has its own message catalog and configuration settings in \fBmsgcat\fR.
+\fBmsgcat\fR distinguishes packages by its namespace. Each package has
+its own message catalog and configuration settings in \fBmsgcat\fR.
.PP
-A \fIlocale\fR is a specification string describing a user language like \fBde_ch\fR for Swiss German.
-In \fBmsgcat\fR, there is a global locale initialized by the system locale of the current system.
-Each package may decide to use the global locale or to use a package specific locale.
+A \fIlocale\fR is a specification string describing a user language like
+\fBde_ch\fR for Swiss German. In \fBmsgcat\fR, there is a global locale
+initialized by the system locale of the current system. Each package may
+decide to use the global locale or to use a package specific locale.
.PP
-The global locale may be changed on demand, for example by a user initiated language change or within a multi user application like a web server.
+The global locale may be changed on demand, for example by a user initiated
+language change or within a multi user application like a web server.
.PP
.VS tip490
Object oriented programming is supported by the use of a package namespace.
@@ -100,11 +102,13 @@ later simply by defining new message catalog entries.
.TP
\fB::msgcat::mcn \fInamespace src-string\fR ?\fIarg arg ...\fR?
.VS "TIP 490"
-Like \fB::msgcat::mc\fR, but with the message namespace specified as first argument.
+Like \fB::msgcat::mc\fR, but with the message namespace specified as first
+argument.
.PP
.RS
-\fBmcn\fR may be used for cases where the package namespace is not the namespace of the caller.
-An example is shown within the description of the command \fB::msgcat::mcpackagenamespaceget\fR below.
+\fBmcn\fR may be used for cases where the package namespace is not the
+namespace of the caller. An example is shown within the description of the
+command \fB::msgcat::mcpackagenamespaceget\fR below.
.RE
.VE
.\" COMMAND: mcmax
@@ -117,18 +121,21 @@ localized GUIs, which may require that all buttons, for example, be a
fixed width (which will be the width of the widest button).
.\" COMMAND: mcexists
.TP
-\fB::msgcat::mcexists\fR ?\fB-exactnamespace\fR? ?\fB-exactlocale\fR? ?\fB-namespace\fI namespace\fR? \fIsrc-string\fR
+\fB::msgcat::mcexists\fR ?\fB\-exactnamespace\fR? ?\fB\-exactlocale\fR? ?\fB\-namespace\fI namespace\fR? \fIsrc-string\fR
.VS "TIP 412"
Return true, if there is a translation for the given \fIsrc-string\fR.
.PP
.RS
-The search may be limited by the option \fB\-exactnamespace\fR to only check the current namespace and not any parent namespaces.
+The search may be limited by the option \fB\-exactnamespace\fR to only check
+the current namespace and not any parent namespaces.
.PP
-It may also be limited by the option \fB\-exactlocale\fR to only check the first prefered locale (e.g. first element returned by \fB::msgcat::mcpreferences\fR if global locale is used).
+It may also be limited by the option \fB\-exactlocale\fR to only check the
+first prefered locale (e.g. first element returned by
+\fB::msgcat::mcpreferences\fR if global locale is used).
.PP
.VE "TIP 412"
.VS "TIP 490"
-An explicit package namespace may be specified by the option \fB-namespace\fR.
+An explicit package namespace may be specified by the option \fB\-namespace\fR.
The namespace of the caller is used if not explicitly specified.
.RE
.PP
@@ -137,11 +144,12 @@ The namespace of the caller is used if not explicitly specified.
.TP
\fB::msgcat::mcpackagenamespaceget\fR
.VS "TIP 490"
-Return the package namespace of the caller.
-This command handles all cases described in section \fBOBJECT ORIENTED PROGRAMMING\fR.
+Return the package namespace of the caller. This command handles all cases
+described in section \fBOBJECT ORIENTED PROGRAMMING\fR.
.PP
.RS
-Example usage is a tooltip package, which saves the caller package namespace to update the translation each time the tooltip is shown:
+Example usage is a tooltip package, which saves the caller package namespace
+to update the translation each time the tooltip is shown:
.CS
proc ::tooltip::tooltip {widget message} {
...
@@ -163,16 +171,20 @@ proc ::tooltip::show {widget messagenamespace message} {
.TP
\fB::msgcat::mclocale \fR?\fInewLocale\fR?
.
-If \fInewLocale\fR is omitted, the current locale is returned, otherwise the current locale
-is set to \fInewLocale\fR.
+If \fInewLocale\fR is omitted, the current locale is returned, otherwise the
+current locale is set to \fInewLocale\fR.
.PP
.RS
-If the new locale is set to \fInewLocale\fR, the corresponding preferences are calculated and set.
-For example, if the current locale is en_US_funky, then \fB::msgcat::mcpreferences\fR returns \fB{en_us_funky en_us en {}}\fR.
+If the new locale is set to \fInewLocale\fR, the corresponding preferences
+are calculated and set.
+For example, if the current locale is en_US_funky, then
+\fB::msgcat::mcpreferences\fR returns \fB{en_us_funky en_us en {}}\fR.
.PP
-The same result may be acheved by \fB::msgcat::mcpreferences\fR {*}[\fB::msgcat::mcutil getpreferences\fI newLocale\fR].
+The same result may be achieved by \fB::msgcat::mcpreferences\fR
+{*}[\fB::msgcat::mcutil getpreferences\fI newLocale\fR].
.PP
-The current locale is always the first element of the list returned by \fBmcpreferences\fR.
+The current locale is always the first element of the list returned by
+\fBmcpreferences\fR.
.PP
msgcat stores and compares the locale in a
case-insensitive manner, and returns locales in lowercase.
@@ -196,11 +208,13 @@ The list is ordered from most specific to least preference.
.VS "TIP 499"
.RS
A set of locale preferences may be given to set the list of locale preferences.
-The current locale is also set, which is the first element of the locale preferences list.
+The current locale is also set, which is the first element of the locale
+preferences list.
.PP
Locale preferences are loaded now, if not jet loaded.
.PP
-As an example, the user may prefer French or English text. This may be configured by:
+As an example, the user may prefer French or English text. This may be
+configured by:
.CS
::msgcat::mcpreferences fr en {}
.CE
@@ -210,12 +224,14 @@ As an example, the user may prefer French or English text. This may be configure
.TP
\fB::msgcat::mcloadedlocales subcommand\fR ?\fIlocale\fR?
.VS "TIP 499"
-This group of commands manage the list of loaded locales for packages not setting a package locale.
+This group of commands manage the list of loaded locales for packages not
+setting a package locale.
.PP
.RS
The subcommand \fBloaded\fR returns the list of currently loaded locales.
.PP
-The subcommand \fBclear\fR removes all locales and their data, which are not in the current preference list.
+The subcommand \fBclear\fR removes all locales and their data, which are not in
+the current preference list.
.RE
.VE
.\" COMMAND: mcload
@@ -224,7 +240,8 @@ The subcommand \fBclear\fR removes all locales and their data, which are not in
.VS "TIP 412"
Searches the specified directory for files that match
the language specifications returned by \fB::msgcat::mcloadedlocales loaded\fR
-(or \fBmsgcat::mcpackagelocale preferences\fR if a package locale is set) (note that these are all lowercase), extended by the file extension
+(or \fBmsgcat::mcpackagelocale preferences\fR if a package locale is set)
+(note that these are all lowercase), extended by the file extension
.QW .msg .
Each matching file is
read in order, assuming a UTF-8 encoding. The file contents are
@@ -297,30 +314,37 @@ to \fB::msgcat::mc\fR.
.VS "TIP 412"
.RS
.PP
-Note that this routine is only called if the concerned package did not set a package locale unknown command name.
+Note that this routine is only called if the concerned package did not set a
+package locale unknown command name.
.RE
.\" COMMAND: mcforgetpackage
.TP
\fB::msgcat::mcforgetpackage\fR
.
-The calling package clears all its state within the \fBmsgcat\fR package including all settings and translations.
+The calling package clears all its state within the \fBmsgcat\fR package
+including all settings and translations.
.VE "TIP 412"
.PP
.\" COMMAND: mcutil
+.\" METHOD: getpreferences
.VS "TIP 499"
.TP
\fB::msgcat::mcutil getpreferences\fI locale\fR
.
-Return the preferences list of the given locale as described in section \fBLOCALE SPECIFICATION\fR.
-An example is the composition of a preference list for the bilingual region "Biel/Bienne" as a concatenation of swiss german and swiss french:
+Return the preferences list of the given locale as described in the section
+\fBLOCALE SPECIFICATION\fR.
+An example is the composition of a preference list for the bilingual region
+"Biel/Bienne" as a concatenation of swiss german and swiss french:
.CS
% concat [lrange [msgcat::mcutil getpreferences fr_CH] 0 end-1] [msgcat::mcutil getpreferences de_CH]
fr_ch fr de_ch de {}
.CE
+.\" METHOD: getsystemlocale
.TP
\fB::msgcat::mcutil getsystemlocale\fR
.
-The system locale is returned as described by the section \fBLOCALE SPECIFICATION\fR.
+The system locale is returned as described by the section
+\fBLOCALE SPECIFICATION\fR.
.VE "TIP 499"
.PP
.SH "LOCALE SPECIFICATION"
@@ -361,7 +385,7 @@ msgcat will attempt to extract locale information from the registry.
From Windows Vista on, the RFC4747 locale name "lang-script-country-options"
is transformed to the locale as "lang_country_script" (Example:
sr-Latn-CS -> sr_cs_latin). For Windows XP, the language id is
-transformed analoguously (Example: 0c1a -> sr_yu_cyrillic).
+transformed analogously (Example: 0c1a -> sr_yu_cyrillic).
If all these attempts to discover an initial locale from the user's
environment fail, msgcat defaults to an initial locale of
.QW C .
@@ -534,58 +558,73 @@ A package using \fBmsgcat\fR may choose to use its own package private
locale and its own set of loaded locales, independent to the global
locale set by \fB::msgcat::mclocale\fR.
.PP
-This allows a package to change its locale without causing any locales load or removal in other packages and not to invoke the global locale change callback (see below).
+This allows a package to change its locale without causing any locales load or
+removal in other packages and not to invoke the global locale change callback
+(see below).
.PP
This action is controled by the following ensemble:
+.\" COMMAND: mcpackagelocale
+.\" METHOD: set
.TP
\fB::msgcat::mcpackagelocale set\fR ?\fIlocale\fR?
.
Set or change a package private locale.
-The package private locale is set to the given \fIlocale\fR if the \fIlocale\fR is given.
-If the option \fIlocale\fR is not given, the package is set to package private locale mode, but no locale is changed (e.g. if the global locale was valid for the package before, it is copied to the package private locale).
+The package private locale is set to the given \fIlocale\fR if the \fIlocale\fR
+is given. If the option \fIlocale\fR is not given, the package is set to package
+private locale mode, but no locale is changed (e.g. if the global locale was
+valid for the package before, it is copied to the package private locale).
.PP
.RS
This command may cause the load of locales.
.RE
+.\" METHOD: get
.TP
\fB::msgcat::mcpackagelocale get\fR
.
-Return the package private locale or the global locale, if no package private locale is set.
+Return the package private locale or the global locale, if no package private
+locale is set.
+.\" METHOD: preferences
.TP
\fB::msgcat::mcpackagelocale preferences\fR ?\fIlocale preference\fR? ...
.
-With no parameters, return the package private preferences or the global preferences,
-if no package private locale is set.
-The package locale state (set or not) is not changed (in contrast to the command \fB::msgcat::mcpackagelocale set\fR).
+With no parameters, return the package private preferences or the global
+preferences, if no package private locale is set.
+The package locale state (set or not) is not changed (in contrast to the
+command \fB::msgcat::mcpackagelocale set\fR).
.PP
.RS
.VS "TIP 499"
-If a set of locale preferences is given, it is set as package locale preference list.
-The package locale is set to the first element of the preference list.
+If a set of locale preferences is given, it is set as package locale preference
+list. The package locale is set to the first element of the preference list.
A package locale is activated, if it was not set so far.
.PP
Locale preferences are loaded now for the package, if not jet loaded.
.VE "TIP 499"
.RE
.PP
+.\" METHOD: loaded
.TP
\fB::msgcat::mcpackagelocale loaded\fR
.
Return the list of locales loaded for this package.
+.\" METHOD: isset
.TP
\fB::msgcat::mcpackagelocale isset\fR
.
Returns true, if a package private locale is set.
+.\" METHOD: unset
.TP
\fB::msgcat::mcpackagelocale unset\fR
.
-Unset the package private locale and use the globale locale.
+Unset the package private locale and use the global locale.
Load and remove locales to adjust the list of loaded locales for the
package to the global loaded locales list.
+.\" METHOD: present
.TP
\fB::msgcat::mcpackagelocale present\fI locale\fR
.
Returns true, if the given locale is loaded for the package.
+.\" METHOD: clear
.TP
\fB::msgcat::mcpackagelocale clear\fR
.
@@ -595,22 +634,29 @@ Clear any loaded locales of the package not present in the package preferences.
.PP
Each package using msgcat has a set of options within \fBmsgcat\fR.
The package options are described in the next sectionPackage options.
-Each package option may be set or unset individually using the following ensemble:
+Each package option may be set or unset individually using the following
+ensemble:
+.\" COMMAND: mcpackageconfig
+.\" METHOD: get
.TP
\fB::msgcat::mcpackageconfig get\fI option\fR
.
Return the current value of the given \fIoption\fR.
This call returns an error if the option is not set for the package.
+.\" METHOD: isset
.TP
\fB::msgcat::mcpackageconfig isset\fI option\fR
.
Returns 1, if the given \fIoption\fR is set for the package, 0 otherwise.
+.\" METHOD: set
.TP
\fB::msgcat::mcpackageconfig set\fI option value\fR
.
Set the given \fIoption\fR to the given \fIvalue\fR.
This may invoke additional actions in dependency of the \fIoption\fR.
-The return value is 0 or the number of loaded packages for the option \fBmcfolder\fR.
+The return value is 0 or the number of loaded packages for the option
+\fBmcfolder\fR.
+.\" METHOD: unset
.TP
\fB::msgcat::mcpackageconfig unset\fI option\fR
.
@@ -623,30 +669,40 @@ The following package options are available for each package:
.TP
\fBmcfolder\fR
.
-This is the message folder of the package. This option is set by mcload and by the subcommand set. Both are identical and both return the number of loaded message catalog files.
+This is the message folder of the package. This option is set by mcload and by
+the subcommand set. Both are identical and both return the number of loaded
+message catalog files.
.RS
.PP
-Setting or changing this value will load all locales contained in the preferences valid for the package. This implies also to invoke any set loadcmd (see below).
+Setting or changing this value will load all locales contained in the
+preferences valid for the package. This implies also to invoke any set
+loadcmd (see below).
.PP
Unsetting this value will disable message file load for the package.
.RE
.TP
\fBloadcmd\fR
.
-This callback is invoked before a set of message catalog files are loaded for the package which has this property set.
+This callback is invoked before a set of message catalog files are loaded for
+the package which has this property set.
.PP
.RS
-This callback may be used to do any preparation work for message file load or to get the message data from another source like a data base. In this case, no message files are used (mcfolder is unset).
+This callback may be used to do any preparation work for message file load or
+to get the message data from another source like a data base. In this case, no
+message files are used (mcfolder is unset).
.PP
See section \fBcallback invocation\fR below.
The parameter list appended to this callback is the list of locales to load.
.PP
-If this callback is changed, it is called with the preferences valid for the package.
+If this callback is changed, it is called with the preferences valid for the
+package.
.RE
.TP
\fBchangecmd\fR
.
-This callback is invoked when a default local change was performed. Its purpose is to allow a package to update any dependency on the default locale like showing the GUI in another language.
+This callback is invoked when a default local change was performed. Its
+purpose is to allow a package to update any dependency on the default locale
+like showing the GUI in another language.
.PP
.RS
See the callback invocation section below.
@@ -656,15 +712,19 @@ The registered callbacks are invoked in no particular order.
.TP
\fBunknowncmd\fR
.
-Use a package locale mcunknown procedure instead of the standard version supplied by the msgcat package (msgcat::mcunknown).
+Use a package locale mcunknown procedure instead of the standard version
+supplied by the msgcat package (\fBmsgcat::mcunknown\fR).
.PP
.RS
-The called procedure must return the formatted message which will finally be returned by msgcat::mc.
+The called procedure must return the formatted message which will finally be
+returned by \fBmsgcat::mc\fR.
.PP
-A generic unknown handler is used if set to the empty string. This consists in returning the key if no arguments are given. With given arguments, format is used to process the arguments.
+A generic unknown handler is used if set to the empty string. This consists of
+returning the key if no arguments are given. With given arguments, the
+\fBformat\fR command is used to process the arguments.
.PP
See section \fBcallback invocation\fR below.
-The appended arguments are identical to \fB::msgcat::mcunknown\fR.
+The appended arguments are identical to \fBmsgcat::mcunknown\fR.
.RE
.SH "Callback invocation"
A package may decide to register one or multiple callbacks, as described above.
@@ -677,15 +737,20 @@ Callbacks are invoked, if:
.PP
3. the registering namespace exists.
.PP
-If a called routine fails with an error, the \fBbgerror\fR routine for the interpreter is invoked after command completion.
-Only exception is the callback \fBunknowncmd\fR, where an error causes the invoking \fBmc\fR-command to fail with that error.
+If a called routine fails with an error, the \fBbgerror\fR routine for the
+interpreter is invoked after command completion.
+Only exception is the callback \fBunknowncmd\fR, where an error causes the
+invoking \fBmc\fR-command to fail with that error.
.PP
.VS tip490
.SH "OBJECT ORIENTED PROGRAMMING"
\fBmsgcat\fR supports packages implemented by object oriented programming.
Objects and classes should be defined within a package namespace.
.PP
-There are 3 supported cases where package namespace sensitive commands of msgcat (\fBmc\fR, \fBmcexists\fR, \fBmcpackagelocale\fR, \fBmcforgetpackage\fR, \fBmcpackagenamespaceget\fR, \fBmcpackageconfig\fR, \fBmcset\fR and \fBmcmset\fR) may be called:
+There are 3 supported cases where package namespace sensitive commands of msgcat
+(\fBmc\fR, \fBmcexists\fR, \fBmcpackagelocale\fR, \fBmcforgetpackage\fR,
+\fBmcpackagenamespaceget\fR, \fBmcpackageconfig\fR, \fBmcset\fR and \fBmcmset\fR)
+may be called:
.PP
.TP
\fB1) In class definition script\fR
@@ -701,7 +766,8 @@ namespace eval ::N2 {
.TP
\fB2) method defined in a class\fR
.
-\fBmsgcat\fR command is called from a method in an object and the method is defined in a class.
+\fBmsgcat\fR command is called from a method in an object and the method is
+defined in a class.
.CS
namespace eval ::N3Class {
mcload $dir/msgs
@@ -728,8 +794,8 @@ namespace eval ::N4 {
.PP
.VE tip490
.SH EXAMPLES
-Packages which display a GUI may update their widgets when the global locale changes.
-To register to a callback, use:
+Packages which display a GUI may update their widgets when the global locale
+changes. To register to a callback, use:
.CS
namespace eval gui {
msgcat::mcpackageconfig changecmd updateGUI
@@ -743,7 +809,8 @@ fr
% New locale is 'fr'.
.CE
.PP
-If locales (or additional locales) are contained in another source like a data base, a package may use the load callback and not mcload:
+If locales (or additional locales) are contained in another source like a
+database, a package may use the load callback and not \fBmcload\fR:
.CS
namespace eval db {
msgcat::mcpackageconfig loadcmd loadMessages
@@ -758,10 +825,12 @@ namespace eval db {
}
.CE
.PP
-The \fBclock\fR command implementation uses \fBmsgcat\fR with a package locale to implement the command line parameter \fB-locale\fR.
+The \fBclock\fR command implementation uses \fBmsgcat\fR with a package
+locale to implement the command line parameter \fB\-locale\fR.
Here are some sketches of the implementation:
.PP
-First, a package locale is initialized and the generic unknown function is desactivated:
+First, a package locale is initialized and the generic unknown function is
+deactivated:
.CS
msgcat::mcpackagelocale set
msgcat::mcpackageconfig unknowncmd ""
@@ -770,13 +839,15 @@ As an example, the user requires the week day in a certain locale as follows:
.CS
clock format [clock seconds] -format %A -locale fr
.CE
-\fBclock\fR sets the package locale to \fBfr\fR and looks for the day name as follows:
+\fBclock\fR sets the package locale to \fBfr\fR and looks for the day name as
+follows:
.CS
msgcat::mcpackagelocale set $locale
return [lindex [msgcat::mc DAYS_OF_WEEK_FULL] $day]
### Returns "mercredi"
.CE
-Within \fBclock\fR, some message-catalog items are heavy in computation and thus are dynamically cached using:
+Within \fBclock\fR, some message-catalog items are heavy in computation and
+thus are dynamically cached using:
.CS
proc ::tcl::clock::LocalizeFormat { locale format } {
set key FORMAT_$format
@@ -795,7 +866,8 @@ The message catalog code was developed by Mark Harrison.
.SH "SEE ALSO"
format(n), scan(n), namespace(n), package(n), oo::class(n), oo::object
.SH KEYWORDS
-internationalization, i18n, localization, l10n, message, text, translation, class, object
+internationalization, i18n, localization, l10n, message, text, translation,
+class, object
.\" Local Variables:
.\" mode: nroff
.\" End:
diff --git a/doc/my.n b/doc/my.n
index 3464a87..425324e 100644
--- a/doc/my.n
+++ b/doc/my.n
@@ -35,9 +35,9 @@ defined by that object or class.
.VE TIP500
.PP
The object upon which the method is invoked via \fBmy\fR is the one that owns
-the namespace that the \fBmy\fR command is contained in initially (\fBNB:\fR the link
-remains if the command is renamed), which is the currently invoked object by
-default.
+the namespace that the \fBmy\fR command is contained in initially (\fBNB:\fR the
+link remains if the command is renamed), which is the currently invoked object
+by default.
.VS TIP478
Similarly, the object on which the method is invoked via \fBmyclass\fR is the
object that is the current class of the object that owns the namespace that
diff --git a/doc/namespace.n b/doc/namespace.n
index 5e90d13..5f02082 100644
--- a/doc/namespace.n
+++ b/doc/namespace.n
@@ -287,8 +287,7 @@ For the \fIstring\fR \fB::foo::bar::x\fR,
this command returns \fB::foo::bar\fR,
and for \fB::\fR it returns an empty string.
This command is the complement of the \fBnamespace tail\fR command.
-Note that it does not check whether the
-namespace names are, in fact,
+It does not check whether the namespace names are, in fact,
the names of currently defined namespaces.
.\" METHOD: tail
.TP
@@ -546,14 +545,14 @@ about name resolution.
For example, the command:
.PP
.CS
-\fBnamespace eval\fR Foo::Debug {\fBnamespace which\fR \-variable traceLevel}
+\fBnamespace eval\fR Foo::Debug {\fBnamespace which\fR -variable traceLevel}
.CE
.PP
returns \fB::traceLevel\fR.
On the other hand, the command,
.PP
.CS
-\fBnamespace eval\fR Foo {\fBnamespace which\fR \-variable traceLevel}
+\fBnamespace eval\fR Foo {\fBnamespace which\fR -variable traceLevel}
.CE
.PP
returns \fB::Foo::traceLevel\fR.
@@ -595,7 +594,7 @@ like BLT are contained in a namespace called \fBBlt\fR.
Then you might access these commands like this:
.PP
.CS
-Blt::graph .g \-background red
+Blt::graph .g -background red
Blt::table . .g 0,0
.CE
.PP
@@ -612,7 +611,7 @@ This adds all exported commands from the \fBBlt\fR namespace
into the current namespace context, so you can write code like this:
.PP
.CS
-graph .g \-background red
+graph .g -background red
table . .g 0,0
.CE
.PP
@@ -641,7 +640,7 @@ that have appeared in a namespace. In that case, you can use the
\fB\-force\fR option, and existing commands will be silently overwritten:
.PP
.CS
-\fBnamespace import\fR \-force Blt::graph Blt::table
+\fBnamespace import\fR -force Blt::graph Blt::table
.CE
.PP
If for some reason, you want to stop using the imported commands,
@@ -793,6 +792,7 @@ the \fBuplevel\fR or \fBinfo level\fR commands.
The following options, supported by the \fBnamespace ensemble
create\fR and \fBnamespace ensemble configure\fR commands, control how
an ensemble command behaves:
+.\" OPTION: -map
.TP
\fB\-map\fR
.
@@ -808,12 +808,15 @@ will be from the local name of the subcommand to its fully-qualified
name. Note that when this option is non-empty and the
\fB\-subcommands\fR option is empty, the ensemble subcommand names
will be exactly those words that have mappings in the dictionary.
+.\" OPTION: -parameters
.TP
\fB\-parameters\fR
+.
This option gives a list of named arguments (the names being used during
generation of error messages) that are passed by the caller of the ensemble
between the name of the ensemble and the subcommand argument. By default, it
is the empty list.
+.\" OPTION: -prefixes
.TP
\fB\-prefixes\fR
.
@@ -821,6 +824,7 @@ This option (which is enabled by default) controls whether the
ensemble command recognizes unambiguous prefixes of its subcommands.
When turned off, the ensemble command requires exact matching of
subcommand names.
+.\" OPTION: -subcommands
.TP
\fB\-subcommands\fR
.
@@ -832,6 +836,7 @@ empty, the subcommands of the namespace will either be the keys of the
dictionary listed in the \fB\-map\fR option or the exported commands
of the linked namespace at the time of the invocation of the ensemble
command.
+.\" OPTION: -unknown
.TP
\fB\-unknown\fR
.
@@ -846,6 +851,7 @@ unable to determine how to implement a particular subcommand. See
.PP
The following extra option is allowed by \fBnamespace ensemble
create\fR:
+.\" OPTION: -command
.TP
\fB\-command\fR
.
@@ -857,6 +863,7 @@ command is invoked.
.PP
The following extra option is allowed by \fBnamespace ensemble
configure\fR:
+.\" OPTION: -namespace
.TP
\fB\-namespace\fR
.
diff --git a/doc/next.n b/doc/next.n
index 624e058..9f25ca2 100644
--- a/doc/next.n
+++ b/doc/next.n
@@ -34,10 +34,10 @@ chain.
.PP
The \fBnextto\fR command is the same as the \fBnext\fR command, except that it
takes an additional \fIclass\fR argument that identifies a class whose
-implementation of the current method chain (see \fBinfo object\fR \fBcall\fR) should
-be used; the method implementation selected will be the one provided by the
-given class, and it must refer to an existing non-filter invocation that lies
-further along the chain than the current implementation.
+implementation of the current method chain (see \fBinfo object\fR \fBcall\fR)
+should be used; the method implementation selected will be the one provided by
+the given class, and it must refer to an existing non-filter invocation that
+lies further along the chain than the current implementation.
.SH "THE METHOD CHAIN"
.PP
When a method of an object is invoked, things happen in several stages:
diff --git a/doc/open.n b/doc/open.n
index 1c63f8f..03a58e6 100644
--- a/doc/open.n
+++ b/doc/open.n
@@ -31,35 +31,23 @@ conventions described in the \fBfilename\fR manual entry.
The \fIaccess\fR argument, if present, indicates the way in which the file
(or command pipeline) is to be accessed.
In the first form \fIaccess\fR may have any of the following values:
-.TP 15
-\fBr\fR
-.
+.IP \fBr\fR
Open the file for reading only; the file must already exist. This is the
default value if \fIaccess\fR is not specified.
-.TP 15
-\fBr+\fR
-.
+.IP \fBr+\fR
Open the file for both reading and writing; the file must
already exist.
-.TP 15
-\fBw\fR
-.
+.IP \fBw\fR
Open the file for writing only. Truncate it if it exists. If it does not
exist, create a new file.
-.TP 15
-\fBw+\fR
-.
+.IP \fBw+\fR
Open the file for reading and writing. Truncate it if it exists.
If it does not exist, create a new file.
-.TP 15
-\fBa\fR
-.
+.IP \fBa\fR
Open the file for writing only. If the file does not exist,
create a new empty file.
Set the file pointer to the end of the file prior to each write.
-.TP 15
-\fBa+\fR
-.
+.IP \fBa+\fR
Open the file for reading and writing. If the file does not exist,
create a new empty file.
Set the initial access position to the end of the file.
@@ -73,44 +61,26 @@ reading or writing of binary data.
In the second form, \fIaccess\fR consists of a list of any of the
following flags, most of which have the standard POSIX meanings.
One of the flags must be either \fBRDONLY\fR, \fBWRONLY\fR or \fBRDWR\fR.
-.TP 15
-\fBRDONLY\fR
-.
+.IP \fBRDONLY\fR
Open the file for reading only.
-.TP 15
-\fBWRONLY\fR
-.
+.IP \fBWRONLY\fR
Open the file for writing only.
-.TP 15
-\fBRDWR\fR
-.
+.IP \fBRDWR\fR
Open the file for both reading and writing.
-.TP 15
-\fBAPPEND\fR
-.
+.IP \fBAPPEND\fR
Set the file pointer to the end of the file prior to each write.
-.TP 15
-\fBBINARY\fR
-.
+.IP \fBBINARY\fR
Configure the opened channel with the \fB\-translation binary\fR option.
-.TP 15
-\fBCREAT\fR
-.
+.IP \fBCREAT\fR
Create the file if it does not already exist (without this flag it
is an error for the file not to exist).
-.TP 15
-\fBEXCL\fR
-.
+.IP \fBEXCL\fR
If \fBCREAT\fR is also specified, an error is returned if the
file already exists.
-.TP 15
-\fBNOCTTY\fR
-.
+.IP \fBNOCTTY\fR
If the file is a terminal device, this flag prevents the file from
becoming the controlling terminal of the process.
-.TP 15
-\fBNONBLOCK\fR
-.
+.IP \fBNONBLOCK\fR
Prevents the process from blocking while opening the file, and
possibly in subsequent I/O operations. The exact behavior of
this flag is system- and device-dependent; its use is discouraged
@@ -118,9 +88,7 @@ this flag is system- and device-dependent; its use is discouraged
in nonblocking mode).
For details refer to your system documentation on the \fBopen\fR system
call's \fBO_NONBLOCK\fR flag.
-.TP 15
-\fBTRUNC\fR
-.
+.IP \fBTRUNC\fR
If the file exists it is truncated to zero length.
.PP
If a new file is created as part of opening it, \fIpermissions\fR
@@ -132,6 +100,7 @@ conjunction with the process's file mode creation mask.
When the file opened is an ordinary disk file, the \fBchan configure\fR and
\fBfconfigure\fR commands can be used to query this additional configuration
option:
+.\" OPTION: -stat
.TP
\fB\-stat\fR
.
@@ -190,6 +159,7 @@ the PORTABILITY ISSUES section.
The \fBchan configure\fR and \fBfconfigure\fR commands can be used to query
and set additional configuration options specific to serial ports (where
supported):
+.\" OPTION: -mode
.TP
\fB\-mode\fI baud\fB,\fIparity\fB,\fIdata\fB,\fIstop\fR
.
@@ -207,6 +177,7 @@ or
\fIData\fR is the number of
data bits and should be an integer from 5 to 8, while \fIstop\fR is the
number of stop bits and should be the integer 1 or 2.
+.\" OPTION: -handshake
.TP
\fB\-handshake\fI type\fR
.
@@ -225,12 +196,14 @@ There is no default handshake configuration, the initial value depends
on your operating system settings.
The \fB\-handshake\fR option cannot be queried.
.RE
+.\" OPTION: -queue
.TP
\fB\-queue\fR
.
(Windows and Unix). The \fB\-queue\fR option can only be queried.
It returns a list of two integers representing the current number
of bytes in the input and output queue respectively.
+.\" OPTION: -timeout
.TP
\fB\-timeout\fI msec\fR
.
@@ -241,6 +214,7 @@ For Unix systems the granularity is 100 milliseconds.
The \fB\-timeout\fR option does not affect write operations or
nonblocking reads.
This option cannot be queried.
+.\" OPTION: -ttycontrol
.TP
\fB\-ttycontrol\fI {signal boolean signal boolean ...}\fR
.
@@ -254,6 +228,7 @@ It is not a good idea to change the \fBRTS\fR (or \fBDTR\fR) signal
with active hardware handshake \fBrtscts\fR (or \fBdtrdsr\fR).
The result is unpredictable.
The \fB\-ttycontrol\fR option cannot be queried.
+.\" OPTION: -ttystatus
.TP
\fB\-ttystatus\fR
.
@@ -263,6 +238,7 @@ queried. It returns the current modem status and handshake input signals
The result is a list of signal,value pairs with a fixed order,
e.g. \fB{CTS 1 DSR 0 RING 1 DCD 0}\fR.
The \fIsignal\fR names are returned upper case.
+.\" OPTION: -xchar
.TP
\fB\-xchar\fI {xonChar xoffChar}\fR
.
@@ -270,6 +246,7 @@ The \fIsignal\fR names are returned upper case.
handshake characters. Normally the operating system default should be
DC1 (0x11) and DC3 (0x13) representing the ASCII standard
XON and XOFF characters.
+.\" OPTION: -closemode
.TP
\fB\-closemode\fI closeMode\fR
.VS "8.7, TIP 160"
@@ -278,24 +255,19 @@ the serial channel, which defines how pending output in operating system
buffers is handled when the channel is closed. The following values for
\fIcloseMode\fR are supported:
.RS
-.TP
-\fBdefault\fR
-.
+.IP \fBdefault\fR
indicates that a system default operation should be used; all serial channels
default to this.
-.TP
-\fBdiscard\fR
-.
+.IP \fBdiscard\fR
indicates that the contents of the OS buffers should be discarded. Note that
this is \fInot recommended\fR when writing to a POSIX terminal, as it can
interact unexpectedly with handling of \fBstderr\fR.
-.TP
-\fBdrain\fR
-.
+.IP \fBdrain\fR
indicates that Tcl should wait when closing the channel until all output has
been consumed. This may slow down \fBclose\fR noticeably.
.RE
.VE "8.7, TIP 160"
+.\" OPTION: -inputmode
.TP
\fB\-inputmode\fI inputMode\fR
.VS "8.7, TIP 160"
@@ -305,26 +277,18 @@ the assumption that it is talking to a terminal, which controls how interactive
input from users is handled. The following values for \fIinputMode\fR are
supported:
.RS
-.TP
-\fBnormal\fR
-.
+.IP \fBnormal\fR
indicates that normal line-oriented input should be used, with standard
terminal editing capabilities enabled.
-.TP
-\fBpassword\fR
-.
+.IP \fBpassword\fR
indicates that non-echoing input should be used, with standard terminal
editing capabilities enabled but no writing of typed characters to the
terminal (except for newlines). Some terminals may indicate this specially.
-.TP
-\fBraw\fR
-.
+.IP \fBraw\fR
indicates that all keyboard input should be given directly to Tcl with the
terminal doing no processing at all. It does not echo the keys, leaving it up
to the Tcl script to interpret what to do.
-.TP
-\fBreset\fR (set only)
-.
+.IP "\fBreset\fR (set only)"
indicates that the terminal should be reset to what state it was in when the
terminal was opened.
.PP
@@ -332,6 +296,7 @@ Note that setting this option (technically, anything that changes the terminal
state from its initial value \fIvia this option\fR) will cause the channel to
turn on an automatic reset of the terminal when the channel is closed.
.RE
+.\" OPTION: -winsize
.TP
\fB\-winsize\fR
.
@@ -339,6 +304,7 @@ turn on an automatic reset of the terminal when the channel is closed.
option is query only. It retrieves a two-element list with the the current
width and height of the terminal.
.VE "8.7, TIP 160"
+.\" OPTION: -pollinterval
.TP
\fB\-pollinterval\fI msec\fR
.
@@ -348,6 +314,7 @@ This affects the time interval between checking for events throughout the Tcl
interpreter (the smallest value always wins). Use this option only if
you want to poll the serial port more or less often than 10 msec
(the default).
+.\" OPTION: -sysbuffer
.TP
\fB\-sysbuffer\fI inSize\fR
.TP
@@ -358,6 +325,7 @@ system buffers for a serial channel. Especially at higher communication
rates the default input buffer size of 4096 bytes can overrun
for latent systems. The first form specifies the input buffer size,
in the second form both input and output buffers are defined.
+.\" OPTION: -lasterror
.TP
\fB\-lasterror\fR
.
@@ -376,29 +344,29 @@ lines and handshaking. Here we are using the terms \fIworkstation\fR for
your computer and \fImodem\fR for the external device, because some signal
names (DCD, RI) come from modems. Of course your external device may use
these signal lines for other purposes.
-.IP \fBTXD\fR(output)
+.IP "\fBTXD\fR (output)"
\fBTransmitted Data:\fR Outgoing serial data.
-.IP \fBRXD\fR(input)
+.IP "\fBRXD\fR (input)"
\fBReceived Data:\fRIncoming serial data.
-.IP \fBRTS\fR(output)
+.IP "\fBRTS\fR (output)"
\fBRequest To Send:\fR This hardware handshake line informs the modem that
your workstation is ready to receive data. Your workstation may
automatically reset this signal to indicate that the input buffer is full.
-.IP \fBCTS\fR(input)
+.IP "\fBCTS\fR (input)"
\fBClear To Send:\fR The complement to RTS. Indicates that the modem is
ready to receive data.
-.IP \fBDTR\fR(output)
+.IP "\fBDTR\fR (output)"
\fBData Terminal Ready:\fR This signal tells the modem that the workstation
is ready to establish a link. DTR is often enabled automatically whenever a
serial port is opened.
-.IP \fBDSR\fR(input)
+.IP "\fBDSR\fR (input)"
\fBData Set Ready:\fR The complement to DTR. Tells the workstation that the
modem is ready to establish a link.
-.IP \fBDCD\fR(input)
+.IP "\fBDCD\fR (input)"
\fBData Carrier Detect:\fR This line becomes active when a modem detects a
.QW Carrier
signal.
-.IP \fBRI\fR(input)
+.IP "\fBRI\fR (input)"
\fBRing Indicator:\fR Goes active when the modem detects an incoming call.
.IP \fBBREAK\fR
A BREAK condition is not a hardware signal line, but a logical zero on the
@@ -416,39 +384,27 @@ settings may be wrong. That is why a reliable software should always
\fBcatch\fR serial read operations. In cases of an error Tcl returns a
general file I/O error. Then \fBfconfigure\fR \fB\-lasterror\fR may help to
locate the problem. The following error codes may be returned.
-.TP 10
-\fBRXOVER\fR
-.
+.IP \fBRXOVER\fR
Windows input buffer overrun. The data comes faster than your scripts reads
-it or your system is overloaded. Use \fBfconfigure\fR \fB\-sysbuffer\fR to avoid a
-temporary bottleneck and/or make your script faster.
-.TP 10
-\fBTXFULL\fR
-.
+it or your system is overloaded. Use \fBfconfigure\fR \fB\-sysbuffer\fR to
+avoid a temporary bottleneck and/or make your script faster.
+.IP \fBTXFULL\fR
Windows output buffer overrun. Complement to RXOVER. This error should
practically not happen, because Tcl cares about the output buffer status.
-.TP 10
-\fBOVERRUN\fR
-.
+.IP \fBOVERRUN\fR
UART buffer overrun (hardware) with data lost.
The data comes faster than the system driver receives it.
Check your advanced serial port settings to enable the FIFO (16550) buffer
and/or setup a lower(1) interrupt threshold value.
-.TP 10
-\fBRXPARITY\fR
-.
+.IP \fBRXPARITY\fR
A parity error has been detected by your UART.
-Wrong parity settings with \fBfconfigure\fR \fB\-mode\fR or a noisy data line (RXD)
-may cause this error.
-.TP 10
-\fBFRAME\fR
-.
+Wrong parity settings with \fBfconfigure\fR \fB\-mode\fR or a noisy data line
+(RXD) may cause this error.
+.IP \fBFRAME\fR
A stop-bit error has been detected by your UART.
-Wrong mode settings with \fBfconfigure\fR \fB\-mode\fR or a noisy data line (RXD)
-may cause this error.
-.TP 10
-\fBBREAK\fR
-.
+Wrong mode settings with \fBfconfigure\fR \fB\-mode\fR or a noisy data line
+(RXD) may cause this error.
+.IP \fBBREAK\fR
A BREAK condition has been detected by your UART (see above).
.SS "PORTABILITY ISSUES"
.TP
@@ -482,7 +438,7 @@ before each write, which is not an atomic operation and does not carry the
guarantee of strict appending that is present on POSIX platforms.
.RE
.TP
-\fBUnix\fR\0\0\0\0\0\0\0
+\fBUnix \fR
.
Valid values for \fIfileName\fR to open a serial port are generally of the
form \fB/dev/tty\fIX\fR, where \fIX\fR is \fBa\fR or \fBb\fR, but the name
@@ -509,6 +465,7 @@ applications on the various platforms
.VS "8.7, TIP 160"
On Windows only, console channels (usually \fBstdin\fR or \fBstdout\fR)
support the following options:
+.\" OPTION: -inputmode
.TP
\fB\-inputmode\fI inputMode\fR
.
@@ -516,20 +473,14 @@ This option is used to query or change the input mode of the console channel,
which controls how interactive input from users is handled. The following
values for \fIinputMode\fR are supported:
.RS
-.TP
-\fBnormal\fR
-.
+.IP \fBnormal\fR
indicates that normal line-oriented input should be used, with standard
console editing capabilities enabled.
-.TP
-\fBpassword\fR
-.
+.IP \fBpassword\fR
indicates that non-echoing input should be used, with standard console
-editing capabilitied enabled but no writing of typed characters to the
+editing capabilities enabled but no writing of typed characters to the
terminal (except for newlines).
-.TP
-\fBraw\fR
-.
+.IP \fBraw\fR
indicates that all keyboard input should be given directly to Tcl with the
console doing no processing at all. It does not echo the keys, leaving it up
to the Tcl script to interpret what to do.
@@ -543,11 +494,12 @@ Note that setting this option (technically, anything that changes the console
state from its default \fIvia this option\fR) will cause the channel to turn
on an automatic reset of the console when the channel is closed.
.RE
+.\" OPTION: -winsize
.TP
\fB\-winsize\fR
.
This option is query only.
-It retrieves a two-element list with the the current width and height of the
+It retrieves a two-element list with the current width and height of the
console that this channel is talking to.
.PP
Note that the equivalent options exist on Unix, but are on the serial channel
diff --git a/doc/package.n b/doc/package.n
index dc21093..d27a44a 100644
--- a/doc/package.n
+++ b/doc/package.n
@@ -208,33 +208,23 @@ Returns 1 if the \fIversion\fR satisfies at least one of the given
requirements, and 0 otherwise. Each \fIrequirement\fR is allowed to
have any of the forms:
.RS
-.TP
-min
-.
+.IP \fImin\fR
This form is called
.QW min-bounded .
-.TP
-min-
-.
+.IP \fImin\fB\-\fR
This form is called
.QW min-unbound .
-.TP
-min-max
-.
+.IP \fImin\fB\-\fImax\fR
This form is called
.QW bounded .
-.RE
-.RS
.PP
where
-.QW min
+.QW \fImin\fR
and
-.QW max
+.QW \fImax\fR
are valid version numbers. The legacy syntax is
a special case of the extended syntax, keeping backward
compatibility. Regarding satisfaction the rules are:
-.RE
-.RS
.IP [1]
The \fIversion\fR has to pass at least one of the listed
\fIrequirement\fRs to be satisfactory.
diff --git a/doc/packagens.n b/doc/packagens.n
index ebb7372..42a0686 100644
--- a/doc/packagens.n
+++ b/doc/packagens.n
@@ -19,14 +19,20 @@ command for a given package specification. It can be used to construct a
\fBpkgIndex.tcl\fR file for use with the \fBpackage\fR mechanism.
.SH OPTIONS
The parameters supported are:
+.\" OPTION: -name
.TP
\fB\-name \fIpackageName\fR
+.
This parameter specifies the name of the package. It is required.
+.\" OPTION: -version
.TP
\fB\-version \fIpackageVersion\fR
+.
This parameter specifies the version of the package. It is required.
+.\" OPTION: -load
.TP
\fB\-load \fIfilespec\fR
+.
This parameter specifies a library that must be loaded with the
\fBload\fR command. \fIfilespec\fR is a list with two elements. The
first element is the name of the file to load. The second, optional
@@ -34,8 +40,10 @@ element is a list of commands supplied by loading that file. If the
list of procedures is empty or omitted, \fB::pkg::create\fR will
set up the library for direct loading (see \fBpkg_mkIndex\fR). Any
number of \fB\-load\fR parameters may be specified.
+.\" OPTION: -source
.TP
\fB\-source \fIfilespec\fR
+.
This parameter is similar to the \fB\-load\fR parameter, except that it
specifies a Tcl library that must be loaded with the
\fBsource\fR command. Any number of \fB\-source\fR parameters may be
diff --git a/doc/pkgMkIndex.n b/doc/pkgMkIndex.n
index f98cbcd..3d10360 100644
--- a/doc/pkgMkIndex.n
+++ b/doc/pkgMkIndex.n
@@ -96,29 +96,39 @@ Different versions of a package may be loaded in different
interpreters.
.SH OPTIONS
The optional switches are:
+.\" OPTION: -direct
.TP 15
\fB\-direct\fR
+.
The generated index will implement direct loading of the package
upon \fBpackage require\fR. This is the default.
+.\" OPTION: -lazy
.TP 15
\fB\-lazy\fR
+.
The generated index will manage to delay loading the package until the
use of one of the commands provided by the package, instead of loading
it immediately upon \fBpackage require\fR. This is not compatible with
the use of \fIauto_reset\fR, and therefore its use is discouraged.
+.\" OPTION: -load
.TP 15
\fB\-load \fIpkgPat\fR
+.
The index process will preload any packages that exist in the
current interpreter and match \fIpkgPat\fR into the child interpreter used to
generate the index. The pattern match uses string match rules, but without
making case distinctions.
See \fBCOMPLEX CASES\fR below.
+.\" OPTION: -verbose
.TP 15
\fB\-verbose\fR
+.
Generate output during the indexing process. Output is via
the \fBtclLog\fR procedure, which by default prints to stderr.
+.\" OPTION: --
.TP 15
\fB\-\-\fR
+.
End of the flags, in case \fIdir\fR begins with a dash.
.SH "PACKAGES AND THE AUTO-LOADER"
.PP
diff --git a/doc/platform.n b/doc/platform.n
index 18754b6..3ff0568 100644
--- a/doc/platform.n
+++ b/doc/platform.n
@@ -43,7 +43,7 @@ establishes a standard naming convention for architectures running Tcl
and makes it more convenient for developers to identify the current
architecture a Tcl program is running on.
.SH COMMANDS
-.\" METHOD: identify
+.\" COMMAND: identify
.TP
\fBplatform::identify\fR
.
@@ -53,7 +53,7 @@ core is running on. The returned identifier has the general format
details like kernel version, libc version, etc., and this information
may contain dashes as well. The \fICPU\fR part will not contain
dashes, making the preceding dash the last dash in the result.
-.\" METHOD: generic
+.\" COMMAND: generic
.TP
\fBplatform::generic\fR
.
@@ -61,7 +61,7 @@ This command returns a simplified identifier describing the platform
the Tcl core is running on. In contrast to \fBplatform::identify\fR it
leaves out details like kernel version, libc version, etc. The
returned identifier has the general format \fIOS\fR-\fICPU\fR.
-.\" METHOD: patterns
+.\" COMMAND: patterns
.TP
\fBplatform::patterns \fIidentifier\fR
.
diff --git a/doc/platform_shell.n b/doc/platform_shell.n
index 7103e6a..22c2ca4 100644
--- a/doc/platform_shell.n
+++ b/doc/platform_shell.n
@@ -41,19 +41,19 @@ the architecture of the shell which will actually run the installed
packages, versus the architecture of the shell running the repository
software.
.SH COMMANDS
-.\" METHOD: identify
+.\" COMMAND: identify
.TP
\fBplatform::shell::identify \fIshell\fR
.
This command does the same identification as \fBplatform::identify\fR,
for the specified Tcl shell, in contrast to the running shell.
-.\" METHOD: generic
+.\" COMMAND: generic
.TP
\fBplatform::shell::generic \fIshell\fR
.
This command does the same identification as \fBplatform::generic\fR,
for the specified Tcl shell, in contrast to the running shell.
-.\" METHOD: platform
+.\" COMMAND: platform
.TP
\fBplatform::shell::platform \fIshell\fR
.
diff --git a/doc/prefix.n b/doc/prefix.n
index abd337a..a2180e5 100644
--- a/doc/prefix.n
+++ b/doc/prefix.n
@@ -44,15 +44,18 @@ before use with this subcommand, so that the list of matches presented in the
error message also becomes sorted, though this is not strictly necessary for
the operation of this subcommand itself.)
.RS
+.\" OPTION: -exact
.TP
-\fB\-exact\fR\0
+\fB\-exact\fR
.
Accept only exact matches.
+.\" OPTION: -message
.TP
\fB\-message\0\fIstring\fR
.
Use \fIstring\fR in the error message at a mismatch. Default is
.QW option .
+.\" OPTION: -error
.TP
\fB\-error\0\fIoptions\fR
.
@@ -67,7 +70,7 @@ is used, an error would be generated as:
.RS
.PP
.CS
-return \-errorcode MyError \-level 1 \-code error \e
+return -errorcode MyError -level 1 -code error \e
"ambiguous option ..."
.CE
.RE
@@ -82,9 +85,9 @@ namespace import ::tcl::prefix
\fI\(-> apa\fR
\fBprefix match\fR {apa bepa cepa} a
\fI\(-> apa\fR
-\fBprefix match\fR \-exact {apa bepa cepa} a
+\fBprefix match\fR -exact {apa bepa cepa} a
\fI\(-> bad option "a": must be apa, bepa, or cepa\fR
-\fBprefix match\fR \-message "switch" {apa ada bepa cepa} a
+\fBprefix match\fR -message "switch" {apa ada bepa cepa} a
\fI\(-> ambiguous switch "a": must be apa, ada, bepa, or cepa\fR
\fBprefix longest\fR {fblocked fconfigure fcopy file fileevent flush} fc
\fI\(-> fco\fR
@@ -95,9 +98,9 @@ namespace import ::tcl::prefix
Simplifying option matching:
.PP
.CS
-array set opts {\-apa 1 \-bepa "" \-cepa 0}
+array set opts {-apa 1 -bepa "" -cepa 0}
foreach {arg val} $args {
- set opts([\fBprefix match\fR {\-apa \-bepa \-cepa} $arg]) $val
+ set opts([\fBprefix match\fR {-apa -bepa -cepa} $arg]) $val
}
.CE
.PP
diff --git a/doc/proc.n b/doc/proc.n
index fdccaca..d4de9b0 100644
--- a/doc/proc.n
+++ b/doc/proc.n
@@ -57,10 +57,10 @@ There is one special case to permit procedures with
variable numbers of arguments. If the last formal argument has the name
.QW \fBargs\fR ,
then a call to the procedure may contain more actual arguments
-than the procedure has formal arguments. In this case, all of the actual arguments
-starting at the one that would be assigned to \fBargs\fR are combined into
-a list (as if the \fBlist\fR command had been used); this combined value
-is assigned to the local variable \fBargs\fR.
+than the procedure has formal arguments. In this case, all of the actual
+arguments starting at the one that would be assigned to \fBargs\fR are
+combined into a list (as if the \fBlist\fR command had been used); this
+combined value is assigned to the local variable \fBargs\fR.
.PP
When \fIbody\fR is being executed, variable names normally refer to
local variables, which are created automatically when referenced and
diff --git a/doc/process.n b/doc/process.n
index f69811e..78c05ad 100644
--- a/doc/process.n
+++ b/doc/process.n
@@ -57,16 +57,16 @@ processes, the status is a list with the following format:
where:
.RS
.TP
-\fIcode\fR\0
+\fIcode\fR
.
is a standard Tcl return code, i.e., \fB0\fR for TCL_OK and \fB1\fR
for TCL_ERROR,
.TP
-\fImsg\fR\0
+\fImsg\fR
.
is the human-readable error message,
.TP
-\fIerrorCode\fR\0
+\fIerrorCode\fR
.
uses the same format as the \fBerrorCode\fR global variable
.PP
@@ -76,14 +76,16 @@ hood this command calls \fBTcl_WaitPid\fR with the \fBWNOHANG\fR flag set for
non-blocking behavior, unless the \fB\-wait\fR switch is set (see below).
.PP
Additionally, \fB::tcl::process status\fR accepts the following switches:
+.\" OPTION: -wait
.TP
-\fB\-wait\fR\0
+\fB\-wait\fR
.
By default the command returns immediately (the underlying \fBTcl_WaitPid\fR is
called with the \fBWNOHANG\fR flag set) unless this switch is set. If \fIpids\fR
is specified as a list of PIDs then the command waits until the status of the
matching subprocesses are available. If \fIpids\fR was not specified, this
command will wait for all known subprocesses.
+.\" OPTION: --
.TP
\fB\-\|\-\fR
.
diff --git a/doc/re_syntax.n b/doc/re_syntax.n
index f68135e..1ece560 100644
--- a/doc/re_syntax.n
+++ b/doc/re_syntax.n
@@ -57,29 +57,17 @@ Without a quantifier, it matches a single match for the atom.
The quantifiers,
and what a so-quantified atom matches, are:
.RS 2
-.TP 6
-\fB*\fR
-.
+.IP \fB*\fR 6
a sequence of 0 or more matches of the atom
-.TP
-\fB+\fR
-.
+.IP \fB+\fR 6
a sequence of 1 or more matches of the atom
-.TP
-\fB?\fR
-.
+.IP \fB?\fR 6
a sequence of 0 or 1 matches of the atom
-.TP
-\fB{\fIm\fB}\fR
-.
+.IP \fB{\fIm\fB}\fR 6
a sequence of exactly \fIm\fR matches of the atom
-.TP
-\fB{\fIm\fB,}\fR
-.
+.IP \fB{\fIm\fB,}\fR 6
a sequence of \fIm\fR or more matches of the atom
-.TP
-\fB{\fIm\fB,\fIn\fB}\fR
-.
+.IP \fB{\fIm\fB,\fIn\fB}\fR 6
a sequence of \fIm\fR through \fIn\fR (inclusive) matches of the atom;
\fIm\fR may not exceed \fIn\fR
.TP
@@ -99,32 +87,32 @@ An atom is one of:
.IP \fB(\fIre\fB)\fR 6
matches a match for \fIre\fR (\fIre\fR is any regular expression) with
the match noted for possible reporting
-.IP \fB(?:\fIre\fB)\fR
+.IP \fB(?:\fIre\fB)\fR 6
as previous, but does no reporting (a
.QW non-capturing
set of parentheses)
-.IP \fB()\fR
+.IP \fB()\fR 6
matches an empty string, noted for possible reporting
-.IP \fB(?:)\fR
+.IP \fB(?:)\fR 6
matches an empty string, without reporting
-.IP \fB[\fIchars\fB]\fR
+.IP \fB[\fIchars\fB]\fR 6
a \fIbracket expression\fR, matching any one of the \fIchars\fR (see
\fBBRACKET EXPRESSIONS\fR for more detail)
-.IP \fB.\fR
+.IP \fB.\fR 6
matches any single character
-.IP \fB\e\fIk\fR
+.IP \fB\e\fIk\fR 6
matches the non-alphanumeric character \fIk\fR
taken as an ordinary character, e.g. \fB\e\e\fR matches a backslash
character
-.IP \fB\e\fIc\fR
+.IP \fB\e\fIc\fR 6
where \fIc\fR is alphanumeric (possibly followed by other characters),
an \fIescape\fR (AREs only), see \fBESCAPES\fR below
-.IP \fB{\fR
+.IP \fB{\fR 6
when followed by a character other than a digit, matches the
left-brace character
.QW \fB{\fR ;
when followed by a digit, it is the beginning of a \fIbound\fR (see above)
-.IP \fIx\fR
+.IP \fIx\fR 6
where \fIx\fR is a single character with no other significance,
matches that character.
.RE
@@ -334,82 +322,50 @@ is the one actual incompatibility between EREs and AREs.)
Character-entry escapes (AREs only) exist to make it easier to specify
non-printing and otherwise inconvenient characters in REs:
.RS 2
-.TP 5
-\fB\ea\fR
-.
+.IP \fB\ea\fR 5
alert (bell) character, as in C
-.TP
-\fB\eb\fR
-.
+.IP \fB\eb\fR 5
backspace, as in C
-.TP
-\fB\eB\fR
-.
+.IP \fB\eB\fR 5
synonym for \fB\e\fR to help reduce backslash doubling in some
applications where there are multiple levels of backslash processing
-.TP
-\fB\ec\fIX\fR
-.
+.IP \fB\ec\fIX\fR 5
(where \fIX\fR is any character) the character whose low-order 5 bits
are the same as those of \fIX\fR, and whose other bits are all zero
-.TP
-\fB\ee\fR
-.
+.IP \fB\ee\fR 5
the character whose collating-sequence name is
.QW \fBESC\fR ,
or failing that, the character with octal value 033
-.TP
-\fB\ef\fR
-.
+.IP \fB\ef\fR 5
formfeed, as in C
-.TP
-\fB\en\fR
-.
+.IP \fB\en\fR 5
newline, as in C
-.TP
-\fB\er\fR
-.
+.IP \fB\er\fR 5
carriage return, as in C
-.TP
-\fB\et\fR
-.
+.IP \fB\et\fR 5
horizontal tab, as in C
-.TP
-\fB\eu\fIwxyz\fR
-.
+.IP \fB\eu\fIwxyz\fR 5
(where \fIwxyz\fR is one up to four hexadecimal digits) the Unicode
character \fBU+\fIwxyz\fR in the local byte ordering
-.TP
-\fB\eU\fIstuvwxyz\fR
-.
+.IP \fB\eU\fIstuvwxyz\fR 5
(where \fIstuvwxyz\fR is one up to eight hexadecimal digits) reserved
for a Unicode extension up to 21 bits. The digits are parsed until the
-first non-hexadecimal character is encountered, the maximun of eight
+first non-hexadecimal character is encountered, the maximum of eight
hexadecimal digits are reached, or an overflow would occur in the maximum
value of \fBU+\fI10ffff\fR.
-.TP
-\fB\ev\fR
-.
+.IP \fB\ev\fR 5
vertical tab, as in C
-.TP
-\fB\ex\fIhh\fR
-.
+.IP \fB\ex\fIhh\fR 5
(where \fIhh\fR is one or two hexadecimal digits) the character
whose hexadecimal value is \fB0x\fIhh\fR.
-.TP
-\fB\e0\fR
-.
+.IP \fB\e0\fR 5
the character whose value is \fB0\fR
-.TP
-\fB\e\fIxyz\fR
-.
+.IP \fB\e\fIxyz\fR 5
(where \fIxyz\fR is exactly three octal digits, and is not a \fIback
reference\fR (see below)) the character whose octal value is
\fB0\fIxyz\fR. The first digit must be in the range 0-3, otherwise
the two-digit form is assumed.
-.TP
-\fB\e\fIxy\fR
-.
+.IP \fB\e\fIxy\fR 5
(where \fIxy\fR is exactly two octal digits, and is not a \fIback
reference\fR (see below)) the character whose octal value is
\fB0\fIxy\fR
@@ -446,7 +402,8 @@ commonly-used character classes:
.TP
\fB\ew\fR
.
-\fB[[:alnum:]_\eu203F\eu2040\eu2054\euFE33\euFE34\euFE4D\euFE4E\euFE4F\euFF3F]\fR (including punctuation connector characters)
+\fB[[:alnum:]_\eu203F\eu2040\eu2054\euFE33\euFE34\euFE4D\euFE4E\euFE4F\euFF3F]\fR
+(including punctuation connector characters)
.TP
\fB\eD\fR
.
@@ -458,7 +415,8 @@ commonly-used character classes:
.TP
\fB\eW\fR
.
-\fB[^[:alnum:]_\eu203F\eu2040\eu2054\euFE33\euFE34\euFE4D\euFE4E\euFE4F\euFF3F]\fR (including punctuation connector characters)
+\fB[^[:alnum:]_\eu203F\eu2040\eu2054\euFE33\euFE34\euFE4D\euFE4E\euFE4F\euFF3F]\fR
+(including punctuation connector characters)
.RE
.PP
Within bracket expressions,
@@ -484,41 +442,25 @@ is illegal.)
A constraint escape (AREs only) is a constraint, matching the empty
string if specific conditions are met, written as an escape:
.RS 2
-.TP 6
-\fB\eA\fR
-.
+.IP \fB\eA\fR 6
matches only at the beginning of the string (see \fBMATCHING\fR,
below, for how this differs from
.QW \fB^\fR )
-.TP
-\fB\em\fR
-.
+.IP \fB\em\fR 6
matches only at the beginning of a word
-.TP
-\fB\eM\fR
-.
+.IP \fB\eM\fR 6
matches only at the end of a word
-.TP
-\fB\ey\fR
-.
+.IP \fB\ey\fR 6
matches only at the beginning or end of a word
-.TP
-\fB\eY\fR
-.
+.IP \fB\eY\fR 6
matches only at a point that is not the beginning or end of a word
-.TP
-\fB\eZ\fR
-.
+.IP \fB\eZ\fR 6
matches only at the end of the string (see \fBMATCHING\fR, below, for
how this differs from
.QW \fB$\fR )
-.TP
-\fB\e\fIm\fR
-.
+.IP \fB\e\fIm\fR 6
(where \fIm\fR is a nonzero digit) a \fIback reference\fR, see below
-.TP
-\fB\e\fImnn\fR
-.
+.IP \fB\e\fImnn\fR 6
(where \fIm\fR is a nonzero digit, and \fInn\fR is some more digits,
and the decimal value \fImnn\fR is not greater than the number of
closing capturing parentheses seen so far) a \fIback reference\fR, see
diff --git a/doc/read.n b/doc/read.n
index 7c0c155..a19e2a2 100644
--- a/doc/read.n
+++ b/doc/read.n
@@ -62,14 +62,14 @@ In blocking mode, the error is directly thrown, even, if there is a
leading decodable data portion.
The file pointer is advanced just before the encoding error.
An eventual well decoded data chunk before the encoding error is returned
-in the error option dictionary key \fB-data\fR.
+in the error option dictionary key \fB\-data\fR.
The value of the key contains the empty string, if the error arises at the
first data position.
.PP
In non blocking mode, first, any data without encoding error is returned
(without error state).
In the next call, no data is returned and the \fBEILSEQ\fR error state is set.
-The key \fB-data\fR is not present.
+The key \fB\-data\fR is not present.
.PP
Here is an example with an encoding error in UTF-8 encoding, which is then
introspected by a switch to the binary encoding. The test file contains a not
@@ -101,7 +101,7 @@ file35a65a0
% close $f
.CE
The already decoded data "A" is returned in the error options dictionary key
-\fB-data\fR.
+\fB\-data\fR.
The file position is advanced on the encoding error position 1.
The data at the error position is thus recovered by the next \fBread\fR command.
.PP
@@ -156,7 +156,8 @@ set lines [split $data \en]
.SH "SEE ALSO"
file(n), eof(n), fblocked(n), fconfigure(n), Tcl_StandardChannels(3)
.SH KEYWORDS
-blocking, channel, end of line, end of file, nonblocking, read, translation, encoding
+blocking, channel, end of line, end of file, nonblocking, read, translation,
+encoding
'\"Local Variables:
'\"mode: nroff
'\"End:
diff --git a/doc/refchan.n b/doc/refchan.n
index 2b79da2..b997ddb 100644
--- a/doc/refchan.n
+++ b/doc/refchan.n
@@ -244,17 +244,11 @@ the channel.
.PP
The \fIbase\fR argument is the same as the equivalent argument of the
builtin \fBchan seek\fR, namely:
-.TP 10
-\fBstart\fR
-.
+.IP \fBstart\fR 10
Seeking is relative to the beginning of the channel.
-.TP 10
-\fBcurrent\fR
-.
+.IP \fBcurrent\fR 10
Seeking is relative to the current seek position.
-.TP 10
-\fBend\fR
-.
+.IP \fBend\fR 10
Seeking is relative to the end of the channel.
.PP
The \fIoffset\fR is an integer number specifying the amount of
diff --git a/doc/regexp.n b/doc/regexp.n
index f39f389..f37ccbe 100644
--- a/doc/regexp.n
+++ b/doc/regexp.n
@@ -34,6 +34,7 @@ subexpression to the right in \fIexp\fR, and so on.
If the initial arguments to \fBregexp\fR start with \fB\-\fR then
they are treated as switches. The following switches are
currently supported:
+.\" OPTION: -about
.TP 15
\fB\-about\fR
.
@@ -42,12 +43,14 @@ containing information about the regular expression. The first
element of the list is a subexpression count. The second element is a
list of property names that describe various attributes of the regular
expression. This switch is primarily intended for debugging purposes.
+.\" OPTION: -expanded
.TP 15
\fB\-expanded\fR
.
Enables use of the expanded regular expression syntax where
whitespace and comments are ignored. This is the same as specifying
the \fB(?x)\fR embedded option (see the \fBre_syntax\fR manual page).
+.\" OPTION: -indices
.TP 15
\fB\-indices\fR
.
@@ -57,6 +60,7 @@ each variable
will contain a list of two decimal strings giving the indices
in \fIstring\fR of the first and last characters in the matching
range of characters.
+.\" OPTION: -line
.TP 15
\fB\-line\fR
.
@@ -75,6 +79,7 @@ matches an empty string before any newline in
addition to its normal function. This flag is equivalent to
specifying both \fB\-linestop\fR and \fB\-lineanchor\fR, or the
\fB(?n)\fR embedded option (see the \fBre_syntax\fR manual page).
+.\" OPTION: -linestop
.TP 15
\fB\-linestop\fR
.
@@ -85,6 +90,7 @@ bracket expressions and
so that they
stop at newlines. This is the same as specifying the \fB(?p)\fR
embedded option (see the \fBre_syntax\fR manual page).
+.\" OPTION: -lineanchor
.TP 15
\fB\-lineanchor\fR
.
@@ -98,11 +104,13 @@ so they match the
beginning and end of a line respectively. This is the same as
specifying the \fB(?w)\fR embedded option (see the \fBre_syntax\fR
manual page).
+.\" OPTION: -nocase
.TP 15
\fB\-nocase\fR
.
Causes upper-case characters in \fIstring\fR to be treated as
lower case during the matching process.
+.\" OPTION: -all
.TP 15
\fB\-all\fR
.
@@ -110,6 +118,7 @@ Causes the regular expression to be matched as many times as possible
in the string, returning the total number of matches found. If this
is specified with match variables, they will contain information for
the last match only.
+.\" OPTION: -inline
.TP 15
\fB\-inline\fR
.
@@ -129,6 +138,7 @@ regular expression. Examples are:
\fI\(-> in n li i ne e\fR
.CE
.RE
+.\" OPTION: -start
.TP 15
\fB\-start\fI index\fR
.
@@ -143,6 +153,7 @@ match the start of the string at \fIindex\fR. If \fB\-indices\fR
is specified, the indices will be indexed starting from the
absolute beginning of the input string.
\fIindex\fR will be constrained to the bounds of the input string.
+.\" OPTION: --
.TP 15
\fB\-\|\-\fR
.
@@ -175,7 +186,7 @@ Find the index of the word \fBbadger\fR (in any case) within a string
and store that in the variable \fBlocation\fR:
.PP
.CS
-\fBregexp\fR \-indices {(?i)\embadger\eM} $string location
+\fBregexp\fR -indices {(?i)\embadger\eM} $string location
.CE
.PP
This could also be written as a \fIbasic\fR regular expression (as opposed
@@ -183,13 +194,13 @@ to using the default syntax of \fIadvanced\fR regular expressions) match by
prefixing the expression with a suitable flag:
.PP
.CS
-\fBregexp\fR \-indices {(?ib)\e<badger\e>} $string location
+\fBregexp\fR -indices {(?ib)\e<badger\e>} $string location
.CE
.PP
This counts the number of octal digits in a string:
.PP
.CS
-\fBregexp\fR \-all {[0\-7]} $string
+\fBregexp\fR -all {[0-7]} $string
.CE
.PP
This lists all words (consisting of all sequences of non-whitespace
@@ -197,7 +208,7 @@ characters) in a string, and is useful as a more powerful version of the
\fBsplit\fR command:
.PP
.CS
-\fBregexp\fR \-all \-inline {\eS+} $string
+\fBregexp\fR -all -inline {\eS+} $string
.CE
.SH "SEE ALSO"
re_syntax(n), regsub(n), string(n)
diff --git a/doc/registry.n b/doc/registry.n
index 58215ff..4defbad 100644
--- a/doc/registry.n
+++ b/doc/registry.n
@@ -144,53 +144,35 @@ data, but does not actually change the representation. For some
types, the \fBregistry\fR command returns the data in a different form to
make it easier to manipulate. The following types are recognized by the
registry command:
-.TP 17
-\fBbinary\fR
-.
+.IP \fBbinary\fR
The registry value contains arbitrary binary data. The data is represented
exactly in Tcl, including any embedded nulls.
-.TP
-\fBnone\fR
-.
+.IP \fBnone\fR
The registry value contains arbitrary binary data with no defined
type. The data is represented exactly in Tcl, including any embedded
nulls.
-.TP
-\fBsz\fR
-.
+.IP \fBsz\fR
The registry value contains a null-terminated string. The data is
represented in Tcl as a string.
-.TP
-\fBexpand_sz\fR
-.
+.IP \fBexpand_sz\fR
The registry value contains a null-terminated string that contains
unexpanded references to environment variables in the normal Windows
style (for example,
.QW %PATH% ).
The data is represented in Tcl as a string.
-.TP
-\fBdword\fR
-.
+.IP \fBdword\fR
The registry value contains a little-endian 32-bit number. The data is
represented in Tcl as a decimal string.
-.TP
-\fBdword_big_endian\fR
-.
+.IP \fBdword_big_endian\fR
The registry value contains a big-endian 32-bit number. The data is
represented in Tcl as a decimal string.
-.TP
-\fBlink\fR
-.
+.IP \fBlink\fR
The registry value contains a symbolic link. The data is represented
exactly in Tcl, including any embedded nulls.
-.TP
-\fBmulti_sz\fR
-.
+.IP \fBmulti_sz\fR
The registry value contains an array of null-terminated strings. The
data is represented in Tcl as a list of strings.
-.TP
-\fBresource_list\fR
-.
+.IP \fBresource_list\fR
The registry value contains a device-driver resource list. The data
is represented exactly in Tcl, including any embedded nulls.
.PP
diff --git a/doc/regsub.n b/doc/regsub.n
index 439ad49..f7931af 100644
--- a/doc/regsub.n
+++ b/doc/regsub.n
@@ -54,6 +54,7 @@ backslashes.
If the initial arguments to \fBregsub\fR start with \fB\-\fR then
they are treated as switches. The following switches are
currently supported:
+.\" OPTION: -all
.TP
\fB\-all\fR
.
@@ -67,6 +68,7 @@ and
.QW \e\fIn\fR
sequences are handled for each substitution using the information
from the corresponding match.
+.\" OPTION: -command
.TP
\fB\-command\fR
.VS 8.7
@@ -80,7 +82,7 @@ command prefix, that is, a non-empty list. The substring of \fIstring\fR
that matches \fIexp\fR, and then each substring that matches each
capturing sub-RE within \fIexp\fR are appended as additional elements
to that list. (The items appended to the list are much like what
-\fBregexp\fR \fB-inline\fR would return). The completed list is then
+\fBregexp\fR \fB\-inline\fR would return). The completed list is then
evaluated as a Tcl command, and the result of that command is the
substitution string. Any error or exception from command evaluation
becomes an error or exception from the \fBregsub\fR command.
@@ -94,12 +96,14 @@ The exact location indices that matched are not made available to the script.
See \fBEXAMPLES\fR below for illustrative cases.
.RE
.VE 8.7
+.\" OPTION: -expanded
.TP
\fB\-expanded\fR
.
Enables use of the expanded regular expression syntax where
whitespace and comments are ignored. This is the same as specifying
the \fB(?x)\fR embedded option (see the \fBre_syntax\fR manual page).
+.\" OPTION: -line
.TP
\fB\-line\fR
.
@@ -117,6 +121,7 @@ matches an empty string before any newline in
addition to its normal function. This flag is equivalent to
specifying both \fB\-linestop\fR and \fB\-lineanchor\fR, or the
\fB(?n)\fR embedded option (see the \fBre_syntax\fR manual page).
+.\" OPTION: -linestop
.TP
\fB\-linestop\fR
.
@@ -127,6 +132,7 @@ bracket expressions and
so that they
stop at newlines. This is the same as specifying the \fB(?p)\fR
embedded option (see the \fBre_syntax\fR manual page).
+.\" OPTION: -lineanchor
.TP
\fB\-lineanchor\fR
.
@@ -140,12 +146,14 @@ so they match the
beginning and end of a line respectively. This is the same as
specifying the \fB(?w)\fR embedded option (see the \fBre_syntax\fR
manual page).
+.\" OPTION: -nocase
.TP
\fB\-nocase\fR
.
Upper-case characters in \fIstring\fR will be converted to lower-case
before matching against \fIexp\fR; however, substitutions specified
by \fIsubSpec\fR use the original unconverted form of \fIstring\fR.
+.\" OPTION: -start
.TP
\fB\-start\fI index\fR
.
@@ -158,6 +166,7 @@ When using this switch,
will not match the beginning of the line, and \eA will still
match the start of the string at \fIindex\fR.
\fIindex\fR will be constrained to the bounds of the input string.
+.\" OPTION: --
.TP
\fB\-\|\-\fR
.
@@ -256,6 +265,15 @@ set decoded [\fBregsub\fR -all -command $RE $string {apply {{- p h} {
format %c $charNumber
}}}]
.CE
+.PP
+The \fB\-command\fR option can also be useful for restricting the range of
+commands such as \fBstring totitle\fR:
+.PP
+.CE
+set message "the quIck broWn fOX JUmped oVer the laZy dogS..."
+puts [\fBregsub\fR -all -command {\ew+} $message {string totitle}]
+# \(-> \fIThe Quick Brown Fox Jumped Over The Lazy Dogs..\fR
+.CE
.VE 8.7
.SH "SEE ALSO"
regexp(n), re_syntax(n), subst(n), string(n)
diff --git a/doc/return.n b/doc/return.n
index a7eb197..9bf1ae2 100644
--- a/doc/return.n
+++ b/doc/return.n
@@ -105,6 +105,7 @@ script.
As documented above, the \fB\-code\fR entry in the return options dictionary
receives special treatment by Tcl. There are other return options also
recognized and treated specially by Tcl. They are:
+.\" OPTION: -errorcode
.TP
\fB\-errorcode \fIlist\fR
.
@@ -117,6 +118,7 @@ the \fB\-code error\fR option is provided, Tcl will set the value
of the \fB\-errorcode\fR entry in the return options dictionary
to the default value of \fBNONE\fR. The \fB\-errorcode\fR return
option will also be stored in the global variable \fBerrorCode\fR.
+.\" OPTION: -errorinfo
.TP
\fB\-errorinfo \fIinfo\fR
.
@@ -135,11 +137,14 @@ the procedure. Typically the \fIinfo\fR value is supplied from
the value of \fB\-errorinfo\fR in a return options dictionary captured
by the \fBcatch\fR command (or from the copy of that information
stored in the global variable \fBerrorInfo\fR).
+.\" OPTION: -errorstack
.TP
\fB\-errorstack \fIlist\fR
+.
The \fB\-errorstack\fR option receives special treatment only when the value
of the \fB\-code\fR option is \fBTCL_ERROR\fR. Then \fIlist\fR is the initial
-error stack, recording actual argument values passed to each proc level. The error stack will
+error stack, recording actual argument values passed to each proc level.
+The error stack will
also be reachable through \fBinfo errorstack\fR.
If no \fB\-errorstack\fR option is provided to \fBreturn\fR when
the \fB\-code error\fR option is provided, Tcl will provide its own
@@ -151,6 +156,7 @@ the procedure. Typically the \fIlist\fR value is supplied from
the value of \fB\-errorstack\fR in a return options dictionary captured
by the \fBcatch\fR command (or from the copy of that information from
\fBinfo errorstack\fR).
+.\" OPTION: -level
.TP
\fB\-level \fIlevel\fR
.
@@ -163,6 +169,7 @@ be \fIcode\fR. If no \fB\-level\fR option is provided, the default value
of \fIlevel\fR is 1, so that \fBreturn\fR sets the return code that the
current procedure returns to its caller, 1 level up the call stack. The
mechanism by which these options work is described in more detail below.
+.\" OPTION: -options
.TP
\fB\-options \fIoptions\fR
.
diff --git a/doc/safe.n b/doc/safe.n
index 44375e5..982ff37 100644
--- a/doc/safe.n
+++ b/doc/safe.n
@@ -114,16 +114,17 @@ Example of use:
set i1 [safe::interpCreate {*}[safe::interpConfigure $i0]]
# Get the current deleteHook
-set dh [safe::interpConfigure $i0 \-del]
+set dh [safe::interpConfigure $i0 -del]
# Change (only) the statics loading ok attribute of an
# interp and its deleteHook (leaving the rest unchanged):
-safe::interpConfigure $i0 \-delete {foo bar} \-statics 0
+safe::interpConfigure $i0 -delete {foo bar} -statics 0
.CE
.RE
.\" COMMAND: interpDelete
.TP
\fB::safe::interpDelete\fI child\fR
+.
Deletes the safe interpreter and cleans up the corresponding
parent interpreter data structures.
If a \fIdeleteHook\fR script was specified for this interpreter it is
@@ -216,6 +217,7 @@ and \fB::safe::interpConfigure\fR.
Any option name can be abbreviated to its minimal
non-ambiguous name.
Option names are not case sensitive.
+.\" OPTION: -accessPath
.TP
\fB\-accessPath\fI directoryList\fR
.
@@ -226,6 +228,7 @@ empty list, the safe interpreter will use the same directories as its
parent for auto-loading.
See the section \fBSECURITY\fR below for more detail about virtual paths,
tokens and access control.
+.\" OPTION: -autoPath
.TP
\fB\-autoPath\fI directoryList\fR
.
@@ -234,6 +237,7 @@ This option sets the list of directories in the safe interpreter's
- in that case the safe interpreter's ::auto_path is managed by the Safe
Base and is a tokenized form of its access path.
See the section \fBSYNC MODE\fR below for details.
+.\" OPTION: -statics
.TP
\fB\-statics\fI boolean\fR
.
@@ -241,12 +245,14 @@ This option specifies if the safe interpreter will be allowed
to load statically linked packages (like \fBload {} Tk\fR).
The default value is \fBtrue\fR :
safe interpreters are allowed to load statically linked packages.
+.\" OPTION: -noStatics
.TP
\fB\-noStatics\fR
.
This option is a convenience shortcut for \fB\-statics false\fR and
thus specifies that the safe interpreter will not be allowed
to load statically linked packages.
+.\" OPTION: -nested
.TP
\fB\-nested\fI boolean\fR
.
@@ -255,12 +261,14 @@ to load packages into its own sub-interpreters.
The default value is \fBfalse\fR :
safe interpreters are not allowed to load packages into
their own sub-interpreters.
+.\" OPTION: -nestedLoadOk
.TP
\fB\-nestedLoadOk\fR
.
This option is a convenience shortcut for \fB\-nested true\fR and
thus specifies the safe interpreter will be allowed
to load packages into its own sub-interpreters.
+.\" OPTION: -deleteHook
.TP
\fB\-deleteHook\fI script\fR
.
@@ -295,7 +303,7 @@ the safe interpreter for it to be found successfully.
Additionally, the shared object file must contain a safe entry point; see
the manual page for the \fBload\fR command for more details.
.TP
-\fBfile\fR ?\fIsubCmd args...\fR?
+\fBfile\fR ?\fIsubcommand args...\fR?
.
The \fBfile\fR alias provides access to a safe subset of the subcommands of
the \fBfile\fR command; it allows only \fBdirname\fR, \fBjoin\fR,
@@ -303,7 +311,7 @@ the \fBfile\fR command; it allows only \fBdirname\fR, \fBjoin\fR,
subcommands. For more details on what these subcommands do see the manual
page for the \fBfile\fR command.
.TP
-\fBencoding\fR ?\fIsubCmd args...\fR?
+\fBencoding\fR ?\fIsubcommand args...\fR?
.
The \fBencoding\fR alias provides access to a safe subset of the
subcommands of the \fBencoding\fR command; it disallows setting of
@@ -462,9 +470,9 @@ parent interpreter to packages, modules, and autoloader files. With
parent's ::auto_path, and will set the child's ::auto_path to a tokenized form
of the parent's ::auto_path.
.PP
-With "Sync Mode" off, if a value is specified for \fB\-autoPath\fR, even the empty
-list, in a call to \fB::safe::interpCreate\fR, \fB::safe::interpInit\fR, or
-\fB::safe::interpConfigure\fR, it will be tokenized and used as the safe
+With "Sync Mode" off, if a value is specified for \fB\-autoPath\fR, even the
+empty list, in a call to \fB::safe::interpCreate\fR, \fB::safe::interpInit\fR,
+or \fB::safe::interpConfigure\fR, it will be tokenized and used as the safe
interpreter's ::auto_path. Any directories that do not also belong to the
access path cannot be tokenized and will be silently ignored. However, the
value of \fB\-autoPath\fR will remain as specified, and will be used to
@@ -473,15 +481,15 @@ to change the value of \fB\-accessPath\fR.
.PP
With "Sync Mode" off, if the access path is reset to the values in the
parent interpreter by calling \fB::safe::interpConfigure\fR with arguments
-\fB\-accessPath\fR {}, then the ::auto_path will also be reset unless the argument
-\fB\-autoPath\fR is supplied to specify a different value.
+\fB\-accessPath\fR {}, then the ::auto_path will also be reset unless the
+argument \fB\-autoPath\fR is supplied to specify a different value.
.PP
With "Sync Mode" off, if a non-empty value of \fB\-accessPath\fR is supplied, the
safe interpreter's ::auto_path will be set to {} (by
\fB::safe::interpCreate\fR, \fB::safe::interpInit\fR) or left unchanged
(by \fB::safe::interpConfigure\fR). If the same command specifies a new
-value for \fB\-autoPath\fR, it will be applied after the \fB\-accessPath\fR argument has
-been processed.
+value for \fB\-autoPath\fR, it will be applied after the \fB\-accessPath\fR
+argument has been processed.
.PP
Examples of use with "Sync Mode" off: any of these commands will set the
::auto_path to a tokenized form of its value in the parent interpreter:
@@ -551,7 +559,7 @@ safe::interpConfigure foo -autoPath $childAutoPath
interp(n), library(n), load(n), package(n), pkg_mkIndex(n), source(n),
tm(n), unknown(n)
.SH KEYWORDS
-alias, auto\-loading, auto_mkindex, load, parent interpreter, safe
+alias, auto-loading, auto_mkindex, load, parent interpreter, safe
interpreter, child interpreter, source
'\" Local Variables:
'\" mode: nroff
diff --git a/doc/scan.n b/doc/scan.n
index e87bef1..0f9ed06 100644
--- a/doc/scan.n
+++ b/doc/scan.n
@@ -86,33 +86,23 @@ the integer range to be stored is unlimited.
.SS "MANDATORY CONVERSION CHARACTER"
.PP
The following conversion characters are supported:
-.TP
-\fBd\fR
-.
+.IP \fBd\fR
The input substring must be a decimal integer.
It is read in and the integer value is stored in the variable,
truncated as required by the size modifier value.
-.TP
-\fBo\fR
-.
+.IP \fBo\fR
The input substring must be an octal integer. It is read in and the
integer value is stored in the variable,
truncated as required by the size modifier value.
-.TP
-\fBx\fR or \fBX\fR
-.
+.IP "\fBx\fR or \fBX\fR"
The input substring must be a hexadecimal integer.
It is read in and the integer value is stored in the variable,
truncated as required by the size modifier value.
-.TP
-\fBb\fR
-.
+.IP \fBb\fR
The input substring must be a binary integer.
It is read in and the integer value is stored in the variable,
truncated as required by the size modifier value.
-.TP
-\fBu\fR
-.
+.IP \fBu\fR
The input substring must be a decimal integer.
The integer value is truncated as required by the size modifier
value, and the corresponding unsigned value for that truncated
@@ -120,35 +110,28 @@ range is computed and stored in the variable as a decimal string.
The conversion makes no sense without reference to a truncation range,
so the size modifier \fBll\fR is not permitted in combination
with conversion character \fBu\fR.
-.TP
-\fBi\fR
-.
-The input substring must be an integer. The base (i.e. decimal, octal, or hexadecimal) is determined by the C convention (leading 0 for octal; prefix 0x for hexadecimal). The integer value is stored in the variable,
-truncated as required by the size modifier value.
-.TP
-\fBc\fR
-.
+.IP \fBi\fR
+The input substring must be an integer. The base (i.e. decimal,
+octal, or hexadecimal) is determined by the C convention (leading
+0 for octal; prefix 0x for hexadecimal). The integer value is
+stored in the variable, truncated as required by the size modifier
+value.
+.IP \fBc\fR
A single character is read in and its Unicode value is stored in
the variable as an integer value.
Initial white space is not skipped in this case, so the input
substring may be a white-space character.
-.TP
-\fBs\fR
-.
+.IP \fBs\fR
The input substring consists of all the characters up to the next
white-space character; the characters are copied to the variable.
-.TP
-\fBe\fR or \fBf\fR or \fBg\fR or \fBE\fR or \fBG\fR
-.
+.IP "\fBe\fR or \fBf\fR or \fBg\fR or \fBE\fR or \fBG\fR"
The input substring must be a floating-point number consisting
of an optional sign, a string of decimal digits possibly
containing a decimal point, and an optional exponent consisting
of an \fBe\fR or \fBE\fR followed by an optional sign and a string of
decimal digits.
It is read in and stored in the variable as a floating-point value.
-.TP
-\fB[\fIchars\fB]\fR
-.
+.IP \fB[\fIchars\fB]\fR
The input substring consists of one or more characters in \fIchars\fR.
The matching string is stored in the variable.
If the first character between the brackets is a \fB]\fR then
@@ -159,9 +142,7 @@ contains a sequence of the form \fIa\fB\-\fIb\fR then any
character between \fIa\fR and \fIb\fR (inclusive) will match.
If the first or last character between the brackets is a \fB\-\fR, then
it is treated as part of \fIchars\fR rather than indicating a range.
-.TP
-\fB[^\fIchars\fB]\fR
-.
+.IP \fB[^\fIchars\fB]\fR
The input substring consists of one or more characters not in \fIchars\fR.
The matching string is stored in the variable.
If the character immediately following the \fB^\fR is a \fB]\fR then it is
@@ -173,9 +154,7 @@ character between \fIa\fR and \fIb\fR (inclusive) will be excluded
from the set.
If the first or last character between the brackets is a \fB\-\fR, then
it is treated as part of \fIchars\fR rather than indicating a range value.
-.TP
-\fBn\fR
-.
+.IP \fBn\fR
No input is consumed from the input string. Instead, the total number
of characters scanned from the input string so far is stored in the variable.
.PP
diff --git a/doc/seek.n b/doc/seek.n
index 3b206d1..68d40f7 100644
--- a/doc/seek.n
+++ b/doc/seek.n
@@ -27,20 +27,14 @@ The \fIoffset\fR and \fIorigin\fR
arguments specify the position at which the next read or write will occur
for \fIchannelId\fR. \fIOffset\fR must be an integer (which may be
negative) and \fIorigin\fR must be one of the following:
-.TP 10
-\fBstart\fR
-.
+.IP \fBstart\fR 10
The new access position will be \fIoffset\fR bytes from the start
of the underlying file or device.
-.TP 10
-\fBcurrent\fR
-.
+.IP \fBcurrent\fR 10
The new access position will be \fIoffset\fR bytes from the current
access position; a negative \fIoffset\fR moves the access position
backwards in the underlying file or device.
-.TP 10
-\fBend\fR
-.
+.IP \fBend\fR 10
The new access position will be \fIoffset\fR bytes from the end of
the file or device. A negative \fIoffset\fR places the access position
before the end of file, and a positive \fIoffset\fR places the access
diff --git a/doc/set.n b/doc/set.n
index 890ef1d..ed1fc41 100644
--- a/doc/set.n
+++ b/doc/set.n
@@ -70,7 +70,8 @@ practice instead of doing double-dereferencing):
\fBset\fR out [\fBset\fR $vbl]
.CE
.SH "SEE ALSO"
-expr(n), global(n), namespace(n), proc(n), trace(n), unset(n), upvar(n), variable(n)
+expr(n), global(n), namespace(n), proc(n), trace(n), unset(n), upvar(n),
+variable(n)
.SH KEYWORDS
read, write, variable
'\" Local Variables:
diff --git a/doc/singleton.n b/doc/singleton.n
index 3ccbdd3..ce35593 100644
--- a/doc/singleton.n
+++ b/doc/singleton.n
@@ -47,6 +47,7 @@ The \fBoo::singleton\fR class does not define an explicit destructor;
destroying an instance of it is just like destroying an ordinary class (and
will destroy the singleton object).
.SS "EXPORTED METHODS"
+.\" METHOD: new
.TP
\fIcls \fBnew \fR?\fIarg ...\fR?
.
@@ -63,7 +64,8 @@ identical call signature to the superclass's implementation.
.SS "NON-EXPORTED METHODS"
The \fBoo::singleton\fR class explicitly states that \fBcreate\fR and
\fBcreateWithNamespace\fR are unexported; callers should not assume that they
-have control over either the name or the namespace name of the singleton instance.
+have control over either the name or the namespace name of the singleton
+instance.
.SH EXAMPLE
.PP
This example demonstrates that there is only one instance even though the
diff --git a/doc/socket.n b/doc/socket.n
index 8cc5029..06d3b5b 100644
--- a/doc/socket.n
+++ b/doc/socket.n
@@ -49,6 +49,7 @@ Use \fIlocalhost\fR to refer to the host on which the command is invoked.
.PP
The following options may also be present before \fIhost\fR
to specify additional information about the connection:
+.\" OPTION: -myaddr
.TP
\fB\-myaddr\fI addr\fR
.
@@ -57,6 +58,7 @@ the client-side network interface to use for the connection.
This option may be useful if the client machine has multiple network
interfaces. If the option is omitted then the client-side interface
will be chosen by the system software.
+.\" OPTION: -myport
.TP
\fB\-myport\fI port\fR
.
@@ -65,6 +67,7 @@ supported and understood by the host operating system) to use for the
client's
side of the connection. If this option is omitted, the client's
port number will be chosen at random by the system software.
+.\" OPTION: -async
.TP
\fB\-async\fR
.
@@ -98,9 +101,12 @@ asynchronous connection has succeeded or failed. See the \fBvwait\fR
and the \fBchan\fR commands for more details on the event loop and
channel events.
.PP
-The \fBchan configure\fR option \fB-connecting\fR may be used to check if the connect is still running. To verify a successful connect, the option \fB-error\fR may be checked when \fB-connecting\fR returned 0.
+The \fBchan configure\fR option \fB\-connecting\fR may be used to check
+if the connect is still running. To verify a successful connect, the
+option \fB\-error\fR may be checked when \fB\-connecting\fR returned 0.
.PP
-Operation without the event queue requires at the moment calls to \fBchan configure\fR to advance the internal state machine.
+Operation without the event queue requires at the moment calls to
+\fBchan configure\fR to advance the internal state machine.
.RE
.SH "SERVER SOCKETS"
.PP
@@ -120,6 +126,7 @@ network address notation, of the client's host, and the client's port
number.
.PP
The following additional option may also be specified before \fIport\fR:
+.\" OPTION: -myaddr
.TP
\fB\-myaddr\fI addr\fR
.
@@ -131,11 +138,13 @@ wildcard address so that it can accept connections from any
interface. If \fIaddr\fR is a domain name that resolves to multiple IP
addresses that are available on the local machine, the socket will
listen on all of them.
+.\" OPTION: -reuseaddr
.TP
\fB\-reuseaddr\fI boolean\fR
.
Tells the kernel whether to reuse the local address if there is no socket
actively listening on it. This is the default on Windows.
+.\" OPTION: -reuseport
.TP
\fB\-reuseport\fI boolean\fR
.
@@ -164,6 +173,7 @@ described below.
The \fBchan configure\fR command can be used to query several readonly
configuration options for socket channels or in some cases to set
alternative properties on socket channels:
+.\" OPTION: -error
.TP
\fB\-error\fR
.
@@ -176,6 +186,7 @@ returned. If there was no error, an empty string is returned.
Note that the error status is reset by the read operation; this mimics
the underlying getsockopt(SO_ERROR) call.
.RE
+.\" OPTION: -sockname
.TP
\fB\-sockname\fR
.
@@ -193,6 +204,7 @@ was created without \fB\-myaddr\fR or with the argument to
\fB\-myaddr\fR being a domain name that resolves multiple IP addresses
that are local to the invoking host.
.RE
+.\" OPTION: -peername
.TP
\fB\-peername\fR
.
@@ -201,15 +213,19 @@ sockets, this option returns a list of three elements; these are the
address, the host name and the port to which the peer socket is connected
or bound. If the host name cannot be computed, the second element of the
list is identical to the address, its first element.
+.\" OPTION: -connecting
.TP
\fB\-connecting\fR
.
-This option is not supported by server sockets. For client sockets, this option returns 1 if an asyncroneous connect is still in progress, 0 otherwise.
+This option is not supported by server sockets. For client sockets, this
+option returns 1 if an asynchronous connect is still in progress, 0 otherwise.
+.\" OPTION: -keepalive
.TP
\fB\-keepalive\fR
.
This option sets or queries the TCP keepalive option on the socket as 1 if
keepalive is turned on, 0 otherwise.
+.\" OPTION: -nodelay
.TP
\fB\-nodelay\fR
.
@@ -250,7 +266,8 @@ Support for IPv6 was added in Tcl 8.6.
.SH "SEE ALSO"
chan(n), flush(n), open(n), read(n)
.SH KEYWORDS
-asynchronous I/O, bind, channel, connection, domain name, host, network address, socket, tcp
+asynchronous I/O, bind, channel, connection, domain name, host,
+network address, socket, tcp
'\" Local Variables:
'\" mode: nroff
'\" End:
diff --git a/doc/source.n b/doc/source.n
index cee1312..d4d8332 100644
--- a/doc/source.n
+++ b/doc/source.n
@@ -41,7 +41,8 @@ in code for string comparison, you can use
which will be safely substituted by the Tcl interpreter into
.QW ^Z .
.PP
-A leading BOM (Byte order mark) contained in the file is ignored for unicode encodings (utf-8, utf-16, ucs-2).
+A leading BOM (Byte order mark) contained in the file is ignored for
+unicode encodings (utf-8, utf-16, ucs-2).
.PP
The \fB\-encoding\fR option is used to specify the encoding of
the data stored in \fIfileName\fR. When the \fB\-encoding\fR option
diff --git a/doc/string.n b/doc/string.n
index 6e87deb..3b9af03 100644
--- a/doc/string.n
+++ b/doc/string.n
@@ -183,10 +183,11 @@ Any of the forms allowed to \fBTcl_GetBoolean\fR where the value is
true.
.IP \fBunicode\fR 12
Any Unicode character, except surrogates and noncharacters.
-.
-Warning: this option is under discussion and may be renamed or replaced
-by another solution withhin the TCL 9.0 series.
-.
+.RS
+.PP
+\fIWarning: this option is under discussion and may be renamed or replaced
+by another solution within the Tcl 9.0 series.\fR
+.RE
.IP \fBupper\fR 12
Any upper case alphabet character in the Unicode character set.
.IP \fBwideinteger\fR 12
@@ -489,14 +490,14 @@ set length [\fBstring length\fR $string]
if {$length == 0} {
set isPrefix 0
} else {
- set isPrefix [\fBstring equal\fR \-length $length $string "foobar"]
+ set isPrefix [\fBstring equal\fR -length $length $string "foobar"]
}
.CE
.SH "SEE ALSO"
expr(n), list(n)
.SH KEYWORDS
-case conversion, compare, index, integer value, match, pattern, string, word, equal,
-ctype, character, reverse
+case conversion, compare, index, integer value, match, pattern, string,
+word, equal, ctype, character, reverse
.\" Local Variables:
.\" mode: nroff
.\" End:
diff --git a/doc/subst.n b/doc/subst.n
index 4518140..4c9a519 100644
--- a/doc/subst.n
+++ b/doc/subst.n
@@ -158,7 +158,8 @@ not
.SH "SEE ALSO"
Tcl(n), eval(n), break(n), continue(n)
.SH KEYWORDS
-backslash substitution, command substitution, quoting, substitution, variable substitution
+backslash substitution, command substitution, quoting, substitution,
+variable substitution
.\" Local Variables:
.\" mode: nroff
.\" End:
diff --git a/doc/switch.n b/doc/switch.n
index d35c650..61449a9 100644
--- a/doc/switch.n
+++ b/doc/switch.n
@@ -35,26 +35,31 @@ unless there are exactly two arguments to \fBswitch\fR (in which case the
first must the \fIstring\fR and the second must be the
\fIpattern\fR/\fIbody\fR list).
The following options are currently supported:
+.\" OPTION: -exact
.TP 10
\fB\-exact\fR
.
Use exact matching when comparing \fIstring\fR to a pattern. This
is the default.
+.\" OPTION: -glob
.TP 10
\fB\-glob\fR
.
When matching \fIstring\fR to the patterns, use glob-style matching
(i.e. the same as implemented by the \fBstring match\fR command).
+.\" OPTION: -regexp
.TP 10
\fB\-regexp\fR
.
When matching \fIstring\fR to the patterns, use regular
expression matching
(as described in the \fBre_syntax\fR reference page).
+.\" OPTION: -nocase
.TP 10
\fB\-nocase\fR
.
Causes comparisons to be handled in a case-insensitive manner.
+.\" OPTION: -matchvar
.TP 10
\fB\-matchvar\fI varName\fR
.
@@ -68,6 +73,7 @@ capturing parenthesis in the regular expression that matched, and so
on. When a \fBdefault\fR branch is taken, the variable will have the
empty list written to it. This option may be specified at the same
time as the \fB\-indexvar\fR option.
+.\" OPTION: -indexvar
.TP 10
\fB\-indexvar\fI varName\fR
.
@@ -85,6 +91,7 @@ capturing parenthesis in the regular expression that matched, and so
on. When a \fBdefault\fR branch is taken, the variable will have the
empty list written to it. This option may be specified at the same
time as the \fB\-matchvar\fR option.
+.\" OPTION: --
.TP 10
\fB\-\|\-\fR
.
@@ -128,7 +135,7 @@ literals, as shown here (the result is \fI2\fR):
.PP
.CS
set foo "abc"
-\fBswitch\fR abc a \- b {expr {1}} $foo {expr {2}} default {expr {3}}
+\fBswitch\fR abc a - b {expr {1}} $foo {expr {2}} default {expr {3}}
.CE
.PP
Using glob matching and the fall-through body is an alternative to
@@ -136,8 +143,8 @@ writing regular expressions with alternations, as can be seen here
(this returns \fI1\fR):
.PP
.CS
-\fBswitch\fR \-glob aaab {
- a*b \-
+\fBswitch\fR -glob aaab {
+ a*b -
b {expr {1}}
a* {expr {2}}
default {expr {3}}
@@ -149,7 +156,7 @@ last) is taken. This example has a result of \fI3\fR:
.PP
.CS
\fBswitch\fR xyz {
- a \-
+ a -
b {
# Correct Comment Placement
expr {1}
@@ -167,7 +174,7 @@ When matching against regular expressions, information about what
exactly matched is easily obtained using the \fB\-matchvar\fR option:
.PP
.CS
-\fBswitch\fR \-regexp \-matchvar foo \-\- $bar {
+\fBswitch\fR -regexp -matchvar foo -- $bar {
a(b*)c {
puts "Found [string length [lindex $foo 1]] 'b's"
}
diff --git a/doc/tclsh.1 b/doc/tclsh.1
index 28ad14c..91df79d 100644
--- a/doc/tclsh.1
+++ b/doc/tclsh.1
@@ -112,21 +112,25 @@ the binary.
\fBTclsh\fR sets the following global Tcl variables in addition to those
created by the Tcl library itself (such as \fBenv\fR, which maps
environment variables such as \fBPATH\fR into Tcl):
+.\" VARIABLE: argc
.TP 15
\fBargc\fR
.
Contains a count of the number of \fIarg\fR arguments (0 if none),
not including the name of the script file.
+.\" VARIABLE: argv
.TP 15
\fBargv\fR
.
Contains a Tcl list whose elements are the \fIarg\fR arguments,
in order, or an empty string if there are no \fIarg\fR arguments.
+.\" VARIABLE: argv0
.TP 15
\fBargv0\fR
.
Contains \fIfileName\fR if it was specified.
Otherwise, contains the name by which \fBtclsh\fR was invoked.
+.\" VARIABLE: tcl_interactive
.TP 15
\fBtcl_interactive\fR
.
@@ -134,6 +138,8 @@ Contains 1 if \fBtclsh\fR is running interactively (no
\fIfileName\fR was specified and standard input is a terminal-like
device), 0 otherwise.
.SH PROMPTS
+.\" VARIABLE: tcl_prompt1
+.\" VARIABLE: tcl_prompt2
.PP
When \fBtclsh\fR is invoked interactively it normally prompts for each
command with
diff --git a/doc/tcltest.n b/doc/tcltest.n
index c29b05e..f78f7a2 100644
--- a/doc/tcltest.n
+++ b/doc/tcltest.n
@@ -525,6 +525,7 @@ description for regression tests. If the test case exists to reproduce
a bug, include the bug ID in the description.
.PP
Valid attributes and associated values are:
+.\" OPTION: -constraints
.TP
\fB\-constraints \fIkeywordList\fR|\fIexpression\fR
.
@@ -535,9 +536,12 @@ defined by a call to \fBtestConstraint\fR. If any of the listed
constraints is false or does not exist, the test is skipped. If the
\fB\-constraints\fR value is an expression, that expression
is evaluated. If the expression evaluates to true, then the test is run.
+.RS
+.PP
Note that the expression form of \fB\-constraints\fR may interfere with the
operation of \fBconfigure \-constraints\fR and
\fBconfigure \-limitconstraints\fR, and is not recommended.
+.PP
Appropriate constraints should be added to any tests that should
not always be run. That is, conditional evaluation of a test
should be accomplished by the \fB\-constraints\fR option, not by
@@ -547,6 +551,8 @@ the number skipped may change based on the testing environment.
The default value is an empty list.
See \fBTEST CONSTRAINTS\fR below for a list of built-in constraints
and information on how to add your own constraints.
+.RE
+.\" OPTION: -setup
.TP
\fB\-setup \fIscript\fR
.
@@ -554,6 +560,7 @@ The optional \fB\-setup\fR attribute indicates a \fIscript\fR that will be run
before the script indicated by the \fB\-body\fR attribute. If evaluation
of \fIscript\fR raises an error, the test will fail. The default value
is an empty script.
+.\" OPTION: -body
.TP
\fB\-body \fIscript\fR
.
@@ -563,6 +570,7 @@ If evaluation of \fIscript\fR raises an error, the test will fail
(unless the \fB\-returnCodes\fR option is used to state that an error
is expected).
The default value is an empty script.
+.\" OPTION: -cleanup
.TP
\fB\-cleanup \fIscript\fR
.
@@ -570,6 +578,7 @@ The optional \fB\-cleanup\fR attribute indicates a \fIscript\fR that will be
run after the script indicated by the \fB\-body\fR attribute.
If evaluation of \fIscript\fR raises an error, the test will fail.
The default value is an empty script.
+.\" OPTION: -match
.TP
\fB\-match \fImode\fR
.
@@ -578,12 +587,14 @@ The \fB\-match\fR attribute determines how expected answers supplied by
values for \fImode\fR are \fBregexp\fR, \fBglob\fR, \fBexact\fR, and
any value registered by a prior call to \fBcustomMatch\fR. The default
value is \fBexact\fR.
+.\" OPTION: -result
.TP
\fB\-result \fIexpectedValue\fR
.
The \fB\-result\fR attribute supplies the \fIexpectedValue\fR against which
the return value from script will be compared. The default value is
an empty string.
+.\" OPTION: -output
.TP
\fB\-output \fIexpectedValue\fR
.
@@ -593,6 +604,7 @@ of the script(s) will be compared. Note that only output printed using
the global \fBputs\fR command is used for comparison. If \fB\-output\fR is
not specified, output sent to \fBstdout\fR and \fBoutputChannel\fR is not
processed for comparison.
+.\" OPTION: -errorOutput
.TP
\fB\-errorOutput \fIexpectedValue\fR
.
@@ -602,6 +614,7 @@ evaluation of the script(s) will be compared. Note that only output
printed using the global \fBputs\fR command is used for comparison. If
\fB\-errorOutput\fR is not specified, output sent to \fBstderr\fR and
\fBerrorChannel\fR is not processed for comparison.
+.\" OPTION: -returnCodes
.TP
\fB\-returnCodes \fIexpectedCodeList\fR
.
@@ -613,6 +626,7 @@ return codes known to \fBreturn\fR, in both numeric and symbolic
form, including extended return codes, are acceptable elements in
the \fIexpectedCodeList\fR. Default value is
.QW "\fBok return\fR" .
+.\" OPTION: -errorCode
.TP
\fB\-errorCode \fIexpectedErrorCode\fR
.
@@ -669,134 +683,82 @@ options.
.PP
The following is a list of constraints predefined by the
\fBtcltest\fR package itself:
-.TP
-\fIsingleTestInterp\fR
-.
+.IP \fIsingleTestInterp\fR
This test can only be run if all test files are sourced into a single
interpreter.
-.TP
-\fIunix\fR
-.
+.IP \fIunix\fR
This test can only be run on any Unix platform.
-.TP
-\fIwin\fR
-.
+.IP \fIwin\fR
This test can only be run on any Windows platform.
-.TP
-\fInt\fR
-.
+.IP \fInt\fR
This test can only be run on any Windows NT platform.
-.TP
-\fImac\fR
-.
+.IP \fImac\fR
This test can only be run on any Mac platform.
-.TP
-\fIunixOrWin\fR
-.
+.IP \fIunixOrWin\fR
This test can only be run on a Unix or Windows platform.
-.TP
-\fImacOrWin\fR
-.
+.IP \fImacOrWin\fR
This test can only be run on a Mac or Windows platform.
-.TP
-\fImacOrUnix\fR
-.
+.IP \fImacOrUnix\fR
This test can only be run on a Mac or Unix platform.
-.TP
-\fItempNotWin\fR
-.
+.IP \fItempNotWin\fR
This test can not be run on Windows. This flag is used to temporarily
disable a test.
-.TP
-\fItempNotMac\fR
-.
+.IP \fItempNotMac\fR
This test can not be run on a Mac. This flag is used
to temporarily disable a test.
-.TP
-\fIunixCrash\fR
-.
+.IP \fIunixCrash\fR
This test crashes if it is run on Unix. This flag is used to temporarily
disable a test.
-.TP
-\fIwinCrash\fR
-.
+.IP \fIwinCrash\fR
This test crashes if it is run on Windows. This flag is used to temporarily
disable a test.
-.TP
-\fImacCrash\fR
-.
+.IP \fImacCrash\fR
This test crashes if it is run on a Mac. This flag is used to temporarily
disable a test.
-.TP
-\fIemptyTest\fR
-.
+.IP \fIemptyTest\fR
This test is empty, and so not worth running, but it remains as a
place-holder for a test to be written in the future. This constraint
has value false to cause tests to be skipped unless the user specifies
otherwise.
-.TP
-\fIknownBug\fR
-.
+.IP \fIknownBug\fR
This test is known to fail and the bug is not yet fixed. This constraint
has value false to cause tests to be skipped unless the user specifies
otherwise.
-.TP
-\fInonPortable\fR
-.
+.IP \fInonPortable\fR
This test can only be run in some known development environment.
Some tests are inherently non-portable because they depend on things
like word length, file system configuration, window manager, etc.
This constraint has value false to cause tests to be skipped unless
the user specifies otherwise.
-.TP
-\fIuserInteraction\fR
-.
+.IP \fIuserInteraction\fR
This test requires interaction from the user. This constraint has
value false to causes tests to be skipped unless the user specifies
otherwise.
-.TP
-\fIinteractive\fR
-.
+.IP \fIinteractive\fR
This test can only be run in if the interpreter is in interactive mode
-(when the global tcl_interactive variable is set to 1).
-.TP
-\fInonBlockFiles\fR
-.
+(when the global \fB::tcl_interactive\fR variable is set to 1).
+.IP \fInonBlockFiles\fR
This test can only be run if platform supports setting files into
nonblocking mode.
-.TP
-\fIasyncPipeClose\fR
-.
+.IP \fIasyncPipeClose\fR
This test can only be run if platform supports async flush and async close
on a pipe.
-.TP
-\fIunixExecs\fR
-.
+.IP \fIunixExecs\fR
This test can only be run if this machine has Unix-style commands
\fBcat\fR, \fBecho\fR, \fBsh\fR, \fBwc\fR, \fBrm\fR, \fBsleep\fR,
\fBfgrep\fR, \fBps\fR, \fBchmod\fR, and \fBmkdir\fR available.
-.TP
-\fIhasIsoLocale\fR
-.
+.IP \fIhasIsoLocale\fR
This test can only be run if can switch to an ISO locale.
-.TP
-\fIroot\fR
-.
+.IP \fIroot\fR
This test can only run if Unix user is root.
-.TP
-\fInotRoot\fR
-.
+.IP \fInotRoot\fR
This test can only run if Unix user is not root.
-.TP
-\fIeformat\fR
-.
+.IP \fIeformat\fR
This test can only run if app has a working version of sprintf with respect
to the
.QW e
format of floating-point numbers.
-.TP
-\fIstdio\fR
-.
+.IP \fIstdio\fR
This test can only be run if \fBinterpreter\fR can be \fBopen\fRed
as a pipe.
.PP
@@ -881,12 +843,14 @@ command.
.SH "CONFIGURABLE OPTIONS"
The \fBconfigure\fR command is used to set and query the configurable
options of \fBtcltest\fR. The valid options are:
+.\" OPTION: -singleproc
.TP
\fB\-singleproc \fIboolean\fR
.
Controls whether or not \fBrunAllTests\fR spawns a child process for
each test file. No spawning when \fIboolean\fR is true. Default
value is false.
+.\" OPTION: -debug
.TP
\fB\-debug \fIlevel\fR
.
@@ -912,6 +876,7 @@ that exist in the current namespace as they are used.
Display information regarding what individual procs in the test
harness are doing.
.RE
+.\" OPTION: -verbose
.TP
\fB\-verbose \fIlevel\fR
.
@@ -941,7 +906,7 @@ Print each test's execution time in milliseconds
Print each test's execution time in microseconds
.PP
Note that the \fBmsec\fR and \fBusec\fR verbosity levels are provided as
-indicative measures only. They do not tackle the problem of repeatibility which
+indicative measures only. They do not tackle the problem of repeatability which
should be considered in performance tests or benchmarks. To use these verbosity
levels to thoroughly track performance degradations, consider wrapping your
test bodies with \fBtime\fR commands.
@@ -952,6 +917,7 @@ so that
is the same as
.QW "\fBconfigure \-verbose {pass start}\fR" .
.RE
+.\" OPTION: -preservecore
.TP
\fB\-preservecore \fIlevel\fR
.
@@ -969,11 +935,13 @@ Also check for core files at the end of each \fBtest\fR command.
Check for core files at all times described above, and save a
copy of each core file produced in \fBconfigure \-tmpdir\fR.
.RE
+.\" OPTION: -limitconstraints
.TP
\fB\-limitconstraints \fIboolean\fR
.
Sets the mode by which \fBtest\fR honors constraints as described
in \fBTESTS\fR above. Default value is false.
+.\" OPTION: -constraints
.TP
\fB\-constraints \fIlist\fR
.
@@ -981,6 +949,7 @@ Sets all the constraints in \fIlist\fR to true. Also used in
combination with \fBconfigure \-limitconstraints true\fR to control an
alternative constraint mode as described in \fBTESTS\fR above.
Default value is an empty list.
+.\" OPTION: -tmpdir
.TP
\fB\-tmpdir \fIdirectory\fR
.
@@ -989,17 +958,20 @@ Sets the temporary directory to be used by \fBmakeFile\fR,
and \fBremoveDirectory\fR as the default directory where
temporary files and directories created by test files should
be created. Default value is \fBworkingDirectory\fR.
+.\" OPTION: -testdir
.TP
\fB\-testdir \fIdirectory\fR
.
Sets the directory searched by \fBrunAllTests\fR for test files
and subdirectories. Default value is \fBworkingDirectory\fR.
+.\" OPTION: -file
.TP
\fB\-file \fIpatternList\fR
.
Sets the list of patterns used by \fBrunAllTests\fR to determine
what test files to evaluate. Default value is
.QW \fB*.test\fR .
+.\" OPTION: -notfile
.TP
\fB\-notfile \fIpatternList\fR
.
@@ -1007,6 +979,7 @@ Sets the list of patterns used by \fBrunAllTests\fR to determine
what test files to skip. Default value is
.QW \fBl.*.test\fR ,
so that any SCCS lock files are skipped.
+.\" OPTION: -relateddir
.TP
\fB\-relateddir \fIpatternList\fR
.
@@ -1014,40 +987,47 @@ Sets the list of patterns used by \fBrunAllTests\fR to determine
what subdirectories to search for an \fBall.tcl\fR file. Default
value is
.QW \fB*\fR .
+.\" OPTION: -asidefromdir
.TP
\fB\-asidefromdir \fIpatternList\fR
.
Sets the list of patterns used by \fBrunAllTests\fR to determine
what subdirectories to skip when searching for an \fBall.tcl\fR file.
Default value is an empty list.
+.\" OPTION: -match
.TP
\fB\-match \fIpatternList\fR
.
Set the list of patterns used by \fBtest\fR to determine whether
a test should be run. Default value is
.QW \fB*\fR .
+.\" OPTION: -skip
.TP
\fB\-skip \fIpatternList\fR
.
Set the list of patterns used by \fBtest\fR to determine whether
a test should be skipped. Default value is an empty list.
+.\" OPTION: -load
.TP
\fB\-load \fIscript\fR
.
Sets a script to be evaluated by \fBloadTestedCommands\fR.
Default value is an empty script.
+.\" OPTION: -loadfile
.TP
\fB\-loadfile \fIfilename\fR
.
Sets the filename from which to read a script to be evaluated
by \fBloadTestedCommands\fR. This is an alternative to
\fB\-load\fR. They cannot be used together.
+.\" OPTION: -outfile
.TP
\fB\-outfile \fIfilename\fR
.
Sets the file to which all output produced by tcltest should be
written. A file named \fIfilename\fR will be \fBopen\fRed for writing,
and the resulting channel will be set as the value of \fBoutputChannel\fR.
+.\" OPTION: -errfile
.TP
\fB\-errfile \fIfilename\fR
.
diff --git a/doc/tclvars.n b/doc/tclvars.n
index a08f525..04cbc6c 100644
--- a/doc/tclvars.n
+++ b/doc/tclvars.n
@@ -297,71 +297,48 @@ retrieve any relevant information. In addition, extensions
and applications may add additional values to the array. The
predefined elements are:
.RS
-.TP
-\fBbyteOrder\fR
-.
+.IP \fBbyteOrder\fR
The native byte order of this machine: either \fBlittleEndian\fR or
\fBbigEndian\fR.
-.TP
-\fBdebug\fR
-.
+.IP \fBdebug\fR
If this variable exists, then the interpreter was compiled with and linked
to a debug-enabled C run-time. This variable will only exist on Windows,
so extension writers can specify which package to load depending on the
C run-time library that is in use. This is not an indication that this core
contains symbols.
-.TP
-\fBengine\fR
-.
+.IP \fBengine\fR
The name of the Tcl language implementation. When the interpreter is first
created, this is always set to the string \fBTcl\fR.
-.TP
-\fBmachine\fR
-.
+.IP \fBmachine\fR
The instruction set executed by this machine, such as
\fBintel\fR, \fBPPC\fR, \fB68k\fR, or \fBsun4m\fR. On UNIX machines, this
is the value returned by \fBuname -m\fR.
-.TP
-\fBos\fR
-.
+.IP \fBos\fR
The name of the operating system running on this machine,
such as \fBWindows NT\fR or \fBSunOS\fR.
On UNIX machines, this is the value returned by \fBuname -s\fR.
-.TP
-\fBosVersion\fR
-.
+.IP \fBosVersion\fR
The version number for the operating system running on this machine.
On UNIX machines, this is the value returned by \fBuname -r\fR.
-.TP
-\fBpathSeparator\fR
+.IP \fBpathSeparator\fR
'\" Defined by TIP #315
The character that should be used to \fBsplit\fR PATH-like environment
variables into their corresponding list of directory names.
-.TP
-\fBplatform\fR
-.
+.IP \fBplatform\fR
Either \fBwindows\fR, or \fBunix\fR. This identifies the
general operating environment of the machine.
-.TP
-\fBpointerSize\fR
-.
+.IP \fBpointerSize\fR
This gives the size of the native-machine pointer in bytes (strictly, it
is same as the result of evaluating \fIsizeof(void*)\fR in C.)
-.TP
-\fBthreaded\fR
-.
+.IP \fBthreaded\fR
If this variable exists, then the interpreter
was compiled with threads enabled.
-.TP
-\fBuser\fR
-.
+.IP \fBuser\fR
This identifies the
current user based on the login information available on the platform.
This value comes from the getuid() and getpwuid() system calls on Unix,
and the value from the GetUserName() system call on Windows.
-.TP
-\fBwordSize\fR
-.
+.IP \fBwordSize\fR
This gives the size of the native-machine word in bytes (strictly, it
is same as the result of evaluating \fIsizeof(long)\fR in C.)
.RE
@@ -383,6 +360,7 @@ tracking down suspected problems with the Tcl compiler.
.RS
This variable and functionality only exist if
\fBTCL_COMPILE_DEBUG\fR was defined during Tcl's compilation.
+.\" tcl::unsupported::disassemble always works, but we don't document it
.RE
.\" VARIABLE: tcl_traceExec
.TP
@@ -423,6 +401,7 @@ selecting a word by double-clicking in text in Tk. It is platform
dependent. On Windows, it defaults to \fB\eS\fR, meaning anything
but a Unicode space character. Otherwise it defaults to \fB\ew\fR,
which is any Unicode word character (number, letter, or underscore).
+.\" VARIABLE: tcl_nonwordchars
.TP
\fBtcl_nonwordchars\fR
.
diff --git a/doc/timerate.n b/doc/timerate.n
index f5f960c..0207fd8 100644
--- a/doc/timerate.n
+++ b/doc/timerate.n
@@ -46,15 +46,18 @@ It will then return a canonical Tcl-list of the form:
.PP
which indicates:
.IP \(bu 3
-the average amount of time required per iteration, in microseconds ([\fBlindex\fR $result 0])
+the average amount of time required per iteration, in microseconds
+([\fBlindex\fR $result 0])
.IP \(bu 3
the count how many times it was executed ([\fBlindex\fR $result 2])
.IP \(bu 3
the estimated rate per second ([\fBlindex\fR $result 4])
.IP \(bu 3
-the estimated real execution time without measurement overhead ([\fBlindex\fR $result 6])
+the estimated real execution time without measurement overhead
+([\fBlindex\fR $result 6])
.PP
The following options may be supplied to the \fBtimerate\fR command:
+.\" OPTION: -calibrate
.TP
\fB\-calibrate\fR
.
@@ -66,8 +69,10 @@ for future invocations of the \fBtimerate\fR command. If the \fItime\fR
parameter is not specified, the calibrate procedure runs for up to 10 seconds.
.RS
.PP
-Note that the calibration process is not thread safe in the current implementation.
+Note that the calibration process is not thread safe in the current
+implementation.
.RE
+.\" OPTION: -overhead
.TP
\fB\-overhead \fIestimate\fR
.
@@ -77,21 +82,23 @@ measurement overhead of each iteration of the tested script. This quantity
will be subtracted from the measured time prior to reporting results. This can
be useful for removing the cost of interpreter state reset commands from the
script being measured.
+.\" OPTION: -direct
.TP
\fB\-direct\fR
.
-The \fB-direct\fR option causes direct execution of the supplied script,
+The \fB\-direct\fR option causes direct execution of the supplied script,
without compilation, in a manner similar to the \fBtime\fR command. It can be
used to measure the cost of \fBTcl_EvalObjEx\fR, of the invocation of canonical
lists, and of the uncompiled versions of bytecoded commands.
.PP
-As opposed to the \fBtime\fR commmand, which runs the tested script for a fixed
+As opposed to the \fBtime\fR command, which runs the tested script for a fixed
number of iterations, the \fBtimerate\fR command runs it for a fixed time.
Additionally, the compiled variant of the script will be used during the entire
-measurement, as if the script were part of a compiled procedure, if the \fB\-direct\fR
-option is not specified. The fixed time period and possibility of compilation allow
-for more precise results and prevent very long execution times by slow scripts, making
-it practical for measuring scripts with highly uncertain execution times.
+measurement, as if the script were part of a compiled procedure,
+if the \fB\-direct\fR option is not specified. The fixed time period and
+possibility of compilation allow for more precise results and prevent very long
+execution times by slow scripts, making it practical for measuring scripts with
+highly uncertain execution times.
.SH EXAMPLES
Estimate how fast it takes for a simple Tcl \fBfor\fR loop (including
operations on variable \fIi\fR) to count to ten:
@@ -117,9 +124,9 @@ set i 0; \fBtimerate\fR -calibrate {expr {$i<10}; incr i} 1000
} 5000
.CE
.PP
-Estimate the speed of calculating the hour of the day using \fBclock format\fR only,
-ignoring overhead of the portion of the script that prepares the time for it to
-calculate:
+Estimate the speed of calculating the hour of the day using \fBclock format\fR
+only, ignoring overhead of the portion of the script that prepares the time for
+it to calculate:
.PP
.CS
\fI# calibrate\fR
diff --git a/doc/trace.n b/doc/trace.n
index a60b36c..6eba974 100644
--- a/doc/trace.n
+++ b/doc/trace.n
@@ -90,10 +90,12 @@ an error will be thrown.
one or more of the following items:
.TP
\fBenter\fR
+.
Invoke \fIcommandPrefix\fR whenever the command \fIname\fR is executed,
just before the actual execution takes place.
.TP
\fBleave\fR
+.
Invoke \fIcommandPrefix\fR whenever the command \fIname\fR is executed,
just after the actual execution takes place.
.TP
@@ -157,6 +159,7 @@ the result string.
\fIOp\fR indicates what operation is being performed on the
command execution, and is one of \fBleave\fR or \fBleavestep\fR as
defined above.
+.PP
Note that the creation of many \fBenterstep\fR or
\fBleavestep\fR traces can lead to unintuitive results, since the
invoked commands from one trace can themselves lead to further
@@ -188,6 +191,7 @@ The behavior of execution traces is currently undefined for a command
.RE
.TP
\fBtrace add variable\fI name ops commandPrefix\fR
+.
Arrange for \fIcommandPrefix\fR to be executed whenever variable \fIname\fR
is accessed in one of the ways given by the list \fIops\fR. \fIName\fR may
refer to a normal variable, an element of an array, or to an array
@@ -203,6 +207,7 @@ queries, but not to \fBinfo exists\fR queries.
one or more of the following items:
.TP
\fBarray\fR
+.
Invoke \fIcommandPrefix\fR whenever the variable is accessed or modified via
the \fBarray\fR command, provided that \fIname\fR is not a scalar
variable at the time that the \fBarray\fR command is invoked. If
@@ -210,12 +215,15 @@ variable at the time that the \fBarray\fR command is invoked. If
command will not trigger the trace.
.TP
\fBread\fR
+.
Invoke \fIcommandPrefix\fR whenever the variable is read.
.TP
\fBwrite\fR
+.
Invoke \fIcommandPrefix\fR whenever the variable is written.
.TP
\fBunset\fR
+.
Invoke \fIcommandPrefix\fR whenever the variable is unset. Variables
can be unset explicitly with the \fBunset\fR command, or
implicitly when procedures return (all of their local variables
@@ -306,10 +314,12 @@ This command returns an empty string.
.\" METHOD: remove
.TP
\fBtrace remove \fItype name opList commandPrefix\fR
+.
Where \fItype\fR is either \fBcommand\fR, \fBexecution\fR or \fBvariable\fR.
.RS
.TP
\fBtrace remove command\fI name opList commandPrefix\fR
+.
If there is a trace set on command \fIname\fR with the operations and
command given by \fIopList\fR and \fIcommandPrefix\fR, then the trace is
removed, so that \fIcommandPrefix\fR will never again be invoked. Returns
@@ -317,6 +327,7 @@ an empty string. If \fIname\fR does not exist, the command will throw
an error.
.TP
\fBtrace remove execution\fI name opList commandPrefix\fR
+.
If there is a trace set on command \fIname\fR with the operations and
command given by \fIopList\fR and \fIcommandPrefix\fR, then the trace is
removed, so that \fIcommandPrefix\fR will never again be invoked. Returns
@@ -324,6 +335,7 @@ an empty string. If \fIname\fR does not exist, the command will throw
an error.
.TP
\fBtrace remove variable\fI name opList commandPrefix\fR
+.
If there is a trace set on variable \fIname\fR with the operations and
command given by \fIopList\fR and \fIcommandPrefix\fR, then the trace is
removed, so that \fIcommandPrefix\fR will never again be invoked. Returns
@@ -332,10 +344,12 @@ an empty string.
.\" METHOD: info
.TP
\fBtrace info \fItype name\fR
+.
Where \fItype\fR is either \fBcommand\fR, \fBexecution\fR or \fBvariable\fR.
.RS
.TP
\fBtrace info command\fI name\fR
+.
Returns a list containing one element for each trace currently set on
command \fIname\fR. Each element of the list is itself a list
containing two elements, which are the \fIopList\fR and \fIcommandPrefix\fR
@@ -344,6 +358,7 @@ then the result of the command will be an empty string. If \fIname\fR
does not exist, the command will throw an error.
.TP
\fBtrace info execution\fI name\fR
+.
Returns a list containing one element for each trace currently set on
command \fIname\fR. Each element of the list is itself a list
containing two elements, which are the \fIopList\fR and \fIcommandPrefix\fR
@@ -352,6 +367,7 @@ then the result of the command will be an empty string. If \fIname\fR
does not exist, the command will throw an error.
.TP
\fBtrace info variable\fI name\fR
+.
Returns a list containing one element for each trace currently set on
variable \fIname\fR. Each element of the list is itself a list
containing two elements, which are the \fIopList\fR and \fIcommandPrefix\fR
diff --git a/doc/transchan.n b/doc/transchan.n
index a424981..a511c75 100644
--- a/doc/transchan.n
+++ b/doc/transchan.n
@@ -70,13 +70,9 @@ This mandatory subcommand is called first, and then never again (for the given
transformation at the Tcl level. The \fImode\fR is a list containing any of
\fBread \fRand \fBwrite\fR.
.RS
-.TP
-\fBwrite\fR
-.
+.IP \fBwrite\fR
implies that the channel is writable.
-.TP
-\fBread\fR
-.
+.IP \fBread\fR
implies that the channel is readable.
.PP
The return value of the subcommand should be a list containing the names of
diff --git a/doc/unload.n b/doc/unload.n
index d5bbde8..fdc3555 100644
--- a/doc/unload.n
+++ b/doc/unload.n
@@ -36,16 +36,19 @@ interpreter in which the \fBunload\fR command was invoked.
If the initial arguments to \fBunload\fR start with \fB\-\fR then
they are treated as switches. The following switches are
currently supported:
+.\" OPTION: -nocomplain
.TP
\fB\-nocomplain\fR
.
Suppresses all error messages. If this switch is given, \fBunload\fR will
never report an error.
+.\" OPTION: -keeplibrary
.TP
\fB\-keeplibrary\fR
.
This switch will prevent \fBunload\fR from issuing the operating system call
that will unload the library from the process.
+.\" OPTION: --
.TP
\fB\-\|\-\fR
.
@@ -81,10 +84,10 @@ 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 \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.
+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.
.SS "UNLOAD HOOK PROTOTYPE"
.PP
The unload procedure must match the following prototype:
@@ -130,7 +133,7 @@ For example, the command \fBunload libxyz4.2.so\fR uses the prefix
prefix \fBLast\fR.
.SH "PORTABILITY ISSUES"
.TP
-\fBUnix\fR\0\0\0\0\0
+\fBUnix\fR
.
Not all unix operating systems support library unloading. Under such
an operating system \fBunload\fR returns an error (unless \fB\-nocomplain\fR
diff --git a/doc/uplevel.n b/doc/uplevel.n
index cda1652..8687416 100644
--- a/doc/uplevel.n
+++ b/doc/uplevel.n
@@ -26,7 +26,8 @@ it gives a distance (up the procedure calling stack) to move before
executing the command. If \fIlevel\fR consists of \fB#\fR followed by
a integer then the level gives an absolute level. If \fIlevel\fR
is omitted then it defaults to \fB1\fR. \fILevel\fR cannot be
-defaulted if the first \fIcommand\fR argument is an integer or starts with \fB#\fR.
+defaulted if the first \fIcommand\fR argument is an integer or starts
+with \fB#\fR.
.PP
For example, suppose that procedure \fBa\fR was invoked
from top-level, and that it called \fBb\fR, and that \fBb\fR called \fBc\fR.
diff --git a/doc/vwait.n b/doc/vwait.n
index 951dbaa..1ff6caa 100644
--- a/doc/vwait.n
+++ b/doc/vwait.n
@@ -28,52 +28,63 @@ namespace's variables if the fully-qualified name is given.
.PP
In the second more complex command form \fIoptions\fR allow for finer
control of the wait operation and to deal with multiple event sources.
-\fIOptions\fR can be made up of
+\fIOptions\fR can be made up of:
+.\" OPTION: --
.TP
\fB\-\-\fR
.
Marks the end of options. All following arguments are handled as
variable names.
+.\" OPTION: -all
.TP
\fB\-all\fR
.
All conditions for the wait operation must be met to complete the
wait operation. Otherwise (the default) the first event completes
the wait.
+.\" OPTION: -extended
.TP
\fB\-extended\fR
.
An extended result in list form is returned, see below for explanation.
+.\" OPTION: -nofileevents
.TP
\fB\-nofileevents\fR
.
File events are not handled in the wait operation.
+.\" OPTION: -noidleevents
.TP
\fB\-noidleevents\fR
.
Idle handlers are not invoked during the wait operation.
+.\" OPTION: -notimerevents
.TP
\fB\-notimerevents\fR
.
Timer handlers are not serviced during the wait operation.
+.\" OPTION: -nowindowevents
.TP
\fB\-nowindowevents\fR
.
Events of the windowing system are not handled during the wait operation.
+.\" OPTION: -readable
.TP
\fB\-readable\fI channel\fR
.
\fIChannel\fR must name a Tcl channel open for reading. If \fIchannel\fR
is or becomes readable the wait operation completes.
+.\" OPTION: -timeout
.TP
\fB\-timeout\fI milliseconds\fR
.
The wait operation is constrained to \fImilliseconds\fR.
+.\" OPTION: -variable
.TP
\fB\-variable\fI varName\fR
.
\fIVarName\fR must be the name of a global variable. Writing or
unsetting this variable completes the wait operation.
+.\" OPTION: -writable
.TP
\fB\-writable\fI channel\fR
.
@@ -81,11 +92,11 @@ unsetting this variable completes the wait operation.
is or becomes writable the wait operation completes.
.PP
The result returned by \fBvwait\fR is for the simple form an empty
-string. If the \fI\-timeout\fR option is specified, the result is the
+string. If the \fB\-timeout\fR option is specified, the result is the
number of milliseconds remaining when the wait condition has been
met, or -1 if the wait operation timed out.
.PP
-If the \fI\-extended\fR option is specified, the result is made up
+If the \fB\-extended\fR option is specified, the result is made up
of a Tcl list with an even number of elements. Odd elements
take the values \fBreadable\fR, \fBtimeleft\fR, \fBvariable\fR,
and \fBwritable\fR. Even elements are the corresponding variable
diff --git a/doc/while.n b/doc/while.n
index 6acc909..bacc782 100644
--- a/doc/while.n
+++ b/doc/while.n
@@ -30,7 +30,7 @@ commands may be executed inside \fIbody\fR to cause immediate
termination of the \fBwhile\fR command. The \fBwhile\fR command
always returns an empty string.
.PP
-Note: \fItest\fR should almost always be enclosed in braces. If not,
+Note that \fItest\fR should almost always be enclosed in braces. If not,
variable substitutions will be made before the \fBwhile\fR
command starts executing, which means that variable changes
made by the loop body will not be considered in the expression.
diff --git a/doc/zipfs.3 b/doc/zipfs.3
index 18b9ea5..c15ba02 100644
--- a/doc/zipfs.3
+++ b/doc/zipfs.3
@@ -83,7 +83,7 @@ example, the Tcl 8.7.2 release would be searched for in a file
On Windows, \fBTclZipfs_AppHook\fR has a slightly different signature, since
it uses WCHAR instead of char. As a result, it requires your application to
be compiled with the UNICODE preprocessor symbol defined (e.g., via the
-\fB-DUNICODE\fR compiler flag).
+\fB\-DUNICODE\fR compiler flag).
.PP
The result of \fBTclZipfs_AppHook\fR is the full Tcl version with build
information (e.g., \fB9.0.0+abcdef...abcdef.gcc-1002\fR).
diff --git a/doc/zipfs.n b/doc/zipfs.n
index 520c11b..d4f97a8 100644
--- a/doc/zipfs.n
+++ b/doc/zipfs.n
@@ -16,7 +16,7 @@ zipfs \- Mount and work with ZIP files within Tcl
.nf
\fBpackage require tcl::zipfs \fR?\fB1.0\fR?
-\fBzipfs canonical\fR ?\fImntpnt\fR? \fIfilename\fR ?\fIZIPFS\fR?
+\fBzipfs canonical\fR ?\fImountpoint\fR? \fIfilename\fR ?\fIZIPFS\fR?
\fBzipfs exists\fI filename\fR
\fBzipfs find\fI directoryName\fR
\fBzipfs info\fI filename\fR
@@ -87,9 +87,9 @@ the compressed size of the file, and
.IP (4)
the offset of the compressed data in the ZIP archive file.
.PP
-As a special case, querying the mount point gives the start of the zip data as the offset
-in (4), which can be used to truncate the zip information from an executable.
-Querying an ancestor of a mount point will raise an error.
+As a special case, querying the mount point gives the start of the zip data
+as the offset in (4), which can be used to truncate the zip information from
+an executable. Querying an ancestor of a mount point will raise an error.
.RE
.\" METHOD: list
.TP
@@ -97,9 +97,9 @@ Querying an ancestor of a mount point will raise an error.
.
If \fIpattern\fR is not specified, the command returns a list of files across
all zipfs mounted archives. If \fIpattern\fR is specified, only those paths
-matching the pattern are returned. By default, or with the \fB-glob\fR option,
+matching the pattern are returned. By default, or with the \fB\-glob\fR option,
the pattern is treated as a glob pattern and matching is done as described for
-the \fBstring match\fR command. Alternatively, the \fB-regexp\fR option may be
+the \fBstring match\fR command. Alternatively, the \fB\-regexp\fR option may be
used to specify matching \fBpattern\fR as a regular expression. The file names
are returned in arbitrary order. Note that path separators are treated as
ordinary characters in the matching. Thus forward slashes should be used
@@ -124,10 +124,10 @@ mount points to the path of the corresponding ZIP archive.
In the single argument form, the command returns the file path
of the ZIP archive mounted at the specified mount point.
.PP
-In the third form, the command mounts the ZIP archive \fIzipfile\fR as a Tcl virtual
-filesystem at \fImountpoint\fR. After this command executes, files contained
-in \fIzipfile\fR will appear to Tcl to be regular files at the mount point.
-If \fImountpoint\fR is
+In the third form, the command mounts the ZIP archive \fIzipfile\fR as a Tcl
+virtual filesystem at \fImountpoint\fR. After this command executes, files
+contained in \fIzipfile\fR will appear to Tcl to be regular files at the
+mount point. If \fImountpoint\fR is
specified as an empty string, it is defaulted to the \fB[zipfs root]\fR.
The command returns the normalized mount point path.
.PP
diff --git a/doc/zlib.n b/doc/zlib.n
index 8bf6f2b..4c6cb2b 100644
--- a/doc/zlib.n
+++ b/doc/zlib.n
@@ -51,37 +51,23 @@ have been in gzip format. If \fB\-headerVar\fR is given, store a dictionary
describing the contents of the gzip header in the variable called
\fIvarName\fR. The keys of the dictionary that may be present are:
.RS
-.TP
-\fBcomment\fR
-.
+.IP \fBcomment\fR
The comment field from the header, if present.
-.TP
-\fBcrc\fR
-.
+.IP \fBcrc\fR
A boolean value describing whether a CRC of the header is computed.
-.TP
-\fBfilename\fR
-.
+.IP \fBfilename\fR
The filename field from the header, if present.
-.TP
-\fBos\fR
-.
+.IP \fBos\fR
The operating system type code field from the header (if not the
QW unknown
value). See RFC 1952 for the meaning of these codes.
-.TP
-\fBsize\fR
-.
+.IP \fBsize\fR
The size of the uncompressed data.
-.TP
-\fBtime\fR
-.
+.IP \fBtime\fR
The time field from the header if non-zero, expected to be time that the file
named by the \fBfilename\fR field was modified. Suitable for use with
\fBclock format\fR.
-.TP
-\fBtype\fR
-.
+.IP \fBtype\fR
The type of the uncompressed data (\fBbinary\fR or \fBtext\fR) if known.
.RE
.\" METHOD: gzip
@@ -94,33 +80,21 @@ If \fB\-level\fR is given, \fIlevel\fR gives the compression level to use
is given, \fIdict\fR is a dictionary containing values used for the gzip
header. The following keys may be defined:
.RS
-.TP
-\fBcomment\fR
-.
+.IP \fBcomment\fR
Add the given comment to the header of the gzip-format data.
-.TP
-\fBcrc\fR
-.
+.IP \fBcrc\fR
A boolean saying whether to compute a CRC of the header. Note that if the data
is to be interchanged with the \fBgzip\fR program, a header CRC should
\fInot\fR be computed.
-.TP
-\fBfilename\fR
-.
+.IP \fBfilename\fR
The name of the file that the data to be compressed came from.
-.TP
-\fBos\fR
-.
+.IP \fBos\fR
The operating system type code, which should be one of the values described in
RFC 1952.
-.TP
-\fBtime\fR
-.
+.IP \fBtime\fR
The time that the file named in the \fBfilename\fR key was last modified. This
will be in the same as is returned by \fBclock seconds\fR or \fBfile mtime\fR.
-.TP
-\fBtype\fR
-.
+.IP \fBtype\fR
The type of the data being compressed, being \fBbinary\fR or \fBtext\fR.
.RE
.\" METHOD: inflate
@@ -141,34 +115,22 @@ The transformation can be removed again with \fBchan pop\fR.
The \fImode\fR argument determines what type of transformation
is pushed; the following are supported:
.RS
-.TP
-\fBcompress\fR
-.
+.IP \fBcompress\fR
The transformation will be a compressing transformation that produces
zlib-format data on \fIchannel\fR, which must be writable.
-.TP
-\fBdecompress\fR
-.
+.IP \fBdecompress\fR
The transformation will be a decompressing transformation that reads
zlib-format data from \fIchannel\fR, which must be readable.
-.TP
-\fBdeflate\fR
-.
+.IP \fBdeflate\fR
The transformation will be a compressing transformation that produces raw
compressed data on \fIchannel\fR, which must be writable.
-.TP
-\fBgunzip\fR
-.
+.IP \fBgunzip\fR
The transformation will be a decompressing transformation that reads
gzip-format data from \fIchannel\fR, which must be readable.
-.TP
-\fBgzip\fR
-.
+.IP \fBgzip\fR
The transformation will be a compressing transformation that produces
gzip-format data on \fIchannel\fR, which must be writable.
-.TP
-\fBinflate\fR
-.
+.IP \fBinflate\fR
The transformation will be a decompressing transformation that reads raw
compressed data from \fIchannel\fR, which must be readable.
.PP
@@ -176,6 +138,7 @@ The following options may be set when creating a transformation via
the
.QW "\fIoptions ...\fR"
to the \fBzlib push\fR command:
+.\" OPTION: -dictionary
.TP
\fB\-dictionary\fI binData\fR
.VS "TIP 400"
@@ -187,16 +150,19 @@ with the most commonly used strings preferably put towards the end of the
dictionary. Tcl provides no mechanism for choosing a good such dictionary for
a particular data sequence.
.VE
+.\" OPTION: -header
.TP
\fB\-header\fI dictionary\fR
.
Passes a description of the gzip header to create, in the same format that
\fBzlib gzip\fR understands.
+.\" OPTION: -level
.TP
\fB\-level\fI compressionLevel\fR
.
How hard to compress the data. Must be an integer from 0 (uncompressed) to 9
(maximally compressed).
+.\" OPTION: -limit
.TP
\fB\-limit\fI readaheadLimit\fR
.
@@ -216,6 +182,7 @@ to further readers.
Both compressing and decompressing channel transformations add extra
configuration options that may be accessed through \fBchan configure\fR. The
options are:
+.\" OPTION: -checksum
.TP
\fB\-checksum\fI checksum\fR
.
@@ -223,6 +190,7 @@ This read-only option gets the current checksum for the uncompressed data that
the compression engine has seen so far. It is valid for both compressing and
decompressing transforms, but not for the raw inflate and deflate formats. The
compression algorithm depends on what format is being produced or consumed.
+.\" OPTION: -dictionary
.TP
\fB\-dictionary\fI binData\fR
.VS "TIP 400"
@@ -234,6 +202,7 @@ the transformation is stacked. Note that this cannot be used to get the
current active compression dictionary mid-stream, as that information is not
exposed by the underlying library.
.VE
+.\" OPTION: -flush
.TP
\fB\-flush\fI type\fR
.
@@ -243,12 +212,14 @@ underlying channel. It is only valid for compressing transformations. The
expensive flush respectively. Flushing degrades the compression ratio, but
makes it easier for a decompressor to recover more of the file in the case of
data corruption.
+.\" OPTION: -header
.TP
\fB\-header\fI dictionary\fR
.
This read-only option, only valid for decompressing transforms that are
processing gzip-format data, returns the dictionary describing the header read
off the data stream.
+.\" OPTION: -limit
.TP
\fB\-limit\fI readaheadLimit\fR
.
@@ -406,12 +377,14 @@ buffers while applying the transformation. The following \fIoption\fRs are
supported (or an unambiguous prefix of them), which are used to modify the
way in which the transformation is applied:
.RS
+.\" OPTION: -dictionary
.TP
\fB\-dictionary\fI binData\fR
.VS "TIP 400"
Sets the compression dictionary to use when working with compressing or
decompressing the data to be \fIbinData\fR.
.VE
+.\" OPTION: -finalize
.TP
\fB\-finalize\fR
.
@@ -425,6 +398,7 @@ of the stream with the \fBget\fR subcommand.
This option is mutually exclusive with the \fB\-flush\fR and \fB\-fullflush\fR
options.
.RE
+.\" OPTION: -flush
.TP
\fB\-flush\fR
.
@@ -436,6 +410,7 @@ compressed so far, at some performance penalty.
This option is mutually exclusive with the \fB\-finalize\fR and
\fB\-fullflush\fR options.
.RE
+.\" OPTION: -fullflush
.TP
\fB\-fullflush\fR
.