aboutsummaryrefslogtreecommitdiff
path: root/Lib/tcl/wish.i
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tcl/wish.i')
-rw-r--r--Lib/tcl/wish.i70
1 files changed, 16 insertions, 54 deletions
diff --git a/Lib/tcl/wish.i b/Lib/tcl/wish.i
index 260032a81..6969b2ac5 100644
--- a/Lib/tcl/wish.i
+++ b/Lib/tcl/wish.i
@@ -4,25 +4,20 @@
* SWIG File for making wish
* ----------------------------------------------------------------------------- */
-#ifdef AUTODOC
-%subsection "wish.i"
-%text %{
-This module provides the Tk_AppInit() function needed to build a
-new version of the wish executable. Like tclsh.i, this file should
-not be used with dynamic loading. To make an interface file work with
-both static and dynamic loading, put something like this in your
-interface file :
-
- #ifdef STATIC
- %include <wish.i>
- #endif
-
-A startup file may be specified by defining the symbol SWIG_RcFileName
-as follows (this should be included in a code-block) :
-
- #define SWIG_RcFileName "~/.mywishrc"
-%}
-#endif
+// This module provides the Tk_AppInit() function needed to build a
+// new version of the wish executable. Like tclsh.i, this file should
+// not be used with dynamic loading. To make an interface file work with
+// both static and dynamic loading, put something like this in your
+// interface file :
+//
+// #ifdef STATIC
+// %include <wish.i>
+// #endif
+//
+// A startup file may be specified by defining the symbol SWIG_RcFileName
+// as follows (this should be included in a code-block) :
+//
+// #define SWIG_RcFileName "~/.mywishrc"
%{
@@ -35,11 +30,6 @@ as follows (this should be included in a code-block) :
char *SWIG_RcFileName = "~/.wishrc";
#endif
-#ifdef MAC_TCL
-extern int MacintoshInit _ANSI_ARGS_((void));
-extern int SetupMainInterp _ANSI_ARGS_((Tcl_Interp *interp));
-#endif
-
/*
*----------------------------------------------------------------------
*
@@ -61,10 +51,9 @@ extern int SetupMainInterp _ANSI_ARGS_((Tcl_Interp *interp));
int Tcl_AppInit(Tcl_Interp *interp)
{
-#ifndef MAC_TCL
Tk_Window main;
main = Tk_MainWindow(interp);
-#endif
+
/*
* Call the init procedures for included packages. Each call should
* look like this:
@@ -93,10 +82,6 @@ int Tcl_AppInit(Tcl_Interp *interp)
return TCL_ERROR;
}
-#ifdef MAC_TCL
- SetupMainInterp(interp);
-#endif
-
/*
* Specify a user-specific startup file to invoke if the application
* is run interactively. Typically the startup file is "~/.apprc"
@@ -104,35 +89,12 @@ int Tcl_AppInit(Tcl_Interp *interp)
* then no user-specific startup file will be run under any conditions.
*/
-#if TCL_MAJOR_VERSION >= 8 || TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION >= 5
- Tcl_SetVar(interp, (char *) "tcl_rcFileName",SWIG_RcFileName,TCL_GLOBAL_ONLY);
-#else
- tcl_RcFileName = SWIG_RcFileName;
-#endif
-
-/* For Macintosh might also want this */
-
-#ifdef MAC_TCL
-#ifdef SWIG_RcRsrcName
- Tcl_SetVar(interp, (char *) "tcl_rcRsrcName",SWIG_RcRsrcName,TCL_GLOBAL_ONLY);
-#endif
-#endif
+ Tcl_SetVar(interp, (char *) "tcl_rcFileName",SWIG_RcFileName,TCL_GLOBAL_ONLY);
return TCL_OK;
}
#if TK_MAJOR_VERSION >= 4
int main(int argc, char **argv) {
-
-#ifdef MAC_TCL
- char *newArgv[2];
- if (MacintoshInit() != TCL_OK) {
- Tcl_Exit(1);
- }
- argc = 1;
- newArgv[0] = "Wish";
- newArgv[1] = NULL;
- argv = newArgv;
-#endif
Tk_Main(argc, argv, Tcl_AppInit);
return(0);
}