? MainEx-HEAD.patch
? core.22683
? core.22705
Index: doc/Tcl_Main.3
===================================================================
RCS file: /cvsroot/tcl/tcl/doc/Tcl_Main.3,v
retrieving revision 1.20
diff -r1.20 Tcl_Main.3
8c8
< '\" 
---
> '\"
10c10
< '\" 
---
> '\"
21a22,23
> \fBTcl_MainEx\fR(\fIargc, argv, appInitProc, interp\fR)
> .sp
36a39,40
> .AP Tcl_Interp *interp in
> The main interpreter
56c60
< to developers of shell applications, so they do not have to 
---
> to developers of shell applications, so they do not have to
90a95,100
> \fBTcl_MainEx\fR takes as an additional parameter the main interpreter. So
> the caller may create variables or commands, before \fBTcl_Main\fR runs.
> \fBTcl_MainEx\fR and \fBTk_MainEx\fR are not interchangable, because
> \fBTk_MainEx\fR runs an event loop and \fBTcl_MainEx\fR does not.
> \fBTcl_MainEx\fR is also present in the stub library.
> .PP
110c120
< by \fIencodingPtr\fR, when that is not NULL.  
---
> by \fIencodingPtr\fR, when that is not NULL.
140c150
< commands.  The application initialization routine might also 
---
> commands.  The application initialization routine might also
Index: generic/tcl.decls
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.decls,v
retrieving revision 1.172
diff -r1.172 tcl.decls
2309a2310,2316
> 
> # Feature Request 1711975
> declare 627 generic {
>     void Tcl_MainEx (int argc, char **argv,
>          Tcl_AppInitProc *appInitProc, Tcl_Interp * interp)
> }
> 
Index: generic/tcl.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tcl.h,v
retrieving revision 1.302
diff -r1.302 tcl.h
2371a2372,2374
> EXTERN void Tcl_MainEx (int argc, char **argv,
>                         Tcl_AppInitProc *appInitProc, Tcl_Interp * interp);
> 
Index: generic/tclDecls.h
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclDecls.h,v
retrieving revision 1.174
diff -r1.174 tclDecls.h
3686a3687,3693
> #ifndef Tcl_MainEx_TCL_DECLARED
> #define Tcl_MainEx_TCL_DECLARED
> /* 627 */
> EXTERN void		Tcl_MainEx(int argc, char **argv,
> 				Tcl_AppInitProc *appInitProc,
> 				Tcl_Interp *interp);
> #endif
4348a4356
>     void (*tcl_MainEx) (int argc, char **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); /* 627 */
6886a6895,6898
> #ifndef Tcl_MainEx
> #define Tcl_MainEx \
> 	(tclStubsPtr->tcl_MainEx) /* 627 */
> #endif
Index: generic/tclMain.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclMain.c,v
retrieving revision 1.49
diff -r1.49 tclMain.c
229c229
<  * Tcl_Main --
---
>  * Tcl_MainEx --
231a232
>  *      It gets the main interp as an argument.
246c247
< Tcl_Main(
---
> Tcl_MainEx(
249c250,251
<     Tcl_AppInitProc *appInitProc)
---
>     Tcl_AppInitProc *appInitProc,
>     Tcl_Interp * interp)
260d261
<     Tcl_Interp *interp;
265,266d265
<     interp = Tcl_CreateInterp();
<     Tcl_InitMemory(interp);
611a611,647
> /*----------------------------------------------------------------------
>  *
>  * Tcl_Main --
>  *
>  *	Main program for tclsh and most other Tcl-based applications.
>  *
>  * Results:
>  *	None. This function never returns (it exits the process when it's
>  *	done).
>  *
>  * Side effects:
>  *	This function initializes the Tcl world and then starts interpreting
>  *	commands; almost anything could happen, depending on the script being
>  *	interpreted.
>  *
>  *----------------------------------------------------------------------
>  */
> 
> void
> Tcl_Main(
>     int argc,			/* Number of arguments. */
>     char **argv,		/* Array of argument strings. */
>     Tcl_AppInitProc *appInitProc)
> 				/* Application-specific initialization
> 				 * function to call after most initialization
> 				 * but before starting to execute commands. */
> {
> 
>     Tcl_Interp * interp = Tcl_CreateInterp();
> #ifdef TCL_MEM_DEBUG
>     Tcl_InitMemory(interp);
> #endif
>     Tcl_MainEx(argc, argv, appInitProc, interp);
> 
> }
> 
> 
Index: generic/tclStubInit.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclStubInit.c,v
retrieving revision 1.188
diff -r1.188 tclStubInit.c
1116a1117
>     Tcl_MainEx, /* 627 */
