<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE TIP SYSTEM "http://www.tcl.tk/cgi-bin/tct/tip/tipxml.dtd">
<!-- Converted at Thu May 17 04:28:03 GMT 2012 -->
<!-- TIP AutoGenerator - written by Donal K. Fellows -->

<TIP number='338'>
<header><title>Embedder Access to Startup Scripts of *_Main()</title><author address="mailto:dgp@users.sf.net">Don Porter</author><status type='project' state='final' tclversion="8.6" vote='after'>$Revision: 1.4 $</status><history></history><created day='22' month='oct' year='2008' /><keyword>Tcl Tk tclsh wish</keyword></header>
<abstract>This TIP proposes to make public the routines that get and set the startup script file that <emph style="italic">Tcl_Main</emph> or <emph style="italic">Tk_Main</emph> evaluate in their non-interactive modes.</abstract>
<body><section title="Background">
<para>When support for the <emph style="bold">-encoding</emph> option was added to tclsh and wish <tipref type="text" tip="137"/>, two new internal routines were added to Tcl:</para>
<quote>Tcl_Obj *<emph style="bold">Tcl_GetStartupScript</emph>(const char **<emph style="italic">encodingNamePtr</emph>)</quote>
<quote>void <emph style="bold">Tcl_SetStartupScript</emph>(Tcl_Obj *<emph style="italic">pathPtr</emph>, const char *<emph style="italic">encodingName</emph>)</quote>
<para>These routines (or other weaker alternative internal routines) are used by both wish and Tclkit by way of the internal stubs table to manipulate the startup script for <emph style="italic">Tcl_Main</emph> or <emph style="italic">Tk_Main</emph> to evaluate.</para>
</section>
<section title="Rationale">
<para>The naming of these routines indicate they were always intended to be(come) public.</para>
<para>These are the last &quot;private&quot; Tcl routines used by Tk and wish. After implementation of this TIP, Tk can drop use of tclInt.h.</para>
</section>
<section title="Proposal">
<para>Make these routines public.</para>
</section>
<section title="Compatibility">
<para>There will need to be some care taken for existing users of these routines via the private stubs table. The ability to compile against Tcl 8.6 headers, yet run against a pre-8.6 stubs table will likely be lost.</para>
</section>
<section title="Copyright">
<para>This document has been placed in the public domain.</para>
</section>
</body></TIP>

