summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2001-09-27 05:50:56 (GMT)
committerandreas_kupries <akupries@shaw.ca>2001-09-27 05:50:56 (GMT)
commit8005a1ea0359cc32b78d70f77f91fbc6e73e58b5 (patch)
treeb2735d686a38fb6d792949148e4ee91cc365efa0
parentb60e127643bd0ad00cf457b77b1de6e0977f6b2c (diff)
downloadtcl-8005a1ea0359cc32b78d70f77f91fbc6e73e58b5.zip
tcl-8005a1ea0359cc32b78d70f77f91fbc6e73e58b5.tar.gz
tcl-8005a1ea0359cc32b78d70f77f91fbc6e73e58b5.tar.bz2
* doc/fileevent.n: Accepted [Patch #465279] adding an example to
the fileevent manpage. Minor modifications to get a better formatting. Report and patch by David N. Welton <davidw@users.sourceforge.net>.
-rw-r--r--ChangeLog8
-rw-r--r--doc/fileevent.n17
2 files changed, 24 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a3c241..ce7bb53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2001-09-26 Andreas Kupries <andreas_kupries@users.sourceforge.net>
+ * doc/fileevent.n: Accepted [Patch #465279] adding an example to
+ the fileevent manpage. Minor modifications to get a better
+ formatting. Report and patch by David N. Welton
+ <davidw@users.sourceforge.net>.
+
* The changes below fix [Bug #462317] where Expect tried to read
more than was in the buffers and then blocked in the OS call as
its pty channel driver provides no blockmodeproc through which
@@ -7,6 +12,9 @@
the general I/O core has to take more care than usual to
preserve the semantics of non-blocking channels.
+ The problem was reported by "Kevin O'Gorman"
+ <kevin@kosmanor.com>.
+
* generic/tclIO.c (Tcl_ReadRaw): Do not read from the driver if
the channel is non-blocking and the fileevent causing the read
was generated by a timer. We do not know if there is data
diff --git a/doc/fileevent.n b/doc/fileevent.n
index 037d361..8e82564 100644
--- a/doc/fileevent.n
+++ b/doc/fileevent.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: fileevent.n,v 1.4 2001/09/14 19:20:40 andreas_kupries Exp $
+'\" RCS: @(#) $Id: fileevent.n,v 1.5 2001/09/27 05:50:56 andreas_kupries Exp $
'\"
.so man.macros
.TH fileevent n 7.5 Tcl "Tcl Built-In Commands"
@@ -101,6 +101,21 @@ In addition, the file event handler is deleted if it ever returns
an error; this is done in order to prevent infinite loops due to
buggy handlers.
+.SH EXAMPLE
+.PP
+.CS
+ proc GetData {chan} {
+ if {![eof $chan]} {
+ puts [gets $chan]
+ }
+ }
+
+ fileevent $chan readable [list GetData $chan]
+
+.CE
+In this setup \fBGetData\fR will be called with the channel as an
+argument whenever $chan becomes readable.
+
.SH CREDITS
.PP
\fBfileevent\fR is based on the \fBaddinput\fR command created