Re: [PATCH v2 3/3] pretty-print: Don't translate escape sequences to windows console API

2024-05-12 Thread LIU Hao
在 2024-05-10 01:02, Peter Damianov 写道: - if (GetConsoleMode (h, &mode)) -/* If it is a console, translate ANSI escape codes as needed. */ + if (GetConsoleMode (h, &mode) && !(mode & ENABLE_VIRTUAL_TERMINAL_PROCESSING)) +/* If it is a console, and doesn't support ANSI escape codes, tra

[PATCH v2 3/3] pretty-print: Don't translate escape sequences to windows console API

2024-05-09 Thread Peter Damianov
Modern versions of windows (after windows 10 v1511) support VT100 escape sequences, so translation for them is not necessary. The translation also mangles embedded warning documentation links. gcc/ChangeLog: * pretty-print.cc (mingw_ansi_fputs): Don't translate escape sequences if