#include "attributes.h"
#include <stdarg.h>
#include <stdio.h>
Go to the source code of this file.
◆ BACKGROUND_BLACK
◆ BACKGROUND_BLUE
◆ BACKGROUND_CYAN
◆ BACKGROUND_GRAY
◆ BACKGROUND_GREEN
◆ BACKGROUND_MAGENTA
◆ BACKGROUND_RED
◆ BACKGROUND_WHITE
◆ BACKGROUND_YELLOW
◆ COLOR_CREATOR
#define COLOR_CREATOR |
( |
| NUM | ) |
|
Value:When supplied with the correct ANSI color code, this macro creates the escape code for the corresponding color.
For example:
#define COLOR_DEFAULT COLOR_CREATOR( "0" )
#define FOREGROUND_BLACK COLOR_CREATOR( GROUND_FORE COLORCODE_BLACK )
◆ COLOR_DEFAULT
◆ COLORCODE_BLACK
#define COLORCODE_BLACK "0" |
◆ COLORCODE_BLUE
#define COLORCODE_BLUE "4" |
◆ COLORCODE_CYAN
#define COLORCODE_CYAN "6" |
◆ COLORCODE_GREEN
#define COLORCODE_GREEN "2" |
◆ COLORCODE_MAGENTA
#define COLORCODE_MAGENTA "5" |
◆ COLORCODE_RED
#define COLORCODE_RED "1" |
◆ COLORCODE_WHITE
#define COLORCODE_WHITE "7" |
◆ COLORCODE_YELLOW
#define COLORCODE_YELLOW "3" |
◆ FOREGROUND_BLACK
◆ FOREGROUND_BLUE
◆ FOREGROUND_CYAN
◆ FOREGROUND_GRAY
◆ FOREGROUND_GREEN
◆ FOREGROUND_MAGENTA
◆ FOREGROUND_RED
◆ FOREGROUND_WHITE
◆ FOREGROUND_YELLOW
◆ GROUND_BACK
◆ GROUND_FORE
◆ PRINT_COLOR
Format string for printing colors
◆ PrintInColor()
Prints a formatted message (like fprintf) in the supplied color.
Since there exists no reliable way to retrieve the current terminal color, this function resets it to the default.
◆ SetTerminalColor()
LibraryDefined bool SetTerminalColor |
( |
FILE * | stream, |
|
|
const char * | Color ) |
|
inline |
Sets the terminal color to Color.
The string must be a valid color string (something like FOREGROUND_WHITE), otherwise this function is just a worse fprintf. (it only exists as an abstraction for fprintf)
◆ VPrintInColor()
LibraryDefined int VPrintInColor |
( |
FILE * | file, |
|
|
const char * | Color, |
|
|
const char * | format, |
|
|
va_list | vaList ) |
|
inline |