45 #define ANSICOL_DEFINE( basic, rgb ) ( ( (basic) << 28 ) | (rgb) ) 53 #define ANSICOL_BASIC( ansicol ) ( (ansicol) >> 28 ) 61 #define ANSICOL_RGB( ansicol ) ( ( (ansicol) >> 0 ) & 0xffffffUL ) 69 #define ANSICOL_RED( ansicol ) ( ( (ansicol) >> 16 ) & 0xff ) 77 #define ANSICOL_GREEN( ansicol ) ( ( (ansicol) >> 8 ) & 0xff ) 85 #define ANSICOL_BLUE( ansicol ) ( ( (ansicol) >> 0 ) & 0xff ) 97 #define ANSICOL_DEFAULT( basic ) \ 98 ANSICOL_DEFINE ( ( ( (basic) == COLOR_NORMAL_BG ) ? \ 99 ANSICOL_MAGIC : (basic) ), \ 135 DBGC ( &
ansicols[0],
"ANSICOL redefined colour %d as basic %d RGB " #define ANSICOL_GREEN(ansicol)
Extract 24-bit RGB value green component from ANSI colour definition.
#define EINVAL
Invalid argument.
int printf(const char *fmt,...)
Write a formatted string to the console.
#define ANSICOL_RGB(ansicol)
Extract 24-bit RGB value from ANSI colour definition.
void ansicol_set(unsigned int colour, unsigned int which)
Set ANSI colour (using colour definitions)
#define ANSICOL_RED(ansicol)
Extract 24-bit RGB value red component from ANSI colour definition.
Display colour configuration.
#define CSI
Control Sequence Introducer.
#define colour
Colour for debug messages.
int ansicol_define(unsigned int colour, unsigned int basic, uint32_t rgb)
Define ANSI colour.
#define ANSICOL_BASIC(ansicol)
Extract basic colour from ANSI colour definition.
#define ANSICOL_BLUE(ansicol)
Extract 24-bit RGB value blue component from ANSI colour definition.
#define COLOUR_DEFAULT
Default colour (usually white foreground, black background)
void ansicol_set_magic_transparent(void)
Set magic colour to transparent.
static uint8_t ansicol_magic
Magic basic colour.
#define ANSICOL_NO_RGB
RGB value for "not defined".
static uint32_t ansicols[]
ANSI colour definitions.
void ansicol_reset_magic(void)
Reset magic colour.
#define ANSICOL_DEFINE(basic, rgb)
Construct ANSI colour definition.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define ANSICOL_DEFAULT(basic)
Construct default ANSI colour definition.