From 083c386bdc343d3e4550833dd3261f9ddb3ff399 Mon Sep 17 00:00:00 2001 From: davygrvy Date: Tue, 1 Jun 2004 18:44:16 +0000 Subject: * 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. --- generic/tclIO.c | 10 +--------- 1 file changed, 1 insertion(+), 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)) { -- cgit v0.12