aboutsummaryrefslogtreecommitdiffhomepage
path: root/output.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2007-01-16 03:51:44 +1000
committerGravatar axel <axel@liljencrantz.se>2007-01-16 03:51:44 +1000
commitcb7caf2afcd0ccb82b73a0de678b353e44e12a83 (patch)
tree8a53c8f89c3e4e54b4fa705a386ad3f28f1f88af /output.c
parentc6ebb23f38218c561888cfb83a683c51affaa7e3 (diff)
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
Diffstat (limited to 'output.c')
-rw-r--r--output.c10
1 files changed, 10 insertions, 0 deletions
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;