|
gwion-util
utilities for the Gwion project
|
#include <stdbool.h>#include <stdio.h>Go to the source code of this file.
Enumerations | |
| enum | term_color_error_t { TermColorErrorNone = 0 , TermColorErrorAllocationFailed = 1 , TermColorErrorPrintingFailed = 2 , TermColorErrorInvalidColor = 3 , TermColorErrorUnterminatedColor = 4 , TERM_COLOR_ERROR_COUNT } |
Functions | |
| int | _tcol_color_generate (char *dst, size_t dstn, size_t *len, int rep, int foreground, int background) |
| const char * | tcol_errorstr (const enum term_color_error_t err) |
| int | tcol_color_parse (char *dst, size_t dstn, char color[16], size_t k, size_t *len) |
| void | tcol_override_color_checks (bool enable_color) |
| bool | tcol_has_color (void) |
| int | tcol_fprintf (FILE *stream, const char *fmt,...) |
| int | tcol_printf (const char *fmt,...) |
| int | tcol_snprintf (char *buffer, size_t N, const char *fmt,...) |
| enum term_color_error_t |
| Enumerator | |
|---|---|
| TermColorErrorNone | |
| TermColorErrorAllocationFailed | |
| TermColorErrorPrintingFailed | |
| TermColorErrorInvalidColor | |
| TermColorErrorUnterminatedColor | |
| TERM_COLOR_ERROR_COUNT | |
Definition at line 36 of file termcolor.h.
| 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 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.
| 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 * | buffer, |
| size_t | N, | ||
| const char * | fmt, | ||
| ... ) |
Definition at line 382 of file termcolor.c.