Index: ChangeLog
===================================================================
RCS file: /cvsroot/tcl/tcl/ChangeLog,v
retrieving revision 1.635
diff -u -r1.635 ChangeLog
--- ChangeLog	2001/09/27 02:12:19	1.635
+++ ChangeLog	2001/09/27 05:47:56
@@ -1,11 +1,19 @@
 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
 	  the OS could be notified of blocking-behaviour. Because of this
 	  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
Index: doc/fileevent.n
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/fileevent.n,v
retrieving revision 1.4
diff -u -r1.4 fileevent.n
--- doc/fileevent.n	2001/09/14 19:20:40	1.4
+++ doc/fileevent.n	2001/09/27 05:47:56
@@ -101,6 +101,21 @@
 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
