diff options
author | griffin <briang42@easystreet.net> | 2023-05-24 23:17:17 (GMT) |
---|---|---|
committer | griffin <briang42@easystreet.net> | 2023-05-24 23:17:17 (GMT) |
commit | ba261e8e87cd9fb904172ca5a43fadb8f163666a (patch) | |
tree | 07f644f0eb19d93b953c156179e27db3c292384f /win | |
parent | c3f8318a3f328bd39244bc8f88ed606848ec5b85 (diff) | |
parent | 231fd112f959c258117188b044681643f30129f1 (diff) | |
download | tcl-ba261e8e87cd9fb904172ca5a43fadb8f163666a.zip tcl-ba261e8e87cd9fb904172ca5a43fadb8f163666a.tar.gz tcl-ba261e8e87cd9fb904172ca5a43fadb8f163666a.tar.bz2 |
merge trunk
Diffstat (limited to 'win')
-rw-r--r-- | win/Makefile.in | 2 | ||||
-rw-r--r-- | win/makefile.vc | 2 | ||||
-rw-r--r-- | win/tclWinDde.c | 19 | ||||
-rw-r--r-- | win/tclWinThrd.c | 8 |
4 files changed, 17 insertions, 14 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index edfda72..2bde8b6 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -1010,7 +1010,7 @@ runtest: tcltest # `make shell SCRIPT=foo.tcl` shell: binaries @TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \ - $(WINE) ./$(TCLSH) $(SCRIPT) + $(WINE) ./$(TCLSH) -encoding utf-8 $(SCRIPT) # This target can be used to run tclsh inside either gdb or insight gdb: binaries diff --git a/win/makefile.vc b/win/makefile.vc index 4333a2a..ceb2903e 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -677,7 +677,7 @@ CHMFILE=$(HTMLDIR)\$(HTMLBASE).chm htmlhelp: chmsetup $(CHMFILE)
$(CHMFILE): $(DOCDIR)\*
- @$(TCLSH) $(TOOLSDIR)\tcltk-man2html.tcl "--htmldir=$(HTMLDIR)"
+ @$(TCLSH) -encoding utf-8 $(TOOLSDIR)\tcltk-man2html.tcl "--htmldir=$(HTMLDIR)"
@echo Compiling HTML help project
-"$(HHC)" <<$(HHPFILE) >NUL
[OPTIONS]
diff --git a/win/tclWinDde.c b/win/tclWinDde.c index 697aae6..3377bfa 100644 --- a/win/tclWinDde.c +++ b/win/tclWinDde.c @@ -313,12 +313,12 @@ DdeSetServerName( Tcl_Obj *handlerPtr) /* Name of the optional proc/command to handle * incoming Dde eval's */ { - int suffix, offset; + int suffix; RegisteredInterp *riPtr, *prevPtr; Tcl_DString dString; const WCHAR *actualName; Tcl_Obj *srvListPtr = NULL, **srvPtrPtr = NULL; - Tcl_Size n, srvCount = 0; + Tcl_Size n, srvCount = 0, offset; int lastSuffix, r = TCL_OK; ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -942,8 +942,8 @@ DdeServerProc( */ HSZPAIR *returnPtr; - int i; - int numItems; + Tcl_Size i; + DWORD numItems; for (i = 0, riPtr = tsdPtr->interpListPtr; riPtr != NULL; i++, riPtr = riPtr->nextPtr) { @@ -952,12 +952,15 @@ DdeServerProc( */ } - numItems = i; + if ((size_t)i >= UINT_MAX/sizeof(HSZPAIR)) { + return NULL; + } + numItems = (DWORD)i; ddeReturn = DdeCreateDataHandle(ddeInstance, NULL, - (numItems + 1) * sizeof(HSZPAIR), 0, 0, 0, 0); + (numItems + 1) * (DWORD)sizeof(HSZPAIR), 0, 0, 0, 0); returnPtr = (HSZPAIR *) DdeAccessData(ddeReturn, &dlen); len = dlen; - for (i = 0, riPtr = tsdPtr->interpListPtr; i < numItems; + for (i = 0, riPtr = tsdPtr->interpListPtr; i < (Tcl_Size)numItems; i++, riPtr = riPtr->nextPtr) { returnPtr[i].hszSvc = DdeCreateStringHandleW(ddeInstance, TCL_DDE_SERVICE_NAME, CP_WINUNICODE); @@ -1645,7 +1648,7 @@ DdeObjCmd( if ((tmp >= sizeof(WCHAR)) && !dataString[tmp / sizeof(WCHAR) - 1]) { - tmp -= sizeof(WCHAR); + tmp -= (DWORD)sizeof(WCHAR); } Tcl_DStringInit(&dsBuf); Tcl_WCharToUtfDString(dataString, tmp>>1, &dsBuf); diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c index ecc592b..c7f0ba7 100644 --- a/win/tclWinThrd.c +++ b/win/tclWinThrd.c @@ -204,7 +204,7 @@ TclpThreadCreate( Tcl_ThreadId *idPtr, /* Return, the ID of the thread. */ Tcl_ThreadCreateProc *proc, /* Main() function of the thread. */ void *clientData, /* The one argument to Main(). */ - size_t stackSize, /* Size of stack for the new thread. */ + TCL_HASH_TYPE stackSize, /* Size of stack for the new thread. */ int flags) /* Flags controlling behaviour of the new * thread. */ { @@ -223,11 +223,11 @@ TclpThreadCreate( */ #if defined(_MSC_VER) || defined(__MSVCRT__) - tHandle = (HANDLE) _beginthreadex(NULL, (unsigned) stackSize, + tHandle = (HANDLE) _beginthreadex(NULL, (unsigned)stackSize, (Tcl_ThreadCreateProc*) TclWinThreadStart, winThreadPtr, 0, (unsigned *)idPtr); #else - tHandle = CreateThread(NULL, (DWORD) stackSize, + tHandle = CreateThread(NULL, (DWORD)stackSize, TclWinThreadStart, winThreadPtr, 0, (LPDWORD)idPtr); #endif @@ -725,7 +725,7 @@ Tcl_ConditionWait( if (timePtr == NULL) { wtime = INFINITE; } else { - wtime = (DWORD)timePtr->sec * 1000 + (unsigned long)timePtr->usec / 1000; + wtime = (DWORD)timePtr->sec * 1000 + (DWORD)timePtr->usec / 1000; } /* |