Mail Archives: cygwin-developers/1998/10/14/17:51:58
Hi Larry, hi all,
I have found the solution for the color problem in the
newer winsups, also the b20alpha-releases.
The newer winsups don't have an extra `linearize/de_linearize'
section for the class fhandler_console. This is really not
necessary, but unfortunately the console fhandler also forgets
its default colorizing, if it's `dup'ed. So, one extra line
of code clears the problem, the copying of member
`default_color' in case of method dup().
The second part of this diff is, erasing unnecessary but time
killing code in constructor of fhandler_console. 'Time killing',
because it's called very often.
Bye
Corinna
------ snip -------
*** fhandler_console.cc.orig Thu Oct 15 00:57:18 1998
--- fhandler_console.cc Thu Oct 15 00:54:27 1998
*************** fhandler_console::dup (fhandler_base *ch
*** 207,212 ****
--- 207,213 ----
fhc->set_output_handle (nh);
fhc->state_ = state_;
+ fhc->default_color = default_color;
return fhandler_base::dup (child);
}
*************** fhandler_console::fhandler_console (cons
*** 406,415 ****
set_cb (sizeof *this);
iflag_ = lflag_ = nargs_ = 0;
state_ = normal;
- if (fillin_info ())
- default_color = info.wAttributes;
- else
- default_color = FOREGROUND_BLUE | FOREGROUND_GREEN |
FOREGROUND_RED;
}
/*
--- 407,412 ----
- Raw text -