summaryrefslogtreecommitdiffstats
path: root/generic/tkConsole.c
diff options
context:
space:
mode:
authorstanton <stanton>1999-03-10 07:04:38 (GMT)
committerstanton <stanton>1999-03-10 07:04:38 (GMT)
commit50950accea8a4e877651105374865cb6f3f48d6e (patch)
treeb83515b886272ee3c61631f31cfe3fad937dc0a7 /generic/tkConsole.c
parentd6904011d50a34d15964b94db8d5e7010e081ffd (diff)
downloadtk-50950accea8a4e877651105374865cb6f3f48d6e.zip
tk-50950accea8a4e877651105374865cb6f3f48d6e.tar.gz
tk-50950accea8a4e877651105374865cb6f3f48d6e.tar.bz2
integrated stubs into 8.0 main branch
Diffstat (limited to 'generic/tkConsole.c')
-rw-r--r--generic/tkConsole.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c
index 0ff1479..810847e 100644
--- a/generic/tkConsole.c
+++ b/generic/tkConsole.c
@@ -10,10 +10,11 @@
* 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.3 1999/02/04 20:51:36 stanton Exp $
+ * RCS: @(#) $Id: tkConsole.c,v 1.4 1999/03/10 07:04:39 stanton Exp $
*/
#include "tk.h"
+#include "tkInt.h"
#include <string.h>
/*
@@ -36,6 +37,7 @@ static Tcl_Interp *gStdoutInterp = NULL;
*/
void TkConsoleCreate _ANSI_ARGS_((void));
+void TkConsoleCreate_ _ANSI_ARGS_((void));
int TkConsoleInit _ANSI_ARGS_((Tcl_Interp *interp));
void TkConsolePrint _ANSI_ARGS_((Tcl_Interp *interp,
int devId, char *buffer, long size));
@@ -79,7 +81,7 @@ static Tcl_ChannelType consoleChannelType = {
/*
*----------------------------------------------------------------------
*
- * TkConsoleCreate --
+ * TkConsoleCreate, TkConsoleCreate_ --
*
* Create the console channels and install them as the standard
* channels. All I/O will be discarded until TkConsoleInit is
@@ -98,6 +100,17 @@ static Tcl_ChannelType consoleChannelType = {
void
TkConsoleCreate()
{
+ /*
+ * This function is being disabled so we don't end up calling it
+ * twice. Once from WinMain() and once from Tk_Main(). The real
+ * function is now TkConsoleCreate_ and is only called from Tk_Main.
+ * All of is an ugly hack.
+ */
+}
+
+void
+TkConsoleCreate_()
+{
Tcl_Channel consoleChannel;
consoleChannel = Tcl_CreateChannel(&consoleChannelType, "console0",
@@ -155,6 +168,7 @@ TkConsoleInit(interp)
#endif
consoleInterp = Tcl_CreateInterp();
+
if (consoleInterp == NULL) {
goto error;
}