summaryrefslogtreecommitdiffstats
path: root/generic/tkConsole.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-05-25 01:31:05 (GMT)
committerstanton <stanton>1999-05-25 01:31:05 (GMT)
commitf08249eab8beae6de80ce931756fe797851ec13c (patch)
tree1ab6959cba7bcd1a7b6f261967f5ab3ff7400179 /generic/tkConsole.c
parenteb02b7f4b5f03cf0252e0733efdebf890095f57c (diff)
downloadtk-f08249eab8beae6de80ce931756fe797851ec13c.zip
tk-f08249eab8beae6de80ce931756fe797851ec13c.tar.gz
tk-f08249eab8beae6de80ce931756fe797851ec13c.tar.bz2
* generic/tkStubLib.c:
* generic/tkStubInit.c: * generic/tkIntXlibDecls.h: * generic/tkIntPlatDecls.h: * generic/tkIntDecls.h: * generic/tkInt.decls: * generic/tkConsole.c: Various changes to try to get the Mac builds working.
Diffstat (limited to 'generic/tkConsole.c')
-rw-r--r--generic/tkConsole.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index ed7bab8..5c43a12 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.6 1999/04/28 18:18:06 redman Exp $
+ * RCS: @(#) $Id: tkConsole.c,v 1.7 1999/05/25 01:31:05 stanton Exp $
*/
#include "tk.h"
@@ -127,9 +127,20 @@ Tk_InitConsoleChannels(interp)
/*
* check for STDIN, otherwise create it
+ *
+ * Don't do this check on the Mac, because it is hard to prevent
+ * callbacks from the SIOUX layer from opening stdout & stdin, but
+ * we don't want to use the SIOUX console. Since the console is not
+ * actually created till something is written to the channel, it is
+ * okay to just ignore it here.
+ *
+ * This is still a bit of a hack, however, and should be cleaned up
+ * when we have a better abstraction for the console.
*/
+#ifndef MAC_TCL
if (Tcl_GetStdChannel(TCL_STDIN) == NULL) {
+#endif
consoleChannel = Tcl_CreateChannel(&consoleChannelType, "console0",
(ClientData) TCL_STDIN, TCL_READABLE);
if (consoleChannel != NULL) {
@@ -141,13 +152,17 @@ Tk_InitConsoleChannels(interp)
"-encoding", "utf-8");
}
Tcl_SetStdChannel(consoleChannel, TCL_STDIN);
+#ifndef MAC_TCL
}
+#endif
/*
* check for STDOUT, otherwise create it
*/
+#ifndef MAC_TCL
if (Tcl_GetStdChannel(TCL_STDOUT) == NULL) {
+#endif
consoleChannel = Tcl_CreateChannel(&consoleChannelType, "console1",
(ClientData) TCL_STDOUT, TCL_WRITABLE);
if (consoleChannel != NULL) {
@@ -159,13 +174,17 @@ Tk_InitConsoleChannels(interp)
"-encoding", "utf-8");
}
Tcl_SetStdChannel(consoleChannel, TCL_STDOUT);
+#ifndef MAC_TCL
}
+#endif
/*
* check for STDERR, otherwise create it
*/
+#ifndef MAC_TCL
if (Tcl_GetStdChannel(TCL_STDERR) == NULL) {
+#endif
consoleChannel = Tcl_CreateChannel(&consoleChannelType, "console2",
(ClientData) TCL_STDERR, TCL_WRITABLE);
if (consoleChannel != NULL) {
@@ -177,7 +196,9 @@ Tk_InitConsoleChannels(interp)
"-encoding", "utf-8");
}
Tcl_SetStdChannel(consoleChannel, TCL_STDERR);
+#ifndef MAC_TCL
}
+#endif
}
Tcl_MutexUnlock(&consoleMutex);
}