gwion-util
utilities for the Gwion project
|
Go to the source code of this file.
Macros | |
#define | __APPEND(c) |
Enumerations | |
enum | _termcolor_internal_color { _termcolor_internal_color_BOLD = 1 << 1 , _termcolor_internal_color_FANT = 1 << 2 , _termcolor_internal_color_UNDR = 1 << 3 , _termcolor_internal_color_BLNK = 1 << 4 , _termcolor_internal_color_STRK = 1 << 5 , _termcolor_internal_color_ITLC = 1 << 6 } |
Functions | |
const char * | tcol_errorstr (const enum term_color_error_t err) |
bool | tcol_has_color (void) |
void | tcol_override_color_checks (bool enable_color) |
int | _termcolor_internal_lookup (const char color_name) |
int | _tcol_color_generate (char *dst, size_t dstn, size_t *len, int rep, int foreground, int background) |
int | tcol_color_parse (char *dst, size_t dstn, char color[16], size_t k, size_t *len) |
static int | tcol_fmt_parse (char *dst, size_t dstn, const char *src, size_t srcn) |
static int | tcol_vsnprintf (char *stream, size_t N, const char *fmt, va_list ap) |
static int | tcol_vfprintf (FILE *stream, const char *fmt, va_list ap) |
int | tcol_fprintf (FILE *stream, const char *fmt,...) |
int | tcol_printf (const char *fmt,...) |
int | tcol_snprintf (char *stream, size_t N, const char *fmt,...) |
Variables | |
static bool | use_color = true |
const char * | tcol_errorstrs [TERM_COLOR_ERROR_COUNT] |
#define __APPEND | ( | c | ) |
Enumerator | |
---|---|
_termcolor_internal_color_BOLD | |
_termcolor_internal_color_FANT | |
_termcolor_internal_color_UNDR | |
_termcolor_internal_color_BLNK | |
_termcolor_internal_color_STRK | |
_termcolor_internal_color_ITLC |
Definition at line 67 of file termcolor.c.
int _tcol_color_generate | ( | char * | dst, |
size_t | dstn, | ||
size_t * | len, | ||
int | rep, | ||
int | foreground, | ||
int | background ) |
Definition at line 76 of file termcolor.c.
int _termcolor_internal_lookup | ( | const char | color_name | ) |
Definition at line 44 of file termcolor.c.
int tcol_color_parse | ( | char * | dst, |
size_t | dstn, | ||
char | color[16], | ||
size_t | k, | ||
size_t * | len ) |
Definition at line 142 of file termcolor.c.
|
inline |
Definition at line 32 of file termcolor.c.
|
inlinestatic |
Definition at line 219 of file termcolor.c.
int tcol_fprintf | ( | FILE * | stream, |
const char * | fmt, | ||
... ) |
Definition at line 365 of file termcolor.c.
bool tcol_has_color | ( | void | ) |
Definition at line 36 of file termcolor.c.
void tcol_override_color_checks | ( | bool | enable_color | ) |
Definition at line 40 of file termcolor.c.
int tcol_printf | ( | const char * | fmt, |
... ) |
Definition at line 373 of file termcolor.c.
int tcol_snprintf | ( | char * | stream, |
size_t | N, | ||
const char * | fmt, | ||
... ) |
Definition at line 382 of file termcolor.c.
|
inlinestatic |
Definition at line 324 of file termcolor.c.
|
inlinestatic |
Definition at line 292 of file termcolor.c.
const char* tcol_errorstrs[TERM_COLOR_ERROR_COUNT] |
Definition at line 24 of file termcolor.c.
|
static |
Definition at line 22 of file termcolor.c.