zig/lib
Ryan Liptak 337f09e932 Add File.getOrEnableAnsiEscapeSupport and use it
On Windows, the console mode flag `ENABLE_VIRTUAL_TERMINAL_PROCESSING` determines whether or not ANSI escape codes are parsed/acted on. On the newer Windows Terminal, this flag is set by default, but on the older Windows Console, it is not set by default, but *can* be enabled (since Windows 10 RS1 from June 2016).

The new `File.getOrEnableAnsiEscapeSupport` function will get the current status of ANSI escape code support, but will also attempt to enable `ENABLE_VIRTUAL_TERMINAL_PROCESSING` on Windows if necessary which will provide better/more consistent results for things like `std.Progress` and `std.io.tty`.

This type of change was not done previously due to a mistaken assumption (on my part) that the console mode would persist after the run of a program. However, it turns out that the console mode is always reset to the default for each program run in a console session.
2024-06-02 16:46:21 -07:00
..
compiler Replace YES_COLOR with CLICOLOR_FORCE 2024-06-02 17:35:34 -04:00
compiler_rt handle visionos target OS tag in the compiler 2024-05-09 15:04:15 +02:00
docs compiler: rework comptime pointer representation and access 2024-04-17 13:41:25 +01:00
include update C language headers to LLVM 18 2024-05-08 19:37:28 -07:00
init init: clarify .paths usage in build.zig.zon 2024-05-28 21:20:41 -04:00
libc mingw: support -municode 2024-03-27 10:05:57 +00:00
libcxx update libcxx and libcxxabi to llvm 18.1.6 2024-05-20 16:12:36 -04:00
libcxxabi update libcxx and libcxxabi to llvm 18.1.6 2024-05-20 16:12:36 -04:00
libunwind libunwind: update to LLVM 18 2024-05-08 19:37:29 -07:00
std Add File.getOrEnableAnsiEscapeSupport and use it 2024-06-02 16:46:21 -07:00
tsan tsan: update rtl files to LLVM 17.0.6 2024-01-10 01:00:37 -07:00
c.zig std.builtin: make link mode fields lowercase 2024-03-11 07:09:10 -07:00
compiler_rt.zig move libssp into libcompiler_rt 2023-11-10 13:12:10 -07:00
zig.h Revert "implement @expect builtin (#19658)" 2024-05-22 09:57:43 -07:00