diff options
author | mdejong <mdejong> | 2003-03-06 10:10:19 (GMT) |
---|---|---|
committer | mdejong <mdejong> | 2003-03-06 10:10:19 (GMT) |
commit | 532758ed47adda0642397dddb71185eb564a7432 (patch) | |
tree | e2d1fc5e8cd617983609e95e0c820f1d59f162d9 /generic/tclIO.c | |
parent | c2ce0bdf9e6f8693a01148c0a34d49020712fd65 (diff) | |
download | tcl-532758ed47adda0642397dddb71185eb564a7432.zip tcl-532758ed47adda0642397dddb71185eb564a7432.tar.gz tcl-532758ed47adda0642397dddb71185eb564a7432.tar.bz2 |
* generic/tclIO.c (Tcl_Flush): Compare the
nextAdded member of the ChannelBuffer to the
nextRemoved member to determine if any output
has been buffered. The previous check against
the value 0 seems to have just been a coding
error. See other methods like Tcl_OutputBuffered
for examples where nextAdded is compared to
nextRemoved to find the number of bytes buffered.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index 4ffcfb2..9f992f0 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIO.c,v 1.64 2003/03/06 09:58:44 mdejong Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.65 2003/03/06 10:10:24 mdejong Exp $ */ #include "tclInt.h" @@ -5118,7 +5118,8 @@ Tcl_Flush(chan) */ if ((statePtr->curOutPtr != NULL) - && (statePtr->curOutPtr->nextAdded > 0)) { + && (statePtr->curOutPtr->nextAdded > + statePtr->curOutPtr->nextRemoved)) { statePtr->flags |= BUFFER_READY; } |