Tcl Source Code

Artifact [08fa227fad]
Login

Artifact 08fa227fad767a45dec4f2c5d9dda564336571a6:

Attachment "219250.diff.1" to ticket [219250ffff] added by andreas_kupries 2001-09-15 02:18:19.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.610
diff -u -r1.610 ChangeLog
--- ChangeLog	2001/09/13 19:58:35	1.610
+++ ChangeLog	2001/09/14 18:53:27
@@ -1,8 +1,25 @@
+2001-09-13  Andreas Kupries <[email protected]>
+
+	* doc/gets.n: 
+	* doc/read.n: 
+	* doc/puts.n: 
+	* doc/flush.n: 
+	* doc/fconfigure.n: 
+	* doc/flush.n: 
+	* doc/eof.n: 
+	* doc/seek.n: 
+	* doc/tell.n: 
+	* doc/close.n: 
+	* doc/fileevent.n: Added references to the Tcl standard
+	  channels. Item [219250], reported by David LeBlanc
+	  <[email protected]>. Thanks to Christopher Nelson
+	  <[email protected]> for doing editorial work.
+
 2001-09-13  Jeff Hobbs  <[email protected]>
 
 	* ChangeLog.1999:
 	* ChangeLog: broke changes from 199x into ChangeLog.1999 to reduce
-	size of the main ChangeLog.
+	  size of the main ChangeLog.
 
 2001-09-13  Andreas Kupries <[email protected]>
 
Index: doc/close.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/close.n,v
retrieving revision 1.3
diff -u -r1.3 close.n
--- doc/close.n	2000/09/07 14:27:46	1.3
+++ doc/close.n	2001/09/14 18:53:27
@@ -19,9 +19,15 @@
 
 .SH DESCRIPTION
 .PP
-Closes the channel given by \fIchannelId\fR.  \fIChannelId\fR must be a
-channel identifier such as the return value from a previous \fBopen\fR
-or \fBsocket\fR command.
+Closes the channel given by \fIchannelId\fR.
+.PP
+.VS
+\fIChannelId\fR must be an identifier for an open channel such as a
+Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR),
+the return value from an invocation of \fBopen\fR or \fBsocket\fR, or
+the result of a channel creation command provided by a Tcl extension.
+.VE
+.PP
 All buffered output is flushed to the channel's output device,
 any buffered input is discarded, the underlying file or device is closed,
 and \fIchannelId\fR becomes unavailable for use.
@@ -56,7 +62,7 @@
 an error occurs while flushing output.
 
 .SH "SEE ALSO"
-file(n), open(n), socket(n), eof(n)
+file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3)
 
 .SH KEYWORDS
 blocking, channel, close, nonblocking
Index: doc/eof.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/eof.n,v
retrieving revision 1.3
diff -u -r1.3 eof.n
--- doc/eof.n	2000/09/07 14:27:47	1.3
+++ doc/eof.n	2001/09/14 18:53:27
@@ -22,9 +22,16 @@
 Returns 1 if an end of file condition occurred during the most
 recent input operation on \fIchannelId\fR (such as \fBgets\fR),
 0 otherwise.
+.PP
+.VS
+\fIChannelId\fR must be an identifier for an open channel such as a
+Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR),
+the return value from an invocation of \fBopen\fR or \fBsocket\fR, or
+the result of a channel creation command provided by a Tcl extension.
+.VE
 
 .SH "SEE ALSO"
-file(n), open(n), close(n), fblocked(n)
+file(n), open(n), close(n), fblocked(n), Tcl_StandardChannels(3)
 
 .SH KEYWORDS
 channel, end of file
Index: doc/fblocked.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/fblocked.n,v
retrieving revision 1.3
diff -u -r1.3 fblocked.n
--- doc/fblocked.n	2000/09/07 14:27:47	1.3
+++ doc/fblocked.n	2001/09/14 18:53:27
@@ -25,9 +25,15 @@
 returns an empty string and a subsequent call to \fBfblocked\fR will
 return 1.
 .PP
+.VS
+\fIChannelId\fR must be an identifier for an open channel such as a
+Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR),
+the return value from an invocation of \fBopen\fR or \fBsocket\fR, or
+the result of a channel creation command provided by a Tcl extension.
+.VE
 
 .SH "SEE ALSO"
-gets(n), open(n), read(n)
+gets(n), open(n), read(n), Tcl_StandardChannels(3)
 
 .SH KEYWORDS
 blocking, nonblocking
Index: doc/fconfigure.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/fconfigure.n,v
retrieving revision 1.4
diff -u -r1.4 fconfigure.n
--- doc/fconfigure.n	1999/07/07 18:59:52	1.4
+++ doc/fconfigure.n	2001/09/14 18:53:28
@@ -19,11 +19,18 @@
 \fBfconfigure \fIchannelId\fR \fIname value \fR?\fIname value ...\fR?
 .fi
 .BE
-
 .SH DESCRIPTION
 .PP
 The \fBfconfigure\fR command sets and retrieves options for channels.
-\fIChannelId\fR identifies the channel for which to set or query an option.
+.PP
+.VS
+\fIChannelId\fR identifies the channel for which to set or query an
+option and must refer to an open channel such as a Tcl standard
+channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR), the return
+value from an invocation of \fBopen\fR or \fBsocket\fR, or the result
+of a channel creation command provided by a Tcl extension.
+.VE
+.PP
 If no \fIname\fR or \fIvalue\fR arguments are supplied, the command
 returns a list containing alternating option names and values for the channel.
 If \fIname\fR is supplied but no \fIvalue\fR then the command returns
@@ -192,8 +199,20 @@
 .RE
 .PP
 
+.VS
+.SH "STANDARD CHANNELS"
+.PP
+The Tcl standard channels (\fBstdin\fR, \fBstdout\fR, and \fBstderr\fR)
+can be configured through this command like every other channel opened
+by the Tcl library. Beyond the standard options described above they
+will also support any special option according to their current type.
+If, for example, a Tcl application is started by the \fBinet\fR
+super-server common on Unix system its Tcl standard channels will be
+sockets and thus support the socket options.
+.VE
+
 .SH "SEE ALSO"
-close(n), flush(n), gets(n), puts(n), read(n), socket(n)
+close(n), flush(n), gets(n), puts(n), read(n), socket(n), Tcl_StandardChannels(3)
 
 .SH KEYWORDS
 blocking, buffering, carriage return, end of line, flushing, linemode,
Index: doc/fileevent.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/fileevent.n,v
retrieving revision 1.3
diff -u -r1.3 fileevent.n
--- doc/fileevent.n	2000/09/07 14:27:47	1.3
+++ doc/fileevent.n	2001/09/14 18:53:28
@@ -34,9 +34,14 @@
 tell when data is present and only invoke \fBgets\fR or \fBread\fR when
 they won't block.
 .PP
-The \fIchannelId\fR argument to \fBfileevent\fR refers to an open channel,
-such as the return value from a previous \fBopen\fR or \fBsocket\fR
-command.
+.VS
+The \fIchannelId\fR argument to \fBfileevent\fR refers to an open
+channel such as a Tcl standard channel (\fBstdin\fR, \fBstdout\fR,
+or \fBstderr\fR), the return value from an invocation of \fBopen\fR
+or \fBsocket\fR, or the result of a channel creation command provided
+by a Tcl extension.
+.VE
+.PP
 If the \fIscript\fR argument is specified, then \fBfileevent\fR
 creates a new event handler:  \fIscript\fR will be evaluated
 whenever the channel becomes readable or writable (depending on the
@@ -102,7 +107,7 @@
 by Mark Diekhans.
 
 .SH "SEE ALSO"
-bgerror(n), fconfigure(n), gets(n), puts(n), read(n)
+bgerror(n), fconfigure(n), gets(n), puts(n), read(n), Tcl_StandardChannels(3)
 
 .SH KEYWORDS
 asynchronous I/O, blocking, channel, event handler, nonblocking, readable,
Index: doc/flush.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/flush.n,v
retrieving revision 1.3
diff -u -r1.3 flush.n
--- doc/flush.n	2000/09/07 14:27:48	1.3
+++ doc/flush.n	2001/09/14 18:53:28
@@ -20,8 +20,15 @@
 .SH DESCRIPTION
 .PP
 Flushes any output that has been buffered for \fIchannelId\fR.
-\fIChannelId\fR must be a channel identifier such as returned by a previous
-\fBopen\fR or \fBsocket\fR command, and it must have been opened for writing.
+.PP
+.VS
+\fIChannelId\fR must be an identifier for an open channel such as a
+Tcl standard channel (\fBstdout\fR or \fBstderr\fR), the return
+value from an invocation of \fBopen\fR or \fBsocket\fR, or the result
+of a channel creation command provided by a Tcl extension.  The
+channel must have been opened for writing.
+.VE
+.PP
 If the channel is in blocking mode the command does not return until all the
 buffered output has been flushed to the channel. If the channel is in
 nonblocking mode, the command may return before all buffered output has been
@@ -29,7 +36,7 @@
 underlying file or device is able to absorb it.
 
 .SH "SEE ALSO"
-file(n), open(n), socket(n)
+file(n), open(n), socket(n), Tcl_StandardChannels(3)
 
 .SH KEYWORDS
 blocking, buffer, channel, flush, nonblocking, output
Index: doc/gets.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/gets.n,v
retrieving revision 1.3
diff -u -r1.3 gets.n
--- doc/gets.n	2000/09/07 14:27:48	1.3
+++ doc/gets.n	2001/09/14 18:53:28
@@ -22,6 +22,15 @@
 This command reads the next line from \fIchannelId\fR, returns everything
 in the line up to (but not including) the end-of-line character(s), and
 discards the end-of-line character(s).
+.PP
+.VS
+\fIChannelId\fR must be an identifier for an open channel such as the
+Tcl standard input channel (\fBstdin\fR), the return value from an
+invocation of \fBopen\fR or \fBsocket\fR, or the result of a channel
+creation command provided by a Tcl extension. The channel must have
+been opened for input.
+.VE
+.PP
 If \fIvarName\fR is omitted the line is returned as the result of the
 command.
 If \fIvarName\fR is specified then the line is placed in the variable by
@@ -44,7 +53,7 @@
 these three cases.
 
 .SH "SEE ALSO"
-file(n), eof(n), fblocked(n)
+file(n), eof(n), fblocked(n), Tcl_StandardChannels(3)
 
 .SH KEYWORDS
 blocking, channel, end of file, end of line, line, nonblocking, read
Index: doc/puts.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/puts.n,v
retrieving revision 1.4
diff -u -r1.4 puts.n
--- doc/puts.n	2000/09/07 14:27:50	1.4
+++ doc/puts.n	2001/09/14 18:53:28
@@ -21,9 +21,16 @@
 .PP
 Writes the characters given by \fIstring\fR to the channel given
 by \fIchannelId\fR.
-\fIChannelId\fR must be a channel identifier such as returned from a
-previous invocation of \fBopen\fR or \fBsocket\fR. It must have been opened
-for output. If no \fIchannelId\fR is specified then it defaults to
+.PP
+.VS
+\fIChannelId\fR must be an identifier for an open channel such as a
+Tcl standard channel (\fBstdout\fR or \fBstderr\fR), the return
+value from an invocation of \fBopen\fR or \fBsocket\fR, or the result
+of a channel creation command provided by a Tcl extension. The channel
+must have been opened for output.
+.VE
+.PP
+If no \fIchannelId\fR is specified then it defaults to
 \fBstdout\fR. \fBPuts\fR normally outputs a newline character after
 \fIstring\fR, but this feature may be suppressed by specifying the
 \fB\-nonewline\fR switch.
@@ -63,7 +70,7 @@
 via a file event that the channel is ready for more output data).
 
 .SH "SEE ALSO"
-file(n), fileevent(n)
+file(n), fileevent(n), Tcl_StandardChannels(3)
 
 .SH KEYWORDS
 channel, newline, output, write
Index: doc/read.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/read.n,v
retrieving revision 1.6
diff -u -r1.6 read.n
--- doc/read.n	2001/04/06 14:27:51	1.6
+++ doc/read.n	2001/09/14 18:53:28
@@ -32,6 +32,14 @@
 number of characters read may not be the same as the number of bytes
 read.
 .PP
+.VS
+\fIChannelId\fR must be an identifier for an open channel such as the
+Tcl standard input channel (\fBstdin\fR), the return value from an
+invocation of \fBopen\fR or \fBsocket\fR, or the result of a channel
+creation command provided by a Tcl extension. The channel must have
+been opened for input.
+.VE
+.PP
 If \fIchannelId\fR is in nonblocking mode, the command may not read as
 many characters as requested: once all available input has been read,
 the command will return the data that is available rather than
@@ -50,27 +58,25 @@
 
 .SH "USE WITH SERIAL PORTS"
 '\" Note:  this advice actually applies to many versions of Tcl
-.VS 8.4
+
 For most applications a channel connected to a serial port should be
 configured to be nonblocking: \fBfconfigure \fIchannelId \fB\-blocking
 \fI0\fR.  Then \fBread\fR behaves much like described above.  Care
 must be taken when using \fBread\fR on blocking serial ports:
 .TP
 \fBread \fIchannelId numChars\fR 
-. 
 In this form \fBread\fR blocks until \fInumChars\fR have been received
 from the serial port.
 .TP
 \fBread \fIchannelId\fR 
-. 
 In this form \fBread\fR blocks until the reception of the end-of-file
 character, see \fBfconfigure -eofchar\fR. If there no end-of-file
 character has been configured for the channel, then \fBread\fR will
 block forever.
-.VE
+
 
 .SH "SEE ALSO"
-file(n), eof(n), fblocked(n), fconfigure(n)
+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
Index: doc/seek.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/seek.n,v
retrieving revision 1.4
diff -u -r1.4 seek.n
--- doc/seek.n	2000/09/07 14:27:51	1.4
+++ doc/seek.n	2001/09/14 18:53:28
@@ -20,8 +20,14 @@
 .SH DESCRIPTION
 .PP
 Changes the current access position for \fIchannelId\fR.
-\fIChannelId\fR must be a channel identifier such as returned from a
-previous invocation of \fBopen\fR or \fBsocket\fR.
+.PP
+.VS
+\fIChannelId\fR must be an identifier for an open channel such as a
+Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR),
+the return value from an invocation of \fBopen\fR or \fBsocket\fR, or
+the result of a channel creation command provided by a Tcl extension.
+.VE
+.PP
 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
@@ -58,7 +64,7 @@
 .VE 8.1
 
 .SH "SEE ALSO"
-file(n), open(n), close(n), gets(n), tell(n)
+file(n), open(n), close(n), gets(n), tell(n), Tcl_StandardChannels(3)
  
 .SH KEYWORDS
 access position, file, seek
Index: doc/tell.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/tell.n,v
retrieving revision 1.4
diff -u -r1.4 tell.n
--- doc/tell.n	2000/09/07 14:27:52	1.4
+++ doc/tell.n	2001/09/14 18:53:28
@@ -27,9 +27,16 @@
 .VE 8.1
 The value returned is -1 for channels that do not support
 seeking.
+.PP
+.VS
+\fIChannelId\fR must be an identifier for an open channel such as a
+Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR),
+the return value from an invocation of \fBopen\fR or \fBsocket\fR, or
+the result of a channel creation command provided by a Tcl extension.
+.VE
 
 .SH "SEE ALSO"
-file(n), open(n), close(n), gets(n), seek(n)
+file(n), open(n), close(n), gets(n), seek(n), Tcl_StandardChannels(3)
 
 .SH KEYWORDS
 access position, channel, seeking