4 // SWIG File for building new tclsh program
 
  10  * Revision 1.1  2002/04/29 19:56:57  RD
 
  11  * Since I have made several changes to SWIG over the years to accomodate
 
  12  * special cases and other things in wxPython, and since I plan on making
 
  13  * several more, I've decided to put the SWIG sources in wxPython's CVS
 
  14  * instead of relying on maintaining patches.  This effectivly becomes a
 
  15  * fork of an obsolete version of SWIG, :-( but since SWIG 1.3 still
 
  16  * doesn't have some things I rely on in 1.1, not to mention that my
 
  17  * custom patches would all have to be redone, I felt that this is the
 
  18  * easier road to take.
 
  20  * Revision 1.1.1.1  1999/02/28 02:00:56  beazley
 
  23  * Revision 1.1  1996/05/22 19:47:45  beazley
 
  31 This module provides the Tcl_AppInit() function needed to build a 
 
  32 new version of the tclsh executable.   This file should not be used
 
  33 when using dynamic loading.   To make an interface file work with
 
  34 both static and dynamic loading, put something like this in your
 
  45 /* A TCL_AppInit() function that lets you build a new copy
 
  48  * The macro SWIG_init contains the name of the initialization
 
  49  * function in the wrapper file.
 
  52 #ifndef SWIG_RcFileName
 
  53 char *SWIG_RcFileName = "~/.myapprc";
 
  58 extern int              MacintoshInit _ANSI_ARGS_((void));
 
  61 int Tcl_AppInit(Tcl_Interp *interp){
 
  63   if (Tcl_Init(interp) == TCL_ERROR) 
 
  66   /* Now initialize our functions */
 
  68   if (SWIG_init(interp) == TCL_ERROR)
 
  70 #if TCL_MAJOR_VERSION > 7 || TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION >= 5
 
  71    Tcl_SetVar(interp,"tcl_rcFileName",SWIG_RcFileName,TCL_GLOBAL_ONLY);
 
  73    tcl_RcFileName = SWIG_RcFileName;
 
  75 #ifdef SWIG_RcRsrcName
 
  76   Tcl_SetVar(interp,"tcl_rcRsrcName",SWIG_RcRsrcName,TCL_GLOBAL);
 
  82 #if TCL_MAJOR_VERSION > 7 || TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION >= 4
 
  83 int main(int argc, char **argv) {
 
  87     if (MacintoshInit()  != TCL_OK) {
 
  97   Tcl_Main(argc, argv, Tcl_AppInit);