pretty-print.c [_WIN32] (colorize_init): Remove.
authorLiu Hao <lh_mouse@126.com>
Wed, 11 Oct 2017 13:34:44 +0000 (13:34 +0000)
committerJonathan Yong <jyong@gcc.gnu.org>
Wed, 11 Oct 2017 13:34:44 +0000 (13:34 +0000)
commitdb0d1bae4a36e255bdf676e5030294c27e4b6c86
tree026c4bf2491704e6d768ff840a022533a7d45e3e
parent85866209d4b1819c1a99071c980a42f4db35d104
pretty-print.c [_WIN32] (colorize_init): Remove.

2017-10-11  Liu Hao  <lh_mouse@126.com>

* pretty-print.c [_WIN32] (colorize_init): Remove.  Use
the generic version below instead.
(should_colorize): Recognize Windows consoles as terminals
for MinGW targets.
* pretty-print.c [__MINGW32__] (write_all): New function.
[__MINGW32__] (find_esc_head): Likewise.
[__MINGW32__] (find_esc_terminator): Likewise.
[__MINGW32__] (eat_esc_sequence): Likewise.
[__MINGW32__] (mingw_ansi_fputs): New function that handles
ANSI escape codes.
(pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
for MinGW targets.

From-SVN: r253645
gcc/ChangeLog
gcc/diagnostic-color.c
gcc/pretty-print.c