Changeset 5629

Make the -n option to suppress colour/highlighting actually work

Comitted by:  mjagdis
Date:  Feb 10 2010 * 19:09 (about 1 year ago)

Affected files:

callweaver/trunk/corelib/console.c (unified diff)

r5625r5629
760760
761761 terminal_init();
762762
763 terminal_highlight(&level_attr[__CW_LOG_DEBUG].on, &level_attr[__CW_LOG_DEBUG].off, "fg=blue,bold");
764 terminal_highlight(&level_attr[__CW_LOG_NOTICE].on, &level_attr[__CW_LOG_NOTICE].off, "fg=green,bold");
765 terminal_highlight(&level_attr[__CW_LOG_WARNING].on, &level_attr[__CW_LOG_WARNING].off, "fg=yellow,bold");
766 terminal_highlight(&level_attr[__CW_LOG_ERROR].on, &level_attr[__CW_LOG_ERROR].off, "fg=red,bold");
763 if (!option_nocolor) {
764 terminal_highlight(&level_attr[__CW_LOG_DEBUG].on, &level_attr[__CW_LOG_DEBUG].off, "fg=blue,bold");
765 terminal_highlight(&level_attr[__CW_LOG_NOTICE].on, &level_attr[__CW_LOG_NOTICE].off, "fg=green,bold");
766 terminal_highlight(&level_attr[__CW_LOG_WARNING].on, &level_attr[__CW_LOG_WARNING].off, "fg=yellow,bold");
767 terminal_highlight(&level_attr[__CW_LOG_ERROR].on, &level_attr[__CW_LOG_ERROR].off, "fg=red,bold");
767768
768 terminal_highlight(&bold_on, &bold_off, "bold");
769 terminal_highlight(&bold_on, &bold_off, "bold");
770 }
769771
770772 terminal_set_icon("Callweaver");
771773