diff options
author | dkf <dkf@noemail.net> | 2006-11-15 09:22:59 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2006-11-15 09:22:59 (GMT) |
commit | cf00a1a2961dbc006f691b2a43340bbd2a0c963c (patch) | |
tree | 994b2a6f3769b72c60403ff8a3825e46ca2ff910 | |
parent | 9f8087a815b062f4a23c738570f3e15f0bb088b5 (diff) | |
download | tcl-cf00a1a2961dbc006f691b2a43340bbd2a0c963c.zip tcl-cf00a1a2961dbc006f691b2a43340bbd2a0c963c.tar.gz tcl-cf00a1a2961dbc006f691b2a43340bbd2a0c963c.tar.bz2 |
Convert \fP to \fR for easier manual page scraping
FossilOrigin-Name: 6ac86620d0e4fa5d2b6ad1d0008248310ef1bfe2
-rw-r--r-- | ChangeLog | 26 | ||||
-rw-r--r-- | doc/ChnlStack.3 | 18 | ||||
-rw-r--r-- | doc/CrtObjCmd.3 | 6 | ||||
-rw-r--r-- | doc/GetIndex.3 | 6 | ||||
-rw-r--r-- | doc/OpenTcp.3 | 12 | ||||
-rw-r--r-- | doc/chan.n | 50 | ||||
-rw-r--r-- | doc/fconfigure.n | 24 | ||||
-rw-r--r-- | doc/fcopy.n | 34 | ||||
-rw-r--r-- | doc/foreach.n | 8 | ||||
-rw-r--r-- | doc/history.n | 12 | ||||
-rw-r--r-- | doc/http.n | 178 | ||||
-rw-r--r-- | doc/library.n | 10 | ||||
-rw-r--r-- | doc/lindex.n | 6 | ||||
-rw-r--r-- | doc/lrepeat.n | 10 | ||||
-rw-r--r-- | doc/lreverse.n | 10 | ||||
-rw-r--r-- | doc/pkgMkIndex.n | 28 | ||||
-rw-r--r-- | doc/re_syntax.n | 4 |
17 files changed, 225 insertions, 217 deletions
@@ -1,3 +1,11 @@ +2006-11-15 Donal K. Fellows <dkf@users.sf.net> + + * doc/ChnlStack.3, doc/CrtObjCmd.3, doc/GetIndex.3, doc/OpenTcp.3: + * doc/chan.n, doc/fconfigure.n, doc/fcopy.n, doc/foreach.n: + * doc/history.n, doc/http.n, doc/library.n, doc/lindex.n: + * doc/lrepeat.n, doc/lreverse.n, doc/pkgMkIndex.n, doc/re_syntax.n: + Convert \fP to \fR so that man-page scrapers have an easier time. + 2006-11-14 Don Porter <dgp@users.sourceforge.net> TIP#261 IMPLEMENTATION @@ -7,9 +15,9 @@ 2006-11-13 Kevin Kenny <kennykb@users.sourceforge.net> - * generic/tclThreadStorage.c (Tcl_InitThreadStorage, - Tcl_FinalizeThreadStorage): Silence a compiler warning about - presenting a volatile pointer to 'memset'. + * generic/tclThreadStorage.c (Tcl_InitThreadStorage): + (Tcl_FinalizeThreadStorage): Silence a compiler warning about + presenting a volatile pointer to 'memset'. 2006-11-13 Don Porter <dgp@users.sourceforge.net> @@ -21,7 +29,7 @@ 2006-11-13 Daniel Steffen <das@users.sourceforge.net> - * generic/tclCompExpr.c: fix gcc warnings about 'cast to/from + * generic/tclCompExpr.c: Fix gcc warnings about 'cast to/from * generic/tclEncoding.c: pointer from/to integer of different * generic/tclEvent.c: size' on 64-bit platforms by casting to * generic/tclExecute.c: intermediate types intptr_t/uintptr_t @@ -67,11 +75,11 @@ * generic/tclParseExpr.c (removed): Moved all the code of * generic/tclCompExpr.c: tclParseExpr.c into tclCompExpr.c. - * unix/Makefile.in: This sets the stage for expr compiling to - * win/Makefile.in: work directly with the full parse tree - * win/makefile.bc: structures, and not have to pass through - * win/makefile.vc: the information lossy format of an array - * win/tcl.dsp: of Tcl_Tokens. + * unix/Makefile.in: This sets the stage for expr compiling to work + * win/Makefile.in: directly with the full parse tree structures, + * win/makefile.bc: and not have to pass through the information + * win/makefile.vc: lossy format of an array of Tcl_Tokens. + * win/tcl.dsp: 2006-11-09 Donal K. Fellows <donal.k.fellows@manchester.ac.uk> diff --git a/doc/ChnlStack.3 b/doc/ChnlStack.3 index 0a656a5..092ead5 100644 --- a/doc/ChnlStack.3 +++ b/doc/ChnlStack.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: ChnlStack.3,v 1.7 2004/10/07 14:44:31 dkf Exp $ +'\" RCS: @(#) $Id: ChnlStack.3,v 1.8 2006/11/15 09:23:01 dkf Exp $ .so man.macros .TH Tcl_StackChannel 3 8.3 Tcl "Tcl Library Procedures" .BS @@ -33,13 +33,13 @@ Tcl_Channel .AP Tcl_Interp *interp in Interpreter for error reporting. .AP Tcl_ChannelType *typePtr in -The new channel I/O procedures to use for \fIchannel\fP. +The new channel I/O procedures to use for \fIchannel\fR. .AP ClientData clientData in Arbitrary one-word value to pass to channel I/O procedures. .AP int mask in Conditions under which \fIchannel\fR will be used: OR-ed combination of \fBTCL_READABLE\fR, \fBTCL_WRITABLE\fR and \fBTCL_EXCEPTION\fR. -This can be a subset of the operations currently allowed on \fIchannel\fP. +This can be a subset of the operations currently allowed on \fIchannel\fR. .AP Tcl_Channel channel in An existing Tcl channel such as returned by \fBTcl_CreateChannel\fR. .BE @@ -57,9 +57,9 @@ stacked channels. Anyone using stacked channels or creating stacked channel drivers should update to the new \fBTCL_CHANNEL_VERSION_2\fR \fBTcl_ChannelType\fR structure. See \fBTcl_CreateChannel\fR for details. .PP -\fBTcl_StackChannel\fR stacks a new \fIchannel\fP on an existing channel -with the same name that was registered for \fIchannel\fP by -\fBTcl_RegisterChannel\fP. +\fBTcl_StackChannel\fR stacks a new \fIchannel\fR on an existing channel +with the same name that was registered for \fIchannel\fR by +\fBTcl_RegisterChannel\fR. .PP \fBTcl_StackChannel\fR works by creating a new channel structure and placing itself on top of the channel stack. EOL translation, encoding and @@ -70,7 +70,7 @@ remain at the top of the channel stack. A pointer to the new top channel structure is returned. If an error occurs when stacking the channel, NULL is returned instead. .PP -The \fImask\fP parameter specifies the operations that are allowed on the +The \fImask\fR parameter specifies the operations that are allowed on the new channel. These can be a subset of the operations allowed on the original channel. For example, a read-write channel may become read-only after the \fBTcl_StackChannel\fR call. @@ -79,10 +79,10 @@ Closing a channel closes the channels stacked below it. The close of stacked channels is executed in a way that allows buffered data to be properly flushed. .PP -\fBTcl_UnstackChannel\fP reverses the process. The old channel is +\fBTcl_UnstackChannel\fR reverses the process. The old channel is associated with the channel name, and the processing module added by \fBTcl_StackChannel\fR is destroyed. If there is no old channel, then -\fBTcl_UnstackChannel\fP is equivalent to \fBTcl_Close\fP. If an error +\fBTcl_UnstackChannel\fR is equivalent to \fBTcl_Close\fR. If an error occurs unstacking the channel, \fBTCL_ERROR\fR is returned, otherwise \fBTCL_OK\fR is returned. .PP diff --git a/doc/CrtObjCmd.3 b/doc/CrtObjCmd.3 index f9ee031..bb125e0 100644 --- a/doc/CrtObjCmd.3 +++ b/doc/CrtObjCmd.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.14 2006/06/20 15:00:05 dgp Exp $ +'\" RCS: @(#) $Id: CrtObjCmd.3,v 1.15 2006/11/15 09:23:01 dkf Exp $ '\" .so man.macros .TH Tcl_CreateObjCommand 3 8.0 Tcl "Tcl Library Procedures" @@ -286,10 +286,10 @@ they need to keep it for a long time. \fBTcl_GetCommandFullName\fR produces the fully qualified name of a command from a command token. The name, including all namespace prefixes, -is appended to the object specified by \fIobjPtr\fP. +is appended to the object specified by \fIobjPtr\fR. .PP \fBTcl_GetCommandFromObj\fR returns a token for the command -specified by the name in a \fBTcl_Obj\fP. +specified by the name in a \fBTcl_Obj\fR. The command name is resolved relative to the current namespace. Returns NULL if the command is not found. .SH "SEE ALSO" diff --git a/doc/GetIndex.3 b/doc/GetIndex.3 index 4b4a220..f77705c 100644 --- a/doc/GetIndex.3 +++ b/doc/GetIndex.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: GetIndex.3,v 1.19 2006/04/06 18:57:58 dgp Exp $ +'\" RCS: @(#) $Id: GetIndex.3,v 1.20 2006/11/15 09:23:01 dkf Exp $ '\" .so man.macros .TH Tcl_GetIndexFromObj 3 8.1 Tcl "Tcl Library Procedures" @@ -35,9 +35,9 @@ table entry. An array of null-terminated strings. The end of the array is marked by a NULL string pointer. .AP "const void" *structTablePtr in -An array of arbitrary type, typically some \fBstruct\fP type. +An array of arbitrary type, typically some \fBstruct\fR type. The first member of the structure must be a null-terminated string. -The size of the structure is given by \fIoffset\fP. +The size of the structure is given by \fIoffset\fR. .AP int offset in The offset to add to structTablePtr to get to the next entry. The end of the array is marked by a NULL string pointer. diff --git a/doc/OpenTcp.3 b/doc/OpenTcp.3 index f5b733d..70b80fa 100644 --- a/doc/OpenTcp.3 +++ b/doc/OpenTcp.3 @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: OpenTcp.3,v 1.10 2005/05/10 18:33:57 kennykb Exp $ +'\" RCS: @(#) $Id: OpenTcp.3,v 1.11 2006/11/15 09:23:01 dkf Exp $ .so man.macros .TH Tcl_OpenTcpClient 3 8.0 Tcl "Tcl Library Procedures" .BS @@ -114,24 +114,24 @@ replacement for the standard channel. .PP \fBTcl_OpenTcpServer\fR opens a TCP socket on the local host on a specified \fIport\fR and uses the Tcl event mechanism to accept requests from clients -to connect to it. The \fImyaddr\fP argument specifies the network interface. -If \fImyaddr\fP is NULL the special address INADDR_ANY should be used to +to connect to it. The \fImyaddr\fR argument specifies the network interface. +If \fImyaddr\fR is NULL the special address INADDR_ANY should be used to allow connections from any network interface. Each time a client connects to this socket, Tcl creates a channel for the new connection and invokes \fIproc\fR with information about -the channel. \fIProc\fR must match the following prototype: +the channel. \fIProc\fR must match the following prototype: .CS typedef void Tcl_TcpAcceptProc( ClientData \fIclientData\fR, Tcl_Channel \fIchannel\fR, char *\fIhostName\fR, - int \fIport\fP); + int \fIport\fR); .CE .PP The \fIclientData\fR argument will be the same as the \fIclientData\fR argument to \fBTcl_OpenTcpServer\fR, \fIchannel\fR will be the handle for the new channel, \fIhostName\fR points to a string containing -the name of the client host making the connection, and \fIport\fP +the name of the client host making the connection, and \fIport\fR will contain the client's port number. The new channel is opened for both input and output. @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: chan.n,v 1.4 2006/05/23 15:35:02 dkf Exp $ +'\" RCS: @(#) $Id: chan.n,v 1.5 2006/11/15 09:23:01 dkf Exp $ .so man.macros .TH chan n 8.5 Tcl "Tcl Built-In Commands" .BS @@ -184,11 +184,11 @@ of a line may be represented differently on different platforms, or even for different devices on the same platform. For example, under UNIX newlines are used in files, whereas carriage-return-linefeed sequences are normally used in network connections. On input (i.e., -with \fBchan gets\fP and \fBchan read\fP) the Tcl I/O system +with \fBchan gets\fR and \fBchan read\fR) the Tcl I/O system automatically translates the external end-of-line representation into -newline characters. Upon output (i.e., with \fBchan puts\fP), the I/O +newline characters. Upon output (i.e., with \fBchan puts\fR), the I/O system translates newlines to the external end-of-line representation. -The default translation mode, \fBauto\fP, handles all the common cases +The default translation mode, \fBauto\fR, handles all the common cases automatically, but the \fB\-translation\fR option provides explicit control over the end of line translations. .RS @@ -206,8 +206,8 @@ currently supported: \fBauto\fR . As the input translation mode, \fBauto\fR treats any of newline -(\fBlf\fP), carriage return (\fBcr\fP), or carriage return followed by -a newline (\fBcrlf\fP) as the end of line representation. The end of +(\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 representation can even change from line-to-line, and all cases are translated to a newline. As the output translation mode, \fBauto\fR chooses a platform specific representation; for sockets on @@ -219,7 +219,7 @@ for both input and output. \fBbinary\fR . No end-of-line translations are performed. This is nearly identical -to \fBlf\fP mode, except that in addition \fBbinary\fP mode also sets +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 encoding to \fBbinary\fR (which disables encoding filtering). See the description of \fB\-eofchar\fR and \fB\-encoding\fR for more @@ -229,17 +229,17 @@ information. . 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\fP mode converts carriage returns to newline characters. As the -output translation mode, \fBcr\fP mode translates newline characters +\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 . 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\fP mode converts +input translation mode, \fBcrlf\fR mode converts carriage-return-linefeed sequences to newline characters. As the -output translation mode, \fBcrlf\fP mode translates newline characters +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 @@ -262,38 +262,38 @@ buffering too much data in main memory when copying large files to slow destinations like network sockets. .RS .PP -The \fBchan copy\fP command transfers data from \fIinputChan\fR until -end of file or \fIsize\fP bytes have been transferred. If no -\fB\-size\fP argument is given, then the copy goes until end of file. +The \fBchan copy\fR command transfers data from \fIinputChan\fR until +end of file or \fIsize\fR bytes have been transferred. If no +\fB\-size\fR argument is given, then the copy goes until end of file. All the data read from \fIinputChan\fR is copied to \fIoutputChan\fR. -Without the \fB\-command\fP option, \fBchan copy\fP blocks until the +Without the \fB\-command\fR option, \fBchan copy\fR blocks until the copy is complete and returns the number of bytes written to \fIoutputChan\fR. .PP -The \fB\-command\fP argument makes \fBchan copy\fP work in the +The \fB\-command\fR argument makes \fBchan copy\fR work in the background. In this case it returns immediately and the -\fIcallback\fP is invoked later when the copy completes. The -\fIcallback\fP is called with one or two additional arguments that +\fIcallback\fR is invoked later when the copy completes. The +\fIcallback\fR is called with one or two additional arguments that indicates how many bytes were written to \fIoutputChan\fR. If an error occurred during the background copy, the second argument is the error string associated with the error. With a background copy, it is not necessary to put \fIinputChan\fR or \fIoutputChan\fR into -non-blocking mode; the \fBchan copy\fP command takes care of that +non-blocking mode; the \fBchan copy\fR command takes care of that automatically. However, it is necessary to enter the event loop by -using the \fBvwait\fP command or by using Tk. +using the \fBvwait\fR command or by using Tk. .PP You are not allowed to do other I/O operations with \fIinputChan\fR or \fIoutputChan\fR during a background \fBchan copy\fR. If either \fIinputChan\fR or \fIoutputChan\fR get closed while the copy is in progress, the current copy is stopped and the command callback is -\fInot\fP made. If \fIinputChan\fR is closed, then all data already +\fInot\fR made. If \fIinputChan\fR is closed, then all data already queued for \fIoutputChan\fR is written out. .PP Note that \fIinputChan\fR can become readable during a background -copy. You should turn off any \fBchan event\fP or \fBfileevent\fR +copy. You should turn off any \fBchan event\fR or \fBfileevent\fR handlers during a background copy so those handlers do not interfere with the copy. Any I/O attempted by a \fBchan event\fR or -\fBfileevent\fP handler will get a "channel busy" error. +\fBfileevent\fR handler will get a "channel busy" error. .PP \fBChan copy\fR translates end-of-line sequences in \fIinputChan\fR and \fIoutputChan\fR according to the \fB\-translation\fR option for @@ -301,8 +301,8 @@ these channels (see \fBchan configure\fR above). The translations mean that the number of bytes read from \fIinputChan\fR can be different than the number of bytes written to \fIoutputChan\fR. Only the number of bytes written to \fIoutputChan\fR is reported, either as -the return value of a synchronous \fBchan copy\fP or as the argument -to the callback for an asynchronous \fBchan copy\fP. +the return value of a synchronous \fBchan copy\fR or as the argument +to the callback for an asynchronous \fBchan copy\fR. .PP \fBChan copy\fR obeys the encodings and character translations configured for the channels. This means that the incoming characters diff --git a/doc/fconfigure.n b/doc/fconfigure.n index 6dedf75..044b21e 100644 --- a/doc/fconfigure.n +++ b/doc/fconfigure.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fconfigure.n,v 1.16 2006/11/03 00:34:51 hobbs Exp $ +'\" RCS: @(#) $Id: fconfigure.n,v 1.17 2006/11/15 09:23:01 dkf Exp $ '\" .so man.macros .TH fconfigure n 8.3 Tcl "Tcl Built-In Commands" @@ -130,11 +130,11 @@ newline character (\en). However, in actual files and devices the end of a line may be represented differently on different platforms, or even for different devices on the same platform. For example, under UNIX newlines are used in files, whereas carriage-return-linefeed sequences are -normally used in network connections. On input (i.e., with \fBgets\fP -and \fBread\fP) the Tcl I/O system automatically translates the external +normally used in network connections. On input (i.e., with \fBgets\fR +and \fBread\fR) the Tcl I/O system automatically translates the external end-of-line representation into newline characters. Upon output (i.e., -with \fBputs\fP), the I/O system translates newlines to the external -end-of-line representation. The default translation mode, \fBauto\fP, +with \fBputs\fR), the I/O system translates newlines to the external +end-of-line representation. The default translation mode, \fBauto\fR, handles all the common cases automatically, but the \fB\-translation\fR option provides explicit control over the end of line translations. .RS @@ -152,8 +152,8 @@ currently supported: \fBauto\fR . As the input translation mode, \fBauto\fR treats any of newline -(\fBlf\fP), carriage return (\fBcr\fP), or carriage return followed by a -newline (\fBcrlf\fP) as the end of line representation. The end of line +(\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 representation can even change from line-to-line, and all cases are translated to a newline. As the output translation mode, \fBauto\fR chooses a platform specific representation; for sockets on all platforms @@ -164,7 +164,7 @@ setting for \fB\-translation\fR is \fBauto\fR for both input and output. \fBbinary\fR . No end-of-line translations are performed. This is nearly identical to -\fBlf\fP mode, except that in addition \fBbinary\fP mode also sets the +\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 encoding to \fBbinary\fR (which disables encoding filtering). See the description of \fB\-eofchar\fR and \fB\-encoding\fR for more information. @@ -180,17 +180,17 @@ the translation. . 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\fP mode converts carriage returns to newline characters. As the -output translation mode, \fBcr\fP mode translates newline characters to +\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 . 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\fP mode converts carriage-return-linefeed +translation mode, \fBcrlf\fR mode converts carriage-return-linefeed sequences to newline characters. As the output translation mode, -\fBcrlf\fP mode translates newline characters to carriage-return-linefeed +\fBcrlf\fR mode translates newline characters to carriage-return-linefeed sequences. This mode is typically used on Windows platforms and for network connections. .TP diff --git a/doc/fcopy.n b/doc/fcopy.n index de74d3c..5cda3e3 100644 --- a/doc/fcopy.n +++ b/doc/fcopy.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: fcopy.n,v 1.6 2005/05/10 18:33:59 kennykb Exp $ +'\" RCS: @(#) $Id: fcopy.n,v 1.7 2006/11/15 09:23:01 dkf Exp $ '\" .so man.macros .TH fcopy n 8.0 Tcl "Tcl Built-In Commands" @@ -19,47 +19,47 @@ fcopy \- Copy data from one channel to another .SH DESCRIPTION .PP -The \fBfcopy\fP command copies data from one I/O channel, \fIinchan\fR to another I/O channel, \fIoutchan\fR. -The \fBfcopy\fP command leverages the buffering in the Tcl I/O system to +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 slow destinations like network sockets. .PP -The \fBfcopy\fP +The \fBfcopy\fR command transfers data from \fIinchan\fR until end of file -or \fIsize\fP bytes have been -transferred. If no \fB\-size\fP argument is given, +or \fIsize\fR bytes have been +transferred. If no \fB\-size\fR argument is given, then the copy goes until end of file. All the data read from \fIinchan\fR is copied to \fIoutchan\fR. -Without the \fB\-command\fP option, \fBfcopy\fP blocks until the copy is complete +Without the \fB\-command\fR option, \fBfcopy\fR blocks until the copy is complete and returns the number of bytes written to \fIoutchan\fR. .PP -The \fB\-command\fP argument makes \fBfcopy\fP work in the background. -In this case it returns immediately and the \fIcallback\fP is invoked +The \fB\-command\fR argument makes \fBfcopy\fR work in the background. +In this case it returns immediately and the \fIcallback\fR is invoked later when the copy completes. -The \fIcallback\fP is called with +The \fIcallback\fR is called with one or two additional arguments that indicates how many bytes were written to \fIoutchan\fR. If an error occurred during the background copy, the second argument is the error string associated with the error. With a background copy, it is not necessary to put \fIinchan\fR or \fIoutchan\fR into -non-blocking mode; the \fBfcopy\fP command takes care of that automatically. +non-blocking mode; the \fBfcopy\fR command takes care of that automatically. However, it is necessary to enter the event loop by using -the \fBvwait\fP command or by using Tk. +the \fBvwait\fR command or by using Tk. .PP You are not allowed to do other I/O operations with \fIinchan\fR or \fIoutchan\fR during a background fcopy. If either \fIinchan\fR or \fIoutchan\fR get closed while the copy is in progress, the current copy is stopped -and the command callback is \fInot\fP made. +and the command callback is \fInot\fR made. If \fIinchan\fR is closed, then all data already queued for \fIoutchan\fR is written out. .PP Note that \fIinchan\fR can become readable during a background copy. -You should turn off any \fBfileevent\fP handlers during a background +You should turn off any \fBfileevent\fR handlers during a background copy so those handlers do not interfere with the copy. -Any I/O attempted by a \fBfileevent\fP handler will get a "channel busy" error. +Any I/O attempted by a \fBfileevent\fR handler will get a "channel busy" error. .PP \fBFcopy\fR translates end-of-line sequences in \fIinchan\fR and \fIoutchan\fR according to the \fB\-translation\fR option @@ -69,8 +69,8 @@ See the manual entry for \fBfconfigure\fR for details on the The translations mean that the number of bytes read from \fIinchan\fR can be different than the number of bytes written to \fIoutchan\fR. Only the number of bytes written to \fIoutchan\fR is reported, -either as the return value of a synchronous \fBfcopy\fP or -as the argument to the callback for an asynchronous \fBfcopy\fP. +either as the return value of a synchronous \fBfcopy\fR or +as the argument to the callback for an asynchronous \fBfcopy\fR. .PP \fBFcopy\fR obeys the encodings and character translations configured for the channels. This diff --git a/doc/foreach.n b/doc/foreach.n index 3398b17..5d3a631 100644 --- a/doc/foreach.n +++ b/doc/foreach.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: foreach.n,v 1.7 2005/05/10 18:34:00 kennykb Exp $ +'\" RCS: @(#) $Id: foreach.n,v 1.8 2006/11/15 09:23:01 dkf Exp $ '\" .so man.macros .TH foreach n "" Tcl "Tcl Built-In Commands" @@ -37,9 +37,9 @@ In the general case there can be more than one value list and each value list can be associated with a list of loop variables (e.g., \fIvarlist1\fR and \fIvarlist2\fR). During each iteration of the loop -the variables of each \fIvarlist\fP are assigned -consecutive values from the corresponding \fIlist\fP. -Values in each \fIlist\fP are used in order from first to last, +the variables of each \fIvarlist\fR are assigned +consecutive values from the corresponding \fIlist\fR. +Values in each \fIlist\fR are used in order from first to last, and each value is used exactly once. The total number of loop iterations is large enough to use up all the values from all the value lists. diff --git a/doc/history.n b/doc/history.n index a49fd7e..3236046 100644 --- a/doc/history.n +++ b/doc/history.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: history.n,v 1.3 2004/08/31 15:19:36 dkf Exp $ +'\" RCS: @(#) $Id: history.n,v 1.4 2006/11/15 09:23:01 dkf Exp $ '\" .so man.macros .TH history n "" Tcl "Tcl Built-In Commands" @@ -29,7 +29,7 @@ A number: if positive, it refers to the event with that number (all events are numbered starting at 1). If the number is negative, it selects an event relative to the current event (\fB\-1\fR refers to the previous event, \fB\-2\fR to the one before that, and -so on). Event \fB0\fP refers to the current event. +so on). Event \fB0\fR refers to the current event. .IP [2] A string: selects the most recent event that matches the string. An event is considered to match the string either if the string is @@ -89,16 +89,16 @@ revision: see below for details. .PP Pre-8.0 Tcl had a complex history revision mechanism. The current mechanism is more limited, and the old -history operations \fBsubstitute\fP and \fBwords\fP have been removed. -(As a consolation, the \fBclear\fP operation was added.) +history operations \fBsubstitute\fR and \fBwords\fR have been removed. +(As a consolation, the \fBclear\fR operation was added.) .PP The history option \fBredo\fR results in much simpler ``history revision''. When this option is invoked then the most recent event is modified to eliminate the history command and replace it with the result of the history command. If you want to redo an event without modifying history, then use -the \fBevent\fP operation to retrieve some event, -and the \fBadd\fP operation to add it to history and execute it. +the \fBevent\fR operation to retrieve some event, +and the \fBadd\fR operation to add it to history and execute it. .SH KEYWORDS event, history, record @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: http.n,v 1.23 2004/10/27 12:53:22 dkf Exp $ +'\" RCS: @(#) $Id: http.n,v 1.24 2006/11/15 09:23:01 dkf Exp $ '\" .so man.macros .TH "http" n 2.5 http "Tcl Bundled Packages" @@ -21,9 +21,9 @@ http \- Client-side implementation of the HTTP/1.0 protocol .sp \fB::http::geturl \fIurl ?options?\fR .sp -\fB::http::formatQuery\fP \fIkey value\fP ?\fIkey value\fP ...? +\fB::http::formatQuery\fR \fIkey value\fR ?\fIkey value\fR ...? .sp -\fB::http::reset\fP \fItoken\fP ?\fIwhy\fP? +\fB::http::reset\fR \fItoken\fR ?\fIwhy\fR? .sp \fB::http::wait \fItoken\fR .sp @@ -65,7 +65,7 @@ The value is also the name of an array in the ::http namespace that contains state information about the transaction. The elements of this array are described in the STATE ARRAY section. .PP -If the \fB-command\fP option is specified, then +If the \fB-command\fR option is specified, then the HTTP operation is done in the background. \fB::http::geturl\fR returns immediately after generating the HTTP request and the callback is invoked @@ -75,7 +75,7 @@ applications, the caller can use \fB::http::wait\fR after calling \fB::http::geturl\fR to start the event loop. .SH COMMANDS .TP -\fB::http::config\fP ?\fIoptions\fR? +\fB::http::config\fR ?\fIoptions\fR? The \fB::http::config\fR command is used to set and query the name of the proxy server and port, and the User-Agent name used in the HTTP requests. If no options are specified, then the current configuration @@ -85,20 +85,20 @@ that setting is returned. Otherwise, the options should be a set of flags and values that define the configuration: .RS .TP -\fB\-accept\fP \fImimetypes\fP +\fB\-accept\fR \fImimetypes\fR The Accept header of the request. The default is */*, which means that 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, "image/gif, image/jpeg, text/*". .TP -\fB\-proxyhost\fP \fIhostname\fP +\fB\-proxyhost\fR \fIhostname\fR The name of the proxy host, if any. If this value is the empty string, the URL host is contacted directly. .TP -\fB\-proxyport\fP \fInumber\fP +\fB\-proxyport\fR \fInumber\fR The proxy port number. .TP -\fB\-proxyfilter\fP \fIcommand\fP +\fB\-proxyfilter\fR \fIcommand\fR The command is a callback that is made during \fB::http::geturl\fR to determine if a proxy is required for a given host. One argument, a @@ -109,7 +109,7 @@ an empty list. The default filter returns the values of the \fB\-proxyhost\fR and \fB\-proxyport\fR settings if they are non-empty. .TP -\fB\-urlencoding\fP \fIencoding\fP +\fB\-urlencoding\fR \fIencoding\fR The \fIencoding\fR used for creating the x-url-encoded URLs with \fB::http::formatQuery\fR. The default is \fButf-8\fR, as specified by RFC 2718. Prior to http 2.5 this was unspecified, and that behavior can be @@ -118,12 +118,12 @@ returned by specifying the empty string (\fB{}\fR), although \fB::http::formatQuery\fR throwing an error processing non-latin-1 characters. .TP -\fB\-useragent\fP \fIstring\fP +\fB\-useragent\fR \fIstring\fR The value of the User-Agent header in the HTTP request. The default is \fB"Tcl http client package 2.4."\fR .RE .TP -\fB::http::geturl\fP \fIurl\fP ?\fIoptions\fP? +\fB::http::geturl\fR \fIurl\fR ?\fIoptions\fR? The \fB::http::geturl\fR command is the main procedure in the package. The \fB\-query\fR option causes a POST operation and the \fB\-validate\fR option causes a HEAD operation; @@ -136,25 +136,25 @@ that is invoked when the HTTP transaction completes. \fB::http::geturl\fR takes several options: .RS .TP -\fB\-binary\fP \fIboolean\fP +\fB\-binary\fR \fIboolean\fR 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 \fBcompress\fR is considered binary data). .TP -\fB\-blocksize\fP \fIsize\fP +\fB\-blocksize\fR \fIsize\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). .TP -\fB\-channel\fP \fIname\fP +\fB\-channel\fR \fIname\fR Copy the URL contents to channel \fIname\fR instead of saving it in \fBstate(body)\fR. .TP -\fB\-command\fP \fIcallback\fP -Invoke \fIcallback\fP after the HTTP transaction completes. -This option causes \fB::http::geturl\fP to return immediately. -The \fIcallback\fP gets an additional argument that is the \fItoken\fR returned +\fB\-command\fR \fIcallback\fR +Invoke \fIcallback\fR after the HTTP transaction completes. +This option causes \fB::http::geturl\fR to return immediately. +The \fIcallback\fR gets an additional argument that is the \fItoken\fR returned from \fB::http::geturl\fR. This token is the name of an array that is described in the STATE ARRAY section. Here is a template for the callback: @@ -167,8 +167,8 @@ proc httpCallback {token} { .CE .RE .TP -\fB\-handler\fP \fIcallback\fP -Invoke \fIcallback\fP whenever HTTP data is available; if present, nothing +\fB\-handler\fR \fIcallback\fR +Invoke \fIcallback\fR whenever HTTP data is available; if present, nothing else will be done with the HTTP data. This procedure gets two additional arguments: the socket for the HTTP data and the \fItoken\fR returned from \fB::http::geturl\fR. The token is the name of a global array that is described @@ -187,7 +187,7 @@ proc httpHandlerCallback {socket token} { .CE .RE .TP -\fB\-headers\fP \fIkeyvaluelist\fP +\fB\-headers\fR \fIkeyvaluelist\fR This option is used to add extra headers to the HTTP request. The \fIkeyvaluelist\fR argument must be a list with an even number of elements that alternate between keys and values. The keys become @@ -199,7 +199,7 @@ HTTP request: Pragma: no-cache .CE .TP -\fB\-progress\fP \fIcallback\fP +\fB\-progress\fR \fIcallback\fR The \fIcallback\fR is made after each transfer of data from the URL. The callback gets three additional arguments: the \fItoken\fR from \fB::http::geturl\fR, the expected total size of the contents from the @@ -215,13 +215,13 @@ proc httpProgress {token total current} { .CE .RE .TP -\fB\-query\fP \fIquery\fP +\fB\-query\fR \fIquery\fR This flag causes \fB::http::geturl\fR to do a POST request that passes the \fIquery\fR to the server. The \fIquery\fR must be an x-url-encoding formatted query. The \fB::http::formatQuery\fR procedure can be used to do the formatting. .TP -\fB\-queryblocksize\fP \fIsize\fP +\fB\-queryblocksize\fR \fIsize\fR The block size used when posting query data to the URL. At most \fIsize\fR @@ -229,35 +229,35 @@ bytes are written at once. After each block, a call to the \fB\-queryprogress\fR callback is made (if that option is specified). .TP -\fB\-querychannel\fP \fIchannelID\fP +\fB\-querychannel\fR \fIchannelID\fR This flag causes \fB::http::geturl\fR to do a POST request that passes the data contained in \fIchannelID\fR to the server. The data contained in \fIchannelID\fR must be an x-url-encoding -formatted query unless the \fB\-type\fP option below is used. +formatted query unless the \fB\-type\fR option below is used. If a Content-Length 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. .TP -\fB\-queryprogress\fP \fIcallback\fP +\fB\-queryprogress\fR \fIcallback\fR The \fIcallback\fR is made after each transfer of data to the URL (i.e. POST) and acts exactly like the \fB\-progress\fR option (the callback format is the same). .TP -\fB\-timeout\fP \fImilliseconds\fP +\fB\-timeout\fR \fImilliseconds\fR If \fImilliseconds\fR is non-zero, then \fB::http::geturl\fR sets up a timeout to occur after the specified number of milliseconds. -A timeout results in a call to \fB::http::reset\fP and to -the \fB-command\fP callback, if specified. -The return value of \fB::http::status\fP is \fBtimeout\fP +A timeout results in a call to \fB::http::reset\fR and to +the \fB-command\fR callback, if specified. +The return value of \fB::http::status\fR is \fBtimeout\fR after a timeout has occurred. .TP -\fB\-type\fP \fImime-type\fP +\fB\-type\fR \fImime-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. .TP -\fB\-validate\fP \fIboolean\fP +\fB\-validate\fR \fIboolean\fR If \fIboolean\fR is non-zero, then \fB::http::geturl\fR does an HTTP HEAD request. This request returns meta information about the URL, but the contents are not returned. The meta information is available in the @@ -265,62 +265,62 @@ contents are not returned. The meta information is available in the ARRAY section for details. .RE .TP -\fB::http::formatQuery\fP \fIkey value\fP ?\fIkey value\fP ...? +\fB::http::formatQuery\fR \fIkey value\fR ?\fIkey value\fR ...? This procedure does x-url-encoding of query data. It takes an even 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. .TP -\fB::http::reset\fP \fItoken\fP ?\fIwhy\fP? +\fB::http::reset\fR \fItoken\fR ?\fIwhy\fR? This command resets the HTTP transaction identified by \fItoken\fR, if -any. This sets the \fBstate(status)\fP value to \fIwhy\fP, which defaults to \fBreset\fR, and then calls the registered \fB\-command\fR callback. +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. .TP -\fB::http::wait\fP \fItoken\fP +\fB::http::wait\fR \fItoken\fR This is a convenience procedure that blocks and waits for the transaction to complete. This only works in trusted code because it uses \fBvwait\fR. Also, it's not useful for the case where -\fB::http::geturl\fP is called \fIwithout\fP the \fB-command\fP option -because in this case the \fB::http::geturl\fP call doesn't return +\fB::http::geturl\fR is called \fIwithout\fR the \fB-command\fR option +because in this case the \fB::http::geturl\fR call doesn't return until the HTTP transaction is complete, and thus there's nothing to wait for. .TP -\fB::http::data\fP \fItoken\fP -This is a convenience procedure that returns the \fBbody\fP element +\fB::http::data\fR \fItoken\fR +This is a convenience procedure that returns the \fBbody\fR element (i.e., the URL data) of the state array. .TP -\fB::http::error\fP \fItoken\fP -This is a convenience procedure that returns the \fBerror\fP element +\fB::http::error\fR \fItoken\fR +This is a convenience procedure that returns the \fBerror\fR element of the state array. .TP -\fB::http::status\fP \fItoken\fP -This is a convenience procedure that returns the \fBstatus\fP element of +\fB::http::status\fR \fItoken\fR +This is a convenience procedure that returns the \fBstatus\fR element of the state array. .TP -\fB::http::code\fP \fItoken\fP -This is a convenience procedure that returns the \fBhttp\fP element of the +\fB::http::code\fR \fItoken\fR +This is a convenience procedure that returns the \fBhttp\fR element of the state array. .TP -\fB::http::ncode\fP \fItoken\fP +\fB::http::ncode\fR \fItoken\fR This is a convenience procedure that returns just the numeric return -code (200, 404, etc.) from the \fBhttp\fP element of the state array. +code (200, 404, etc.) from the \fBhttp\fR element of the state array. .TP -\fB::http::size\fP \fItoken\fP -This is a convenience procedure that returns the \fBcurrentsize\fP +\fB::http::size\fR \fItoken\fR +This is a convenience procedure that returns the \fBcurrentsize\fR element of the state array, which represents the number of bytes -received from the URL in the \fB::http::geturl\fP call. +received from the URL in the \fB::http::geturl\fR call. .TP -\fB::http::cleanup\fP \fItoken\fP +\fB::http::cleanup\fR \fItoken\fR This procedure cleans up the state associated with the connection -identified by \fItoken\fP. After this call, the procedures -like \fB::http::data\fP cannot be used to get information -about the operation. It is \fIstrongly\fP recommended that you call +identified by \fItoken\fR. After this call, the procedures +like \fB::http::data\fR cannot be used to get information +about the operation. It is \fIstrongly\fR recommended that you call this function after you're done with a given HTTP request. Not doing so will result in memory not being freed, and if your app calls -\fB::http::geturl\fP enough times, the memory leak could cause a +\fB::http::geturl\fR enough times, the memory leak could cause a performance hit...or worse. .TP -\fB::http::register\fP \fIproto port command\fP +\fB::http::register\fR \fIproto port command\fR This procedure allows one to provide custom HTTP transport types such as HTTPS, by registering a prefix, the default port, and the command to execute to create the Tcl \fBchannel\fR. E.g.: @@ -335,12 +335,12 @@ set token [::http::geturl https://my.secure.site/] .CE .RE .TP -\fB::http::unregister\fP \fIproto\fP +\fB::http::unregister\fR \fIproto\fR This procedure unregisters a protocol handler that was previously registered via \fB::http::register\fR. .SH "ERRORS" -The \fB::http::geturl\fP procedure will raise errors in the following cases: +The \fB::http::geturl\fR procedure will raise errors in the following cases: invalid command line options, an invalid URL, a URL on a non-existent host, @@ -349,59 +349,59 @@ These errors mean that it cannot even start the network transaction. It will also raise an error if it gets an I/O error while writing out the HTTP request header. -For synchronous \fB::http::geturl\fP calls (where \fB-command\fP is +For synchronous \fB::http::geturl\fR calls (where \fB-command\fR is not specified), it will raise an error if it gets an I/O error while -reading the HTTP reply headers or data. Because \fB::http::geturl\fP +reading the HTTP reply headers or data. Because \fB::http::geturl\fR doesn't return a token in these cases, it does all the required cleanup and there's no issue of your app having to call -\fB::http::cleanup\fP. +\fB::http::cleanup\fR. .PP -For asynchronous \fB::http::geturl\fP calls, all of the above error +For asynchronous \fB::http::geturl\fR calls, all of the above error situations apply, except that if there's any error while reading the HTTP reply headers or data, no exception is thrown. This is because -after writing the HTTP headers, \fB::http::geturl\fP returns, and the +after writing the HTTP headers, \fB::http::geturl\fR returns, and the rest of the HTTP transaction occurs in the background. The command callback can check if any error occurred during the read by calling -\fB::http::status\fP to check the status and if its \fIerror\fP, -calling \fB::http::error\fP to get the error message. +\fB::http::status\fR to check the status and if its \fIerror\fR, +calling \fB::http::error\fR to get the error message. .PP Alternatively, if the main program flow reaches a point where it needs to know the result of the asynchronous HTTP request, it can call -\fB::http::wait\fP and then check status and error, just as the +\fB::http::wait\fR and then check status and error, just as the callback does. .PP In any case, you must still call -\fB::http::cleanup\fP to delete the state array when you're done. +\fB::http::cleanup\fR to delete the state array when you're done. .PP There are other possible results of the HTTP transaction -determined by examining the status from \fB::http::status\fP. +determined by examining the status from \fB::http::status\fR. These are described below. .TP ok -If the HTTP transaction completes entirely, then status will be \fBok\fP. -However, you should still check the \fB::http::code\fP value to get -the HTTP status. The \fB::http::ncode\fP procedure provides just -the numeric error (e.g., 200, 404 or 500) while the \fB::http::code\fP +If the HTTP transaction completes entirely, then status will be \fBok\fR. +However, you should still check the \fB::http::code\fR value to get +the HTTP status. The \fB::http::ncode\fR procedure provides just +the numeric error (e.g., 200, 404 or 500) while the \fB::http::code\fR procedure returns a value like "HTTP 404 File not found". .TP eof If the server closes the socket without replying, then no error -is raised, but the status of the transaction will be \fBeof\fP. +is raised, but the status of the transaction will be \fBeof\fR. .TP error -The error message will also be stored in the \fBerror\fP status -array element, accessible via \fB::http::error\fP. +The error message will also be stored in the \fBerror\fR status +array element, accessible via \fB::http::error\fR. .PP -Another error possibility is that \fB::http::geturl\fP is unable to +Another error possibility is that \fB::http::geturl\fR is unable to write all the post query data to the server before the server responds and closes the socket. -The error message is saved in the \fBposterror\fP status array -element and then \fB::http::geturl\fP attempts to complete the +The error message is saved in the \fBposterror\fR status array +element and then \fB::http::geturl\fR attempts to complete the transaction. If it can read the server's response -it will end up with an \fBok\fP status, otherwise it will have -an \fBeof\fP status. +it will end up with an \fBok\fR status, otherwise it will have +an \fBeof\fR status. .SH "STATE ARRAY" The \fB::http::geturl\fR procedure returns a \fItoken\fR that can be used to @@ -412,14 +412,14 @@ upvar #0 $token state .CE Once the data associated with the URL is no longer needed, the state array should be unset to free up storage. -The \fB::http::cleanup\fP procedure is provided for that purpose. +The \fB::http::cleanup\fR procedure is provided for that purpose. The following elements of the array are supported: .RS .TP \fBbody\fR The contents of the URL. This will be empty if the \fB\-channel\fR -option has been specified. This value is returned by the \fB::http::data\fP command. +option has been specified. This value is returned by the \fB::http::data\fR command. .TP \fBcharset\fR The value of the charset attribute from the \fBContent-Type\fR meta-data @@ -432,7 +432,7 @@ A copy of the \fBContent-Encoding\fR meta-data value. .TP \fBcurrentsize\fR The current number of bytes fetched from the URL. -This value is returned by the \fB::http::size\fP command. +This value is returned by the \fB::http::size\fR command. .TP \fBerror\fR If defined, this is the error string seen when the HTTP transaction @@ -440,10 +440,10 @@ was aborted. .TP \fBhttp\fR The HTTP status reply from the server. This value -is returned by the \fB::http::code\fP command. The format of this value is: +is returned by the \fB::http::code\fR command. The format of this value is: .RS .CS -\fIHTTP/1.0 code string\fP +\fIHTTP/1.0 code string\fR .CE The \fIcode\fR is a three-digit number defined in the HTTP standard. A code of 200 is OK. Codes beginning with 4 or 5 indicate errors. @@ -483,7 +483,7 @@ the post query data to the server. .TP \fBstatus\fR Either \fBok\fR, for successful completion, \fBreset\fR for -user-reset, \fBtimeout\fP if a timeout occurred before the transaction +user-reset, \fBtimeout\fR if a timeout occurred before the transaction could complete, or \fBerror\fR for an error condition. During the transaction this value is the empty string. .TP diff --git a/doc/library.n b/doc/library.n index 8845ef8..d4ba1d8 100644 --- a/doc/library.n +++ b/doc/library.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: library.n,v 1.17 2004/06/16 21:20:42 dgp Exp $ +'\" RCS: @(#) $Id: library.n,v 1.18 2006/11/15 09:23:01 dkf Exp $ .so man.macros .TH library n "8.0" Tcl "Tcl Built-In Commands" .BS @@ -173,18 +173,18 @@ This is a standard search procedure for use by extensions during their initialization. They call this procedure to look for their script library in several standard directories. The last component of the name of the library directory is -normally \fIbasenameversion\fP +normally \fIbasenameversion\fR (e.g., tk8.0), but it might be "library" when in the build hierarchies. The \fIinitScript\fR file will be sourced into the interpreter once it is found. The directory in which this file is found is -stored into the global variable \fIvarName\fP. +stored into the global variable \fIvarName\fR. If this variable is already defined (e.g., by C code during application initialization) then no searching is done. Otherwise the search looks in these directories: -the directory named by the environment variable \fIenVarName\fP; +the directory named by the environment variable \fIenVarName\fR; relative to the Tcl library directory; relative to the executable file in the standard installation -bin or bin/\fIarch\fP directory; +bin or bin/\fIarch\fR directory; relative to the executable file in the current build tree; relative to the executable file in a parallel build tree. .TP diff --git a/doc/lindex.n b/doc/lindex.n index 10981c1..b99427e 100644 --- a/doc/lindex.n +++ b/doc/lindex.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lindex.n,v 1.11 2005/05/10 18:34:00 kennykb Exp $ +'\" RCS: @(#) $Id: lindex.n,v 1.12 2006/11/15 09:23:01 dkf Exp $ '\" .so man.macros .TH lindex n 8.4 Tcl "Tcl Built-In Commands" @@ -19,8 +19,8 @@ lindex \- Retrieve an element from a list .BE .SH DESCRIPTION .PP -The \fBlindex\fP command accepts a parameter, \fIlist\fP, which -it treats as a Tcl list. It also accepts zero or more \fIindices\fP into +The \fBlindex\fR command accepts a parameter, \fIlist\fR, which +it treats as a Tcl list. It also accepts zero or more \fIindices\fR into the list. The indices may be presented either consecutively on the command line, or grouped in a Tcl list and presented as a single argument. diff --git a/doc/lrepeat.n b/doc/lrepeat.n index d5c6d9a..4bda99c 100644 --- a/doc/lrepeat.n +++ b/doc/lrepeat.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lrepeat.n,v 1.1 2003/08/11 13:26:13 dkf Exp $ +'\" RCS: @(#) $Id: lrepeat.n,v 1.2 2006/11/15 09:23:01 dkf Exp $ '\" .so man.macros .TH lrepeat n 8.5 Tcl "Tcl Built-In Commands" @@ -17,10 +17,10 @@ lrepeat \- Build a list by repeating elements .BE .SH DESCRIPTION .PP -The \fBlrepeat\fP command creates a list of size \fInumber * number of -elements\fP by repeating \fInumber\fR times the sequence of elements -\fIelement1 element2 ...\fR. \fInumber\fP must be a positive integer, -\fIelementn\fP can be any Tcl value. Note that \fBlrepeat 1 arg ...\fR +The \fBlrepeat\fR command creates a list of size \fInumber * number of +elements\fR by repeating \fInumber\fR times the sequence of elements +\fIelement1 element2 ...\fR. \fInumber\fR must be a positive integer, +\fIelementn\fR can be any Tcl value. Note that \fBlrepeat 1 arg ...\fR is identical to \fBlist arg ...\fR, though the \fIarg\fR is required with \fBlrepeat\fR. .SH EXAMPLES diff --git a/doc/lreverse.n b/doc/lreverse.n index 6c10274..932b2d9 100644 --- a/doc/lreverse.n +++ b/doc/lreverse.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: lreverse.n,v 1.1 2006/11/09 15:19:03 dkf Exp $ +'\" RCS: @(#) $Id: lreverse.n,v 1.2 2006/11/15 09:23:02 dkf Exp $ '\" .so man.macros .TH lreverse n 8.5 Tcl "Tcl Built-In Commands" @@ -17,12 +17,12 @@ lreverse \- Reverse the order of a list .BE .SH DESCRIPTION .PP -The \fBlreverse\fP command returns a list that has the same elements as its -input list, \fIlist\fP, except with the elements in the reverse order. +The \fBlreverse\fR command returns a list that has the same elements as its +input list, \fIlist\fR, except with the elements in the reverse order. .SH EXAMPLES .CS -\fBlreverse\fP {a a b c} => c b a a -\fBlreverse\fP {a b {c d} e f} => f e {c d} b a +\fBlreverse\fR {a a b c} => c b a a +\fBlreverse\fR {a b {c d} e f} => f e {c d} b a .CE .SH "SEE ALSO" list(n), lsearch(n), lsort(n) diff --git a/doc/pkgMkIndex.n b/doc/pkgMkIndex.n index 28b3a2f..6be6de5 100644 --- a/doc/pkgMkIndex.n +++ b/doc/pkgMkIndex.n @@ -4,7 +4,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.17 2005/05/10 18:34:02 kennykb Exp $ +'\" RCS: @(#) $Id: pkgMkIndex.n,v 1.18 2006/11/15 09:23:02 dkf Exp $ '\" .so man.macros .TH pkg_mkIndex n 8.3 Tcl "Tcl Built-In Commands" @@ -51,7 +51,7 @@ and new commands appear (this is why it is essential to have in the files, as described above). If you have a package split among scripts and binary files, or if you have dependencies among files, -you may have to use the \fB\-load\fP option +you may have to use the \fB\-load\fR option or adjust the order in which \fBpkg_mkIndex\fR processes the files. See COMPLEX CASES below. @@ -110,17 +110,17 @@ the use of \fIauto_reset\fR, and therefore its use is discouraged. .TP 15 \fB\-load \fIpkgPat\fR The index process will pre-load any packages that exist in the -current interpreter and match \fIpkgPat\fP into the slave interpreter used to +current interpreter and match \fIpkgPat\fR into the slave interpreter used to generate the index. The pattern match uses string match rules, but without making case distinctions. See COMPLEX CASES below. .TP 15 \fB\-verbose\fR Generate output during the indexing process. Output is via -the \fBtclLog\fP procedure, which by default prints to stderr. +the \fBtclLog\fR procedure, which by default prints to stderr. .TP 15 \fB\-\-\fR -End of the flags, in case \fIdir\fP begins with a dash. +End of the flags, in case \fIdir\fR begins with a dash. .SH "PACKAGES AND THE AUTO-LOADER" .PP @@ -188,28 +188,28 @@ with some glob patterns. .PP In general, it is OK for scripts to have dependencies on other packages. -If scripts contain \fBpackage require\fP commands, these are +If scripts contain \fBpackage require\fR commands, these are stubbed out in the interpreter used to process the scripts, so these do not cause problems. If scripts call into other packages in global code, -these calls are handled by a stub \fBunknown\fP command. +these calls are handled by a stub \fBunknown\fR command. However, if scripts make variable references to other package's variables in global code, these will cause errors. That is also bad coding style. .PP If binary files have dependencies on other packages, things can become tricky because it is not possible to stub out -C-level APIs such as \fBTcl_PkgRequire\fP API +C-level APIs such as \fBTcl_PkgRequire\fR API when loading a binary file. For example, suppose the BLT package requires Tk, and expresses -this with a call to \fBTcl_PkgRequire\fP in its \fBBlt_Init\fP routine. +this with a call to \fBTcl_PkgRequire\fR in its \fBBlt_Init\fR routine. To support this, you must run \fBpkg_mkIndex\fR in an interpreter that has Tk loaded. You can achieve this with the \fB\-load \fIpkgPat\fR option. If you specify this option, \fBpkg_mkIndex\fR will load any packages listed by -\fBinfo loaded\fP and that match \fIpkgPat\fP +\fBinfo loaded\fR and that match \fIpkgPat\fR into the interpreter used to process files. -In most cases this will satisfy the \fBTcl_PkgRequire\fP calls +In most cases this will satisfy the \fBTcl_PkgRequire\fR calls made by binary files. .PP If you are indexing two binary files and one depends on the other, @@ -219,14 +219,14 @@ and then the package it provides will be available when the second file is processed. You may also need to load the first package into the temporary interpreter used to create the index by using -the \fB\-load\fP flag; +the \fB\-load\fR flag; it won't hurt to specify package patterns that are not yet loaded. .PP If you have a package that is split across scripts and a binary file, -then you should avoid the \fB\-load\fP flag. The problem is that +then you should avoid the \fB\-load\fR flag. The problem is that if you load a package before computing the index it masks any other files that provide part of the same package. -If you must use \fB\-load\fP, +If you must use \fB\-load\fR, then you must specify the scripts first; otherwise the package loaded from the binary file may mask the package defined by the scripts. diff --git a/doc/re_syntax.n b/doc/re_syntax.n index c3a06cc..334375c 100644 --- a/doc/re_syntax.n +++ b/doc/re_syntax.n @@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: re_syntax.n,v 1.8 2005/05/10 18:34:02 kennykb Exp $ +'\" RCS: @(#) $Id: re_syntax.n,v 1.9 2006/11/15 09:23:02 dkf Exp $ '\" .so man.macros .TH re_syntax n "8.1" Tcl "Tcl Built-In Commands" @@ -182,7 +182,7 @@ illustration.) .PP For example, assume the collating sequence includes a \fBch\fR multi-character collating element. Then the RE \fB[[.ch.]]*c\fR (zero -or more \fBch\fP's followed by \fBc\fP) matches the first five +or more \fBch\fR's followed by \fBc\fR) matches the first five characters of `\fBchchcc\fR'. Also, the RE \fB[^c]b\fR matches all of `\fBchb\fR' (because \fB[^c]\fR matches the multi-character \fBch\fR). .PP |