From c79c9eb73fe262af2c00578169ea715ba9d74fab Mon Sep 17 00:00:00 2001 From: ccremers Date: Thu, 29 Dec 2005 11:03:18 +0000 Subject: [PATCH] - Added color output but forgot to add the sources files, fixed. - Note: ~ is not expanded in SCYTHERDIR because it is not handled by the shell; thus $HOME should be used. --- src/color.c | 32 ++++++++++++++++++++++++++++++++ src/color.h | 9 +++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/color.c create mode 100644 src/color.h diff --git a/src/color.c b/src/color.c new file mode 100644 index 0000000..7eca4cf --- /dev/null +++ b/src/color.c @@ -0,0 +1,32 @@ +/** @file color.c \brief Color output for terminals. + * + * Depends on the switches (to disable them with a --plain switch) + */ + +#include +#include +#include +#include "switches.h" + +char *empty = ""; +char *COLOR_Reset = ""; +char *COLOR_Red = ""; +char *COLOR_Green = ""; +char *COLOR_Bold = ""; + +void +colorInit (void) +{ + if (switches.plain) + { + COLOR_Reset = empty; + COLOR_Red = empty; + COLOR_Green = empty; + COLOR_Bold = empty; + } +} + +void +colorDone (void) +{ +} diff --git a/src/color.h b/src/color.h new file mode 100644 index 0000000..78bf7ae --- /dev/null +++ b/src/color.h @@ -0,0 +1,9 @@ +#ifndef COLOROUTPUT +#define COLOROUTPUT + +extern char *COLOR_Reset; +extern char *COLOR_Red; +extern char *COLOR_Green; +extern char *COLOR_Bold; + +#endif