Overview
| Artifact ID: | dee037b3b6c2d15960198693f261d40eb9d51bf8 |
|---|---|
| Ticket: | 1711975fffffffffffffffffffffffffffffffff
Tcl_MainEx() (like Tk_MainEx()) |
| User & Date: | fridolin on 2010-07-01 19:44:00 |
Changes
- icomment:
Where can I attach here a file? Here is an update for HEAD: ? MainEx-HEAD.patch 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.175 diff -r1.175 tcl.decls 2321a2322,2330 > > # Feature Request 1711975 > > declare 630 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.307 diff -r1.307 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.177 diff -r1.177 tclDecls.h 3705a3706,3712 > #ifndef Tcl_MainEx_TCL_DECLARED > #define Tcl_MainEx_TCL_DECLARED > /* 630 */ > EXTERN voidTcl_MainEx(int argc, char **argv, > Tcl_AppInitProc *appInitProc, > Tcl_Interp *interp); > #endif 4370a4378 > void (*tcl_MainEx) (int argc, char **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); /* 630 */ 6920a6929,6932 > #ifndef Tcl_MainEx > #define Tcl_MainEx \ > (tclStubsPtr->tcl_MainEx) /* 630 */ > #endif Index: generic/tclMain.c =================================================================== RCS file: /cvsroot/tcl/tcl/generic/tclMain.c,v retrieving revision 1.50 diff -r1.50 tclMain.c 226c226 < * Tcl_Main -- --- > * Tcl_MainEx -- 228a229 > * It gets the main interp as an argument. 243c244 < Tcl_Main( --- > Tcl_MainEx( 246c247,248 < Tcl_AppInitProc *appInitProc) --- > Tcl_AppInitProc *appInitProc, > Tcl_Interp * interp) 257d258 < Tcl_Interp *interp; 262,263d262 < interp = Tcl_CreateInterp(); < Tcl_InitMemory(interp); 608a608,644 > /*---------------------------------------------------------------------- > * > * 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.191 diff -r1.191 tclStubInit.c 1126a1127 > Tcl_MainEx, /* 630 */ - login: "fridolin"
- mimetype: "text/plain"
- username: "fridolin"