Import Tk 8.6.11
This commit is contained in:
@@ -25,15 +25,29 @@ int _CRT_glob = 0;
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#ifdef TK_TEST
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern Tcl_PackageInitProc Tktest_Init;
|
||||
#endif /* TK_TEST */
|
||||
|
||||
#if !defined(TCL_USE_STATIC_PACKAGES)
|
||||
# if TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6
|
||||
# define TCL_USE_STATIC_PACKAGES 1
|
||||
# else
|
||||
# define TCL_USE_STATIC_PACKAGES 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES
|
||||
extern Tcl_PackageInitProc Registry_Init;
|
||||
extern Tcl_PackageInitProc Dde_Init;
|
||||
extern Tcl_PackageInitProc Dde_SafeInit;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#ifdef TCL_BROKEN_MAINARGS
|
||||
static void setargv(int *argcPtr, TCHAR ***argvPtr);
|
||||
#endif
|
||||
@@ -54,7 +68,11 @@ static BOOL consoleRequired = TRUE;
|
||||
#define TK_LOCAL_APPINIT Tcl_AppInit
|
||||
#endif
|
||||
#ifndef MODULE_SCOPE
|
||||
# define MODULE_SCOPE extern
|
||||
# ifdef __cplusplus
|
||||
# define MODULE_SCOPE extern "C"
|
||||
# else
|
||||
# define MODULE_SCOPE extern
|
||||
# endif
|
||||
#endif
|
||||
MODULE_SCOPE int TK_LOCAL_APPINIT(Tcl_Interp *interp);
|
||||
|
||||
@@ -106,6 +124,10 @@ _tWinMain(
|
||||
TCHAR **argv;
|
||||
int argc;
|
||||
TCHAR *p;
|
||||
(void)hInstance;
|
||||
(void)hPrevInstance;
|
||||
(void)lpszCmdLine;
|
||||
(void)nCmdShow;
|
||||
|
||||
/*
|
||||
* Create the console channels and install them as the standard channels.
|
||||
@@ -196,12 +218,12 @@ Tcl_AppInit(
|
||||
if (Registry_Init(interp) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_StaticPackage(interp, "registry", Registry_Init, 0);
|
||||
Tcl_StaticPackage(interp, "Registry", Registry_Init, 0);
|
||||
|
||||
if (Dde_Init(interp) == TCL_ERROR) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
Tcl_StaticPackage(interp, "dde", Dde_Init, Dde_SafeInit);
|
||||
Tcl_StaticPackage(interp, "Dde", Dde_Init, Dde_SafeInit);
|
||||
#endif
|
||||
|
||||
#ifdef TK_TEST
|
||||
@@ -265,6 +287,7 @@ main(
|
||||
char **dummy)
|
||||
{
|
||||
TCHAR **argv;
|
||||
(void)dummy;
|
||||
#else
|
||||
int
|
||||
_tmain(
|
||||
@@ -364,7 +387,7 @@ setargv(
|
||||
#undef Tcl_Alloc
|
||||
#undef Tcl_DbCkalloc
|
||||
|
||||
argSpace = ckalloc(size * sizeof(char *)
|
||||
argSpace = (TCHAR *)ckalloc(size * sizeof(char *)
|
||||
+ (_tcslen(cmdLine) * sizeof(TCHAR)) + sizeof(TCHAR));
|
||||
argv = (TCHAR **) argSpace;
|
||||
argSpace += size * (sizeof(char *)/sizeof(TCHAR));
|
||||
|
||||
Reference in New Issue
Block a user