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