summaryrefslogtreecommitdiffstats
path: root/generic/tclIORTrans.c
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2009-09-01 17:31:53 (GMT)
committerandreas_kupries <akupries@shaw.ca>2009-09-01 17:31:53 (GMT)
commite2f9593018e694ea4db44610c096ba4df5a3a3d3 (patch)
tree8f6a70bc1b10b0364c68addf1016a1a340384400 /generic/tclIORTrans.c
parentfba4c630a694890fb444eb5ca69f54ebc2bc4c13 (diff)
downloadtcl-e2f9593018e694ea4db44610c096ba4df5a3a3d3.zip
tcl-e2f9593018e694ea4db44610c096ba4df5a3a3d3.tar.gz
tcl-e2f9593018e694ea4db44610c096ba4df5a3a3d3.tar.bz2
* generic/tclIORTrans.c (ReflectInput): Remove error response to
0-result from method 'limit?' of transformations. Return the number of copied bytes instead, which is possibly nothing. The latter then triggers EOF handling in the higher layers, making the 0-result of limit? the way to inject artificial EOF's into the data stream.
Diffstat (limited to 'generic/tclIORTrans.c')
-rw-r--r--generic/tclIORTrans.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/generic/tclIORTrans.c b/generic/tclIORTrans.c
index 2cf38b1..cb91829 100644
--- a/generic/tclIORTrans.c
+++ b/generic/tclIORTrans.c
@@ -15,7 +15,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIORTrans.c,v 1.8 2009/01/22 00:11:24 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclIORTrans.c,v 1.9 2009/09/01 17:31:53 andreas_kupries Exp $
*/
#include <tclInt.h>
@@ -424,8 +424,6 @@ static void DeleteReflectedTransformMap(ClientData clientData,
* list-quoting to keep the words of the message together. See also [x].
*/
-static const char *msg_read_badlimit =
- "{Tcl driver returned bad read limit '0'}";
static const char *msg_read_unsup = "{read not supported by Tcl driver}";
static const char *msg_write_unsup = "{write not supported by Tcl driver}";
#ifdef TCL_THREADS
@@ -1112,8 +1110,7 @@ ReflectInput(
return -1;
}
if (maxRead == 0) {
- SetChannelErrorStr(rtPtr->chan, msg_read_badlimit);
- return -1;
+ return gotBytes;
} else if (maxRead > 0) {
if (maxRead < toRead) {
toRead = maxRead;