// $Header: /cvsroot/swig/SWIG/Lib/tcl/tclsh.i,v 1.3 2002/11/30 22:10:09 beazley Exp $
// SWIG File for building new tclsh program
This module provides the Tcl_AppInit() function needed to build a
new version of the tclsh executable. This file should not be used
when using dynamic loading. To make an interface file work with
both static and dynamic loading, put something like this in your
/* A TCL_AppInit() function that lets you build a new copy
* The macro SWIG_init contains the name of the initialization
* function in the wrapper file.
char *SWIG_RcFileName = "~/.myapprc";
extern int MacintoshInit _ANSI_ARGS_((void));
int Tcl_AppInit(Tcl_Interp *interp){
if (Tcl_Init(interp) == TCL_ERROR)
/* Now initialize our functions */
if (SWIG_init(interp) == TCL_ERROR)
#if TCL_MAJOR_VERSION > 7 || TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION >= 5
Tcl_SetVar(interp, (char *) "tcl_rcFileName",SWIG_RcFileName,TCL_GLOBAL_ONLY);
tcl_RcFileName = SWIG_RcFileName;
Tcl_SetVar(interp, (char *) "tcl_rcRsrcName",SWIG_RcRsrcName,TCL_GLOBAL);
#if TCL_MAJOR_VERSION > 7 || TCL_MAJOR_VERSION == 7 && TCL_MINOR_VERSION >= 4
int main(int argc, char **argv) {
if (MacintoshInit() != TCL_OK) {
Tcl_Main(argc, argv, Tcl_AppInit);