diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | generic/tclIO.c | 5 |
2 files changed, 14 insertions, 2 deletions
@@ -1,5 +1,16 @@ 2003-03-06 Mo DeJong <mdejong@users.sourceforge.net> + * 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. + +2003-03-06 Mo DeJong <mdejong@users.sourceforge.net> + * generic/tclIO.c (Tcl_GetsObj): Check that the eol pointer has not gone past the end of the string when in auto translation 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; } |