- 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.
This commit is contained in:
ccremers 2005-12-29 11:03:18 +00:00
parent 515dec7f8b
commit c79c9eb73f
2 changed files with 41 additions and 0 deletions

32
src/color.c Normal file
View File

@ -0,0 +1,32 @@
/** @file color.c \brief Color output for terminals.
*
* Depends on the switches (to disable them with a --plain switch)
*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#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)
{
}

9
src/color.h Normal file
View File

@ -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