#include <tcl.h>
Tcl_AppInit(interp)
Tcl_AppInit is a procedure that is invoked by the main programs for Tcl applications such as tclsh and wish. Its purpose is to allow new Tcl applications to be created without modifying existing main programs such as those for tclsh and wish. To create a new application simply write a new version of Tcl_AppInit to replace the default version provided by Tcl, then link your new Tcl_AppInit with the Tcl library, which contains the main program from tclsh (be sure to specify the switch ``-u _main'' to the linker to force it to use the version of main from the Tcl library).
Tcl_AppInit is invoked after other initialization in main and before entering the main loop to process commands. Here are some examples of things that Tcl_AppInit might do: