From cb7caf2afcd0ccb82b73a0de678b353e44e12a83 Mon Sep 17 00:00:00 2001 From: axel Date: Tue, 16 Jan 2007 03:51:44 +1000 Subject: Minor edits - add a few input checks, remove a few commented pieces of debug code, add a few brackets, etc. darcs-hash:20070115175144-ac50b-2045f2132156645222e6dde57487aa299a5316e2.gz --- output.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'output.c') diff --git a/output.c b/output.c index 94b2445c..59cedb80 100644 --- a/output.c +++ b/output.c @@ -153,6 +153,16 @@ void set_color( int c, int c2 ) int is_bold = 0; int is_underline = 0; + /* + Test if we have at least basic support for setting fonts, colors + and related bits - otherwise just give up... + */ + if( !exit_attribute_mode ) + { + return; + } + + is_bold |= (c&FISH_COLOR_BOLD)!=0; is_bold |= (c2&FISH_COLOR_BOLD)!=0; -- cgit v1.2.3