diff options
author | stanton <stanton> | 1999-03-06 23:18:05 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-03-06 23:18:05 (GMT) |
commit | 6a6d3284e86e6e0e635cd678424fe6ecf3d68d44 (patch) | |
tree | e2a1a7dd648cbe52b0159309f5a9d9f8ebf56eac /generic | |
parent | 307d14f16b85ccfd297dd1009635376a88d9a74a (diff) | |
download | tk-6a6d3284e86e6e0e635cd678424fe6ecf3d68d44.zip tk-6a6d3284e86e6e0e635cd678424fe6ecf3d68d44.tar.gz tk-6a6d3284e86e6e0e635cd678424fe6ecf3d68d44.tar.bz2 |
stubbed out TkConsoleCreate and added a call to TkConsoleCreate_
in Tk_Main() so that Tk can be dynamically loaded
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkConsole.c | 16 | ||||
-rw-r--r-- | generic/tkMain.c | 4 |
2 files changed, 16 insertions, 4 deletions
diff --git a/generic/tkConsole.c b/generic/tkConsole.c index 0ff1479..6f89c48 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.3 1999/02/04 20:51:36 stanton Exp $ + * RCS: @(#) $Id: tkConsole.c,v 1.3.4.1 1999/03/06 23:18:05 stanton Exp $ */ #include "tk.h" @@ -36,6 +36,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 +80,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 +99,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", diff --git a/generic/tkMain.c b/generic/tkMain.c index ffd9d8b..abbcb7b 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMain.c,v 1.2.4.1 1999/03/06 23:07:51 stanton Exp $ + * RCS: @(#) $Id: tkMain.c,v 1.2.4.2 1999/03/06 23:18:05 stanton Exp $ */ #include <ctype.h> @@ -124,7 +124,7 @@ Tk_MainEx(argc, argv, appInitProc, interp) #if (defined(__WIN32__) || defined(MAC_TCL)) - TkConsoleCreate(); + TkConsoleCreate_(); #endif #ifdef TCL_MEM_DEBUG |