summaryrefslogtreecommitdiffstats
path: root/doc/fconfigure.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-27 12:53:22 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-27 12:53:22 (GMT)
commit4c2d0f20bfa9108949678cf49bfdc58eedc7bb93 (patch)
treeb3ce80d2f183dc1bd02185c2bf44738b4377c9ed /doc/fconfigure.n
parentcd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07 (diff)
downloadtcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.zip
tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.tar.gz
tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.tar.bz2
More minor doc fixes
Diffstat (limited to 'doc/fconfigure.n')
-rw-r--r--doc/fconfigure.n18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/fconfigure.n b/doc/fconfigure.n
index dcea8cd..807ce90 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.10 2004/05/20 21:18:44 dkf Exp $
+'\" RCS: @(#) $Id: fconfigure.n,v 1.11 2004/10/27 12:53:22 dkf Exp $
'\"
.so man.macros
.TH fconfigure n 8.3 Tcl "Tcl Built-In Commands"
@@ -204,14 +204,14 @@ sockets and thus support the socket options.
Instruct Tcl to always send output to \fBstdout\fR immediately,
whether or not it is to a terminal:
.CS
-fconfigure stdout -buffering none
+\fBfconfigure\fR stdout -buffering none
.CE
-
+.PP
Open a socket and read lines from it without ever blocking the
processing of other events:
.CS
set s [socket some.where.com 12345]
-fconfigure $s -blocking 0
+\fBfconfigure\fR $s -blocking 0
fileevent $s readable "readMe $s"
proc readMe chan {
if {[gets $chan line] < 0} {
@@ -227,12 +227,12 @@ proc readMe chan {
}
}
.CE
-
+.PP
Read a PPM-format image from a file:
.CS
# Open the file and put it into Unix ASCII mode
set f [open teapot.ppm]
-fconfigure $f \-encoding ascii \-translation lf
+\fBfconfigure\fR $f \-encoding ascii \-translation lf
# Get the header
if {[gets $f] ne "P6"} {
@@ -249,12 +249,12 @@ while {[llength $words] < 3} {
}
# Those words supply the size of the image and its
-# overall depth per channel.
+# overall depth per channel. Assign to variables.
lassign $words xSize ySize depth
# Now switch to binary mode to pull in the data,
-# one byte per channel (red,gree,blue) per pixel.
-fconfigure $f \-translation binary
+# one byte per channel (red,green,blue) per pixel.
+\fBfconfigure\fR $f \-translation binary
set numDataBytes [expr {3 * $xSize * $ySize}]
set data [read $f $numDataBytes]