Tcl Source Code

Check-in [224ba13ab4]
Login

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

Overview
Comment:In case of redirecting stderr to a file on Windows, append CRLF after Panic output.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | win-console-panic
Files: files | file ages | folders
SHA3-256: 224ba13ab4964affcf0470cf241d47e600df2f236980643807f4e4c579050efd
User & Date: jan.nijtmans 2018-03-15 23:01:00
Context
2018-05-11
09:42
TIP #425 implementation: Correct use of UTF-8 in Panic Callback (Windows only) check-in: e2d9683a48 user: jan.nijtmans tags: core-8-branch
2018-03-15
23:01
In case of redirecting stderr to a file on Windows, append CRLF after Panic output. Closed-Leaf check-in: 224ba13ab4 user: jan.nijtmans tags: win-console-panic
21:53
merge 8.7 check-in: a50f884700 user: jan.nijtmans tags: win-console-panic
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to win/tclWinPanic.c.

55
56
57
58
59
60
61
62

63
64
65
66
67
68
69

    if (IsDebuggerPresent()) {
	OutputDebugStringW(msgString);
    } else if (_isatty(2)) {
	WriteConsoleW(handle, msgString, wcslen(msgString), &dummy, 0);
    } else {
	buf[0] = 0xEF; buf[1] = 0xBB; buf[2] = 0xBF; /* UTF-8 bom */
	WriteFile(handle, buf, 3, &dummy, 0);

	FlushFileBuffers(handle);
    }
#   if defined(__GNUC__)
	__builtin_trap();
#   elif defined(_WIN64)
	__debugbreak();
#   elif defined(_MSC_VER)







|
>







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

    if (IsDebuggerPresent()) {
	OutputDebugStringW(msgString);
    } else if (_isatty(2)) {
	WriteConsoleW(handle, msgString, wcslen(msgString), &dummy, 0);
    } else {
	buf[0] = 0xEF; buf[1] = 0xBB; buf[2] = 0xBF; /* UTF-8 bom */
	WriteFile(handle, buf, strlen(buf), &dummy, 0);
	WriteFile(handle, "\n", 1, &dummy, 0);
	FlushFileBuffers(handle);
    }
#   if defined(__GNUC__)
	__builtin_trap();
#   elif defined(_WIN64)
	__debugbreak();
#   elif defined(_MSC_VER)