[asterisk-commits] tilghman: trunk r377512 - in /trunk: ./ main/xmldoc.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Dec 9 19:41:54 CST 2012
Author: tilghman
Date: Sun Dec 9 19:41:50 2012
New Revision: 377512
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377512
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
........
Merged revisions 377511 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/main/xmldoc.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/xmldoc.c?view=diff&rev=377512&r1=377511&r2=377512
==============================================================================
--- trunk/main/xmldoc.c (original)
+++ trunk/main/xmldoc.c Sun Dec 9 19:41:50 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 asterisk-commits
mailing list