[asterisk-commits] tilghman: branch 1.8 r377509 - /branches/1.8/main/xmldoc.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Dec 9 19:38:56 CST 2012
Author: tilghman
Date: Sun Dec 9 19:38:52 2012
New Revision: 377509
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377509
Log:
Improve documentation by making all of the colors used readable,
no matter what the background color is.
Dark blue on a black background is unreadable, as is yellow on a
light background. This patch turns on the bright attribute for
colors when on a dark background and turns *off* the bright
attribute when the -W command line option is used (indicating a
_light_ background). This ensures that text is readable in both
cases.
Patch by: tilghman
Review: https://reviewboard.asterisk.org/r/2224
Modified:
branches/1.8/main/xmldoc.c
Modified: branches/1.8/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/main/xmldoc.c?view=diff&rev=377509&r1=377508&r2=377509
==============================================================================
--- branches/1.8/main/xmldoc.c (original)
+++ branches/1.8/main/xmldoc.c Sun Dec 9 19:38:52 2012
@@ -354,7 +354,13 @@
/* Setup color */
if (withcolors) {
- ast_term_color_code(&colorized, colorized_tags[c].colorfg, 0);
+ if (ast_opt_light_background) {
+ /* Turn off *bright* colors */
+ ast_term_color_code(&colorized, colorized_tags[c].colorfg & 0x7f, 0);
+ } else {
+ /* Turn on *bright* colors */
+ ast_term_color_code(&colorized, colorized_tags[c].colorfg | 0x80, 0);
+ }
if (!colorized) {
return NULL;
}
More information about the asterisk-commits
mailing list