5 #include <ctu_format_api.h> 
STA_DECL char * colour_format(format_context_t context, colour_t idx, const char *fmt,...)
 
#define CT_PUREFN
mark a function as pure, always returns the same value for the same arguments
 
#define STA_FIELD_STRING
annotate a field as being a null terminated string
 
#define IN_NOTNULL
annotate a parameter as not being null
 
#define STA_FORMAT_STRING
mark a function parameter as a printf format string
 
#define STA_RET_STRING
annotate the return value as a null terminated string
 
#define IN_DOMAIN(cmp, it)
annotate a parameter as being bounded by the expression of cmp and it
 
#define IN_STRING
annotate a parameter as being a null terminated string
 
STA_RET_STRING colour_t STA_FORMAT_STRING const char * fmt
 
STA_RET_STRING colour_t STA_FORMAT_STRING const char STA_RET_STRING CT_FORMAT_API char * colour_vformat(format_context_t context, colour_t idx, const char *fmt, va_list args)
format a string and add colour to it
 
STA_RET_STRING CT_PUREFN CT_FORMAT_API const char * colour_get(const colour_pallete_t *colours, colour_t idx)
get a colours string form from a pallete
 
CT_FORMAT_API const colour_pallete_t kColourNone
a colour pallete that applies no colours
 
STA_RET_STRING STA_PRINTF(3, 4) CT_FORMAT_API char *colour_format(format_context_t context
format a string and add colour to it
 
STA_RET_STRING colour_t idx
 
CT_FORMAT_API const colour_pallete_t kColourDefault
a colour pallete that applies ANSI VT100 colours
 
STA_RET_STRING CT_PUREFN CT_FORMAT_API const char * colour_reset(const colour_pallete_t *colours)
get a reset string from a pallete
 
STA_RET_STRING CT_FORMAT_API char * colour_text(format_context_t context, colour_t idx, const char *text)
add colour to a string
 
const char * colours[eColourCount]
 
STA_FIELD_STRING const char * reset
 
a formatting context when using colours
 
const colour_pallete_t * pallete