diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-09-06 10:15:07 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-09-06 10:15:07 (GMT) |
commit | 8e7161cdcd57f8a28cff6682062c6d766dcf2bac (patch) | |
tree | 021d5d0139bf0113cd5d866e244f4cc4c9da5f69 | |
parent | b42f4ce30d519270bf8cc236a5af815a63448e69 (diff) | |
parent | c14c0cb9b1f94390b3e110a359a5506c892cda44 (diff) | |
download | tcl-8e7161cdcd57f8a28cff6682062c6d766dcf2bac.zip tcl-8e7161cdcd57f8a28cff6682062c6d766dcf2bac.tar.gz tcl-8e7161cdcd57f8a28cff6682062c6d766dcf2bac.tar.bz2 |
[RFE 1711975]: Tcl_MainEx() (like Tk_MainEx())
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tcl.h | 6 | ||||
-rw-r--r-- | generic/tclDecls.h | 2 | ||||
-rw-r--r-- | generic/tclMain.c | 9 |
4 files changed, 15 insertions, 8 deletions
@@ -1,3 +1,9 @@ +2011-09-06 Jan Nijtmans <nijtmans@users.sf.net> + + * generic/tcl.h: [RFE 1711975]: Tcl_MainEx() (like Tk_MainEx()) + * generic/tclDecls.h + * generic/tclMain.c + 2011-09-02 Don Porter <dgp@users.sourceforge.net> * tests/http.test: Convert [testthread] use to Thread package use. diff --git a/generic/tcl.h b/generic/tcl.h index 54bfedc..177126a 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -2373,8 +2373,10 @@ const char * TclTomMathInitializeStubs(Tcl_Interp *interp, * Tcl_GetMemoryInfo is needed for AOLserver. [Bug 1868171] */ -EXTERN void Tcl_Main(int argc, char **argv, - Tcl_AppInitProc *appInitProc); +#define Tcl_Main(argc, argv, proc) Tcl_MainEx(argc, argv, proc, \ + (Tcl_FindExecutable(argv[0]), (Tcl_CreateInterp)())) +EXTERN void Tcl_MainEx(int argc, char **argv, + Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp, const char *version, int exact); #if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 1df7e14..1f7dfe6 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -3791,8 +3791,6 @@ extern const TclStubs *tclStubsPtr; # define Tcl_MainEx Tcl_MainExW EXTERN void Tcl_MainExW(int argc, wchar_t **argv, Tcl_AppInitProc *appInitProc, Tcl_Interp *interp); -# define Tcl_Main(argc, argv, proc) Tcl_MainExW(argc, argv, proc, \ - (Tcl_FindExecutable(argv[0]), (Tcl_CreateInterp)())) #endif #undef TCL_STORAGE_CLASS diff --git a/generic/tclMain.c b/generic/tclMain.c index 114d2c3..373e3f6 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -620,18 +620,19 @@ Tcl_MainEx( Tcl_Exit(exitCode); } -#ifndef UNICODE -void +#if (TCL_MAJOR_VERSION == 8) && !defined(UNICODE) +#undef Tcl_Main +extern DLLEXPORT void Tcl_Main( int argc, /* Number of arguments. */ - TCHAR **argv, /* Array of argument strings. */ + 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_FindExecutable(argv[0]); - Tcl_MainEx(argc, argv, appInitProc, Tcl_CreateInterp()); + Tcl_MainEx(argc, argv, appInitProc, Tcl_CreateInterp()); } #endif |