paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Macros | Functions
color.h File Reference

Exported functions from color.c. More...

Macros

#define COLOR_MAXLEN   24
 "\033[1;38;5;2xx;48;5;2xxm\0" is 23 bytes More...
 
#define COLOR_RESET   "\033[m"
 Switch back to normal colors. More...
 

Functions

void color_parse_or_die (const char *value, char *dst)
 Create an escape sequence for colored output. More...
 

Detailed Description

Exported functions from color.c.

Macro Definition Documentation

◆ COLOR_MAXLEN

#define COLOR_MAXLEN   24

"\033[1;38;5;2xx;48;5;2xxm\0" is 23 bytes

◆ COLOR_RESET

#define COLOR_RESET   "\033[m"

Switch back to normal colors.

Function Documentation

◆ color_parse_or_die()

void color_parse_or_die ( const char *  value,
char *  dst 
)

Create an escape sequence for colored output.

Parameters
valueHuman-readable color spec.
dstResult pointer for the escape sequence.

Format of value: [fg [bg]] [attr].

References COLOR_RESET, and para_isspace.

Referenced by daemon_set_log_color_or_die().