Cthulhu  0.2.10
Cthulhu compiler collection
colour.c File Reference
#include "format/colour.h"
#include "base/panic.h"
#include "core/macros.h"
#include "std/str.h"
Include dependency graph for colour.c:

Go to the source code of this file.

Functions

STA_DECL const char * colour_get (const colour_pallete_t *colours, colour_t idx)
 get a colours string form from a pallete More...
 
STA_DECL const char * colour_reset (const colour_pallete_t *colours)
 get a reset string from a pallete More...
 
STA_DECL char * colour_text (format_context_t context, colour_t idx, const char *text)
 add colour to a string More...
 
STA_DECL char * colour_format (format_context_t context, colour_t idx, const char *fmt,...)
 
STA_DECL char * colour_vformat (format_context_t context, colour_t idx, const char *fmt, va_list args)
 format a string and add colour to it More...
 

Variables

const colour_pallete_t kColourNone
 a colour pallete that applies no colours More...
 
const colour_pallete_t kColourDefault
 a colour pallete that applies ANSI VT100 colours More...
 

Function Documentation

◆ colour_format()

STA_DECL char* colour_format ( format_context_t  context,
colour_t  idx,
const char *  fmt,
  ... 
)

Definition at line 65 of file colour.c.