From a6a5b552ece22737d04cdd92b05edacc0a3accf6 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Mon, 8 Jan 2018 10:04:18 -0800 Subject: Update a comment about Windows Console color support. Change-Id: I39171a3c95ca48a39fbbc90ceadb9b1436f2402c Reviewed-on: https://code.wireshark.org/review/25196 Reviewed-by: Michael Mann --- epan/print_stream.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'epan/print_stream.c') diff --git a/epan/print_stream.c b/epan/print_stream.c index 44ed34e0a3..f85c87dace 100644 --- a/epan/print_stream.c +++ b/epan/print_stream.c @@ -43,9 +43,16 @@ print_color_escape(FILE *fh, const color_t *fg, const color_t *bg) WORD win_fg_color = FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN; WORD win_bg_color = 0; - /* Windows seems to offer 1-bit color, so you can't set the red, green, or blue intensities, - * you can only set "{foreground, background} contains {red, green, blue}". - * So include red, green or blue if the numeric intensity is high enough + /* The classic Windows Console offers 1-bit color, so you can't set + * the red, green, or blue intensities, you can only set + * "{foreground, background} contains {red, green, blue}". So + * include red, green or blue if the numeric intensity is high + * enough. + * + * The console in Windows 10 builds 14931 and later supports SGR RGB + * sequences. We might want to print those instead depending on the + * version of Windows or just remove the SetConsoleTextAttribute + * calls and only print SGR sequences. */ if (fg) { if (((fg->red >> 8) & 0xff) >= 0x80) -- cgit v1.2.3