Commit 0127ef5a authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Added function set_text_color(FILE *fp, TextMode attr).

parent 1ded92b9
...@@ -42,6 +42,13 @@ set_text_color(FILE *fp, TextMode attr, TextColor fg) ...@@ -42,6 +42,13 @@ set_text_color(FILE *fp, TextMode attr, TextColor fg)
std::string color_str = color(fg, attr, NO_COLOR); std::string color_str = color(fg, attr, NO_COLOR);
fprintf(fp, "%s", color_str.c_str()); fprintf(fp, "%s", color_str.c_str());
} }
void
set_text_color(FILE *fp, TextMode attr)
{
set_text_color(fp, attr, NO_COLOR);
}
void void
set_text_color(FILE *fp, TextColor fg) set_text_color(FILE *fp, TextColor fg)
{ {
......
...@@ -56,6 +56,7 @@ extern int CDO_Color; ...@@ -56,6 +56,7 @@ extern int CDO_Color;
#define COLOR_STDERR (stderr_is_tty && CDO_Color) #define COLOR_STDERR (stderr_is_tty && CDO_Color)
void set_text_color(FILE *fp, TextMode attr, TextColor fg); void set_text_color(FILE *fp, TextMode attr, TextColor fg);
void set_text_color(FILE *fp, TextMode attr);
void set_text_color(FILE *fp, TextColor fg); void set_text_color(FILE *fp, TextColor fg);
void reset_text_color(FILE *fp); void reset_text_color(FILE *fp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment