This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
[Patch] bug # 514 (cygwin console handling) - update
- From: Thomas Wolff <towo at computer dot org>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 14 Dec 2004 06:02:31 +0100
- Subject: [Patch] bug # 514 (cygwin console handling) - update
- Cc-to: Corinna Vinschen <vinschen@redhat.com>
This is an update of my "trivial patch" that fixes
http://sourceware.org/bugzilla/show_bug.cgi?id=514
> I guess the patch is pretty much ok and I'm inclined to let it pass
> under the trivial patch rule... iff you change it so that the #ifdef
> goes away. Which alternative seems more appropriate resp. which one
> results in the more readable output? It's the one we should choose
> (since any choice will result in complains anyway).
OK, I kept the alternative that was selected by #ifdef before.
It's the more consistent one anyway.
> And please shorten the ChangeLog entry to about one sentence.
OK.
Thanks a lot.
Thomas
2004-12-14 Thomas Wolff <towo@computer.org>
* fhandler_console.cc (get_win32_attr): Avoid inappropriate intensity
interchanging that used to render reverse output unreadable
when (non-reversed) text is bright.
See http://sourceware.org/bugzilla/show_bug.cgi?id=514
--- cygwin-1.5.12-1/winsup/cygwin/fhandler_console.cc 2004-11-30 12:47:46.000000000 +0100
+++ cygwin-1.5.12-1/winsup/cygwin/fhandler_console.cc.fix514.1 2004-12-14 14:13:43.725870000 +0100
@@ -924,11 +924,11 @@ fhandler_console::get_win32_attr ()
win_fg = (win_bg & BACKGROUND_RED ? FOREGROUND_RED : 0) |
(win_bg & BACKGROUND_GREEN ? FOREGROUND_GREEN : 0) |
(win_bg & BACKGROUND_BLUE ? FOREGROUND_BLUE : 0) |
- (win_fg & FOREGROUND_INTENSITY);
+ (win_bg & BACKGROUND_INTENSITY ? FOREGROUND_INTENSITY : 0);
win_bg = (save_fg & FOREGROUND_RED ? BACKGROUND_RED : 0) |
(save_fg & FOREGROUND_GREEN ? BACKGROUND_GREEN : 0) |
(save_fg & FOREGROUND_BLUE ? BACKGROUND_BLUE : 0) |
- (win_bg & BACKGROUND_INTENSITY);
+ (save_fg & FOREGROUND_INTENSITY ? BACKGROUND_INTENSITY : 0);
}
if (dev_state->underline)
win_fg = dev_state->underline_color;