summaryrefslogtreecommitdiffstats
path: root/generic/tkConsole.c
diff options
context:
space:
mode:
authordavidg <davidg@noemail.net>2000-07-18 02:31:05 (GMT)
committerdavidg <davidg@noemail.net>2000-07-18 02:31:05 (GMT)
commit10be6c511a0401606efb1596be3655900e23228c (patch)
tree74f77964208678e3df54373d4be5b7c5a49bffd1 /generic/tkConsole.c
parentc94991e980823154d3656adebf0c4c9f63f40419 (diff)
downloadtk-10be6c511a0401606efb1596be3655900e23228c.zip
tk-10be6c511a0401606efb1596be3655900e23228c.tar.gz
tk-10be6c511a0401606efb1596be3655900e23228c.tar.bz2
Just added comments about a Win2K OS bug with GetStdHandle(STD_OUTPUT_HANDLE).
No change was made to the code. FossilOrigin-Name: 35b6eded59a1c423b20fef91ef6667d94798abe8
Diffstat (limited to 'generic/tkConsole.c')
-rw-r--r--generic/tkConsole.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 5892df5..3e91f62 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.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: tkConsole.c,v 1.11 1999/11/19 22:00:03 hobbs Exp $
+ * RCS: @(#) $Id: tkConsole.c,v 1.12 2000/07/18 02:31:06 davidg Exp $
*/
#include "tk.h"
@@ -151,6 +151,23 @@ static int ShouldUseConsoleChannel(type)
if ((handle == INVALID_HANDLE_VALUE) || (handle == 0)) {
return 1;
}
+
+ /*
+ * Win2K BUG: GetStdHandle(STD_OUTPUT_HANDLE) can return what appears
+ * to be a valid handle. See TclpGetDefaultStdChannel() for this change
+ * implemented. We didn't change it here because GetFileType() [below]
+ * will catch this with FILE_TYPE_UNKNOWN and appropriately return a
+ * value of 1, anyways.
+ *
+ * char dummyBuff[1];
+ * DWORD dummyWritten;
+ *
+ * if ((type == TCL_STDOUT)
+ * && !WriteFile(handle, dummyBuff, 0, &dummyWritten, NULL)) {
+ * return 1;
+ * }
+ */
+
fileType = GetFileType(handle);
/*