diff options
author | davygrvy <davygrvy@pobox.com> | 2004-06-01 18:44:16 (GMT) |
---|---|---|
committer | davygrvy <davygrvy@pobox.com> | 2004-06-01 18:44:16 (GMT) |
commit | 083c386bdc343d3e4550833dd3261f9ddb3ff399 (patch) | |
tree | 44b0c7d6b33158250c6dfed54c35d57dc5984bb5 /generic/tclIO.c | |
parent | bff524bfabd8dafc13a6263997fcfb7b8bed5f54 (diff) | |
download | tcl-083c386bdc343d3e4550833dd3261f9ddb3ff399.zip tcl-083c386bdc343d3e4550833dd3261f9ddb3ff399.tar.gz tcl-083c386bdc343d3e4550833dd3261f9ddb3ff399.tar.bz2 |
* generic/tclIO.c (Tcl_SetChannelOption): Took out the range
verification on -buffersize so original behavior for silently ignoring
bad settings is returned. The only difference now is the behavior
difference between atoi and Tcl_GetInt which gains the ability to
error for 'not a number' and can understand hexidecimal.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r-- | generic/tclIO.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index db6382b..919dfef 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.75 2004/06/01 10:00:21 davygrvy Exp $ + * RCS: @(#) $Id: tclIO.c,v 1.76 2004/06/01 18:44:16 davygrvy Exp $ */ #include "tclInt.h" @@ -6451,14 +6451,6 @@ Tcl_SetChannelOption(interp, chan, optionName, newValue) if (Tcl_GetInt(interp, newValue, &newBufferSize) == TCL_ERROR) { return TCL_ERROR; } - if (newBufferSize < 10 || newBufferSize > (1024 * 1024)) { - if (interp) { - Tcl_AppendResult(interp, "bad value for -buffersize: ", - "must not be less than 10 or greater than 1Mbyte.", - NULL); - } - return TCL_ERROR; - } Tcl_SetChannelBufferSize(chan, newBufferSize); } else if ((len > 2) && (optionName[1] == 'e') && (strncmp(optionName, "-encoding", len) == 0)) { |