summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-12 10:30:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-08-12 10:30:14 (GMT)
commit167c883c087ff89c46268d3b3a0067a8095704a5 (patch)
treed2c34f84614d25559afe802e89d03113abb2ca43
parenta6f978e38d8c7689dc1e15973c12df2d9f14756d (diff)
parent52549ae747613994a8ced4de9b567bc4cc09443f (diff)
downloadtcl-167c883c087ff89c46268d3b3a0067a8095704a5.zip
tcl-167c883c087ff89c46268d3b3a0067a8095704a5.tar.gz
tcl-167c883c087ff89c46268d3b3a0067a8095704a5.tar.bz2
Merge 8.6. Better solution for [e87000d842]
-rw-r--r--generic/tclIO.c2
-rw-r--r--generic/tclInt.h2
-rw-r--r--win/tclWinConsole.c11
3 files changed, 9 insertions, 6 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index f0d4c9e..7af6aa0 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -7711,7 +7711,7 @@ Tcl_BadChannelOption(
}
Tcl_ResetResult(interp);
errObj = Tcl_ObjPrintf("bad option \"%s\": should be one of ",
- optionName);
+ optionName ? optionName : "");
argc--;
for (i = 0; i < argc; i++) {
Tcl_AppendPrintfToObj(errObj, "-%s, ", argv[i]);
diff --git a/generic/tclInt.h b/generic/tclInt.h
index dcac9e8..3018d98 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -1734,7 +1734,7 @@ typedef struct Command {
#define CMD_COMPILES_EXPANDED 0x08
#define CMD_REDEF_IN_PROGRESS 0x10
#define CMD_VIA_RESOLVER 0x20
-#define CMD_DEAD 0x30
+#define CMD_DEAD 0x40
/*
diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c
index 8b1b2da..3b8753b 100644
--- a/win/tclWinConsole.c
+++ b/win/tclWinConsole.c
@@ -1527,11 +1527,14 @@ ConsoleSetOptionProc(
} else {
infoPtr->flags |= CONSOLE_RESET;
}
- } else if (len > 0) {
- return Tcl_BadChannelOption(interp, optionName,
- (infoPtr->flags & CONSOLE_READ_OPS) ? "inputmode" : "");
+ return TCL_OK;
+ }
+
+ if (infoPtr->flags & CONSOLE_READ_OPS) {
+ return Tcl_BadChannelOption(interp, optionName, "inputmode");
+ } else {
+ return Tcl_BadChannelOption(interp, optionName, "");
}
- return TCL_OK;
}
/*