Tk Source Code

Check-in [d6652a45]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge 8.6
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d6652a4557e535f4a1dd2c376615adacf859039a8e39675ecec34d11ca31bd69
User & Date: jan.nijtmans 2019-06-20 12:40:31
Context
2019-06-20
13:52
Handle SVG string > 2G, when compiled with Tcl 9 headers. Make TCL_INDEX_NONE symbol usable in Tk, even when compiled against Tcl 8.6 headers. check-in: 305b9df3 user: jan.nijtmans tags: trunk
13:32
Merge trunk check-in: 9ee03939 user: jan.nijtmans tags: tip-548
12:40
Merge 8.6 check-in: d6652a45 user: jan.nijtmans tags: trunk
12:39
Don't use wcslen() in combination with Tcl_WinTCharToUtf(): Using -1 has the same effect already (it even was wrong in tkWinTest.c's previous commit, forgot to multiply with sizeof(WCHAR)). check-in: 85a33e2a user: jan.nijtmans tags: core-8-6-branch
2019-06-19
15:27
Merge 8.6. Code cleanup, possible because we know we are compiling in UNICODE mode on Windows. check-in: 61cdcacd user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to win/tkWinInit.c.

192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
	wsprintf(sBuffer, L"Error Code: %08lX", hrError);
    }

    if ((p = wcsrchr(lpBuffer, '\r')) != NULL) {
	*p = '\0';
    }

    Tcl_WinTCharToUtf(lpBuffer, wcslen(lpBuffer) * sizeof (WCHAR), &ds);
    errPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
    Tcl_DStringFree(&ds);

    if (lpBuffer != sBuffer) {
	LocalFree((HLOCAL)lpBuffer);
    }







|







192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
	wsprintf(sBuffer, L"Error Code: %08lX", hrError);
    }

    if ((p = wcsrchr(lpBuffer, '\r')) != NULL) {
	*p = '\0';
    }

    Tcl_WinTCharToUtf(lpBuffer, -1, &ds);
    errPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
    Tcl_DStringFree(&ds);

    if (lpBuffer != sBuffer) {
	LocalFree((HLOCAL)lpBuffer);
    }

Changes to win/tkWinTest.c.

173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
	} else {
	    sprintf(msgBuf, "unknown error: %ld", error);
	}
	msg = msgBuf;
    } else {
	char *msgPtr;

	Tcl_WinTCharToUtf(wMsgPtr, wcslen(wMsgPtr), &ds);
	LocalFree(wMsgPtr);

	msgPtr = Tcl_DStringValue(&ds);
	length = Tcl_DStringLength(&ds);

	/*
	 * Trim the trailing CR/LF from the system message.






|







173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
	} else {
	    sprintf(msgBuf, "unknown error: %ld", error);
	}
	msg = msgBuf;
    } else {
	char *msgPtr;

	Tcl_WinTCharToUtf(wMsgPtr, -1, &ds);
	LocalFree(wMsgPtr);

	msgPtr = Tcl_DStringValue(&ds);
	length = Tcl_DStringLength(&ds);

	/*
	 * Trim the trailing CR/LF from the system message.