[asterisk-commits] tilghman: branch 10 r377510 - in /branches/10: ./ main/xmldoc.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Dec 9 19:40:00 CST 2012
Author: tilghman
Date: Sun Dec 9 19:39:58 2012
New Revision: 377510
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=377510
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
Modified:
branches/10/ (props changed)
branches/10/main/xmldoc.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/main/xmldoc.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/main/xmldoc.c?view=diff&rev=377510&r1=377509&r2=377510
==============================================================================
--- branches/10/main/xmldoc.c (original)
+++ branches/10/main/xmldoc.c Sun Dec 9 19:39:58 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