summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-11-28 16:04:31 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-11-28 16:04:31 (GMT)
commite5d536c1d7d013348751b3d4b691d1fa772fe65a (patch)
treecabed87884364e8149d58283abf02c1ff2b0c668
parent924f22e2d958a5cc50eff2cd98862bf2270353b3 (diff)
downloadtcl-e5d536c1d7d013348751b3d4b691d1fa772fe65a.zip
tcl-e5d536c1d7d013348751b3d4b691d1fa772fe65a.tar.gz
tcl-e5d536c1d7d013348751b3d4b691d1fa772fe65a.tar.bz2
* generic/tclIO.c: Simplify test and improve accuracy of error
message in latest changes.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclIO.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 60eaa59..f2ffb27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-28 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/tclIO.c: Simplify test and improve accuracy of error
+ message in latest changes.
+
2007-11-28 Pat Thoyts <patthoyts@users.sourceforge.net>
* generic/tclIO.c: -eofchar must support no eofchar.
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 886a08e..5acef55 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.131 2007/11/28 01:11:52 patthoyts Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.132 2007/11/28 16:04:31 dgp Exp $
*/
#include "tclInt.h"
@@ -7318,11 +7318,10 @@ Tcl_SetChannelOption(
int outIndex = (argc - 1);
int inValue = (int) argv[0][0];
int outValue = (int) argv[outIndex][0];
- if ((inValue < 0 || inValue > 0x7f) || (outValue < 0 || outValue > 0x7f)) {
+ if (inValue & 0x80 || outValue & 0x80) {
if (interp) {
- Tcl_AppendResult(interp,
- "bad value for -eofchar: must be between 0 and 0x7f",
- NULL);
+ Tcl_AppendResult(interp, "bad value for -eofchar: ",
+ "must be non-NUL ASCII character", NULL);
}
ckfree((char *) argv);
return TCL_ERROR;