[svn-commits] tilghman: branch 11 r377511 - in /branches/11: ./ main/xmldoc.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Dec 9 19:41:05 CST 2012


Author: tilghman
Date: Sun Dec  9 19:41:02 2012
New Revision: 377511

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377511
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
........

Merged revisions 377509 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 377510 from http://svn.asterisk.org/svn/asterisk/branches/10

Modified:
    branches/11/   (props changed)
    branches/11/main/xmldoc.c

Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.

Modified: branches/11/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/xmldoc.c?view=diff&rev=377511&r1=377510&r2=377511
==============================================================================
--- branches/11/main/xmldoc.c (original)
+++ branches/11/main/xmldoc.c Sun Dec  9 19:41:02 2012
@@ -358,7 +358,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 svn-commits mailing list