|
From: | Gisle Vanem |
Subject: | [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062: [PATCH] diff: add support for --color |
Date: | Thu, 12 Mar 2015 09:26:47 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1 |
Paul Eggert wrote:
+ fprintf (outfile, "\x1b[0m"); + fflush (outfile); + if (output_is_tty) + sigprocmask (SIG_SETMASK, &old_sigproc_set, NULL); No need to call fflush if output is not a tty.
And what support do GnuLib have for parsing ANSI-codes and showing colours on Windows? None I guess. But I've written a simple ANSI-color decoder elsewhere I could contribute. Or we could replace those "\x1b[0m" with calls to SetConsoleTextAttribute() instead. -- --gv
[Prev in Thread] | Current Thread | [Next in Thread] |